/* Base Theme: UI/UX Pro Max Bright Crystal Light Theme (全頁明亮冰晶風) */
:root {
  --bg-primary: linear-gradient(135deg, #f8fafc 0%, #edf2f7 50%, #e2e8f0 100%);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(148, 163, 184, 0.4);
  --glass-border-soft: rgba(203, 213, 225, 0.5);
  --glass-glow: 0 10px 28px rgba(148, 163, 184, 0.22);
  --font-title: "Outfit", "Noto Sans TC", -apple-system, sans-serif;
  --font-body: "Noto Sans TC", "Outfit", -apple-system, sans-serif;

  --color-text-primary: #0f172a;
  --color-text-secondary: #334155;
  --color-text-dim: #64748b;

  --mtr-line-color: #dc2626;
  --kmb-brand-color: #e11d48;
  --lwb-brand-color: #ea580c;
  --gmb-brand-color: #059669;
  --success-color: #059669;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --info-color: #2563eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--color-text-primary);
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

.dashboard-container {
  width: 100vw;
  height: 100vh;
  padding: 0.8rem 1.2rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: hidden;
}

.dashboard-header {
  min-height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  box-shadow: var(--glass-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.1rem;
  padding: 0.6rem 1.2rem;
  flex-shrink: 0;
}

.header-logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.logo-icon {
  background: transparent;
  border: none;
  width: auto;
  height: 3.2rem;
  max-height: 3.2rem;
  padding: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  flex-shrink: 0;
  position: relative;
}

.brand-logo-img {
  height: auto;
  max-height: 2.8rem;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.logo-divider {
  width: 1px;
  height: 2.0rem;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 0.4rem;
}

.tloft-logo-box {
  background: transparent;
  border: none;
  height: 3.2rem;
  max-height: 3.2rem;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tloft-logo-img {
  height: auto;
  max-height: 2.8rem;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  border-radius: 0.5rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.logo-icon::after {
  display: none;
}

@keyframes pulse-live {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.title-text {
  min-width: 0;
}

.title-text h1 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-text .sub-title {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  font-weight: 600;
}

/* Header Weather Widget */
.header-weather-widget {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.6);
  border-radius: 0.85rem;
  padding: 0.4rem 1.2rem;
  min-width: 0;
  flex: 1;
  max-width: 55%;
  justify-content: space-between;
}

.header-weather-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.weather-icon-wrapper {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.6);
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0.2rem;
  overflow: hidden;
}

.hko-weather-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.header-weather-temp-group {
  display: flex;
  flex-direction: column;
}

.temp-location-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  padding: 0.1rem 0.45rem;
  border-radius: 0.35rem;
  align-self: flex-start;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.temp-display {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.humidity-display {
  margin-top: 0.15rem;
  font-size: 0.76rem;
  color: var(--color-text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.header-weather-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
}

.weather-desc {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-align: right;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Header Clock Widget */
.header-clock-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.6);
  padding: 0.4rem 0.95rem;
  border-radius: 0.85rem;
}

.clock-date {
  font-size: 0.74rem;
  color: #475569;
  font-weight: 700;
  margin-bottom: 0.1rem;
  letter-spacing: 0.02em;
}

.current-time {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1;
}

.warnings-icons-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.warning-icon-item {
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.2rem;
}

.warning-icon-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.warning-icon-empty {
  font-size: 0.72rem;
  font-weight: 700;
  color: #065f46;
  white-space: nowrap;
}

.header-clock-date {
  text-align: right;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.date-display {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.clock-display {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.02em;
  line-height: 1;
}

.dashboard-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 0.52fr 1.22fr 1.08fr;
  grid-template-rows: 1fr auto;
  gap: 0.7rem 0.8rem;
  min-height: 0;
}

.grid-column {
  border-radius: 1.1rem;
  display: flex;
  flex-direction: column;
  padding: 1.1rem;
  min-height: 0;
}

.hospital-column {
  grid-column: 1;
  grid-row: 1;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  min-height: 0;
}

.left-column {
  grid-column: 2;
  grid-row: 1;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  gap: 0.65rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.right-column.tv-column {
  grid-column: 3;
  grid-row: 1 / span 2;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sub-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-glow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 1rem;
  padding: 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
}

.mtr-section,
.bus-section {
  flex: 1 1 0;
  min-height: 0;
}

.hospital-section {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.55rem 0.75rem;
}

.hospital-brand-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.hospital-badge {
  color: #991b1b;
  border-color: #fca5a5;
}

.hospital-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  justify-content: space-between;
  min-height: 0;
}

.hospital-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(203, 213, 225, 0.7);
  border-radius: 0.75rem;
  padding: 0.45rem 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.25rem;
  box-shadow: 0 4px 14px rgba(148, 163, 184, 0.16);
  transition: border-color 0.2s ease, transform 0.2s ease;
  min-height: 0;
}

.hospital-card:hover {
  border-color: rgba(148, 163, 184, 0.9);
  transform: translateY(-1px);
}

.hospital-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
  padding-bottom: 0.2rem;
}

.hospital-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  justify-content: space-between;
}

.hospital-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.hospital-area-tag {
  font-size: 0.66rem;
  font-weight: 700;
  color: #334155;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  padding: 0.06rem 0.38rem;
  border-radius: 0.3rem;
  white-space: nowrap;
}

.hospital-card-mid {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.45rem;
  padding: 0.22rem 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat3-label {
  font-size: 0.68rem;
  color: #475569;
  font-weight: 600;
}

.cat3-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1d4ed8;
}

.hospital-card-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  padding: 0.25rem 0.35rem;
}

.hospital-wait-label {
  font-size: 0.64rem;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hospital-wait-pill {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 900;
  padding: 0.15rem 0.5rem;
  border-radius: 0.45rem;
  white-space: nowrap;
  letter-spacing: 0.02em;
  width: 100%;
  text-align: center;
}

.hospital-wait-pill.wait-green {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  box-shadow: none;
}

.hospital-wait-pill.wait-amber {
  background: #fef3c7;
  border: 1px solid #fde047;
  color: #92400e;
  box-shadow: none;
}

.hospital-wait-pill.wait-red {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  box-shadow: none;
}

.hospital-wait-sub {
  font-size: 0.66rem;
  color: var(--color-text-dim);
  font-weight: 600;
}

.tv-section {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  justify-content: space-between;
}

.tv-brand-icon {
  color: #ef4444;
}

.tv-live-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 10px #ef4444;
  animation: pulse-live 1.2s infinite;
}

.tv-player-wrapper {
  flex: 1;
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0.85rem;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f8fafc;
  border: 1.5px solid rgba(203, 213, 225, 0.7);
  box-shadow: inset 0 0 12px rgba(148, 163, 184, 0.15);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.4rem;
}

.pdf-document-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(148, 163, 184, 0.25);
  display: block;
}

.tv-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.65rem;
}

.tv-official-link {
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  transition: all 0.2s ease;
}

.tv-official-link:hover {
  background: #bfdbfe;
  color: #1e3a8a;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--glass-border-soft);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.column-title h2 {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.column-title .en-sub {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.column-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mtr-brand-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.bus-brand-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.gmb-brand-icon {
  background: #d1fae5;
  color: #065f46;
}

.alert-brand-icon {
  background: #fef3c7;
  color: #92400e;
}

.station-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

.mtr-badge {
  color: #991b1b;
  border-color: #fca5a5;
}

.bus-badge {
  color: #1e3a8a;
  border-color: #93c5fd;
}

.gmb-badge {
  color: #065f46;
  border-color: #6ee7b7;
}

.column-content {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

#mtr-departures-list,
#bus-departures-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}

.mtr-route-group {
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(203, 213, 225, 0.7);
  border-left: 5px solid var(--mtr-line-color);
  box-shadow: 0 4px 14px rgba(148, 163, 184, 0.16);
  border-radius: 0.85rem;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
}

.mtr-route-group:hover {
  border-color: rgba(148, 163, 184, 0.9);
  transform: translateY(-1px);
}

.mtr-route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
  padding-bottom: 0.35rem;
}

.mtr-dest-box {
  display: flex;
  flex-direction: column;
}

.mtr-dest-tc {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.mtr-dest-en {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
}

.column-content::-webkit-scrollbar {
  display: none;
}

.column-footer {
  padding-top: 0.65rem;
  border-top: 1px solid var(--glass-border-soft);
  margin-top: 0.65rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  color: var(--color-text-dim);
  flex-shrink: 0;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.mtr-status-card {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.status-indicator {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
}

.status-indicator.normal {
  background: var(--success-color);
  box-shadow: 0 0 8px var(--success-color);
}

.status-indicator.alert {
  background: var(--danger-color);
  box-shadow: 0 0 8px var(--danger-color);
}

.status-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: #065f46;
  white-space: nowrap;
}

.departure-item,
.bus-route-group,
.traffic-item {
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(203, 213, 225, 0.7);
  box-shadow: 0 4px 14px rgba(148, 163, 184, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.departure-item:hover,
.bus-route-group:hover {
  border-color: rgba(148, 163, 184, 0.9);
  transform: translateY(-1px);
}

.departure-item {
  border-left: 5px solid var(--mtr-line-color);
  border-radius: 0.8rem;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.departure-route-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.departure-dest {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.departure-dest-en {
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
}

.departure-platform-eta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.platform-badge {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  padding: 0.25rem 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.78rem;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
}


.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
}

.service-tag.tag-last {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  box-shadow: none;
}

.service-tag.tag-first {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  box-shadow: none;
}

.eta-time-value {
  font-family: var(--font-title);
  text-align: right;
  display: flex;
  flex-direction: column;
}

.eta-number {
  font-size: 2.1rem;
  font-weight: 800;
  color: #059669;
  line-height: 0.95;
  text-shadow: none;
}

.eta-number.soon {
  color: #b45309;
  text-shadow: none;
}

.eta-number.departing {
  color: #b91c1c;
  font-size: 1.5rem;
  text-shadow: none;
}

.eta-unit {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: 0.1rem;
  font-weight: 600;
}

.bus-route-group {
  border-radius: 0.85rem;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
}

.bus-route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
  padding-bottom: 0.35rem;
}

.bus-route-badge {
  font-size: 1.1rem;
  font-weight: 900;
  padding: 0.18rem 0.55rem;
  border-radius: 0.5rem;
  font-family: var(--font-title);
  min-width: 3.8rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.bus-route-badge.mtrbus {
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  color: white;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.35);
}

.bus-destination {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  flex-grow: 1;
  margin-left: 0.35rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bus-destination-en {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
}

.bus-eta-predictions {
  display: flex;
  gap: 0.35rem;
  flex: 1;
  align-items: stretch;
  min-width: 0;
  margin-top: 0.35rem;
}

.bus-eta-item {
  flex: 1;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.6rem;
  padding: 0.5rem 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.bus-eta-number {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 900;
  color: #1d4ed8;
  text-shadow: none;
  white-space: nowrap;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
}

.bus-eta-unit {
  font-size: 0.8rem;
  margin-left: 0.12rem;
  font-weight: 800;
  opacity: 1;
  color: #1e3a8a;
}

.bus-eta-number.soon {
  color: #b45309;
  text-shadow: none;
}

.bus-eta-number.departing {
  color: #b91c1c;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: none;
  white-space: nowrap;
  padding: 0.15rem 0;
}

.bus-eta-label {
  font-size: 0.82rem;
  color: #334155;
  margin-top: 0.22rem;
  text-align: center;
  font-weight: 800;
  white-space: nowrap;
}

.bus-no-service {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  text-align: center;
  padding: 0.3rem;
  width: 100%;
}

.traffic-news-content {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.traffic-news-content::-webkit-scrollbar {
  display: none;
}

.traffic-item {
  border-radius: 0.7rem;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
}

.traffic-time {
  font-size: 0.64rem;
  color: var(--color-text-secondary);
  font-family: var(--font-title);
}

.traffic-text {
  font-size: 0.79rem;
  line-height: 1.45;
  color: #334155;
}

.no-traffic-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  background: #f0fdf4;
  border: 1px dashed #86efac;
  border-radius: 0.7rem;
  padding: 1rem;
}

.loading-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 2rem 0;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  flex: 1;
}

.spinner {
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid rgba(203, 213, 225, 0.5);
  border-radius: 50%;
  border-top-color: var(--info-color);
  animation: spin 1s ease-in-out infinite;
}

.dashboard-footer-tickers {
  grid-column: 1 / span 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Traffic Ticker Footer Carousel */
.traffic-ticker-footer {
  height: 2.6rem;
  background: var(--glass-bg);
  border: 1.5px solid rgba(203, 213, 225, 0.6);
  box-shadow: 0 4px 14px rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.traffic-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(217, 119, 6, 0.4);
}

.traffic-dot {
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: pulse-live 1.5s infinite;
}

.traffic-ticker-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.traffic-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
}

.traffic-ticker-track.scroll-mode {
  animation: traffic-marquee 600s linear infinite;
}

.traffic-ticker-track.static-mode {
  animation: none;
  width: 100%;
}

.traffic-ticker-wrapper:hover .traffic-ticker-track {
  animation-play-state: paused;
}

@keyframes traffic-marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.traffic-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.traffic-ticker-time {
  background: #fef3c7;
  border: 1px solid #fde047;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 0.35rem;
  font-family: var(--font-title);
}

.traffic-ticker-text {
  color: #854d0e;
  letter-spacing: 0.01em;
  font-weight: 700;
}

.traffic-divider {
  color: #94a3b8;
  margin: 0 0.8rem;
  font-weight: bold;
}

.traffic-loading {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* RTHK Ticker Footer Carousel */
.rthk-ticker-footer {
  height: 2.8rem;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  box-shadow: var(--glass-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.rthk-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.4);
}

.rthk-dot {
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: pulse-live 1.5s infinite;
}

.rthk-ticker-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.rthk-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
  animation: rthk-marquee 216s linear infinite;
}

.rthk-ticker-wrapper:hover .rthk-ticker-track {
  animation-play-state: paused;
}

@keyframes rthk-marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.rthk-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.rthk-item-num {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 800;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rthk-item-time {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.1rem 0.42rem;
  border-radius: 0.35rem;
  font-family: var(--font-title);
}

.rthk-divider {
  color: #94a3b8;
  margin: 0 0.8rem;
  font-weight: bold;
}

.rthk-loading {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

@media (max-width: 1120px) {
  body {
    overflow: auto;
  }

  .dashboard-container {
    height: auto;
    max-height: none;
  }

  .dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .hospital-column,
  .left-column,
  .right-column.tv-column,
  .dashboard-footer-tickers {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }

  .tv-player-wrapper {
    aspect-ratio: 210 / 297;
    height: auto;
  }

  .header-warning-banner {
    max-width: 100%;
  }

  .warning-banner-head {
    max-width: 100%;
  }
}
