.bbs-app {
  max-width: 560px;
  margin: 16px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f8fafc;
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  color: #1e293b;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
}
.bbs-app * {
  box-sizing: border-box;
}
.bbs-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 8px;
}
.bbs-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.bbs-tab-btn {
  padding: 12px 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  line-height: 1.2;
}
.bbs-tab-btn:hover {
  border-color: #94a3b8;
}
.bbs-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28);
}
.bbs-dir-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #e2e8f0;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.bbs-dir-toggle button {
  padding: 10px 8px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  line-height: 1.25;
  transition: all 0.15s ease;
}
.bbs-dir-toggle button.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.bbs-select-wrap {
  margin-bottom: 12px;
  position: relative;
}
.bbs-stop-search {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #ffffff;
  color: #0f172a;
}
.bbs-select {
  width: 100%;
  padding: 13px 12px;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  background-color: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
}
.bbs-select:focus, .bbs-stop-search:focus {
  outline: none;
  border-color: #2563eb;
}
.bbs-filter-bar {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f1f5f9;
  border-radius: 10px;
}
.bbs-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.bbs-checkbox input {
  width: 17px;
  height: 17px;
  margin: 0;
  cursor: pointer;
}
.bbs-next-banner {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}
.bbs-next-banner.has-next {
  display: block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.bbs-next-banner.no-next {
  display: block;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.bbs-times-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bbs-time-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s;
  overflow: hidden;
}
.bbs-time-card.past {
  opacity: 0.48;
  background: #f8fafc;
}
.bbs-time-card.next {
  border: 2px solid #22c55e;
  background: #f0fdf4;
}
.bbs-time-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
}
.bbs-time-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.bbs-time-value {
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.bbs-trip-hint {
  font-size: 11px;
  color: #64748b;
  text-decoration: underline dotted;
}
.bbs-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}
.bbs-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.badge-road { background: #e0f2fe; color: #0369a1; }
.badge-lenina { background: #f3e8ff; color: #7e22ce; }
.badge-workdays { background: #fef3c7; color: #b45309; }
.badge-short { background: #fee2e2; color: #b91c1c; }
.badge-train { background: #e0e7ff; color: #4338ca; }

.bbs-trip-details {
  display: none;
  padding: 10px 14px 12px 14px;
  border-top: 1px dashed #e2e8f0;
  background: #f8fafc;
  font-size: 12px;
}
.bbs-time-card.open .bbs-trip-details {
  display: block;
}
.bbs-trip-stops-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.bbs-trip-stop-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 6px;
  border-radius: 4px;
}
.bbs-trip-stop-row.current-stop {
  background: #dbeafe;
  font-weight: 700;
  color: #1e40af;
}
.bbs-empty {
  text-align: center;
  padding: 24px 12px;
  color: #64748b;
  font-size: 14px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}
.bbs-legend {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}