/* =========================================================
   Building Digital Signage - Multi-Zone Dashboard CSS
   Perfect Responsive Proportions for 1080p, 720p & Auto
   100% Zero Overflow, Touch-Friendly, Glassmorphism & Themes
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;600;700;800;900&family=Rubik:wght@400;500;700;900&display=swap');

:root {
  --font-primary: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --bg-color: #070a12;
  --card-bg: rgba(15, 23, 42, 0.75);
  --card-border: rgba(255, 255, 255, 0.12);
  --card-hover-border: rgba(56, 189, 248, 0.35);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-gold: #f59e0b;
  --accent-blue: #0284c7;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-red: #ef4444;

  font-size: 16px;
}

/* Resolution Scaling */
body.res-1080p { font-size: 16px; }
body.res-720p { font-size: 11px; }

@media (max-height: 780px), (max-width: 1366px) {
  body.res-auto { font-size: 11px; }
}

@media (max-height: 620px), (max-width: 1024px) {
  body.res-auto { font-size: 9.5px; }
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  direction: rtl;
  font-family: var(--font-primary);
  background-color: var(--bg-color);
  color: var(--text-primary);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* Touch Interactive Highlight */
.touch-interactive {
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.touch-interactive:active {
  transform: scale(0.98);
}

/* Themes */
body.theme-default {
  --bg-gradient: radial-gradient(circle at 80% 20%, #172554 0%, #0f172a 45%, #020617 100%);
  --accent-color: #38bdf8;
}

body.theme-shabbat {
  --bg-gradient: radial-gradient(circle at 80% 20%, #2e1065 0%, #1e1b4b 50%, #020617 100%);
  --accent-color: #fbbf24;
  --card-bg: rgba(30, 27, 75, 0.78);
  --card-border: rgba(251, 191, 36, 0.25);
}

body.theme-rosh-hashanah {
  --bg-gradient: radial-gradient(circle at 80% 20%, #451a03 0%, #1e293b 50%, #030712 100%);
  --accent-color: #f59e0b;
}

body.theme-yom-kippur {
  --bg-gradient: radial-gradient(circle at 80% 20%, #1e1b4b 0%, #0f172a 50%, #020617 100%);
  --accent-color: #e2e8f0;
}

body.theme-sukkot {
  --bg-gradient: radial-gradient(circle at 80% 20%, #365314 0%, #14532d 50%, #020617 100%);
  --accent-color: #a3e635;
}

body.theme-hanukkah {
  --bg-gradient: radial-gradient(circle at 80% 20%, #1e3a8a 0%, #0f172a 50%, #020617 100%);
  --accent-color: #60a5fa;
}

body.theme-tu-bishvat {
  --bg-gradient: radial-gradient(circle at 80% 20%, #14532d 0%, #064e3b 50%, #020617 100%);
  --accent-color: #86efac;
}

body.theme-purim {
  --bg-gradient: radial-gradient(circle at 80% 20%, #4c0519 0%, #2e1065 50%, #09090b 100%);
  --accent-color: #ec4899;
}

body.theme-pesach {
  --bg-gradient: radial-gradient(circle at 80% 20%, #14532d 0%, #0f172a 50%, #020617 100%);
  --accent-color: #4ade80;
}

body.theme-memorial {
  --bg-gradient: radial-gradient(circle at 80% 20%, #18181b 0%, #09090b 50%, #020617 100%);
  --accent-color: #94a3b8;
}

body.theme-israel {
  --bg-gradient: radial-gradient(circle at 80% 20%, #1e3a8a 0%, #0f172a 50%, #020617 100%);
  --accent-color: #38bdf8;
}

body.theme-lag-baomer {
  --bg-gradient: radial-gradient(circle at 80% 20%, #7c2d12 0%, #451a03 50%, #030712 100%);
  --accent-color: #fb923c;
}

body.theme-jerusalem {
  --bg-gradient: radial-gradient(circle at 80% 20%, #78350f 0%, #1e293b 50%, #030712 100%);
  --accent-color: #fde047;
}

body.theme-shavuot {
  --bg-gradient: radial-gradient(circle at 80% 20%, #713f12 0%, #14532d 50%, #030712 100%);
  --accent-color: #facc15;
}

body.theme-tu-baav {
  --bg-gradient: radial-gradient(circle at 80% 20%, #831843 0%, #4c0519 50%, #09090b 100%);
  --accent-color: #f472b6;
}

body.theme-back-to-school {
  --bg-gradient: radial-gradient(circle at 80% 20%, #1e3a8a 0%, #1e1b4b 50%, #020617 100%);
  --accent-color: #38bdf8;
}

body.theme-new-year {
  --bg-gradient: radial-gradient(circle at 80% 20%, #451a03 0%, #2e1065 50%, #020617 100%);
  --accent-color: #fbbf24;
}

/* Screen Shell */
#kiosk-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
  background: var(--bg-gradient, #070a12);
  overflow: hidden;
}

/* Background Layers with Dynamic Opacity & Dimming */
#background-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-size: cover;
  background-position: center;
  transition: opacity 1.8s ease-in-out, transform 25s ease-out;
  opacity: var(--bg-layer-opacity, 0.85);
  transform: scale(1);
  will-change: opacity, transform;
}

#background-layer.zoom-effect {
  transform: scale(1.07);
}

#background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: radial-gradient(circle at center, rgba(7,10,18,calc(var(--bg-overlay-opacity, 0.35) * 0.4)) 0%, rgba(7,10,18,var(--bg-overlay-opacity, 0.35)) 100%);
  pointer-events: none;
  transition: background 0.3s ease;
}

/* Left-Side Backlight Burn Compensation Layer */
#left-burn-compensator {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(to right, rgba(255, 255, 255, var(--left-boost, 0)) 0%, rgba(255, 255, 255, calc(var(--left-boost, 0) * 0.45)) 30%, rgba(255, 255, 255, 0) 100%);
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
}

/* Main UI Grid Layer */
#ui-layer {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0.8rem 1.25rem;
  gap: 0.75rem;
  overflow: hidden;
}

/* =========================================================
   1. HEADER SECTION (Right: Clock/Weather | Center: Shabbat | Left: Brand)
   ========================================================= */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 1rem;
  padding: 0.5rem 1.25rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  height: clamp(3.8rem, 9vh, 5.2rem);
}

/* Right Side: Clock & Weather (Bright, functional zone) */
.header-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.clock-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
}

.clock-time {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.clock-date-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-top: 0.15rem;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}

.weather-widget {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.weather-icon-emoji {
  font-size: 1.85rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.weather-info {
  display: flex;
  flex-direction: column;
}

.weather-temp {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.weather-desc {
  font-size: 0.78rem;
  color: #e2e8f0;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Center Widget: Shabbat / Holiday Pill */
.header-center {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.special-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 0.4rem 1rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 1rem;
  animation: pulse-glow 3s infinite;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.shabbat-times {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.92rem;
  color: #f8fafc;
  background: rgba(30, 27, 75, 0.85);
  padding: 0.4rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.shabbat-times span {
  font-weight: 800;
  color: #fbbf24;
}

/* Left Side: Building Brand (Static, placed on dim side) */
.building-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.building-logo-badge {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.building-logo-badge svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: #ffffff;
}

.building-info h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.building-info .city-tag {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* =========================================================
   2. MAIN DASHBOARD: MULTI-ZONE (Stage + Side Column)
   ========================================================= */
.main-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 24rem;
  gap: 0.9rem;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Layout Side Options */
body.layout-side-left .main-dashboard-grid {
  grid-template-columns: 1fr 24rem;
}

body.layout-side-right .main-dashboard-grid,
body.layout-flipped .main-dashboard-grid {
  grid-template-columns: 24rem 1fr;
}

body.layout-side-right .stage-container,
body.layout-flipped .stage-container {
  order: 2;
}

body.layout-side-right .side-column,
body.layout-flipped .side-column {
  order: 1;
}

body.layout-side-hidden .main-dashboard-grid {
  grid-template-columns: 100% !important;
}

body.layout-side-hidden .side-column {
  display: none !important;
}

/* Side Column Width Presets */
body.side-width-compact .main-dashboard-grid {
  grid-template-columns: 1fr 18rem;
}
body.layout-side-right.side-width-compact .main-dashboard-grid,
body.layout-flipped.side-width-compact .main-dashboard-grid {
  grid-template-columns: 18rem 1fr;
}

body.side-width-wide .main-dashboard-grid {
  grid-template-columns: 1fr 30rem;
}
body.layout-side-right.side-width-wide .main-dashboard-grid,
body.layout-flipped.side-width-wide .main-dashboard-grid {
  grid-template-columns: 30rem 1fr;
}

/* Header Positions & Toggles */
body.header-clock-right .header-bar {
  flex-direction: row-reverse;
}

body.header-brand-hidden .building-brand {
  display: none !important;
}

body.header-shabbat-hidden #header-center-widget {
  display: none !important;
}

/* Hide Components */
body.hide-ticker #footer-bar,
body.hide-ticker #ticker-bar,
body.hide-ticker .bottom-ticker-bar,
body.hide-ticker .footer-bar {
  display: none !important;
}

body.hide-arrows .stage-nav-arrow,
body.hide-arrows .stage-arrow-btn {
  display: none !important;
}

/* High-Contrast Light Cards for Dim Left Zone */
body.high-contrast-side .side-widget-card {
  background: rgba(248, 250, 252, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  color: #0f172a !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
}

body.high-contrast-side .side-widget-header {
  border-bottom-color: rgba(15, 23, 42, 0.15) !important;
}

body.high-contrast-side .side-widget-header h3,
body.high-contrast-side .mini-notice-title,
body.high-contrast-side .env-stat-value,
body.high-contrast-side #side-contact-label span {
  color: #0f172a !important;
  font-weight: 800 !important;
}

body.high-contrast-side #side-elevator-phone {
  color: #0284c7 !important;
}

body.high-contrast-side .mini-notice-snippet,
body.high-contrast-side .env-stat-label,
body.high-contrast-side #env-time-label {
  color: #334155 !important;
  font-weight: 600 !important;
}

body.high-contrast-side .mini-notice-item {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

body.high-contrast-side .env-stat-box {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

/* Main Showcase Stage */
.stage-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Touch Stage Nav Arrows */
.stage-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, background-color 0.2s, transform 0.1s;
}

.stage-container:hover .stage-nav-arrow,
.stage-container:active .stage-nav-arrow {
  opacity: 0.85;
}

.stage-nav-prev { right: 0.75rem; }
.stage-nav-next { left: 0.75rem; }
.stage-nav-arrow:active { transform: translateY(-50%) scale(0.9); background: rgba(56, 189, 248, 0.8); }

/* Slide Progress Bar */
.stage-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 20;
}

.stage-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
  transition: width 0.1s linear;
}

.slide-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 10px, 0);
  transition: opacity 0.4s ease-in-out, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem 2rem;
  overflow: hidden;
  pointer-events: none;
}

.slide-card.active {
  display: flex;
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  z-index: 10;
  pointer-events: auto;
}

/* Notice Slide in Stage */
.stage-notice-layout {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Notice with Attached Image (Split Layout) */
.stage-notice-split-layout {
  display: grid;
  grid-template-columns: 48% 52%;
  gap: 1.25rem;
  width: 100%;
  height: 100%;
  align-items: center;
  overflow: hidden;
}

.notice-attached-img-box {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.notice-attached-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.9rem;
}

.notice-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.notice-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.notice-type-badge.urgent {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.45);
  animation: pulse-badge 2s infinite;
}

.notice-author-tag {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.stage-notice-body {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: right;
  align-items: flex-start;
  width: 100%;
  overflow: hidden;
}

.stage-notice-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stage-notice-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vh, 2.3rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.stage-notice-content {
  font-size: clamp(1.1rem, 2.2vh, 1.45rem);
  color: #f1f5f9;
  line-height: 1.5;
  font-weight: 400;
  max-width: 95%;
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stage-notice-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* 4-Day Forecast Slide Layout */
.forecast-slide-layout {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.forecast-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.forecast-title-row h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.forecast-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: auto 0;
  width: 100%;
}

.forecast-day-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.forecast-day-card.today {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.forecast-day-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f8fafc;
}

.forecast-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.forecast-temps {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-family: var(--font-heading);
}

.forecast-temp-max {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.forecast-temp-min {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.forecast-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Contacts Slide */
.contacts-slide-layout {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: auto 0;
  width: 100%;
}

.contact-pill-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-icon {
  font-size: 1.6rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.contact-phone {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.contact-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* =========================================================
   SIDE INFO COLUMN
   ========================================================= */
.side-column {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Mini Notices Widget */
.side-widget-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}

.side-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
  flex-shrink: 0;
}

.side-widget-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.side-notices-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
  flex: 1;
}

.mini-notice-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}

.mini-notice-item:hover, .mini-notice-item:active {
  background: rgba(56, 189, 248, 0.12);
  transform: translateX(-4px);
}

.mini-notice-item.urgent {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.mini-notice-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-notice-snippet {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Environment Info Widget */
.env-widget-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.env-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.65rem;
  padding: 0.4rem 0.3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.env-stat-label {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.env-stat-value {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

/* =========================================================
   3. FOOTER: RSS TICKER & RADIO (Compact)
   ========================================================= */
.footer-bar {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  height: clamp(2.8rem, 6.5vh, 3.5rem);
  flex-shrink: 0;
  position: relative;
}

.ticker-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0 1.25rem;
  height: 100%;
  z-index: 2;
  white-space: nowrap;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.ticker-badge svg {
  width: 1rem !important;
  height: 1rem !important;
  min-width: 1rem !important;
  max-width: 1rem !important;
  flex-shrink: 0;
  fill: #ffffff;
}

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

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-marquee 140s linear infinite;
  padding-right: 2rem;
  will-change: transform;
}

.ticker-speed-slow { animation-duration: 170s !important; }
.ticker-speed-normal { animation-duration: 110s !important; }
.ticker-speed-fast { animation-duration: 65s !important; }

.ticker-content:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-left: 3rem;
}

.ticker-item-bullet {
  color: #ef4444;
  font-size: 0.65rem;
}

.radio-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  cursor: pointer;
}

.radio-waves {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.radio-wave-bar {
  width: 2.5px;
  height: 100%;
  background: var(--accent-color, #38bdf8);
  border-radius: 2px;
  animation: sound-bar 1.2s ease-in-out infinite alternate;
}

.radio-wave-bar:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.radio-wave-bar:nth-child(3) { animation-delay: 0.4s; height: 80%; }

/* Audio Unmute Floating Prompt */
#audio-unmute-prompt {
  position: absolute;
  bottom: 4.2rem;
  left: 1.25rem;
  background: rgba(2, 132, 199, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
  border-radius: 2rem;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  z-index: 50;
  animation: pulse-glow 2s infinite;
}

/* =========================================================
   4. TOUCHSCREEN TOAST & INTERACTIVE MODAL
   ========================================================= */
.touch-toast {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.75rem 1.75rem;
  border-radius: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.touch-toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -20px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1.5rem;
  animation: modal-fade-in 0.25s ease-out;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.5rem;
  padding: 1.75rem;
  max-width: 42rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:active {
  background: rgba(239, 68, 68, 0.8);
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes ticker-marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(100%, 0, 0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.5); }
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes sound-bar {
  0% { height: 20%; }
  100% { height: 100%; }
}

@keyframes modal-fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* =========================================================
   HIGH-CONTRAST LIGHT SIDE CARDS (For Dim / Burnt Left Panel)
   ========================================================= */
body.high-contrast-side .side-column {
  --card-bg: rgba(255, 255, 255, 0.96) !important;
  --card-border: rgba(255, 255, 255, 1) !important;
  --text-primary: #0f172a !important;
  --text-secondary: #334155 !important;
}

body.high-contrast-side .side-column .side-widget-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 2px solid rgba(255, 255, 255, 1) !important;
  color: #0f172a !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
}

body.high-contrast-side .side-column .side-widget-header {
  border-bottom-color: rgba(15, 23, 42, 0.15) !important;
}

body.high-contrast-side .side-column .side-widget-header h3,
body.high-contrast-side .side-column .mini-notice-title,
body.high-contrast-side .side-column .env-stat-value,
body.high-contrast-side .side-column #side-contact-label span {
  color: #0f172a !important;
  font-weight: 900 !important;
}

body.high-contrast-side .side-column #side-elevator-phone {
  color: #0284c7 !important;
  font-weight: 900 !important;
}

body.high-contrast-side .side-column .mini-notice-snippet,
body.high-contrast-side .side-column .env-stat-label,
body.high-contrast-side .side-column #env-time-label {
  color: #334155 !important;
  font-weight: 700 !important;
}

body.high-contrast-side .side-column .mini-notice-item {
  background: rgba(241, 245, 249, 0.95) !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
}

body.high-contrast-side .side-column .env-stat-box {
  background: rgba(241, 245, 249, 0.95) !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
}
