/* ==========================================================================
   Clean Day kiosk simulator (tablet frame + simulated display)
   Mirrors the real Clean Day app display (../day/static/style.css).
   Independent of the site shell: do not restyle to match the page.
   ========================================================================== */

/* Tablet Device Frame */
.tablet-container {
  display: flex;
  justify-content: center;
  position: relative;
}

.tablet-bezel {
  width: 100%;
  max-width: 920px;
  background: #08090b;
  border: 14px solid #22252e;
  border-radius: 36px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.tablet-camera-notch {
  width: 8px;
  height: 8px;
  background: #11141a;
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Simulated Kiosk Screen inside Tablet (Obsidian & Warm Cream Themes)
   Design tokens mirror the actual CleanDay kiosk display (../day/static/style.css)
   ========================================================================== */

.kiosk-screen,
.kiosk-screen[data-sim-theme="obsidian"] {
  --bg-main: #12141b;
  --bg-card: #1c1f28;
  --bg-card-subtle: #232631;
  --border-color: rgba(255, 255, 255, 0.10);

  --text-primary: #f3f1ec;
  --text-secondary: #c7c2b8;
  --text-muted: #8b8678;

  --accent: #d9a441;
  --accent-strong: #f0be5e;
  --accent-ink: #241a05;

  --care-bg: #2b2430;
  --care-border: #6b4c57;
  --care-text: #f3e4e8;

  --routine-bg: #1e2530;
  --routine-border: #3e5570;

  --medical-accent: #d08883;
  --medical-bg: rgba(196, 100, 95, 0.16);

  --hot-accent: #e2895a;
  --cold-accent: #7fb3d5;
  --good-accent: #4cc495;

  --priority-0: var(--accent);
  --priority-1: #5aa9e6;
  --priority-2: #5fc48a;
  --priority-3: #d977b8;
  --priority-4: #a58ae0;

  --color-sunny: var(--accent-strong);
  --color-cloudy: var(--text-muted);
  --color-rainy: #7fb3d5;
  --color-snowy: var(--text-secondary);
  --color-stormy: #a79bd1;
  --color-foggy: var(--text-muted);
  --color-moon: #b9c6e6;

  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-panel: 0 2px 16px rgba(0, 0, 0, 0.35);

  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
}

.kiosk-screen[data-sim-theme="warm_cream"] {
  --bg-main: #faf6ee;
  --bg-card: #ffffff;
  --bg-card-subtle: #f3eee3;
  --border-color: #e7dfcf;

  --text-primary: #2b2620;
  --text-secondary: #55503f;
  --text-muted: #8a8371;

  --accent: #b8791c;
  --accent-strong: #96610f;
  --accent-ink: #ffffff;

  --care-bg: #fbeef0;
  --care-border: #e3b9c0;
  --care-text: #6b2430;

  --routine-bg: #eef3f8;
  --routine-border: #b9cbdc;

  --medical-accent: #a8453f;
  --medical-bg: rgba(168, 69, 63, 0.08);

  --hot-accent: #b5551f;
  --cold-accent: #3f6f8c;
  --good-accent: #1a6b4c;

  --priority-0: var(--accent);
  --priority-1: #1f6fb0;
  --priority-2: #1f8a55;
  --priority-3: #a8387f;
  --priority-4: #6a4fb0;

  --color-sunny: var(--accent-strong);
  --color-rainy: #3f6f8c;
  --color-stormy: #6a5a96;
  --color-moon: #5b6c95;

  --shadow-panel: 0 2px 14px rgba(43, 38, 32, 0.08);
  background-color: var(--bg-main);
  color: var(--text-primary);
}

.kiosk-screen {
  font-family: var(--font-primary);
  border-radius: 22px;
  padding: 14px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  transition: background-color 0.35s ease, color 0.35s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  container-type: inline-size;
}

.kiosk-screen .dashboard-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kiosk-screen #dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Care message banner (Love Note) */
.kiosk-screen .care-message-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--care-bg);
  border: 1px solid var(--care-border);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  animation: fadeIn 0.4s ease-in-out;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.kiosk-screen .care-message-icon {
  color: var(--care-text);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.kiosk-screen .care-message-icon svg {
  width: 28px;
  height: 28px;
}

.kiosk-screen .care-message-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kiosk-screen .care-message-sender {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--care-text);
  opacity: 0.85;
}

.kiosk-screen .care-message-text {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--care-text);
  line-height: 1.35;
}

/* Gentle Routine Reminder Banner */
.kiosk-screen .routine-reminder-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--routine-bg);
  border: 1px solid var(--routine-border);
  border-radius: var(--radius-lg);
  padding: 9px 15px;
  animation: fadeIn 0.4s ease-in-out;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.kiosk-screen .routine-reminder-icon {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.kiosk-screen .routine-reminder-icon svg {
  width: 22px;
  height: 22px;
}

.kiosk-screen .routine-reminder-text {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.kiosk-screen .routine-senior-greeting {
  color: var(--text-secondary);
  margin-right: 5px;
}

/* Fullscreen Routine Alert Overlay */
.kiosk-screen .fullscreen-alert-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
  background: var(--bg-main);
  color: var(--text-primary);
  border-radius: 22px;
  animation: fadeIn 0.3s ease;
}

.kiosk-screen .fullscreen-alert-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kiosk-screen .fullscreen-alert-icon svg {
  width: 56px;
  height: 56px;
}

.kiosk-screen .fullscreen-alert-text {
  font-size: 1.25rem;
  line-height: 1.4;
  max-width: 480px;
}

.kiosk-screen .fullscreen-alert-greeting {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 4px;
  font-weight: 500;
}

/* Visual Alarm Animations (Hard-of-Hearing Seniors) */
.kiosk-screen .fullscreen-alert-overlay.visual-alarm {
  animation: visual-alarm-frame 1s ease-in-out infinite;
}

.kiosk-screen .fullscreen-alert-overlay.visual-alarm .fullscreen-alert-icon {
  position: relative;
  animation: visual-alarm-beat 1s ease-in-out infinite;
}

.kiosk-screen .fullscreen-alert-overlay.visual-alarm .fullscreen-alert-icon::before,
.kiosk-screen .fullscreen-alert-overlay.visual-alarm .fullscreen-alert-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border: 3px solid var(--accent-strong);
  border-radius: 50%;
  opacity: 0;
  animation: visual-alarm-ripple 2s ease-out infinite;
}

.kiosk-screen .fullscreen-alert-overlay.visual-alarm .fullscreen-alert-icon::after {
  animation-delay: 1s;
}

@keyframes visual-alarm-frame {
  0%, 100% { box-shadow: inset 0 0 0 0 var(--accent-strong); }
  50% { box-shadow: inset 0 0 0 16px var(--accent-strong), inset 0 0 40px 10px var(--accent-strong); }}

@keyframes visual-alarm-beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1.05); }
  45% { transform: scale(1.18); }
  60% { transform: scale(1); }
}

@keyframes visual-alarm-ripple {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* Dashboard Header: the display's Large text size, scaled to the screen width
   (cqi on .kiosk-screen; the real display is 1280px wide at these ratios). */
.kiosk-screen .dashboard-header {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 18px 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.kiosk-screen .header-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2px 16px;
  padding-bottom: 8px;
}

.kiosk-screen .header-left {
  display: flex;
  flex-direction: column;
}

.kiosk-screen .senior-greeting {
  font-size: clamp(0.95rem, 2.8cqi, 1.6rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--accent);
}

.kiosk-screen .huge-day {
  font-size: clamp(1.5rem, 4.7cqi, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-primary);
}

.kiosk-screen .huge-date {
  font-size: clamp(1.05rem, 3.1cqi, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

.kiosk-screen .clock-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
}

.kiosk-screen .huge-clock {
  font-size: clamp(2.4rem, 8cqi, 4.4rem);
  font-weight: 800;
  line-height: 0.95;
  white-space: nowrap;
  color: var(--text-primary);
}

.kiosk-screen .huge-clock .ampm {
  font-size: 0.45em;  font-weight: 700;
}

.kiosk-screen .clock-period {
  display: flex;
  align-items: center;
  gap: 0.3em;
  margin-top: 0.15em;
  font-size: clamp(0.95rem, 2.65cqi, 1.5rem);
  font-weight: 600;
  color: var(--text-primary);
  text-transform: capitalize;
}

.kiosk-screen .clock-icon { display: flex; }

.kiosk-screen .clock-icon svg {
  width: 1.1em;
  height: 1.1em;
}

.kiosk-screen .clock-icon .sunny { color: var(--color-sunny); }
.kiosk-screen .clock-icon .sunset { color: var(--hot-accent); }
.kiosk-screen .clock-icon .moon { color: var(--color-moon); }

.kiosk-screen .anchor-line {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding: 7px 0 9px;
  font-size: clamp(0.95rem, 2.65cqi, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

.kiosk-screen .anchor-item {
  display: flex;
  align-items: center;
  gap: 0.45em;
  animation: fadeIn 0.6s ease;
}

.kiosk-screen .anchor-item.is-resting { display: none; }

.kiosk-screen .anchor-item::before {
  content: "";
  flex-shrink: 0;
  width: 0.3em;
  height: 1.1em;
  border-radius: 999px;
  background: var(--accent);
}

.kiosk-screen .anchor-dots {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.kiosk-screen .anchor-dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-color);
}

.kiosk-screen .anchor-dots i.on { background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .kiosk-screen .anchor-item { animation: none; }

  /* Visual Alarm holds its peak frame and one ring instead of pulsing
     (!important beats the inline animation main.js sets on the overlay) */
  .kiosk-screen .fullscreen-alert-overlay.visual-alarm {
    animation: none !important;
    box-shadow: inset 0 0 0 16px var(--accent-strong);
  }

  .kiosk-screen .fullscreen-alert-overlay.visual-alarm .fullscreen-alert-icon { animation: none; }

  .kiosk-screen .fullscreen-alert-overlay.visual-alarm .fullscreen-alert-icon::before {
    animation: none;
    opacity: 0.8;
    transform: scale(1.4);
  }

  .kiosk-screen .fullscreen-alert-overlay.visual-alarm .fullscreen-alert-icon::after { animation: none; }
}

/* Dashboard Grid */
.kiosk-screen .dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.kiosk-screen .dashboard-grid.no-calendar {
  grid-template-columns: 1fr;
}

@media (max-width: 860px) {
  .kiosk-screen .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.kiosk-screen .panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.kiosk-screen .panel-header {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Weather content */
.kiosk-screen .weather-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kiosk-screen .weather-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.kiosk-screen .weather-content-wrapper > .weather-hero-card {
  flex: 1.1 0 auto;
}

.kiosk-screen .weather-content-wrapper > .forecast-5day-box {
  flex: 2 1 0;
}

.kiosk-screen .weather-hero-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.kiosk-screen .weather-fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.kiosk-screen .weather-fx.fx-sun {
  color: var(--color-sunny);
}

.kiosk-screen .weather-fx.fx-sun::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 90% at 50% 50%, currentColor, transparent 70%);
  opacity: 0.16;
  animation: fx-glow 9s ease-in-out infinite;
}

.kiosk-screen .weather-fx.fx-snow {
  color: var(--color-snowy);
  opacity: 0.7;
}

.kiosk-screen .weather-fx.fx-snow::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; top: -120px;
  background-image:
    radial-gradient(circle 3px at 30px 25px, currentColor 70%, transparent),
    radial-gradient(circle 2.5px at 120px 65px, currentColor 70%, transparent),
    radial-gradient(circle 3px at 200px 10px, currentColor 70%, transparent),
    radial-gradient(circle 2px at 80px 105px, currentColor 70%, transparent);
  background-size: 240px 120px;
  animation: fx-fall-mini 12s linear infinite;
}

@keyframes fx-fall-mini {
  from { transform: translateY(0); }
  to { transform: translateY(120px); }
}

@keyframes fx-glow {
  0%, 100% { opacity: 0.08; transform: scale(0.92); }
  50% { opacity: 0.24; transform: scale(1.06); }
}

.kiosk-screen .weather-primary-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 4.5cqi, 18px);
  width: 100%;
  position: relative;
}

.kiosk-screen .weather-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kiosk-screen .weather-svg {
  width: clamp(64px, 31cqi, 128px);
  height: clamp(64px, 31cqi, 128px);
}

.kiosk-screen .weather-svg.sunny { color: var(--color-sunny); }
.kiosk-screen .weather-svg.moon { color: var(--color-moon); }
.kiosk-screen .weather-svg.cloudy { color: var(--color-cloudy); }
.kiosk-screen .weather-svg.rainy { color: var(--color-rainy); }
.kiosk-screen .weather-svg.snowy { color: var(--color-snowy); }
.kiosk-screen .weather-svg.stormy { color: var(--color-stormy); }
.kiosk-screen .weather-svg.foggy { color: var(--color-foggy); }

.kiosk-screen .weather-temp-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* Today's temperature stays below the clock's size so the time reads first. */
.kiosk-screen .weather-temp {
  font-size: clamp(2rem, 12cqi, 3.2rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.kiosk-screen .weather-pertinent-temp {
  font-size: clamp(1.1rem, 6.5cqi, 1.7rem);
  font-weight: 700;
  line-height: 1.1;
}

.kiosk-screen .pertinent-high { color: var(--text-primary); }

.kiosk-screen .weather-pertinent-temp.freezing .pertinent-high { color: var(--cold-accent); }
.kiosk-screen .weather-pertinent-temp.flames .pertinent-high { color: var(--hot-accent); }

.kiosk-screen .weather-condition-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.kiosk-screen .weather-condition-desc {
  font-size: clamp(0.9rem, 5.6cqi, 1.4rem);
  font-weight: 600;
  color: var(--text-primary);
}

.kiosk-screen .forecast-tomorrow {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.4em 0.7em;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: clamp(0.9rem, 2.2cqi, 1.25rem);
  font-weight: 700;
  color: var(--text-primary);
}

.kiosk-screen .forecast-tomorrow-cond {
  display: flex;
  align-items: center;
  gap: 0.35em;
  margin-left: auto;
  font-weight: 600;
}

.kiosk-screen .forecast-tomorrow .forecast-svg {
  width: 1.5em;
  height: 1.5em;
}

/* Air indicator pill under today's conditions: one word, colour plus text */
.kiosk-screen .air-note {
  font-size: clamp(0.75rem, 4.4cqi, 1.1rem);
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
}

.kiosk-screen .air-note.aqi-good {
  background: rgba(16, 185, 129, 0.14);
  color: var(--good-accent);
}

.kiosk-screen .air-note.aqi-sensitive {
  background: rgba(224, 138, 47, 0.16);
  color: var(--hot-accent);
}

.kiosk-screen .air-note.aqi-unhealthy {
  background: var(--medical-bg);
  color: var(--medical-accent);
}

/* 5-day forecast */
.kiosk-screen .forecast-5day-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.kiosk-screen .forecast-days-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  flex: 1;
}

.kiosk-screen .forecast-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.kiosk-screen .forecast-day-name {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-primary);
}

.kiosk-screen .forecast-day-date {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.kiosk-screen .forecast-svg {
  width: 40px;
  height: 40px;
}

.kiosk-screen .forecast-svg.sunny { color: var(--color-sunny); }
.kiosk-screen .forecast-svg.moon { color: var(--color-moon); }
.kiosk-screen .forecast-svg.cloudy { color: var(--color-cloudy); }
.kiosk-screen .forecast-svg.rainy { color: var(--color-rainy); }
.kiosk-screen .forecast-svg.snowy { color: var(--color-snowy); }
.kiosk-screen .forecast-svg.stormy { color: var(--color-stormy); }
.kiosk-screen .forecast-svg.foggy { color: var(--color-foggy); }

.kiosk-screen .forecast-day-desc {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.kiosk-screen .forecast-day-temps {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.kiosk-screen .forecast-temp-high {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.kiosk-screen .forecast-temp-low {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Full-width weather layout (used when there is no calendar) */
.kiosk-screen .weather-panel.full-width .weather-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: 1fr;
  gap: 10px;
  align-items: stretch;
}

.kiosk-screen .weather-panel.full-width .weather-hero-card {
  grid-column: 1;
  grid-row: 1;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kiosk-screen .weather-panel.full-width .forecast-5day-box {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kiosk-screen .weather-panel.full-width .forecast-days-grid {
  grid-template-columns: 1fr;
  gap: 4px;
  flex: 1;
}

.kiosk-screen .weather-panel.full-width .forecast-day-card {
  display: grid;
  grid-template-columns: 56px 26px 1fr 64px;
  align-items: center;
  justify-items: start;
  text-align: left;
  padding: 4px 8px;
  gap: 6px;
}

.kiosk-screen .weather-panel.full-width .forecast-day-date-group {
  text-align: left;
}

.kiosk-screen .weather-panel.full-width .forecast-day-icon {
  justify-self: center;
}

.kiosk-screen .weather-panel.full-width .forecast-day-temps {
  justify-self: end;
  gap: 4px;
}

/* Calendar panel */
.kiosk-screen .calendar-panel {
  display: flex;
  flex-direction: column;
}

.kiosk-screen .calendar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}

.kiosk-screen .calendar-section-title {
  font-size: clamp(0.85rem, 2.2cqi, 1.2rem);
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 3px;
  margin-bottom: 2px;
}

.kiosk-screen .calendar-section-title:first-of-type { margin-top: 0; }

.kiosk-screen .calendar-section-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kiosk-screen .calendar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.kiosk-screen .calendar-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kiosk-screen .calendar-icon svg {
  width: 20px;
  height: 20px;
}

.kiosk-screen .calendar-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kiosk-screen .calendar-summary {
  font-size: clamp(0.9rem, 2.4cqi, 1.3rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.kiosk-screen .calendar-time {
  font-size: clamp(0.85rem, 2.2cqi, 1.2rem);
  color: var(--text-primary);
}

.kiosk-screen .calendar-item.is-next .calendar-summary {
  font-size: clamp(1.05rem, 3.4cqi, 1.8rem);
  font-weight: 800;
}

.kiosk-screen .calendar-item.is-next .calendar-time {
  font-size: clamp(0.9rem, 2.6cqi, 1.4rem);
}

.kiosk-screen .calendar-time strong {
  color: var(--text-primary);
  font-weight: 700;
}

.kiosk-screen .calendar-item.today-item {
  background: var(--bg-card);
  border: 1px solid var(--accent);
}

.kiosk-screen .calendar-item.is-next {
  border-left: 8px solid var(--accent);}

/* Priority events: thick left border, tint, star icon (ADR / Clean Day display) */
.kiosk-screen .calendar-item.priority-highlight {
  --pri: var(--priority-1);
  background: color-mix(in srgb, var(--pri) 18%, var(--bg-card));
  border: 1.5px solid var(--pri);
  border-left-width: 8px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pri) 35%, transparent),
              0 2px 8px rgba(0, 0, 0, 0.12);
  opacity: 1;
}

.kiosk-screen .calendar-item.priority-highlight .calendar-icon,
.kiosk-screen .calendar-icon.priority-icon {
  color: var(--pri, var(--accent));
}

.kiosk-screen .calendar-item.priority-highlight .calendar-summary {
  color: var(--text-primary);
  font-weight: 700;
}

/* Dashboard Footer */
.kiosk-screen .dashboard-footer {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 2px;
}

/* Night mode overlay */
.kiosk-screen .night-mode-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 30;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  background: #05070d;
  color: #94a3b8;
  border-radius: 22px;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.kiosk-screen[data-sim-night="true"] .dashboard-container {
  display: none;
}

.kiosk-screen[data-sim-night="true"] .night-mode-overlay {
  display: flex;
}

.kiosk-screen .night-mode-icon {
  color: #64748b;
  opacity: 0.8;
}

.kiosk-screen .night-mode-icon svg {
  width: 52px;
  height: 52px;
}

.kiosk-screen .night-mode-clock {
  font-size: 3rem;
  font-weight: 600;
  color: #cbd5e1;
}

.kiosk-screen .night-mode-message {
  font-size: 1.1rem;
  font-weight: 500;
  color: #718096;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
