/* ============================================================
   GoHome Planner — styles
   ============================================================ */

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

:root {
  --bg: #FFF7EC;
  --bg-panel: #FFFFFF;
  --ink: #2B1E3F;
  --ink-soft: #6A5F7C;
  --accent: #7C4DFF;
  --accent-2: #FF6E9C;
  --sun: #FFC93C;
  --sky: #4FC3F7;
  --grass: #66BB6A;
  --line: #EDE6D6;
  --shadow: 0 4px 0 0 rgba(43, 30, 63, 0.08), 0 16px 32px -12px rgba(43, 30, 63, 0.18);
  --shadow-hard: 0 6px 0 0 rgba(43, 30, 63, 0.14);
  --radius: 20px;
  --radius-sm: 12px;
}

html {
  scrollbar-gutter: stable;
}
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', 'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  padding: 24px;
}

button { font-family: inherit; cursor: pointer; border: none; }

/* ============================================================
   Design Canvas wrapper
   ============================================================ */
.app-root {
  width: 100%;
  height: 100vh;
}

/* ============================================================
   Variation 1: "Playful Timeline" — napló-szerű, játékos
   ============================================================ */

.v1 {
  --card-bg: #FFFFFF;
  background: var(--bg);
  padding: 24px 32px;
  min-height: 100vh;
  font-family: 'Nunito', sans-serif;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.v1-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 24px;
}

.v1-title {
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.v1-subtitle {
  font-size: 18px;
  color: var(--ink-soft);
  margin-top: 8px;
}

.v1-clock {
  background: var(--ink);
  color: #FFF7EC;
  border-radius: 24px;
  padding: 16px 22px;
  text-align: right;
  min-width: 180px;
  box-shadow: var(--shadow);
}
.v1-clock-label { font-size: 12px; opacity: 0.7; letter-spacing: 0.1em; text-transform: uppercase; }
.v1-clock-time { font-size: 36px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 4px; }
.v1-clock-date { font-size: 13px; opacity: 0.7; margin-top: 4px; }

.v1-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.v1-btn {
  background: var(--card-bg);
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 2px solid var(--line);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.v1-btn:hover { transform: translate(0, -2px); box-shadow: var(--shadow); }
.v1-btn.primary { background: var(--accent); color: white; border-color: var(--accent); }
.v1-btn.warn { background: var(--accent-2); color: var(--ink); border-color: var(--accent-2); }
.v1-btn.active { background: var(--ink); color: #FFF7EC; border-color: var(--ink); }

.v1-time-input { font-family: inherit; font-size: 15px; font-weight: 700; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: white; color: var(--ink); }

.v1-hero-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #5E35B1 100%);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.v1-hero-banner::before {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
  border-radius: 50%;
}
.v1-hero-left { position: relative; z-index: 1; }
.v1-hero-label { font-size: 11px; opacity: 0.8; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.v1-hero-time { font-size: 40px; font-weight: 900; line-height: 1; margin: 2px 0 2px; font-variant-numeric: tabular-nums; }
.v1-hero-sub { font-size: 13px; opacity: 0.9; }
.v1-hero-right { position: relative; z-index: 1; }
.v1-hero-countdown { font-size: 13px; opacity: 0.9; }
.v1-hero-count { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }

.v1-routes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .v1-routes { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .v1-header { flex-direction: column; align-items: flex-start; }
  .v1-title { font-size: 32px; }
  .v1-hero-time { font-size: 40px; }
  .v1-hero-count { font-size: 36px; }
  .v1 { padding: 16px; }
}

.route-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: transform 0.15s;
}
.route-card.primary { border-color: var(--sun); background: linear-gradient(180deg, #FFFBEA 0%, #FFFFFF 40%); }
.route-card:hover { transform: translate(0, -2px); }

.route-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--line);
}
.route-card-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.route-card.primary .route-card-badge {
  background: var(--sun);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 20px;
}
.route-card-total {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.route-steps { display: flex; flex-direction: column; }

.route-step {
  display: grid;
  grid-template-columns: 60px 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 4px 0;
}
.step-time {
  font-weight: 900;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: right;
}
.step-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  font-weight: 900;
}
.bus-icon-regional { background: var(--accent); color: white; }
.bus-icon-local { font-size: 18px; }
.step-icon-home { background: var(--grass); }
.step-body { display: flex; flex-direction: column; }
.step-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.step-sub { font-size: 13px; color: var(--ink-soft); font-weight: 600; }

.step-connector {
  display: grid;
  grid-template-columns: 60px 44px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 14px;
  padding: 0;
}
.connector-line {
  grid-column: 2;
  width: 3px;
  margin: 0 auto;
  height: 14px;
  background: repeating-linear-gradient(to bottom, var(--ink-soft) 0 4px, transparent 4px 8px);
  opacity: 0.4;
}
.connector-label {
  grid-column: 3;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  font-style: italic;
}

.wait-pill {
  display: inline-block;
  background: #FFE8E8;
  color: #C62828;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 4px;
}

.route-expand-btn {
  width: 100%;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 13px;
  padding: 10px;
  border-radius: 10px;
  margin-top: 12px;
  transition: background 0.15s;
}
.route-expand-btn:hover { background: var(--line); }

.route-details {
  margin-top: 14px;
  padding: 14px;
  background: #FAF7F0;
  border-radius: 14px;
}
.details-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.details-stops { display: flex; flex-direction: column; gap: 6px; }
.detail-stop {
  display: grid;
  grid-template-columns: 50px 16px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.detail-stop-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-soft); }
.detail-stop-dot { width: 10px; height: 10px; border-radius: 50%; margin: 0 auto; }
.detail-stop-name { color: var(--ink); font-weight: 600; }
.detail-stop.home .detail-stop-name { font-weight: 900; color: var(--grass); }
.detail-stop.transfer .detail-stop-name { font-weight: 900; color: var(--accent); }

.v1-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.v1-empty-emoji { font-size: 60px; margin-bottom: 16px; }
.v1-empty-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.v1-empty-hint { color: var(--ink-soft); font-size: 15px; }

.app-footer {
  text-align: center; color: #6E6380; font-size: 11px; font-weight: 700;
  padding: 18px 0 8px;
}

/* ============================================================
   Variation 2: "Mission Board" — játékos kártya design küldetés érzéssel
   ============================================================ */

.v2 {
  background: #0E1524;
  color: #F3E9D2;
  padding: 20px 24px;
  min-height: 100vh;
  font-family: 'Space Grotesk', 'Nunito', sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(124, 77, 255, 0.15), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(255, 110, 156, 0.12), transparent 40%);
}

.v2-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.v2-mission-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--sun);
  font-weight: 700;
  text-transform: uppercase;
}
.v2-mission-title {
  font-size: 30px;
  font-weight: 800;
  margin-top: 4px;
  line-height: 1.05;
}
.v2-mission-sub {
  font-size: 13px;
  color: rgba(243, 233, 210, 0.7);
  margin-top: 4px;
}

.v2-hud {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 16px;
  text-align: right;
  backdrop-filter: blur(12px);
}
.v2-hud-label { font-size: 10px; letter-spacing: 0.2em; opacity: 0.6; font-weight: 700; }
.v2-hud-time { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 2px; }

.v2-ready {
  background: linear-gradient(135deg, #C2185B 0%, #6B35FF 100%);
  border-radius: 20px;
  padding: 18px 22px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.v2-ready-title { font-size: 12px; letter-spacing: 0.2em; opacity: 0.9; font-weight: 700; text-transform: uppercase; }
.v2-ready-time { font-size: 52px; font-weight: 900; line-height: 1; margin: 4px 0; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.v2-ready-state { font-size: 14px; opacity: 0.95; font-weight: 700; }

.v2-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.v2-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #F3E9D2;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.15s;
}
.v2-btn:hover { background: rgba(255, 255, 255, 0.14); }
.v2-btn.active { background: var(--sun); color: #0E1524; border-color: var(--sun); }
.v2-btn.warn { background: #FF6E9C; color: #0E1524; border-color: #FF6E9C; }

.v2-routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .v2-routes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .v2-routes { grid-template-columns: 1fr; } }

.v2-route {
  max-width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 18px;
  transition: all 0.2s;
}
.v2-route:hover { background: rgba(255, 255, 255, 0.08); }
.v2-route.primary { background: linear-gradient(135deg, rgba(124, 77, 255, 0.25), rgba(124, 77, 255, 0.05)); border-color: rgba(124, 77, 255, 0.4); }

.v2-route-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.v2-route-rank { display: flex; align-items: center; gap: 10px; }
.v2-rank-num {
  width: 28px; height: 28px;
  background: var(--sun);
  color: #0E1524;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
}
.v2-route.primary .v2-rank-num { background: var(--accent-2); color: #0E1524; }
.v2-rank-label { font-size: 12px; font-weight: 700; color: rgba(243, 233, 210, 0.8); }
.v2-route-eta {
  font-size: 13px;
  font-weight: 800;
  color: var(--sun);
  font-variant-numeric: tabular-nums;
}

.v2-timeline {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.v2-stop { text-align: center; min-width: 44px; }
.v2-stop-time { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.v2-stop-label { font-size: 10px; opacity: 0.7; margin-top: 2px; white-space: nowrap; }
.v2-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.v2-connector-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: grid; place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 12px;
}
.v2-connector-icon.bus-local { font-size: 12px; }
.v2-connector-dur { font-size: 10px; opacity: 0.6; font-weight: 600; }

/* V2 vertical timeline (school direction) */
.v2-timeline-v { display: flex; flex-direction: column; gap: 0; padding: 8px 0; }
.v2-row {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0;
}
.v2-row-time {
  width: 52px; text-align: right; font-size: 16px; font-weight: 900;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.v2-row-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--accent); color: white; font-weight: 800; font-size: 13px;
  flex-shrink: 0;
}
.v2-row-text { font-size: 14px; font-weight: 600; }
.v2-row-line {
  margin-left: 57px; padding-left: 14px;
  border-left: 2px solid rgba(255,255,255,0.15);
  padding-top: 2px; padding-bottom: 2px;
  font-size: 11px; opacity: 0.55; font-weight: 600;
}

/* ============================================================
   Tweaks panel
   ============================================================ */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.3);
  z-index: 9999;
  min-width: 260px;
  font-family: 'Nunito', sans-serif;
  color: var(--ink);
  border: 2px solid var(--line);
}
.tweaks-panel h3 { font-size: 14px; font-weight: 900; margin-bottom: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.tweaks-row { display: flex; justify-content: space-between; align-items: center; margin: 10px 0; gap: 12px; font-size: 13px; font-weight: 700; }
.tweaks-row input[type="range"] { flex: 1; }
.tweaks-row input[type="number"] { width: 60px; padding: 4px 8px; border-radius: 8px; border: 2px solid var(--line); font-family: inherit; font-weight: 700; }
.tweaks-pill-group { display: flex; gap: 4px; }
.tweaks-pill { font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 10px; background: var(--line); color: var(--ink); border: none; cursor: pointer; }
.tweaks-pill.active { background: var(--ink); color: white; }

/* ============================================================
   Tooltips — data-tooltip hover
   ============================================================ */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  font-family: Nunito, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.12s 0.35s;
}
[data-tooltip]:hover::after { opacity: 1; }
[data-tooltip][data-tooltip-dir="up"]::after { top: auto; bottom: calc(100% + 7px); }
[data-tooltip][data-tooltip-dir="left"]::after { top: 50%; bottom: auto; left: auto; right: calc(100% + 7px); transform: translateY(-50%); }
[data-tooltip][data-tooltip-color="warn"]::after { background: #C0392B; }

/* ============================================================
   Accessibility — skip link
   ============================================================ */
.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  font-weight: 800;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  z-index: 100000;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

/* ============================================================
   Accessibility — focus-visible
   ============================================================ */
/* ============================================================
   Stop Picker
   ============================================================ */
.stop-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  width: 100%;
}
.stop-picker-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  flex-shrink: 0;
}
.stop-picker-input {
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 5px 10px;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 2px var(--line);
  background: var(--bg-panel);
  color: var(--ink);
  outline: none;
  width: 200px;
}
.stop-picker-input:focus {
  box-shadow: 0 0 0 2px var(--accent);
}
.stop-picker-default {
  font-size: 11px;
  opacity: 0.55;
  font-style: italic;
  white-space: nowrap;
}
.stop-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 280px;
  z-index: 100;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-panel);
  border: 2px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow);
}
.stop-picker-option {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.stop-picker-option:hover {
  background: var(--accent);
  color: white;
}
.stop-picker-selected {
  cursor: pointer;
}

/* Dark theme overrides for V2 */
.v2 .stop-picker-input {
  background: rgba(255,255,255,0.1);
  color: #F3E9D2;
  border-color: rgba(255,255,255,0.2);
}
.v2 .stop-picker-input::placeholder {
  color: rgba(243,233,210,0.5);
}
.v2 .stop-picker-input:focus {
  border-color: #FFC93C;
}
.v2 .stop-picker-default {
  color: #F3E9D2;
}
.v2 .stop-picker-dropdown {
  background: #1a2438;
  border-color: rgba(255,255,255,0.2);
}
.v2 .stop-picker-option {
  color: #F3E9D2;
}
.v2 .stop-picker-option:hover {
  background: #FFC93C;
  color: #0E1524;
}

/* ── Floating pill container + FABs ── */
.pill-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 8px;
  z-index: 99;
}
.fab-action {
  width: 44px; height: 44px; border-radius: 50%;
  background: #1a2a3a; color: white; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 22px; text-decoration: none; flex-shrink: 0;
  box-shadow: 0 3px 14px rgba(0,0,0,0.28);
  transition: transform 0.15s, background 0.12s, opacity 0.2s;
}
.fab-action:hover { transform: scale(1.1); background: #253545; }
.fab-action:active { transform: scale(0.95); }
.fab-timetable-wrap { position: relative; }
.mobile-pill {
  background: #1a2a3a; color: white;
  border-radius: 22px; padding: 3px;
  display: flex; align-items: center;
  font-family: Nunito, sans-serif;
  font-weight: 800; font-size: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
  overflow: hidden;
  transition: box-shadow 0.15s;
  max-width: calc(100vw - 28px);
}
.pill-extras {
  display: flex; align-items: center; gap: 7px;
  max-width: 260px; opacity: 1; overflow: hidden;
  transition: max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
}
.pill-zone {
  background: none; border: none; color: white;
  display: flex; align-items: center;
  cursor: pointer; padding: 5px 9px; border-radius: 18px;
  transition: background 0.12s; font-family: Nunito, sans-serif;
  font-weight: 800; font-size: 13px; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.pill-zone:hover { background: rgba(255,255,255,0.13); }
.pill-zone:active { transform: scale(0.95); }
.pill-zone-gear { font-size: 16px; padding: 5px 9px; }
.pill-zone-bus { font-size: 12px; }
.pill-zone-chips { max-width: 300px; overflow: hidden; padding: 5px 9px; transition: max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, padding 0.22s ease; }
.pill-sep-mid { width: 1px; height: 18px; background: rgba(255,255,255,0.18); flex-shrink: 0; align-self: center; transition: opacity 0.22s; }
.pill-collapsed .pill-zone-chips { max-width: 0; opacity: 0; padding: 0; }
.pill-collapsed .pill-sep-mid { opacity: 0; }
.pill-sep { width: 1px; height: 13px; background: rgba(255,255,255,0.22); flex-shrink: 0; }
.pill-chip { background: rgba(255,255,255,0.13); border-radius: 7px; padding: 2px 7px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill-chip.pill-hl { background: #FFC93C; color: #1a2a3a; }
.settings-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.38); z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.22s; }
.settings-scrim.open { opacity: 1; pointer-events: all; }
.settings-sheet { position: fixed; bottom: 0; left: 0; right: 0; background: white; border-radius: 20px 20px 0 0; z-index: 10000; transform: translateY(100%); visibility: hidden; transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.28s; max-height: 88dvh; overflow-y: scroll; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@media (min-width: 641px) {
  .settings-sheet { left: auto; max-width: 460px; border-radius: 20px 20px 0 0; }
}
.settings-sheet.open { transform: translateY(0); visibility: visible; transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s; }
.sheet-handle { width: 36px; height: 4px; background: #d0d8e0; border-radius: 2px; margin: 12px auto 0; }
.sheet-head { display: flex; align-items: center; padding: 10px 20px 4px; }
.sheet-head-title { flex: 1; font-size: 15px; font-weight: 900; color: #1a2a3a; }
.sheet-close { background: #1a2a3a; border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 14px; font-weight: 900; color: white; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.sheet-close:hover { background: #e53935; }
.sec-title { font-size: 10px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.09em; padding: 14px 20px 5px; }
.sheet-row { display: flex; align-items: center; padding: 12px 20px; gap: 13px; border-bottom: 1px solid #f0f4f8; }
.row-icon { font-size: 19px; width: 26px; text-align: center; flex-shrink: 0; }
.row-label { flex: 1; }
.row-label strong { display: block; font-size: 13px; font-weight: 800; color: #1a2a3a; }
.row-label small { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.toggle { width: 44px; height: 26px; border-radius: 13px; background: #d0d8e0; position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; border: none; }
.toggle.on { background: #FFC93C; }
.toggle::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: white; top: 3px; left: 3px; transition: transform 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
.toggle.on::after { transform: translateX(18px); }
.sel-pill { background: #f0f4f8; border: 2px solid transparent; border-radius: 10px; padding: 5px 11px; font-family: Nunito, sans-serif; font-weight: 700; font-size: 12px; color: #4a5a6a; cursor: pointer; transition: all 0.12s; }
.sel-pill.on { background: #1a2a3a; color: white; border-color: #1a2a3a; }
.sel-pill.on.green { background: #00796B; border-color: #00796B; }
.sel-pill.on.blue { background: #1565C0; border-color: #1565C0; }
.day-chips-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0 20px 4px; }
.day-pill { background: #f0f4f8; border: 2px solid transparent; border-radius: 9px; padding: 7px 2px; font-family: Nunito, sans-serif; font-weight: 700; font-size: 12px; color: #4a5a6a; cursor: pointer; text-align: center; transition: all 0.12s; }
.day-pill.on { background: #1a2a3a; color: white; border-color: #1a2a3a; }
.day-pill.today { border-color: #FFC93C; }
.day-pill.today.on { background: #cc9900; border-color: #cc9900; }


/* ============================================================
   Desktop settings panel
   ============================================================ */
.desktop-panel {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}
.desktop-panel-col {
  padding: 12px 18px 14px;
  border-right: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.desktop-panel-col:last-child {
  border-right: none;
}
.desktop-panel-col-actions {
  margin-left: auto;
  padding: 12px 18px 14px;
  border-left: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-end;
}
.desktop-panel .sec-title {
  padding: 0 0 4px 0;
}
.desktop-panel .day-pill {
  min-width: 34px;
  padding: 5px 4px;
  font-size: 11px;
}

/* ============================================================
   Mobile — max-width: 700px
   ============================================================ */
@media (max-width: 700px) {
  .v1 {
    padding: 12px 10px;
    padding-bottom: 180px;
  }
  .v1-header {
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
  }
  .v1-title {
    font-size: 26px;
  }
  .v1-subtitle {
    font-size: 14px;
    font-weight: 800;
  }
  .v1-clock {
    padding: 10px 16px;
    min-width: auto;
  }
  .v1-clock-label {
    font-size: 10px;
  }
  .v1-clock-time {
    font-size: 28px;
  }
  .v1-clock-date {
    font-size: 11px;
  }
  .v1-toolbar {
    gap: 4px;
    margin-bottom: 10px;
  }
  .tweaks-pill {
    font-size: 11px;
    padding: 5px 8px;
  }
  .v1-hero-banner {
    padding: 8px 12px;
    gap: 6px;
  }
  .v1-hero-label,
  .v1-hero-countdown {
    font-size: 10px;
  }
  .v1-hero-time {
    font-size: 26px;
    margin: 1px 0;
  }
  .v1-hero-sub {
    font-size: 11px;
  }
  .v1-hero-count {
    font-size: 24px;
  }
  [data-tooltip]::after { display: none; }
}

@media (max-width: 640px) {
  .pill-container { bottom: 24px; right: 14px; }
  .v1 { padding-bottom: 180px; }
}
@media (min-width: 641px) {
  .v1 { padding-bottom: 180px; }
}

/* ============================================================
   Accessibility — focus-visible
   ============================================================ */
[role="option"]:focus {
  outline: none;
  background-color: rgba(124, 77, 255, 0.08);
  box-shadow: inset 0 0 0 2px var(--accent);
  position: relative;
  z-index: 1;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
  box-shadow: 0 0 0 5px rgba(124, 77, 255, 0.25);
}

/* ============================================================
   Accessibility — prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .skip-link {
    transition: none;
  }
}
