:root{--ink:#16211d;--muted:#65736c;--cream:#f6f3ea;--card:#fffdfa;--green:#27624b;--lime:#dafa96;--line:#e5e0d5;--shadow:0 18px 50px rgba(31,52,42,.10)}*{box-sizing:border-box}html,body{margin:0;background:var(--cream);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}body{min-height:100vh}button,input,select{font:inherit}.app-shell{max-width:760px;margin:0 auto;padding:0 18px 60px}.topbar{display:flex;align-items:center;justify-content:space-between;padding:20px 2px}.brand{font-weight:850;font-size:20px;letter-spacing:-.4px;display:flex;gap:8px;align-items:center}.brand-mark{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--green);color:#fff}.ghost,.backlink{border:0;background:transparent;color:var(--muted);font-weight:700;cursor:pointer}.view{display:none}.view.active{display:block}.hero{padding:34px 3px 20px}.eyebrow{font-size:12px;font-weight:900;letter-spacing:.14em;color:var(--green);margin-bottom:10px}.hero h1{font-size:clamp(42px,9vw,72px);line-height:.98;letter-spacing:-.055em;margin:0 0 18px}.hero h1 span{color:var(--green)}.hero p{font-size:18px;line-height:1.55;color:var(--muted);max-width:600px}.card{background:var(--card);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow)}.form-card{padding:22px}.form-card label{display:block;font-weight:800;margin:20px 0 10px}.form-card label:first-child{margin-top:0}.segmented{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.segmented button,.chip{border:1px solid var(--line);background:#fff;border-radius:14px;padding:12px 8px;font-weight:750;color:var(--ink);cursor:pointer}.segmented button.selected,.chip.selected{background:var(--ink);color:#fff;border-color:var(--ink)}.ages-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px}.age-box{display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:#fff;border-radius:14px;padding:10px 12px}.age-box span{font-size:13px;color:var(--muted)}.age-box input{width:100%;border:0;outline:0;font-size:18px;font-weight:800;background:transparent}.form-card input[type=range]{width:100%;accent-color:var(--green)}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.grid-2 input,.grid-2 select{width:100%;border:1px solid var(--line);border-radius:14px;background:#fff;padding:13px}.chips{display:flex;flex-wrap:wrap;gap:8px}.chip{font-size:14px}.primary,.secondary{border:0;border-radius:16px;padding:15px 18px;font-weight:850;cursor:pointer}.primary{background:var(--green);color:#fff}.primary.big{width:100%;font-size:17px;margin-top:24px;display:flex;justify-content:space-between}.secondary{background:#fff;color:var(--ink);border:1px solid var(--line)}.micro{text-align:center;font-size:12px;color:var(--muted);margin:10px 0 0}.trust-row{display:flex;justify-content:center;flex-wrap:wrap;gap:16px;font-size:12px;color:var(--muted);margin:16px}.plan-head{padding:20px 2px 10px}.plan-head h2{font-size:38px;line-height:1.05;letter-spacing:-.04em;margin:4px 0 18px}.stats{display:flex;flex-wrap:wrap;gap:8px}.stat{background:#eaf0eb;border-radius:999px;padding:8px 11px;font-size:13px;font-weight:750}.progress-card{padding:16px 18px;margin:8px 0 14px}.progress-row{display:flex;justify-content:space-between;font-size:14px}.progress-track{height:7px;background:#ece8de;border-radius:99px;margin-top:10px;overflow:hidden}.progress-track div{height:100%;width:0;background:var(--green);transition:.3s}.activity-card{position:relative;overflow:hidden;background:var(--ink);color:#fff;border-radius:28px;padding:26px;min-height:330px;box-shadow:0 24px 60px rgba(22,33,29,.2)}.activity-card:after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;right:-70px;top:-70px;background:rgba(218,250,150,.13)}.activity-kicker{font-size:12px;letter-spacing:.15em;font-weight:900;color:var(--lime)}.activity-icon{font-size:54px;margin:22px 0 10px}.activity-card h3{font-size:34px;letter-spacing:-.04em;line-height:1.05;margin:0 0 10px;max-width:85%}.activity-card p{color:#dce5e0;font-size:17px;line-height:1.5;max-width:90%}.activity-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:22px}.activity-meta span{background:rgba(255,255,255,.1);padding:7px 10px;border-radius:999px;font-size:12px}.actions{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin:12px 0}.rescue{width:100%;background:#ffe0c0;border:0;color:#65370d;padding:15px;border-radius:16px;font-weight:850;cursor:pointer}.timeline{margin-top:16px;padding:18px}.timeline-title{font-weight:900;margin-bottom:8px}.timeline-item{display:grid;grid-template-columns:58px 36px 1fr;gap:8px;align-items:start;padding:12px 0;border-top:1px solid var(--line)}.timeline-item:first-of-type{border-top:0}.timeline-time{font-size:13px;color:var(--muted);font-weight:700}.timeline-icon{font-size:21px}.timeline-name{font-weight:750}.timeline-sub{font-size:12px;color:var(--muted);margin-top:2px}.sheet-wrap{position:fixed;inset:0;z-index:30;display:flex;align-items:flex-end;justify-content:center}.sheet-wrap.hidden{display:none}.sheet-backdrop{position:absolute;inset:0;background:rgba(8,13,11,.55);backdrop-filter:blur(3px)}.sheet{position:relative;background:var(--card);border-radius:28px 28px 0 0;padding:16px 20px 28px;width:min(760px,100%);z-index:1}.sheet-handle{width:42px;height:5px;background:#d4d0c8;border-radius:9px;margin:0 auto 18px}.sheet h3{font-size:28px;letter-spacing:-.03em;margin:0}.sheet p{color:var(--muted)}.rescue-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.rescue-grid button{border:1px solid var(--line);background:#fff;border-radius:18px;padding:17px 10px;font-size:26px}.rescue-grid span{display:block;font-size:13px;font-weight:800;margin-top:6px}@media(max-width:520px){.app-shell{padding:0 14px 40px}.hero{padding-top:24px}.hero p{font-size:16px}.form-card{padding:16px}.grid-2{grid-template-columns:1fr}.plan-head h2{font-size:32px}.activity-card{min-height:310px;padding:22px}.activity-card h3{font-size:31px}.actions{grid-template-columns:1fr 1.2fr}}
.timeline-item.current{background:#f0f6e7;border-radius:14px;margin:4px -8px;padding:12px 8px;border-top-color:transparent}.timeline-item.current .timeline-time,.timeline-item.current .timeline-name{color:var(--green);font-weight:900}.timeline-item.done{opacity:.48}.timeline-item.done .timeline-name{text-decoration:line-through}.timeline-item.arrival{border-top:2px solid var(--line);margin-top:4px}
.favorite-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.favorite-btn,.repeat-btn{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:14px;padding:12px 14px;font-weight:850;cursor:pointer}.favorite-btn.selected{background:#fff4bf;border-color:#e7cf68}.hidden{display:none!important}.idea-box{position:relative;z-index:1;margin-top:18px;padding:14px;border-radius:16px;background:rgba(255,255,255,.1)}.idea-title{font-size:13px;font-weight:900;color:var(--lime);margin-bottom:9px}.idea-chips{display:flex;flex-wrap:wrap;gap:7px}.idea-chips span{background:rgba(255,255,255,.12);border-radius:12px;padding:8px 10px;font-size:13px;line-height:1.25}.favorites-panel{margin:14px 0;padding:16px}.favorites-help{font-size:13px;color:var(--muted);margin:4px 0 8px}.fav-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}.fav-row:first-child{border-top:0}.fav-row button{border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 10px;font-weight:800}.repeat-tag{font-size:10px;background:#fff4bf;color:#66520b;border-radius:999px;padding:3px 6px;white-space:nowrap}
.idea-chip-btn{border:0;background:rgba(255,255,255,.12);color:#fff;border-radius:12px;padding:9px 11px;font-size:13px;text-align:left;cursor:pointer}.more-ideas{margin-top:10px;border:0;background:transparent;color:var(--lime);font-weight:900;padding:4px 0;cursor:pointer}.ideas-sheet{max-height:82vh;overflow:auto}.ideas-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.ideas-head h3{margin:0}.sheet-close{border:1px solid var(--line);background:#fff;border-radius:12px;width:44px;height:44px;font-weight:900;cursor:pointer}.ideas-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.idea-card{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);background:#fff;border-radius:16px;padding:14px;text-align:left;line-height:1.35;cursor:pointer;min-height:76px}.idea-card:active{transform:scale(.99)}.idea-num{font-size:11px;font-weight:900;color:var(--green);background:#edf5ef;border-radius:999px;padding:4px 6px;flex:none}.audio-game{position:relative;z-index:1;margin-top:18px;padding:16px;border-radius:18px;background:rgba(255,255,255,.10)}.audio-status{font-size:12px;font-weight:900;letter-spacing:.08em;color:var(--lime);margin-bottom:10px}.audio-play{width:100%;border:0;border-radius:14px;background:var(--lime);color:#223018;padding:14px;font-size:17px;font-weight:900;cursor:pointer}.audio-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.audio-small,.audio-next{border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.08);color:#fff;border-radius:12px;padding:11px;font-weight:800;cursor:pointer}.audio-next{width:100%;margin-top:8px}.audio-answer{margin-top:10px;padding:10px 12px;border-radius:12px;background:rgba(0,0,0,.16);color:#b9c5bf;font-size:14px}.audio-answer.shown{background:#edf8d0;color:#233019}.audio-note{font-size:11px!important;color:#aebcb5!important;margin:10px 0 0!important}.chip[data-pref="audio"]{position:relative}.chip[data-pref="audio"].selected:after{content:"ON";margin-left:6px;font-size:9px;background:var(--lime);color:#26351d;padding:2px 5px;border-radius:99px}
@media(max-width:520px){.ideas-grid{grid-template-columns:1fr}.ideas-sheet{max-height:88vh}.audio-actions{grid-template-columns:1fr 1fr}}
.audio-pacing{font-size:12px;line-height:1.4;color:#dce5e0;margin:-2px 0 12px}.audio-bonus{margin-top:8px;padding-top:8px;border-top:1px solid rgba(35,48,25,.16);font-weight:800}
.pause-flex-actions{margin:12px 0}.pause-delay-btn{width:100%;border:0;border-radius:16px;padding:15px 16px;background:#dafa96;color:#26351d;font-weight:900;cursor:pointer}.history-list{display:grid;gap:9px;margin-top:14px}.history-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--line);background:#fff;border-radius:15px;padding:12px}.history-main{display:flex;align-items:center;gap:10px;min-width:0}.history-icon{font-size:24px}.history-name{font-weight:850}.history-meta{font-size:12px;color:var(--muted);margin-top:2px}.history-row button{border:0;background:var(--green);color:#fff;border-radius:11px;padding:9px 10px;font-weight:850;white-space:nowrap;cursor:pointer}.timeline-replay{margin-top:6px;border:1px solid var(--line);background:#fff;border-radius:9px;padding:5px 8px;font-size:11px;font-weight:800;color:var(--green);cursor:pointer}.timeline-item.done{opacity:.62}.timeline-item.done .timeline-replay{opacity:1;text-decoration:none}
.screen-choice{display:grid;grid-template-columns:1fr 1fr;gap:8px}.screen-choice button{border:1px solid var(--line);background:#fff;border-radius:14px;padding:13px 10px;font-weight:850;color:var(--ink);cursor:pointer}.screen-choice button.selected{background:var(--ink);color:#fff;border-color:var(--ink)}.screen-hint{font-size:12px;color:var(--muted);margin:8px 2px 0}.screen-badge{background:#dceaff!important;color:#183b62!important}.screen-note{position:relative;z-index:1;margin-top:12px;padding:10px 12px;border-radius:12px;background:rgba(218,234,255,.13);font-size:12px;color:#dceaff}
.preview-panel{padding:20px;margin:8px 0 16px}.preview-panel h3{font-size:26px;margin:2px 0 8px}.preview-panel p{color:var(--muted);line-height:1.45}.preview-actions{display:grid;grid-template-columns:1fr 1.3fr;gap:10px;margin-top:16px}.prep-list{display:grid;gap:8px;margin-top:14px}.prep-item{display:flex;gap:10px;align-items:flex-start;background:#f7f5ef;border-radius:14px;padding:11px 12px}.prep-icon{font-size:20px}.prep-name{font-weight:850}.prep-sub{font-size:12px;color:var(--muted);margin-top:2px}.timeline-adjust{margin-top:6px;border:1px solid var(--line);background:#fff;border-radius:9px;padding:6px 9px;font-size:11px;font-weight:850;color:var(--green);cursor:pointer}.previewing .travel-mode{display:none!important}.previewing .timeline-item.done{opacity:1}.previewing .timeline-item.current{background:transparent;margin:0;padding:12px 0;border-radius:0}.previewing .timeline-item.current .timeline-time,.previewing .timeline-item.current .timeline-name{color:inherit}.material-tag{font-size:10px;background:#eef1f6;color:#40506a;border-radius:999px;padding:3px 6px;white-space:nowrap}
@media(max-width:520px){.preview-actions{grid-template-columns:1fr}.preview-panel{padding:16px}}
.preview-lead{color:var(--muted);font-size:16px;line-height:1.5}.prep-card{padding:18px;margin:8px 0 16px}.prep-list{display:grid;gap:8px;margin-top:10px}.prep-item{display:flex;gap:9px;align-items:flex-start;padding:9px 10px;background:#f6f3ea;border-radius:12px}.prep-item b{display:block}.prep-item span{font-size:12px;color:var(--muted)}.print-kit-btn{margin-top:12px}.preview-list{padding:18px}.preview-item{display:grid;grid-template-columns:58px 36px 1fr auto;gap:8px;align-items:start;padding:13px 0;border-top:1px solid var(--line)}.preview-item:first-of-type{border-top:0}.preview-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.preview-actions button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:7px 9px;font-size:12px;font-weight:800;cursor:pointer}.preview-item .material-tag{display:inline-block;margin-top:5px;font-size:10px;background:#fff4bf;color:#66520b;border-radius:999px;padding:3px 6px}.preview-validation{position:sticky;bottom:0;padding:14px 0 8px;background:linear-gradient(transparent,var(--cream) 20%)}.print-kit{display:none}
@media(max-width:520px){.preview-item{grid-template-columns:48px 30px 1fr}.preview-actions{grid-column:3;justify-content:flex-start}.preview-validation .big{margin-top:0}}
@media print{body>*:not(.print-kit){display:none!important}.print-kit{display:block!important;background:#fff;color:#111;padding:20px;font-family:Arial,sans-serif}.print-kit h1,.print-kit h2{margin:0 0 12px}.print-page{break-after:page;padding:10mm}.print-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.print-card{border:1px solid #aaa;border-radius:8px;padding:12px;min-height:95px}.print-bingo{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.print-bingo div{border:1px solid #777;min-height:70px;padding:8px;text-align:center}.print-cut{border:1px dashed #777;padding:12px;margin:8px 0}}
.pause-mode{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px}.pause-mode button{border:1px solid var(--line);background:#fff;border-radius:12px;padding:10px 8px;font-size:12px;font-weight:850;color:var(--ink);cursor:pointer}.pause-mode button.selected{background:var(--ink);color:#fff;border-color:var(--ink)}.pause-setting{display:flex;align-items:center;gap:9px;margin-top:9px}.pause-setting input{width:90px!important;font-weight:850}.pause-setting span{font-size:12px;color:var(--muted);line-height:1.25}
.pause-select{width:100%;appearance:none;border:1px solid var(--line);border-radius:14px;background:#fff;padding:13px 42px 13px 14px;font-weight:800;color:var(--ink);background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 18px) 18px,calc(100% - 13px) 18px;background-size:5px 5px,5px 5px;background-repeat:no-repeat}.pause-auto-card{display:flex;align-items:center;gap:10px;margin-top:10px;padding:12px 14px;border-radius:14px;background:#edf5ef;border:1px solid #d9e8dd}.pause-auto-card strong,.pause-auto-card span{display:block}.pause-auto-card strong{font-size:13px;color:var(--green)}.pause-auto-card span{font-size:12px;color:var(--muted);margin-top:2px;line-height:1.35}.pause-control-card{display:grid;grid-template-columns:44px 1fr 44px;gap:10px;align-items:center;margin-top:10px;padding:10px;border-radius:16px;background:#f8f6f0;border:1px solid var(--line)}.stepper-btn{width:44px;height:44px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--ink);font-size:24px;font-weight:700;cursor:pointer}.stepper-value{text-align:center}.stepper-value strong,.stepper-value span{display:block}.stepper-value strong{font-size:20px;letter-spacing:-.02em}.stepper-value span{font-size:11px;color:var(--muted);margin-top:1px}

/* Dark mode — cool neutral palette */


.top-actions{display:flex;align-items:center;gap:8px}.theme-toggle{width:38px;height:38px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--ink);display:grid;place-items:center;font-size:18px;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.05)}.theme-toggle:hover{transform:translateY(-1px)}

/* Explicit dark theme overrides system preference */
html[data-theme="dark"]{
  --ink:#eef4f7;--muted:#9aa9b6;--cream:#0f1720;--card:#151f2b;--green:#5eead4;--lime:#7dd3fc;--line:#2b3a49;--shadow:0 18px 50px rgba(0,0,0,.28);
  color-scheme:dark;
}
html[data-theme="dark"],html[data-theme="dark"] body{background:#0f1720;color:#eef4f7}
html[data-theme="dark"] .card,html[data-theme="dark"] .sheet,html[data-theme="dark"] .form-card,html[data-theme="dark"] .preview-list,html[data-theme="dark"] .prep-card,html[data-theme="dark"] .progress-card,html[data-theme="dark"] .timeline,html[data-theme="dark"] .favorites-panel{background:#151f2b;border-color:#2b3a49}
html[data-theme="dark"] .segmented button,html[data-theme="dark"] .chip,html[data-theme="dark"] .grid-2 input,html[data-theme="dark"] .grid-2 select,html[data-theme="dark"] .age-box,html[data-theme="dark"] .secondary,html[data-theme="dark"] .favorite-btn,html[data-theme="dark"] .repeat-btn,html[data-theme="dark"] .fav-row button,html[data-theme="dark"] .sheet-close,html[data-theme="dark"] .idea-card,html[data-theme="dark"] .history-row,html[data-theme="dark"] .timeline-replay,html[data-theme="dark"] .screen-choice button,html[data-theme="dark"] .preview-actions button,html[data-theme="dark"] .pause-select,html[data-theme="dark"] .stepper-btn,html[data-theme="dark"] .theme-toggle{background:#1b2734;color:#eef4f7;border-color:#344657}
html[data-theme="dark"] .segmented button.selected,html[data-theme="dark"] .chip.selected,html[data-theme="dark"] .screen-choice button.selected{background:#243445;color:#fff;border-color:#5eead4}
html[data-theme="dark"] .primary,html[data-theme="dark"] .brand-mark{background:#14b8a6;color:#071715}
html[data-theme="dark"] .activity-card{background:#111b26;color:#f5f9fb}
html[data-theme="dark"] .stat{background:#1f2d3a;color:#dce7ed}
html[data-theme="dark"] .pause-auto-card{background:#172b37;border-color:#294252}
html[data-theme="dark"] .pause-control-card,html[data-theme="dark"] .prep-item{background:#192531;border-color:#2d3d4d}
html[data-theme="dark"] .preview-validation{background:linear-gradient(transparent,#0f1720 20%)}

/* Hard light-mode reset: must fully override OS dark-mode rules */
html[data-theme="light"]{
  --ink:#17212b;
  --muted:#667786;
  --cream:#f6f8fb;
  --card:#ffffff;
  --green:#0f766e;
  --lime:#d8f3f0;
  --line:#dfe6ec;
  --shadow:0 16px 44px rgba(24,39,52,.08);
  color-scheme:light!important;
}
html[data-theme="light"],
html[data-theme="light"] body{
  background:#f6f8fb!important;
  color:#17212b!important;
}
html[data-theme="light"] .card,
html[data-theme="light"] .sheet,
html[data-theme="light"] .form-card,
html[data-theme="light"] .preview-list,
html[data-theme="light"] .prep-card,
html[data-theme="light"] .progress-card,
html[data-theme="light"] .timeline,
html[data-theme="light"] .favorites-panel{
  background:#ffffff!important;
  border-color:#dfe6ec!important;
  color:#17212b!important;
}
html[data-theme="light"] .segmented button,
html[data-theme="light"] .chip,
html[data-theme="light"] .grid-2 input,
html[data-theme="light"] .grid-2 select,
html[data-theme="light"] .age-box,
html[data-theme="light"] .secondary,
html[data-theme="light"] .favorite-btn,
html[data-theme="light"] .repeat-btn,
html[data-theme="light"] .fav-row button,
html[data-theme="light"] .sheet-close,
html[data-theme="light"] .idea-card,
html[data-theme="light"] .history-row,
html[data-theme="light"] .timeline-replay,
html[data-theme="light"] .screen-choice button,
html[data-theme="light"] .preview-actions button,
html[data-theme="light"] .pause-select,
html[data-theme="light"] .stepper-btn,
html[data-theme="light"] .theme-toggle{
  background:#ffffff!important;
  color:#17212b!important;
  border-color:#dfe6ec!important;
}
html[data-theme="light"] .segmented button.selected,
html[data-theme="light"] .chip.selected,
html[data-theme="light"] .screen-choice button.selected{
  background:#18313d!important;
  color:#ffffff!important;
  border-color:#18313d!important;
  box-shadow:none!important;
}
html[data-theme="light"] .primary,
html[data-theme="light"] .brand-mark{
  background:#0f766e!important;
  color:#ffffff!important;
}
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .hero h1 span,
html[data-theme="light"] .timeline-item.current .timeline-time,
html[data-theme="light"] .timeline-item.current .timeline-name,
html[data-theme="light"] .timeline-replay,
html[data-theme="light"] .more-ideas,
html[data-theme="light"] .idea-num{
  color:#0f766e!important;
}
html[data-theme="light"] .activity-card{
  background:#18313d!important;
  color:#ffffff!important;
  box-shadow:0 22px 52px rgba(20,45,57,.18)!important;
}
html[data-theme="light"] .activity-card:after{background:rgba(45,212,191,.10)!important}
html[data-theme="light"] .activity-card p,
html[data-theme="light"] .audio-pacing{color:#d8e5e9!important}
html[data-theme="light"] .activity-kicker,
html[data-theme="light"] .idea-title,
html[data-theme="light"] .audio-status,
html[data-theme="light"] .more-ideas{color:#7dd3fc!important}
html[data-theme="light"] .activity-meta span,
html[data-theme="light"] .idea-box,
html[data-theme="light"] .idea-chip-btn,
html[data-theme="light"] .audio-game,
html[data-theme="light"] .audio-small,
html[data-theme="light"] .audio-next{
  background:rgba(255,255,255,.10)!important;
  color:#ffffff!important;
  border-color:rgba(255,255,255,.16)!important;
}
html[data-theme="light"] .audio-play{background:#5eead4!important;color:#10302c!important}
html[data-theme="light"] .audio-answer{background:rgba(0,0,0,.14)!important;color:#d6e0e4!important}
html[data-theme="light"] .audio-answer.shown{background:#dff7f2!important;color:#15332f!important}
html[data-theme="light"] .audio-note{color:#b8c7ce!important}
html[data-theme="light"] .stat{
  background:#edf4f5!important;
  color:#27434a!important;
}
html[data-theme="light"] .screen-badge{
  background:#e6f2ff!important;
  color:#1c4d78!important;
}
html[data-theme="light"] .screen-note{
  background:#edf7ff!important;
  color:#315f7d!important;
}
html[data-theme="light"] .timeline-item.current{
  background:#edf7f7!important;
}
html[data-theme="light"] .repeat-tag,
html[data-theme="light"] .preview-item .material-tag,
html[data-theme="light"] .favorite-btn.selected{
  background:#e5f3f3!important;
  color:#175f5a!important;
  border-color:#c9e5e2!important;
}
html[data-theme="light"] .rescue{
  background:#fff0f3!important;
  color:#8f2941!important;
  border:1px solid #f2ced8!important;
}
html[data-theme="light"] .pause-delay-btn{
  background:#dff6f2!important;
  color:#125f58!important;
  border:1px solid #bfe7e0!important;
}
html[data-theme="light"] .pause-auto-card{
  background:#edf7f7!important;
  border-color:#d4e8e8!important;
}
html[data-theme="light"] .pause-auto-card strong{color:#0f766e!important}
html[data-theme="light"] .pause-control-card,
html[data-theme="light"] .prep-item{
  background:#f8fafc!important;
  border-color:#dfe6ec!important;
}
html[data-theme="light"] .progress-track{background:#e4ebf0!important}
html[data-theme="light"] .progress-track div{background:#14b8a6!important}
html[data-theme="light"] .sheet-backdrop{background:rgba(15,23,32,.42)!important}
html[data-theme="light"] .sheet-handle{background:#cbd5dd!important}
html[data-theme="light"] .idea-num{background:#eaf5f5!important}
html[data-theme="light"] .preview-validation{
  background:linear-gradient(transparent,#f6f8fb 20%)!important;
}
html[data-theme="light"] .ghost,
html[data-theme="light"] .backlink,
html[data-theme="light"] .screen-hint,
html[data-theme="light"] .micro,
html[data-theme="light"] .timeline-sub,
html[data-theme="light"] .favorites-help,
html[data-theme="light"] .prep-item span,
html[data-theme="light"] .stepper-value span,
html[data-theme="light"] .pause-auto-card span{
  color:#667786!important;
}
html[data-theme="light"] input[type=range]{accent-color:#14b8a6!important}

/* Prevent Chrome/Android from anchoring the viewport to controls from the previous screen */
html,body,.view{overflow-anchor:none}

html,body,.view{overflow-anchor:none}
.rescue-mode-bar{margin:12px 0;padding:14px 15px;border-radius:16px;background:#fff1e8;border:1px solid #f3d0ba;display:flex;align-items:center;justify-content:space-between;gap:14px}.rescue-mode-bar strong,.rescue-mode-bar span{display:block}.rescue-mode-bar strong{font-size:14px}.rescue-mode-bar span{font-size:12px;color:var(--muted);margin-top:3px}.rescue-mode-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.rescue-mode-actions button{border:1px solid #e5b99d;background:#fff;border-radius:10px;padding:8px 10px;font-size:11px;font-weight:850;cursor:pointer}.rescue-help{font-size:12px;color:var(--muted);margin:14px 2px 2px}.sick-safe-note{position:relative;z-index:1;margin-top:12px;padding:10px 12px;border-radius:12px;background:rgba(125,211,252,.12);font-size:12px;color:#d7f0ff}
html[data-theme="dark"] .rescue-mode-bar{background:#34262c;border-color:#5a3d49}html[data-theme="dark"] .rescue-mode-actions button{background:#1b2734;color:#eef4f7;border-color:#5a3d49}
html[data-theme="light"] .rescue-mode-bar{background:#fff3ee!important;border-color:#f0d2c4!important}html[data-theme="light"] .rescue-mode-actions button{background:#fff!important;color:#5e2f24!important;border-color:#ecc6b5!important}
@media(max-width:520px){.rescue-mode-bar{align-items:flex-start;flex-direction:column}.rescue-mode-actions{width:100%;justify-content:flex-start}}

/* Cleaner travel action hierarchy */
.travel-actions{display:grid;gap:10px;margin:14px 0 18px}.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.quick-action{min-height:48px;border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:14px;padding:10px 12px;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;gap:7px;text-align:center;cursor:pointer}.quick-action span{font-size:17px;line-height:1}.quick-action.selected{border-color:#e0be5a;background:#fff7d6}.next-main{width:100%;min-height:58px;border-radius:16px;font-size:17px;font-weight:900;display:flex;align-items:center;justify-content:center;gap:10px}.next-main span{font-size:20px}.rescue-compact{justify-self:center;width:auto!important;min-height:42px;padding:9px 14px!important;border-radius:12px!important;font-size:13px!important;font-weight:800!important;box-shadow:none!important;margin:0!important}.more-ideas{font-size:15px;line-height:1.25}
html[data-theme="dark"] .quick-action{background:#1b2734;color:#eef4f7;border-color:#344657}html[data-theme="dark"] .quick-action.selected{background:#263b52;color:#d7ecff;border-color:#365873}
html[data-theme="light"] .quick-action{background:#fff!important;color:#17212b!important;border-color:#dfe6ec!important}html[data-theme="light"] .quick-action.selected{background:#e8f4f3!important;color:#145f58!important;border-color:#c6e3df!important}
@media(max-width:390px){.quick-actions{grid-template-columns:1fr}.rescue-compact{justify-self:stretch;width:100%!important}}
/* Travel actions order: primary first, compact secondary row, SOS last */
.travel-actions{display:grid;gap:10px;margin:12px 0 18px}
.travel-actions .next-main{order:1}
.travel-actions .quick-actions{order:2}
.travel-actions .rescue-compact{order:3}
.quick-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
@media(max-width:390px){.quick-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.quick-action{font-size:12px;padding:9px 8px;min-height:46px}.rescue-compact{justify-self:center!important;width:auto!important}}
/* Three compact secondary actions on one row */
.travel-actions .quick-actions{grid-template-columns:minmax(0,1.2fr) minmax(0,.9fr) minmax(0,.8fr)!important}
.quick-sos{border-color:#8f3349!important;color:#b63a59!important;background:#fff7f9!important}
html[data-theme="dark"] .quick-sos{background:#311d25!important;color:#ffb8c9!important;border-color:#6f3245!important}
html[data-theme="light"] .quick-sos{background:#fff4f7!important;color:#9f2947!important;border-color:#efc6d2!important}
@media(max-width:390px){
  .travel-actions .quick-actions{grid-template-columns:minmax(0,1.15fr) minmax(0,.9fr) minmax(0,.8fr)!important}
  .quick-actions .quick-action{font-size:11px!important;padding:8px 5px!important;line-height:1.15}
  .quick-actions .quick-action span{font-size:15px}
}

/* Whole idea card opens the full idea bank */
.idea-box-clickable{width:100%;border:1px solid rgba(255,255,255,.12);text-align:left;cursor:pointer;color:inherit;font:inherit;transition:transform .12s ease,border-color .12s ease,background .12s ease}
.idea-box-clickable:active{transform:scale(.995)}
.idea-box-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.idea-box-clickable .idea-title{margin-bottom:9px}
.idea-box-chevron{font-size:28px;line-height:1;color:var(--lime);font-weight:500}
.idea-box-clickable .idea-chip-btn{pointer-events:none}
html[data-theme="dark"] .idea-box-clickable{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.12)}
html[data-theme="dark"] .idea-box-clickable:hover{background:rgba(255,255,255,.09);border-color:rgba(125,211,252,.25)}
html[data-theme="light"] .idea-box-clickable{background:rgba(255,255,255,.10)!important;border-color:rgba(255,255,255,.16)!important;color:#fff!important}
html[data-theme="light"] .idea-box-chevron{color:#7dd3fc!important}
.more-ideas{display:none!important}

/* Equal secondary travel actions */
.travel-actions .quick-actions{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
.travel-actions .quick-actions .quick-action{
  width:100%;
  min-width:0;
  min-height:52px;
  padding:9px 7px!important;
  font-size:12px!important;
  line-height:1.15;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:6px;
  border-radius:14px;
}
.travel-actions .quick-actions .quick-action span{
  flex:0 0 auto;
  font-size:16px!important;
}
@media(max-width:390px){
  .travel-actions .quick-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:6px!important;
  }
  .travel-actions .quick-actions .quick-action{
    min-height:54px;
    padding:8px 5px!important;
    font-size:11px!important;
  }
}

/* === Brand / visual direction === */
.brand{gap:10px}
.brand-logo{width:36px;height:36px;border-radius:12px;background:#0f766e;color:#fff;display:grid;place-items:center;box-shadow:0 8px 22px rgba(15,118,110,.18)}
.brand-logo svg{width:28px;height:28px;overflow:visible}
.brand-logo .logo-road{fill:none;stroke:currentColor;stroke-width:4;stroke-linecap:round}
.brand-logo .logo-dash{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;opacity:.8}
.brand-logo .logo-start{fill:#7dd3fc}
.brand-logo .logo-sun{fill:#fbbf24}
.brand-word{font-size:20px;letter-spacing:-.045em}
.brand-word b{font-weight:900;color:var(--green)}

.hero-branded{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(280px,.92fr);gap:28px;align-items:center;padding:26px 0 28px}
.hero-copy{padding:10px 3px}
.hero-branded h1{font-size:clamp(42px,7vw,68px);max-width:560px}
.hero-branded p{max-width:520px}
.hero-proof{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}
.hero-proof span{padding:7px 10px;border-radius:999px;background:var(--card);border:1px solid var(--line);box-shadow:0 5px 18px rgba(24,39,52,.05);font-size:12px;font-weight:800;color:var(--muted)}

.hero-visual{position:relative;border-radius:32px;overflow:hidden;box-shadow:0 22px 55px rgba(23,58,67,.13);border:1px solid rgba(15,118,110,.12);background:#eaf8f6;min-height:290px}
.hero-visual svg{display:block;width:100%;height:100%;min-height:290px}
.hero-sun{fill:#ffd66b}
.hero-cloud{fill:#fff;opacity:.84}
.hero-hill-back{fill:#bde7df}
.hero-road{stroke:#203844;stroke-width:70;stroke-linecap:round}
.hero-road-line{stroke:#fff;stroke-width:4;stroke-dasharray:16 15;stroke-linecap:round;opacity:.9}
.hero-car path:first-child{fill:#f97360}
.hero-car-window{fill:#bfe8ef!important}
.hero-car circle{fill:#203844}
.hero-car .hero-wheel-center{fill:#dfe7eb}
.hero-sign rect{fill:#fff;stroke:#d7e4e7;stroke-width:2}
.hero-sign path{stroke:#7b8d95;stroke-width:5}
.hero-sign circle{fill:#14b8a6}
.hero-tree path{stroke:#765c46;stroke-width:8;stroke-linecap:round}
.hero-tree circle{fill:#4fa89c}
.hero-visual-caption{position:absolute;left:16px;bottom:16px;right:16px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;padding:11px 13px;border-radius:16px;background:rgba(255,255,255,.88);backdrop-filter:blur(10px);box-shadow:0 8px 24px rgba(22,45,52,.10);color:#203844}
.hero-visual-caption .route-dot{grid-row:1/3;width:11px;height:11px;border-radius:50%;background:#14b8a6;box-shadow:0 0 0 5px rgba(20,184,166,.13)}
.hero-visual-caption strong{font-size:12px}
.hero-visual-caption span:last-child{font-size:11px;color:#657986}

.plan-head-branded{position:relative;overflow:hidden;border-radius:26px;padding:22px 20px 18px;margin:4px 0 12px;background:linear-gradient(135deg,rgba(20,184,166,.08),rgba(125,211,252,.06));border:1px solid rgba(15,118,110,.09)}
.plan-head-branded:after{content:"";position:absolute;width:180px;height:180px;right:-80px;top:-80px;border-radius:50%;border:28px solid rgba(20,184,166,.06)}
.plan-head-branded>*{position:relative;z-index:1}

html[data-theme="dark"] .brand-logo{background:#14b8a6;color:#071715}
html[data-theme="dark"] .brand-word b{color:#5eead4}
html[data-theme="dark"] .hero-proof span{background:#162330;border-color:#2d4150;color:#b6c4ce;box-shadow:none}
html[data-theme="dark"] .hero-visual{background:#102733;border-color:#284657;box-shadow:0 24px 60px rgba(0,0,0,.25)}
html[data-theme="dark"] .hero-sky{fill:#142b37}
html[data-theme="dark"] .hero-cloud{fill:#d5e8ee;opacity:.18}
html[data-theme="dark"] .hero-hill-back{fill:#244b50}
html[data-theme="dark"] .hero-hill-front{fill:#1c5d5b}
html[data-theme="dark"] .hero-road{stroke:#0d1720}
html[data-theme="dark"] .hero-visual-caption{background:rgba(15,27,38,.88);color:#edf6f8}
html[data-theme="dark"] .hero-visual-caption span:last-child{color:#9eb0bb}
html[data-theme="dark"] .plan-head-branded{background:linear-gradient(135deg,rgba(20,184,166,.10),rgba(56,189,248,.05));border-color:#243947}

html[data-theme="light"] .brand-logo{background:#0f766e!important;color:#fff!important}
html[data-theme="light"] .brand-word b{color:#0f766e!important}
html[data-theme="light"] .plan-head-branded{background:linear-gradient(135deg,#edf9f7,#f6fbff)!important;border-color:#dceceb!important}

@media(max-width:700px){
  .hero-branded{grid-template-columns:1fr;gap:14px;padding-top:8px}
  .hero-copy{padding-bottom:0}
  .hero-visual{min-height:220px;border-radius:26px}
  .hero-visual svg{min-height:220px}
  .hero-visual-caption{left:12px;right:12px;bottom:12px}
}
@media(max-width:420px){
  .hero-branded h1{font-size:44px}
  .hero-visual{min-height:205px}
  .hero-visual svg{min-height:205px}
  .hero-proof span{font-size:11px}
  .brand-word{font-size:19px}
}

/* === Mobile travel cockpit: keep controls visible without scrolling === */
@media(max-width:520px){
  body:has(#planView.active){overflow-x:hidden}
  #planView.active{
    min-height:calc(100dvh - 74px);
    padding-bottom:150px;
  }
  #planView.active .plan-head{
    margin:0 0 6px;
    padding:10px 12px 9px;
    border-radius:18px;
  }
  #planView.active .plan-head .backlink,
  #planView.active .plan-head .eyebrow{
    display:none;
  }
  #planView.active .plan-head h2{
    font-size:22px;
    line-height:1.05;
    margin:0 0 7px;
  }
  #planView.active .stats{
    gap:5px;
    flex-wrap:nowrap;
    overflow:hidden;
  }
  #planView.active .stat{
    font-size:10px;
    padding:5px 7px;
    white-space:nowrap;
  }

  #planView.active .progress-card{
    margin:6px 0 8px;
    padding:10px 12px;
    border-radius:16px;
  }
  #planView.active .progress-row{font-size:12px}
  #planView.active .progress-track{margin-top:7px;height:5px}

  #planView.active .activity-card{
    min-height:0;
    max-height:calc(100dvh - 330px);
    padding:16px 16px 14px;
    border-radius:22px;
    overflow:auto;
    overscroll-behavior:contain;
  }
  #planView.active .activity-kicker{
    font-size:10px;
    letter-spacing:.12em;
  }
  #planView.active .activity-icon{
    font-size:34px;
    margin:10px 0 5px;
  }
  #planView.active .activity-card h3{
    font-size:26px;
    margin-bottom:6px;
    max-width:92%;
  }
  #planView.active .activity-card>p{
    font-size:14px;
    line-height:1.35;
    margin:6px 0 8px;
    max-width:100%;
  }
  #planView.active .activity-meta{
    margin-top:8px;
    gap:5px;
  }
  #planView.active .activity-meta span{
    padding:5px 7px;
    font-size:10px;
  }
  #planView.active .idea-box{
    margin-top:10px;
    padding:10px;
    border-radius:13px;
  }
  #planView.active .idea-title{font-size:11px;margin-bottom:6px}
  #planView.active .idea-chips{gap:5px}
  #planView.active .idea-chips span,
  #planView.active .idea-chip-btn{
    padding:6px 7px;
    font-size:11px;
    border-radius:9px;
  }

  /* Compact sound-game controls */
  #planView.active .audio-game{
    margin-top:8px;
    padding:10px;
    border-radius:14px;
  }
  #planView.active .audio-status{
    margin-bottom:6px;
    font-size:10px;
  }
  #planView.active .audio-play{
    padding:10px;
    font-size:14px;
    border-radius:11px;
  }
  #planView.active .audio-actions{
    gap:6px;
    margin-top:6px;
  }
  #planView.active .audio-small,
  #planView.active .audio-next{
    padding:8px 7px;
    font-size:11px;
    border-radius:10px;
  }
  #planView.active .audio-next{margin-top:6px}
  #planView.active .audio-answer{
    margin-top:6px;
    padding:7px 8px;
    font-size:11px;
  }
  #planView.active .audio-note,
  #planView.active .audio-pacing{
    font-size:10px!important;
    margin:6px 0!important;
    line-height:1.25;
  }

  /* Always-visible bottom control dock */
  #planView.active .travel-actions{
    position:fixed;
    left:max(10px,env(safe-area-inset-left));
    right:max(10px,env(safe-area-inset-right));
    bottom:max(8px,env(safe-area-inset-bottom));
    z-index:22;
    margin:0;
    padding:9px;
    gap:7px!important;
    border:1px solid var(--line);
    border-radius:20px;
    background:color-mix(in srgb,var(--card) 94%,transparent);
    box-shadow:0 12px 40px rgba(20,35,45,.18);
    backdrop-filter:blur(14px);
  }
  #planView.active .next-main{
    min-height:48px;
    border-radius:13px;
    font-size:15px;
  }
  #planView.active .quick-actions{
    gap:5px!important;
  }
  #planView.active .quick-actions .quick-action{
    min-height:42px!important;
    padding:6px 4px!important;
    font-size:10px!important;
    border-radius:11px!important;
    line-height:1.05;
  }
  #planView.active .quick-actions .quick-action span{
    font-size:14px!important;
  }

  /* Secondary sections live below the fold */
  #planView.active .favorites-panel,
  #planView.active .timeline{
    margin-top:12px;
  }
}

@media(max-width:390px) and (max-height:760px){
  #planView.active .activity-card{
    max-height:calc(100dvh - 310px);
    padding:13px 14px 12px;
  }
  #planView.active .activity-icon{font-size:28px;margin:7px 0 4px}
  #planView.active .activity-card h3{font-size:23px}
  #planView.active .activity-card>p{font-size:13px}
  #planView.active .activity-meta{display:none}
  #planView.active .plan-head h2{font-size:19px}
  #planView.active .stat:nth-child(n+4){display:none}
}

@media(max-width:520px){#planView.active .activity-card{max-height:none!important;overflow:visible!important;overscroll-behavior:auto!important;touch-action:pan-y}#planView.active{padding-bottom:150px}}
@media(max-width:390px) and (max-height:760px){#planView.active .activity-card{max-height:none!important;overflow:visible!important}}

/* Prevent decorative shapes from widening the mobile viewport */
html,body,.app-shell{max-width:100%;overflow-x:clip}
@media(max-width:520px){
  #planView.active{max-width:100%;overflow-x:clip}
  #planView.active .plan-head-branded{max-width:100%;overflow:hidden}
  #planView.active .plan-head-branded:after{right:0}
  #planView.active .activity-card{max-width:100%}
  #planView.active .activity-card:after{right:0}
  #planView.active .travel-actions{
    width:auto!important;
    max-width:calc(100vw - 20px)!important;
    box-sizing:border-box;
  }
  #planView.active .quick-actions,
  #planView.active .quick-action,
  #planView.active .next-main{
    min-width:0;
    max-width:100%;
  }
}

/* Favorite/repeat belong to the current activity, not the bottom dock */
.activity-wrap{position:relative}
.activity-card-actions{
  position:absolute;
  top:14px;
  right:14px;
  z-index:4;
  display:flex;
  gap:6px;
  align-items:center;
}
.activity-fav-btn,.activity-repeat-btn{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.10);
  color:#fff;
  backdrop-filter:blur(8px);
  border-radius:999px;
  min-height:34px;
  padding:7px 10px;
  font-size:11px;
  line-height:1;
  font-weight:850;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}
.activity-fav-btn.selected{
  background:rgba(255,244,191,.16);
  border-color:rgba(255,226,120,.46);
  color:#fff2b7;
}
.activity-repeat-btn{background:rgba(125,211,252,.12);border-color:rgba(125,211,252,.28)}
.travel-actions .quick-actions{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
html[data-theme="light"] .activity-fav-btn,
html[data-theme="light"] .activity-repeat-btn{
  color:#fff!important;
}
@media(max-width:520px){
  .activity-card-actions{
    top:10px;
    right:10px;
    max-width:calc(100% - 20px);
  }
  .activity-fav-btn,.activity-repeat-btn{
    min-height:30px;
    padding:6px 8px;
    font-size:10px;
  }
  #planView.active .travel-actions .quick-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

.history-section-title{
  margin:14px 2px 6px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.06em;
  color:var(--muted);
  text-transform:uppercase;
}
.history-section-title:first-child{margin-top:2px}

/* Dynamic secondary action grid: no empty slot before replay is available */
.travel-actions .quick-actions:has(#replayHistoryBtn.hidden){
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.travel-actions .quick-actions:has(#replayHistoryBtn:not(.hidden)){
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
@media(max-width:520px){
  #planView.active .travel-actions .quick-actions:has(#replayHistoryBtn.hidden){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #planView.active .travel-actions .quick-actions:has(#replayHistoryBtn:not(.hidden)){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

/* Multi-age activities */
.multi-age-preview{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:3px}
.multi-age-preview>div{background:rgba(255,255,255,.10);border-radius:12px;padding:9px 10px;min-width:0}
.multi-age-preview strong{display:block;font-size:12px;line-height:1.3;color:#fff;margin-top:5px}
.age-level{display:inline-flex;align-items:center;border-radius:999px;padding:4px 7px;font-size:9px;font-weight:900;letter-spacing:.03em}
.age-level.young{background:rgba(251,191,36,.16);color:#fde68a}
.age-level.older{background:rgba(125,211,252,.14);color:#bae6fd}
.ideas-grid.multi-age-grid{display:block}
.age-ideas-section{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}
.age-ideas-title{grid-column:1/-1;font-size:12px;font-weight:900;letter-spacing:.04em;padding:4px 2px;color:var(--muted)}
.age-ideas-title.young{color:#a16207}.age-ideas-title.older{color:#0369a1}
html[data-theme="dark"] .age-ideas-title.young{color:#fde68a}
html[data-theme="dark"] .age-ideas-title.older{color:#bae6fd}
@media(max-width:520px){
 .multi-age-preview{grid-template-columns:1fr 1fr;gap:6px}
 .multi-age-preview>div{padding:7px 8px}
 .multi-age-preview strong{font-size:10.5px}
 .age-ideas-section{grid-template-columns:1fr}
}

/* On-demand trip summary */
.trip-details-btn{
  border:0;
  background:transparent;
  color:var(--green);
  font-size:11px;
  font-weight:900;
  padding:4px 0 4px 8px;
  cursor:pointer;
}
.trip-details-stats{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}
.trip-edit-btn{width:100%;margin-top:6px}
html[data-theme="dark"] .trip-details-btn{color:#5eead4}

/* Mobile activity mode: summary disappears until requested */
@media(max-width:520px){
  #planView.active>.plan-head{
    display:none!important;
  }
  #planView.active .progress-card{
    margin:2px 0 9px;
  }
  #planView.active .progress-row{
    display:grid;
    grid-template-columns:auto 1fr auto;
    gap:8px;
    align-items:center;
  }
  #planView.active #remainingText{
    text-align:center;
    font-weight:750;
  }
  #planView.active .trip-details-btn{
    min-height:30px;
    padding:4px 7px;
    border:1px solid var(--line);
    border-radius:9px;
    background:var(--card);
  }
  #planView.active .activity-card{
    min-height:clamp(360px,55dvh,500px);
  }
  .trip-details-sheet{padding-bottom:max(28px,env(safe-area-inset-bottom))}
}
@media(max-width:390px) and (max-height:760px){
  #planView.active .activity-card{
    min-height:clamp(330px,51dvh,410px);
  }
}

/* Collapsible mobile action dock */
.travel-main-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:stretch}
.actions-toggle{
  display:none;
  min-width:58px;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--ink);
  border-radius:13px;
  padding:5px 8px;
  font-weight:850;
  cursor:pointer;
}
.actions-toggle span{display:block;font-size:17px;line-height:1}
.actions-toggle small{display:block;font-size:9px;margin-top:2px}
@media(max-width:520px){
  #planView.active .travel-actions{
    padding:7px!important;
    border-radius:16px;
  }
  #planView.active .actions-toggle{
    display:block;
  }
  #planView.active .next-main{
    min-height:44px;
    font-size:14px;
  }
  #planView.active .travel-actions .quick-actions{
    max-height:80px;
    opacity:1;
    margin-top:0;
    overflow:hidden;
    transition:max-height .18s ease,opacity .15s ease,margin .18s ease;
  }
  #planView.active .travel-actions.collapsed .quick-actions{
    max-height:0;
    opacity:0;
    margin:0;
    pointer-events:none;
  }
  #planView.active .travel-actions.collapsed{
    gap:0!important;
  }
  #planView.active .travel-actions:not(.collapsed) .actions-toggle{
    background:var(--ink);
    color:var(--card);
    border-color:var(--ink);
  }
}
html[data-theme="dark"] .actions-toggle{background:#1b2734;color:#eef4f7;border-color:#344657}
html[data-theme="dark"] .travel-actions:not(.collapsed) .actions-toggle{background:#14b8a6;color:#071715;border-color:#14b8a6}

/* Mobile travel density/readability pass */
@media(max-width:520px){
  /* Activity card should fit its content, not reserve empty viewport height */
  #planView.active .activity-card{
    min-height:0!important;
    height:auto!important;
    padding:18px 18px 16px!important;
    border-radius:22px;
  }
  #planView.active .activity-card:after{
    width:170px;
    height:170px;
    opacity:.65;
  }
  #planView.active .activity-kicker{
    font-size:12px!important;
    letter-spacing:.12em;
  }
  #planView.active .activity-icon{
    font-size:38px!important;
    margin:12px 0 6px!important;
  }
  #planView.active .activity-card h3{
    font-size:32px!important;
    line-height:1.02!important;
    margin:0 0 10px!important;
    max-width:100%!important;
  }
  #planView.active .activity-card>p{
    font-size:17px!important;
    line-height:1.42!important;
    margin:6px 0 12px!important;
    max-width:100%!important;
  }

  /* Make ready-to-use ideas a real readable content block */
  #planView.active .idea-box{
    margin-top:12px!important;
    padding:12px!important;
    border-radius:15px!important;
  }
  #planView.active .idea-box-clickable .idea-title{
    font-size:14px!important;
    margin-bottom:0!important;
  }
  #planView.active .idea-box-head{
    min-height:28px;
  }
  #planView.active .idea-box-chevron{
    font-size:24px;
  }
  #planView.active .idea-chips{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    margin-top:8px;
  }
  #planView.active .idea-chip-btn,
  #planView.active .idea-chips span{
    display:block;
    width:100%;
    background:rgba(255,255,255,.08)!important;
    padding:8px 10px!important;
    border-radius:10px!important;
    font-size:14px!important;
    line-height:1.3!important;
    color:#fff!important;
  }

  /* Compact bottom dock */
  #planView.active .travel-actions{
    padding:5px!important;
    border-radius:14px!important;
    gap:5px!important;
  }
  #planView.active .travel-main-row{
    grid-template-columns:1fr 54px!important;
    gap:5px!important;
  }
  #planView.active .travel-main-row .next-main{
    order:0!important;
    min-height:40px!important;
    height:40px!important;
    padding:7px 12px!important;
    border-radius:10px!important;
    font-size:13px!important;
    line-height:1!important;
  }
  #planView.active .travel-main-row .next-main span{
    font-size:16px!important;
  }
  #planView.active .actions-toggle{
    order:1!important;
    min-width:54px!important;
    width:54px!important;
    min-height:40px!important;
    height:40px!important;
    padding:3px 4px!important;
    border-radius:10px!important;
  }
  #planView.active .actions-toggle span{
    font-size:15px!important;
    line-height:.8!important;
  }
  #planView.active .actions-toggle small{
    font-size:8px!important;
    margin-top:3px!important;
  }
  #planView.active .travel-actions .quick-actions .quick-action{
    min-height:36px!important;
    padding:5px 4px!important;
    font-size:10px!important;
  }

  /* The fixed dock is now shorter, so reserve less dead space below content */
  #planView.active{
    padding-bottom:92px!important;
  }
}

@media(max-width:390px){
  #planView.active .activity-card h3{font-size:29px!important}
  #planView.active .activity-card>p{font-size:16px!important}
  #planView.active .idea-chip-btn,
  #planView.active .idea-chips span{font-size:13.5px!important}
}

/* Make ready-to-use ideas read as a distinct inset card */
@media(max-width:520px){
  #planView.active .idea-box-clickable{
    background:rgba(255,255,255,.045)!important;
    border:1px solid rgba(125,211,252,.16)!important;
    padding:12px!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
  }
  #planView.active .idea-box-head{
    padding:0 2px 8px;
  }
  #planView.active .idea-chips{
    position:relative;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:0!important;
    margin-top:2px!important;
    padding:4px 12px!important;
    border-radius:13px!important;
    background:rgba(4,17,27,.22)!important;
    border:1px solid rgba(255,255,255,.055);
  }
  #planView.active .idea-chip-btn,
  #planView.active .idea-chips span{
    background:transparent!important;
    border-radius:0!important;
    padding:10px 0!important;
    font-size:14px!important;
    line-height:1.32!important;
    color:#f2f7f9!important;
  }
  #planView.active .idea-chip-btn + .idea-chip-btn,
  #planView.active .idea-chips span + span{
    border-top:1px solid rgba(255,255,255,.07);
  }
}
html[data-theme="light"] #planView.active .idea-box-clickable{
  background:rgba(255,255,255,.08)!important;
  border-color:rgba(125,211,252,.18)!important;
}

/* Immersive mobile activity mode */
.trip-sheet-brand{display:flex;align-items:center;gap:10px}
.trip-live-card{
  margin-top:16px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--card);
}
.trip-live-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px}
.trip-live-row span{color:var(--muted);font-weight:800}
.trip-sheet-actions{display:grid;gap:8px}
.trip-sheet-actions .secondary,.trip-new-btn{width:100%;min-height:46px}
.trip-new-btn{
  border:0;
  border-radius:14px;
  background:transparent;
  color:var(--muted);
  font-weight:850;
  cursor:pointer;
}
.trip-info-action span{font-size:14px!important}

@media(max-width:520px){
  body.travel-active .topbar{
    display:none!important;
  }
  body.travel-active .app-shell{
    padding-top:max(8px,env(safe-area-inset-top));
  }
  body.travel-active #planView>.progress-card{
    display:none!important;
  }
  body.travel-active #planView.active .activity-wrap{
    margin-top:0!important;
  }
  body.travel-active #planView.active .activity-card{
    margin-top:0!important;
  }
  body.travel-active #planView.active{
    padding-top:0!important;
  }

  /* Expanded action menu: 3 items normally, compact 2x2 when replay appears */
  #planView.active .travel-actions .quick-actions:has(#replayHistoryBtn.hidden){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  #planView.active .travel-actions .quick-actions:has(#replayHistoryBtn:not(.hidden)){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #planView.active .travel-actions .quick-actions:has(#replayHistoryBtn:not(.hidden)) .quick-action{
    min-height:34px!important;
  }
}
html[data-theme="dark"] .trip-live-card{background:#162330;border-color:#2b3a49}

/* Slightly larger mobile action dock after immersive header removal */
@media(max-width:520px){
  #planView.active .travel-actions{
    padding:7px!important;
    border-radius:16px!important;
  }
  #planView.active .travel-main-row{
    grid-template-columns:1fr 64px!important;
    gap:7px!important;
  }
  #planView.active .travel-main-row .next-main{
    min-height:48px!important;
    height:48px!important;
    padding:9px 14px!important;
    border-radius:12px!important;
    font-size:15px!important;
  }
  #planView.active .travel-main-row .next-main span{
    font-size:18px!important;
  }
  #planView.active .actions-toggle{
    min-width:64px!important;
    width:64px!important;
    min-height:48px!important;
    height:48px!important;
    padding:5px 6px!important;
    border-radius:12px!important;
  }
  #planView.active .actions-toggle span{
    font-size:17px!important;
  }
  #planView.active .actions-toggle small{
    font-size:9px!important;
  }
  #planView.active .travel-actions .quick-actions .quick-action{
    min-height:42px!important;
    padding:7px 6px!important;
    font-size:11px!important;
    border-radius:11px!important;
  }
  #planView.active .travel-actions .quick-actions .quick-action span{
    font-size:15px!important;
  }
  #planView.active{
    padding-bottom:104px!important;
  }
}

/* === Guided setup wizard === */
.setup-wizard{overflow:hidden}
.wizard-head{display:grid;grid-template-columns:1fr;gap:10px;padding-bottom:16px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.wizard-head>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.wizard-step-label{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--green)}
.wizard-head strong{font-size:13px;color:var(--muted)}
.wizard-progress{height:5px;border-radius:99px;background:var(--line);overflow:hidden}
.wizard-progress span{display:block;width:16.666%;height:100%;border-radius:inherit;background:var(--green);transition:width .25s ease}
.wizard-step{display:none;padding:18px 0 4px;min-height:300px}
.wizard-step.active{display:block;animation:wizardIn .22s ease}
@keyframes wizardIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:none}}
.wizard-question{display:flex;align-items:flex-start;gap:13px;margin-bottom:22px}
.wizard-icon{width:44px;height:44px;display:grid;place-items:center;flex:none;border-radius:14px;background:var(--lime);font-size:22px}
.wizard-question h3{margin:0;font-size:24px;line-height:1.1;letter-spacing:-.035em}
.wizard-question p{margin:7px 0 0;color:var(--muted);font-size:14px;line-height:1.45}
.wizard-step>label{display:block;font-weight:800;margin:18px 0 9px}
.wizard-input{width:100%;border:1px solid var(--line);border-radius:14px;background:#fff;padding:13px;color:var(--ink)}
.wizard-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.wizard-choice-grid .chip{width:100%;min-height:54px}
.wizard-nav{display:grid;grid-template-columns:auto 1fr;gap:9px;align-items:center;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.wizard-back{border:0;background:transparent;color:var(--muted);font-weight:850;padding:12px 8px;cursor:pointer}
.wizard-next,.wizard-submit{min-height:50px;border-radius:14px;display:flex;align-items:center;justify-content:space-between;padding:13px 16px;font-weight:900}
.wizard-submit{grid-column:2}
.wizard-micro{margin-top:9px}
html[data-theme="dark"] .wizard-icon{background:#173d42}
html[data-theme="dark"] .wizard-input{background:#1b2734;color:#eef4f7;border-color:#344657}

@media(max-width:520px){
  #setupView .hero-branded{padding-bottom:14px}
  .setup-wizard{padding:16px!important}
  .wizard-head{padding-bottom:12px}
  .wizard-head>div:first-child{align-items:center}
  .wizard-head strong{font-size:12px;text-align:right}
  .wizard-step{min-height:270px;padding-top:16px}
  .wizard-question{margin-bottom:18px}
  .wizard-question h3{font-size:22px}
  .wizard-question p{font-size:13px}
  .wizard-choice-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:370px){
  .wizard-choice-grid{grid-template-columns:1fr}
}

@media(max-width:520px){.setup-wizard .pause-select{padding:12px 34px 12px 12px!important;font-size:14px!important;background-position:calc(100% - 15px) 17px,calc(100% - 10px) 17px!important}}
@media(max-width:380px){.setup-wizard .pause-select{font-size:13px!important;padding-right:30px!important}}

/* Full-width Continue button on first wizard step */
.wizard-nav:has(#wizardBackBtn.hidden) .wizard-next{grid-column:1/-1;width:100%}

/* Scheduled favorite replay state */
.activity-repeat-btn.scheduled,
.activity-repeat-btn:disabled{
  opacity:.82;
  cursor:default;
}
.activity-repeat-btn.scheduled{
  background:rgba(94,234,212,.12);
  border-color:rgba(94,234,212,.30);
}
.fav-row button:disabled{
  opacity:.65;
  cursor:default;
}

/* Favorite activities in setup */
.wizard-favorites-empty{
  padding:16px;
  border:1px dashed var(--line);
  border-radius:14px;
  color:var(--muted);
  text-align:center;
  font-size:13px;
}
.wizard-favorites-grid{display:grid;gap:9px}
.wizard-favorite-card{
  width:100%;
  display:grid;
  grid-template-columns:42px 1fr 28px;
  gap:10px;
  align-items:center;
  min-height:66px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--card);
  color:var(--ink);
  text-align:left;
  cursor:pointer;
}
.wizard-favorite-card.selected{
  border-color:var(--green);
  background:rgba(45,212,191,.08);
}
.wizard-favorite-card.disabled{opacity:.5;cursor:default}
.wizard-favorite-icon{font-size:24px;text-align:center}
.wizard-favorite-card strong,.wizard-favorite-card small{display:block}
.wizard-favorite-card strong{font-size:14px}
.wizard-favorite-card small{font-size:11px;color:var(--muted);margin-top:3px}
.wizard-favorite-check{font-size:17px;font-weight:900;color:var(--green);text-align:center}
html[data-theme="dark"] .wizard-favorite-card{background:#1b2734;border-color:#344657}
html[data-theme="dark"] .wizard-favorite-card.selected{background:rgba(20,184,166,.13);border-color:#2dd4bf}

/* Expanded action menu now includes favorite picker */
@media(max-width:520px){
  #planView.active .travel-actions .quick-actions:has(#replayHistoryBtn.hidden),
  #planView.active .travel-actions .quick-actions:has(#replayHistoryBtn:not(.hidden)){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* Responsive typography for in-trip activity content */
@media(max-width:520px){
  #planView.active .activity-card h3{
    font-size:clamp(30px,8.2vw,38px)!important;
    line-height:1.03!important;
  }
  #planView.active .activity-card>p{
    font-size:clamp(17px,4.6vw,21px)!important;
    line-height:1.4!important;
  }
  #planView.active .activity-kicker{
    font-size:clamp(11px,3.1vw,13px)!important;
  }
  #planView.active .audio-status{
    font-size:clamp(12px,3.4vw,15px)!important;
    margin-bottom:7px!important;
  }
  #planView.active .audio-pacing{
    font-size:clamp(12px,3.4vw,15px)!important;
    line-height:1.35!important;
    margin:7px 0 11px!important;
  }
  #planView.active .audio-play{
    font-size:clamp(15px,4vw,18px)!important;
    min-height:48px!important;
  }
  #planView.active .audio-small,
  #planView.active .audio-next{
    font-size:clamp(12px,3.3vw,14px)!important;
    min-height:42px!important;
  }
  #planView.active .audio-answer{
    font-size:clamp(13px,3.5vw,16px)!important;
    line-height:1.35!important;
    padding:9px 10px!important;
  }
  #planView.active .audio-note{
    font-size:clamp(12px,3.3vw,15px)!important;
    line-height:1.35!important;
    margin:9px 0 0!important;
  }
  #planView.active .idea-box-clickable .idea-title{
    font-size:clamp(14px,3.7vw,16px)!important;
  }
  #planView.active .idea-chip-btn,
  #planView.active .idea-chips span{
    font-size:clamp(14px,3.6vw,16px)!important;
    line-height:1.35!important;
  }
}

@media(min-width:420px) and (max-width:520px){
  #planView.active .activity-card{
    padding:20px 20px 18px!important;
  }
  #planView.active .audio-game{
    padding:12px!important;
  }
}

/* Dedicated trip timeline view */
.trip-timeline-btn{
  min-width:64px;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--ink);
  border-radius:12px;
  font-weight:850;
  cursor:pointer;
}
.trip-timeline-btn span{display:block;font-size:17px;line-height:1}
.trip-timeline-btn small{display:block;font-size:9px;margin-top:3px}
.trip-timeline-sheet{
  height:min(92dvh,860px);
  display:flex;
  flex-direction:column;
  padding-bottom:max(14px,env(safe-area-inset-bottom));
}
.trip-timeline-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:0 2px 12px;
}
.trip-timeline-head h3{margin:0}
.trip-timeline-head p{margin:6px 0 0;font-size:13px;color:var(--muted)}
.trip-timeline-scroll{
  flex:1;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  padding:2px 2px 12px;
}
.trip-timeline-back{
  width:100%;
  min-height:48px;
  margin-top:8px;
}
.trip-timeline-sheet .timeline-item{
  border:1px solid var(--line);
  border-radius:15px;
  margin:8px 0;
  padding:12px;
  grid-template-columns:54px 34px 1fr;
  background:var(--card);
}
.trip-timeline-sheet .timeline-item:first-of-type{border-top:1px solid var(--line)}
.trip-timeline-sheet .timeline-item.current{
  margin:8px 0;
  padding:13px 12px;
  border-color:var(--green);
  box-shadow:0 0 0 1px var(--green);
}
.trip-timeline-sheet .timeline-item.done{
  opacity:.5;
}
.trip-timeline-sheet .timeline-item.future{
  opacity:1;
}
.trip-timeline-sheet .timeline-item.arrival{
  border-top:1px solid var(--line);
}
.trip-timeline-sheet .timeline-replay{
  display:none;
}
html[data-theme="dark"] .trip-timeline-btn{
  background:#1b2734;
  color:#eef4f7;
  border-color:#344657;
}
html[data-theme="dark"] .trip-timeline-sheet .timeline-item{
  background:#151f2b;
  border-color:#2b3a49;
}
html[data-theme="dark"] .trip-timeline-sheet .timeline-item.current{
  border-color:#2dd4bf;
  box-shadow:0 0 0 1px #2dd4bf;
}

@media(max-width:520px){
  #planView.active .travel-main-row{
    grid-template-columns:minmax(0,1fr) 64px 64px!important;
    gap:7px!important;
  }
  #planView.active .trip-timeline-btn{
    min-width:64px;
    width:64px;
    min-height:48px;
    height:48px;
    padding:5px 4px;
  }
  .trip-timeline-sheet{
    height:94dvh;
    border-radius:24px 24px 0 0;
    padding:12px 14px max(12px,env(safe-area-inset-bottom));
  }
  .trip-timeline-scroll{
    margin:0 -2px;
  }
  .trip-timeline-sheet .timeline-item{
    grid-template-columns:52px 34px 1fr;
    gap:8px;
    padding:11px;
  }
  .trip-timeline-sheet .timeline-time{font-size:12px}
  .trip-timeline-sheet .timeline-name{font-size:14px}
  .trip-timeline-sheet .timeline-sub{font-size:11px}
}

/* Permanent SOS access in the bottom dock */
.sos-main-btn{
  min-width:64px;
  border:1px solid rgba(239,68,68,.28);
  background:rgba(239,68,68,.08);
  color:var(--ink);
  border-radius:12px;
  font-weight:850;
  cursor:pointer;
}
.sos-main-btn span{display:block;font-size:17px;line-height:1}
.sos-main-btn small{display:block;font-size:9px;margin-top:3px}
html[data-theme="dark"] .sos-main-btn{
  background:rgba(248,113,113,.10);
  color:#fff;
  border-color:rgba(248,113,113,.28);
}

@media(max-width:520px){
  #planView.active .travel-main-row{
    grid-template-columns:minmax(0,1fr) 58px 58px 58px!important;
    gap:6px!important;
  }
  #planView.active .sos-main-btn,
  #planView.active .trip-timeline-btn,
  #planView.active .actions-toggle{
    min-width:58px!important;
    width:58px!important;
    min-height:48px!important;
    height:48px!important;
    padding:5px 4px!important;
  }
}

/* Favorite management in setup: selection and deletion are separate actions */
.wizard-favorite-card{
  position:relative;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 44px!important;
  gap:0!important;
  padding:0!important;
  overflow:hidden;
}
.wizard-favorite-select{
  min-width:0;
  min-height:66px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 28px;
  gap:10px;
  align-items:center;
  border:0;
  background:transparent;
  color:inherit;
  padding:10px 8px 10px 12px;
  text-align:left;
  cursor:pointer;
}
.wizard-favorite-select:disabled{cursor:default}
.wizard-favorite-copy{min-width:0}
.wizard-favorite-delete{
  width:44px;
  min-height:100%;
  border:0;
  border-left:1px solid var(--line);
  background:transparent;
  font-size:16px;
  cursor:pointer;
  opacity:.7;
}
.wizard-favorite-delete:active{background:rgba(239,68,68,.10)}
html[data-theme="dark"] .wizard-favorite-delete{
  border-left-color:#344657;
  color:#eef4f7;
}

/* Progression action sits on the right */
@media(max-width:520px){
  #planView.active .travel-main-row{
    grid-template-columns:58px 58px 58px minmax(0,1fr)!important;
  }
}

/* Final mobile dock ordering/layout override */
@media(max-width:520px){
  #planView.active .travel-main-row{
    display:grid!important;
    grid-template-columns:58px 58px 58px minmax(0,1fr)!important;
    gap:6px!important;
    align-items:stretch!important;
  }

  #planView.active .sos-main-btn{
    order:1!important;
  }
  #planView.active .trip-timeline-btn{
    order:2!important;
  }
  #planView.active .actions-toggle{
    order:3!important;
  }
  #planView.active .travel-main-row .next-main{
    order:4!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:48px!important;
    height:48px!important;
    padding:8px 10px!important;
    white-space:nowrap!important;
    font-size:14px!important;
    line-height:1!important;
    overflow:hidden!important;
  }

  #planView.active .sos-main-btn,
  #planView.active .trip-timeline-btn,
  #planView.active .actions-toggle{
    width:58px!important;
    min-width:58px!important;
    max-width:58px!important;
    height:48px!important;
    min-height:48px!important;
  }
}

@media(max-width:380px){
  #planView.active .travel-main-row{
    grid-template-columns:52px 52px 52px minmax(0,1fr)!important;
    gap:5px!important;
  }
  #planView.active .sos-main-btn,
  #planView.active .trip-timeline-btn,
  #planView.active .actions-toggle{
    width:52px!important;
    min-width:52px!important;
    max-width:52px!important;
  }
  #planView.active .travel-main-row .next-main{
    font-size:13px!important;
    padding:8px 7px!important;
  }
}

/* True visual centering for the next-activity CTA */
@media(max-width:520px){
  #planView.active .travel-main-row .next-main{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    padding-left:12px!important;
    padding-right:32px!important;
  }
  #planView.active .travel-main-row .next-main span{
    position:absolute!important;
    right:10px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    margin:0!important;
    line-height:1!important;
  }
}
@media(max-width:380px){
  #planView.active .travel-main-row .next-main{
    padding-left:8px!important;
    padding-right:27px!important;
  }
  #planView.active .travel-main-row .next-main span{
    right:7px!important;
  }
}

/* Keep a compact, persistent navigation header during a trip */
@media(max-width:520px){
  body.travel-active .topbar{
    display:flex!important;
    position:sticky;
    top:0;
    z-index:21;
    min-height:52px;
    padding:7px 2px!important;
    margin:0 -2px 8px;
    background:color-mix(in srgb,var(--cream) 92%,transparent);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    border-bottom:1px solid color-mix(in srgb,var(--line) 70%,transparent);
  }
  body.travel-active .app-shell{
    padding-top:max(0px,env(safe-area-inset-top))!important;
  }
  body.travel-active .brand{
    gap:7px;
    font-size:17px;
  }
  body.travel-active .brand-mark{
    width:30px;
    height:30px;
  }
  body.travel-active .brand-word{
    font-size:17px;
  }
  body.travel-active .top-actions{
    gap:5px;
  }
  body.travel-active .theme-toggle{
    width:34px;
    height:34px;
    border-radius:10px;
    font-size:16px;
    box-shadow:none;
  }
  body.travel-active #resetBtn{
    padding:7px 4px 7px 7px;
    font-size:12px;
    white-space:nowrap;
  }
  body.travel-active #planView.active .activity-wrap{
    margin-top:0!important;
  }
}
html[data-theme="dark"] body.travel-active .topbar{
  background:rgba(10,20,30,.92);
  border-bottom-color:#263747;
}

/* Trip overview lives inside the dedicated Trajet view */
.trip-overview-card{
  flex:none;
  margin:0 0 10px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--card);
}
.trip-overview-live{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.trip-overview-live>div{
  min-width:0;
}
.trip-overview-live span,
.trip-overview-live strong{
  display:block;
}
.trip-overview-live span{
  font-size:10px;
  color:var(--muted);
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.trip-overview-live strong{
  margin-top:3px;
  font-size:15px;
  white-space:nowrap;
}
.trip-overview-card .progress-track{
  margin-top:10px;
}
.trip-overview-stats{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:10px;
}
.trip-overview-stats span{
  padding:5px 8px;
  border-radius:999px;
  background:color-mix(in srgb,var(--green) 9%,var(--card));
  font-size:10px;
  font-weight:800;
}
.trip-overview-edit{
  width:100%;
  margin-top:10px;
  min-height:36px;
  border:1px solid var(--line);
  border-radius:10px;
  background:transparent;
  color:var(--muted);
  font-size:11px;
  font-weight:850;
  cursor:pointer;
}
html[data-theme="dark"] .trip-overview-card{
  background:#151f2b;
  border-color:#2b3a49;
}
html[data-theme="dark"] .trip-overview-edit{
  border-color:#344657;
  color:#c8d4dc;
}

/* Audio activity: clearly separate "next sound" from "next activity" */
@media(max-width:520px){
  #planView.active .audio-next{
    width:100%!important;
    min-height:48px!important;
    margin-top:7px!important;
    padding:10px 12px!important;
    display:grid!important;
    grid-template-columns:24px 1fr 20px!important;
    align-items:center!important;
    gap:7px!important;
    border:1px solid rgba(94,234,212,.65)!important;
    border-radius:12px!important;
    background:#14b8a6!important;
    color:#062e2b!important;
    font-size:15px!important;
    font-weight:950!important;
    text-align:center!important;
    box-shadow:0 5px 14px rgba(20,184,166,.18)!important;
  }
  #planView.active .audio-next span{
    font-size:17px!important;
  }
  #planView.active .audio-next b{
    font-size:18px!important;
    font-weight:950!important;
  }

  /* The answer now sits below the in-game navigation. */
  #planView.active .audio-answer{
    margin-top:7px!important;
  }

  /* Global navigation stays available but is visually secondary during an audio quiz. */
  #planView.active .next-main.audio-exit{
    background:transparent!important;
    color:var(--ink)!important;
    border:1px solid var(--line)!important;
    box-shadow:none!important;
    font-size:13px!important;
  }
}
html[data-theme="dark"] #planView.active .next-main.audio-exit{
  color:#d7e2e8!important;
  border-color:#405160!important;
  background:#17232e!important;
}

/* Collapse the trip summary while browsing the activity list */
.trip-overview-card{
  transition:padding .18s ease,margin .18s ease,border-radius .18s ease;
}
.trip-overview-card .trip-overview-stats,
.trip-overview-card .trip-overview-edit{
  transition:max-height .18s ease,opacity .14s ease,margin .18s ease,padding .18s ease;
  overflow:hidden;
}
.trip-overview-card.compact{
  padding:8px 10px;
  margin-bottom:6px;
  border-radius:12px;
}
.trip-overview-card.compact .trip-overview-live span{
  display:none;
}
.trip-overview-card.compact .trip-overview-live{
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;
}
.trip-overview-card.compact .trip-overview-live strong{
  margin:0;
  font-size:12px;
  text-align:center;
}
.trip-overview-card.compact .trip-overview-live>div:nth-child(1) strong::before{content:"🕒 "}
.trip-overview-card.compact .trip-overview-live>div:nth-child(2) strong::before{content:"⏳ "}
.trip-overview-card.compact .trip-overview-live>div:nth-child(3) strong::before{content:"🏁 "}
.trip-overview-card.compact .progress-track{
  height:4px;
  margin-top:7px;
}
.trip-overview-card.compact .trip-overview-stats,
.trip-overview-card.compact .trip-overview-edit{
  max-height:0;
  opacity:0;
  margin:0;
  padding-top:0;
  padding-bottom:0;
  border-width:0;
  pointer-events:none;
}

@media(max-width:520px){
  .trip-timeline-sheet{
    padding-top:8px;
  }
  .trip-overview-card.compact{
    position:sticky;
    top:0;
    z-index:3;
    box-shadow:0 6px 14px rgba(0,0,0,.08);
  }
}

/* Header logo is the home affordance */
.brand-home{
  border:0;
  background:transparent;
  color:inherit;
  padding:0;
  cursor:pointer;
  text-align:left;
}
.brand-home:active{transform:translateY(1px)}

/* Vertically center short activities in the usable mobile viewport */
@media(max-width:520px){
  body.travel-active #planView.active .activity-wrap{
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-height:calc(100dvh - 52px - 112px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding-top:8px;
    padding-bottom:8px;
  }

  /* Tall activities simply grow beyond the minimum and keep normal scrolling. */
  body.travel-active #planView.active .activity-card{
    flex:none;
  }
}

/* Audio quiz compact primary controls */
.audio-primary-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px;
}
.audio-primary-row .audio-play,
.audio-primary-row .audio-next{
  width:100%;
  margin:0;
}

@media(max-width:520px){
  #planView.active .audio-primary-row{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:7px!important;
  }
  #planView.active .audio-primary-row .audio-play,
  #planView.active .audio-primary-row .audio-next{
    min-height:48px!important;
    height:48px!important;
    margin:0!important;
    padding:8px 9px!important;
    font-size:13px!important;
    border-radius:12px!important;
  }
  #planView.active .audio-primary-row .audio-next{
    display:grid!important;
    grid-template-columns:18px minmax(0,1fr) 14px!important;
    gap:4px!important;
  }
  #planView.active .audio-primary-row .audio-next span{
    font-size:15px!important;
  }
  #planView.active .audio-primary-row .audio-next b{
    font-size:16px!important;
  }
}

/* Audio answer appears as a temporary overlay and does not push content down */
.audio-game{
  position:relative;
}
.audio-answer{
  transition:opacity .14s ease,transform .14s ease;
}
.audio-answer:not(.shown){
  display:none;
}
.audio-answer.shown{
  position:absolute;
  left:10px;
  right:10px;
  bottom:10px;
  z-index:8;
  margin:0!important;
  padding:14px 42px 14px 14px!important;
  border-radius:14px!important;
  background:#edf8d0!important;
  color:#233019!important;
  box-shadow:0 12px 30px rgba(0,0,0,.28);
  border:1px solid rgba(35,48,25,.12);
}
.audio-answer-label{
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  opacity:.65;
  margin-bottom:3px;
}
.audio-answer.shown strong{
  display:block;
  font-size:18px;
  line-height:1.15;
}
.audio-answer-close{
  position:absolute;
  top:8px;
  right:8px;
  width:30px;
  height:30px;
  border:0;
  border-radius:9px;
  background:rgba(35,48,25,.10);
  color:#233019;
  font-weight:900;
  cursor:pointer;
}
.audio-answer.shown .audio-bonus{
  margin-top:7px;
  font-size:13px;
  line-height:1.3;
}

/* Keep temporary audio answers directly in the visible mobile viewport */
@media(max-width:520px){
  #planView.active .audio-answer.shown{
    position:fixed!important;
    left:18px!important;
    right:18px!important;
    top:max(84px,24dvh)!important;
    bottom:auto!important;
    z-index:29!important;
    width:auto!important;
    max-width:430px!important;
    margin:0 auto!important;
    max-height:42dvh!important;
    overflow:auto!important;
  }
}

/* Position temporary audio answer directly above Listen / Next sound */
@media(max-width:520px){
  #planView.active .audio-game{
    position:relative!important;
  }
  #planView.active .audio-answer.shown{
    position:absolute!important;
    left:8px!important;
    right:8px!important;
    top:auto!important;
    bottom:calc(100% - 122px)!important;
    z-index:12!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    max-height:34dvh!important;
    overflow:auto!important;
  }
}

/* Exact anchor: answer uses the primary row's static position and floats above it */
@media(max-width:520px){
  #planView.active .audio-answer.shown{
    position:absolute!important;
    left:8px!important;
    right:8px!important;
    top:auto!important;
    bottom:auto!important;
    transform:translateY(calc(-100% - 8px))!important;
    z-index:12!important;
    margin:0!important;
  }
}

/* New Trajet Zen wordmark */
.brand-full-logo{
  display:block;
  width:178px;
  height:auto;
  object-fit:contain;
}
.brand-home{
  min-height:44px;
  display:flex;
  align-items:center;
}
.trip-sheet-logo{
  width:148px;
  flex:none;
}
.trip-sheet-brand{
  gap:12px!important;
}
.trip-sheet-brand h3{
  margin:0!important;
}

@media(max-width:520px){
  .brand-full-logo{
    width:154px;
  }
  body.travel-active .brand-full-logo{
    width:138px;
  }
  .trip-sheet-logo{
    width:132px;
  }
}

/* =========================================================
   Trajet Zen — landing home based on supplied mockup/assets
   ========================================================= */
body.home-active{
  background:#eef1f2;
}
body.home-active .app-shell{
  max-width:760px;
  padding:0 0 0;
  background:var(--home-bg,#ffffff);
  min-height:100vh;
  box-shadow:0 18px 70px rgba(23,55,73,.09);
}
body.home-active .topbar{
  padding:18px 34px 4px;
  background:var(--home-bg,#ffffff);
}
body.home-active #themeToggle{display:none}
.home-menu-btn{
  display:none;
  width:42px;height:42px;border:0;background:transparent;
  flex-direction:column;align-items:center;justify-content:center;gap:5px;
  cursor:pointer;border-radius:12px;
}
body.home-active .home-menu-btn{display:flex}
.home-menu-btn span{width:24px;height:4px;border-radius:999px;background:#07516b}
.home-menu-popover{
  position:fixed;z-index:70;right:max(16px,calc((100vw - 760px)/2 + 22px));top:66px;
  display:grid;gap:6px;min-width:205px;padding:9px;
  background:var(--home-card,#fff);border:1px solid var(--home-line,#dcebed);
  border-radius:16px;box-shadow:0 18px 50px rgba(5,46,65,.18)
}
.home-menu-popover.hidden{display:none}
.home-menu-popover button{
  border:0;background:transparent;text-align:left;padding:11px 12px;border-radius:10px;
  color:var(--home-ink,#07516b);font-weight:800;cursor:pointer
}
.home-menu-popover button:hover{background:var(--home-soft,#edf9fb)}
.home-page{
  --home-ink:#07516b;
  --home-teal:#2eaa83;
  --home-green:#25a77d;
  --home-soft:#edf9fb;
  --home-panel:#f1fbfd;
  --home-copy:#335f75;
  --home-card:#fff;
  --home-line:#dbecef;
  --home-yellow:#ffb62f;
  background:var(--home-bg,#fff);
  color:var(--home-ink);
  overflow:hidden;
}
.home-page h1,.home-page h2,.home-page h3,.home-page p{margin-top:0}
.home-hero-section{
  display:grid;grid-template-columns:.91fr 1.09fr;align-items:center;
  min-height:480px;padding:18px 20px 8px 34px;gap:0;
}
.home-kicker{
  font-size:11px;line-height:1.35;font-weight:900;letter-spacing:.16em;
  color:var(--home-copy);margin-bottom:18px
}
.home-hero-copy{position:relative;z-index:2;padding-top:2px}
.home-hero-copy h1{
  color:var(--home-ink);font-size:clamp(40px,6.2vw,57px);line-height:.97;
  letter-spacing:-.05em;margin-bottom:14px
}
.home-hero-copy>p{
  color:var(--home-copy);font-size:15px;line-height:1.45;margin-bottom:18px;max-width:330px
}
.home-primary-cta{
  border:0;background:linear-gradient(90deg,#25a77d,#31b58c);
  color:white;border-radius:999px;padding:14px 23px;font-weight:900;font-size:16px;
  display:inline-flex;align-items:center;justify-content:center;gap:18px;
  cursor:pointer;box-shadow:0 8px 20px rgba(37,167,125,.15)
}
.home-primary-cta span{font-size:22px;line-height:1}
.home-how-link{
  margin-top:10px;border:0;background:transparent;color:var(--home-ink);
  display:flex;align-items:center;gap:10px;font-size:12px;font-weight:850;
  text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:0
}
.home-play{
  width:34px;height:34px;border-radius:50%;background:#dcf6f2;color:#24a580;
  display:grid;place-items:center;text-decoration:none;font-size:13px
}
.home-hero-visual{align-self:stretch;display:flex;align-items:center;justify-content:flex-end;min-width:0}
.home-hero-visual img{display:block;width:116%;max-width:none;margin-right:-42px;margin-top:-2px}
.home-panel,.home-reassurance-panel{
  margin:0 12px;border-radius:27px;background:var(--home-panel);padding:18px 14px 16px
}
.home-section-title{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:14px}
.home-section-title h2{
  margin:0;text-align:center;color:var(--home-ink);font-size:21px;line-height:1.1;letter-spacing:-.03em
}
.ray{
  flex:0 0 31px;width:31px;height:30px;
  background-image:url('assets/home/home-rays.png');background-repeat:no-repeat;
  background-size:500% 200%;background-position:0% 0%;
}
.ray-right{transform:scaleX(-1)}
.home-steps-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.home-step-card{
  background:var(--home-card);border-radius:18px;padding:4px 9px 12px;text-align:center;min-width:0
}
.home-step-art{display:block;width:100%;height:92px;object-fit:contain;margin:0 auto -2px}
.home-step-card h3{font-size:16px;line-height:1.02;margin:0 0 6px;color:var(--home-ink)}
.home-step-card p{font-size:11px;line-height:1.22;color:var(--home-copy);margin:0}
.home-features-section{padding:22px 14px 16px}
.home-features-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.home-feature-card{
  background:var(--home-soft);border-radius:15px;min-height:86px;padding:10px 8px;
  display:grid;grid-template-columns:50px 1fr;gap:8px;align-items:center
}
.home-feature-icon{width:50px;height:55px;background-repeat:no-repeat;background-size:300% 100%}
.feature-strip-one{background-image:url('assets/home/home-features-row1.png')}
.feature-strip-two{background-image:url('assets/home/home-features-row2.png')}
.home-feature-icon.pos-1{background-position:0% center}
.home-feature-icon.pos-2{background-position:50% center}
.home-feature-icon.pos-3{background-position:100% center}
.home-feature-card h3{font-size:12px;line-height:1.07;margin:0 0 3px;color:var(--home-ink)}
.home-feature-card p{font-size:9.5px;line-height:1.15;color:var(--home-copy);margin:0}
.home-program-section{
  margin:0 12px 12px;border-radius:24px;background:var(--home-panel);
  min-height:238px;position:relative;overflow:hidden;padding:22px 18px;
}
.home-program-copy{position:relative;z-index:2;width:45%;padding-top:2px}
.home-section-title-left{justify-content:flex-start;align-items:flex-start;gap:7px;margin-bottom:8px}
.home-section-title-left h2{text-align:left;font-size:20px}
.home-section-title-left .ray{margin-top:1px}
.home-program-copy>p{font-size:13px;line-height:1.35;color:var(--home-copy);margin:0}
.home-program-art{
  position:absolute;right:-25px;bottom:-3px;width:79%;max-width:none;height:auto;z-index:1
}
.home-reassurance-panel{padding-top:14px;padding-bottom:17px}
.home-reassurance-panel .home-section-title{margin-bottom:12px}
.home-reassurance-panel .home-section-title h2{font-size:18px}
.home-reassurance-grid{display:grid;grid-template-columns:repeat(3,1fr)}
.home-reassurance-grid article{
  display:grid;grid-template-columns:38px 1fr;gap:7px;align-items:center;padding:4px 10px
}
.home-reassurance-grid article+article{border-left:1px solid #dbe8ea}
.benefit-icon{font-size:29px;line-height:1;display:block;text-align:center}
.benefit-icon.heart{color:#ff624f}.benefit-icon.star{color:#ffb52e}
.home-reassurance-grid h3{font-size:11px;line-height:1.08;margin:0 0 3px}
.home-reassurance-grid p{font-size:9px;line-height:1.18;color:var(--home-copy);margin:0}
.home-final-cta{
  position:relative;min-height:135px;padding:18px 18px 64px;text-align:center;overflow:hidden
}
.home-primary-cta-bottom{min-width:310px;font-size:16px;position:relative;z-index:4}
.home-final-cta>p{position:relative;z-index:4;font-size:10.5px;color:var(--home-copy);margin:10px 0 0}
.home-final-cta>p span{color:var(--home-ink)}
.home-landscape{position:absolute;bottom:-34px;width:38%;z-index:1;pointer-events:none}
.home-landscape-left{left:-10px}
.home-landscape-right{right:-10px}
.planner-page-head{padding:10px 2px 16px}
.planner-page-head h2{font-size:34px;line-height:1.05;letter-spacing:-.04em;margin:5px 0 0}
.planner-home-link{border:0;background:transparent;color:var(--muted);font-weight:800;padding:0 0 14px;cursor:pointer}

/* Dark landing page: assets stay transparent while surfaces adapt */
html[data-theme="dark"] .home-page{
  --home-bg:#0d1720;--home-ink:#e8f5f8;--home-copy:#a9c0cb;
  --home-card:#15232e;--home-panel:#102633;--home-soft:#142a36;--home-line:#27414f;
}
html[data-theme="dark"] body.home-active{background:#071016}
html[data-theme="dark"] body.home-active .app-shell,
html[data-theme="dark"] body.home-active .topbar{background:#0d1720}
html[data-theme="dark"] .home-menu-btn span{background:#e8f5f8}
html[data-theme="dark"] .home-menu-popover{background:#15232e;border-color:#27414f}
html[data-theme="dark"] .home-menu-popover button{color:#e8f5f8}
html[data-theme="dark"] .home-feature-card{background:#142a36}
html[data-theme="dark"] .home-step-card{background:#15232e}
html[data-theme="dark"] .home-reassurance-grid article+article{border-color:#27414f}

@media(max-width:600px){
  body.home-active .app-shell{width:100%;box-shadow:none}
  body.home-active .topbar{padding:12px 20px 2px}
  body.home-active .brand-full-logo{width:145px}
  .home-hero-section{min-height:450px;padding:14px 10px 7px 20px;grid-template-columns:.9fr 1.1fr}
  .home-kicker{font-size:8.5px;margin-bottom:12px}
  .home-hero-copy h1{font-size:clamp(31px,8.8vw,40px);margin-bottom:9px}
  .home-hero-copy>p{font-size:11.5px;line-height:1.35;margin-bottom:13px}
  .home-primary-cta{font-size:12.5px;padding:11px 15px;gap:8px;white-space:nowrap}
  .home-primary-cta span{font-size:17px}
  .home-how-link{font-size:10px;gap:7px;margin-top:8px}
  .home-play{width:29px;height:29px;font-size:10px}
  .home-hero-visual img{width:128%;margin-right:-48px}
  .home-panel,.home-reassurance-panel{margin-left:8px;margin-right:8px;border-radius:21px;padding:14px 8px 13px}
  .home-section-title{gap:5px;margin-bottom:11px}
  .home-section-title h2{font-size:15px}
  .ray{flex-basis:25px;width:25px;height:24px}
  .home-steps-grid{gap:6px}
  .home-step-card{border-radius:13px;padding:2px 5px 10px}
  .home-step-art{height:72px}
  .home-step-card h3{font-size:12.5px}
  .home-step-card p{font-size:8.5px}
  .home-features-section{padding:17px 8px 13px}
  .home-features-grid{gap:6px}
  .home-feature-card{grid-template-columns:39px 1fr;gap:5px;padding:8px 6px;min-height:72px;border-radius:12px}
  .home-feature-icon{width:39px;height:46px}
  .home-feature-card h3{font-size:9.5px}
  .home-feature-card p{font-size:7.5px}
  .home-program-section{margin:0 8px 9px;border-radius:20px;min-height:205px;padding:17px 10px}
  .home-program-copy{width:47%}
  .home-section-title-left h2{font-size:15.5px}
  .home-program-copy>p{font-size:10px}
  .home-program-art{width:84%;right:-31px}
  .home-reassurance-panel .home-section-title h2{font-size:14px}
  .home-reassurance-grid article{grid-template-columns:30px 1fr;gap:4px;padding:3px 5px}
  .benefit-icon{font-size:23px}
  .home-reassurance-grid h3{font-size:8.5px}
  .home-reassurance-grid p{font-size:7px}
  .home-final-cta{min-height:122px;padding-top:14px;padding-bottom:55px}
  .home-primary-cta-bottom{min-width:260px;font-size:13px}
  .home-final-cta>p{font-size:8.5px}
  .home-landscape{width:43%;bottom:-28px}
  .planner-page-head{padding:8px 2px 12px}
}

@media(min-width:761px){
  body.home-active .app-shell{border-radius:0 0 28px 28px;overflow:hidden}
}

/* Trajet Zen configurator illustration assets */
.wizard-question{
  align-items:center!important;
}
.wizard-icon-img{
  width:74px!important;
  height:74px!important;
  flex:0 0 74px!important;
  object-fit:contain;
  border-radius:0!important;
  background:transparent!important;
  padding:0!important;
  box-shadow:none!important;
}
.label-with-asset{
  display:flex!important;
  align-items:center;
  gap:8px;
}
.label-with-asset img{
  width:30px;
  height:30px;
  object-fit:contain;
  flex:none;
}
.label-with-asset strong{
  margin-left:auto;
}
.chip-with-asset{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:7px;
}
.chip-with-asset img{
  width:28px;
  height:28px;
  object-fit:contain;
  flex:none;
}

@media(max-width:520px){
  .wizard-icon-img{
    width:62px!important;
    height:62px!important;
    flex-basis:62px!important;
  }
  .label-with-asset img{
    width:27px;
    height:27px;
  }
  .chip-with-asset img{
    width:25px;
    height:25px;
  }
}

/* Clean secondary CTA */
.home-how-link{
  margin-top:12px!important;
  border:1px solid color-mix(in srgb,var(--home-ink) 18%,transparent)!important;
  background:color-mix(in srgb,var(--home-soft) 72%,transparent)!important;
  color:var(--home-ink)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  min-height:42px;
  padding:6px 13px 6px 7px!important;
  border-radius:999px!important;
  font-size:12px!important;
  font-weight:850!important;
  text-decoration:none!important;
  cursor:pointer;
}
.home-how-link:hover{transform:translateY(-1px)}
.home-how-label{text-decoration:none!important;line-height:1}
.home-play{
  width:30px!important;height:30px!important;flex:0 0 30px;
  margin:0!important;
  border-radius:50%!important;
  background:#dff6f1!important;
  color:#179c78!important;
  display:grid!important;
  place-items:center!important;
  text-decoration:none!important;
}
.home-play-triangle{
  display:block;
  font-size:11px;
  line-height:1;
  transform:translateX(1px);
  text-decoration:none!important;
}

/* Animated how-it-works explainer */
.how-modal{position:fixed;inset:0;z-index:140;display:grid;place-items:center;padding:18px}
.how-modal.hidden{display:none}
.how-modal-backdrop{position:absolute;inset:0;background:rgba(2,20,29,.72);backdrop-filter:blur(8px)}
.how-modal-card{
  position:relative;width:min(92vw,540px);max-height:min(90dvh,720px);overflow:auto;
  border-radius:28px;background:var(--home-card,#fff);color:var(--home-ink,#07516b);
  box-shadow:0 30px 90px rgba(0,24,37,.32);padding:22px;
  border:1px solid color-mix(in srgb,var(--home-ink,#07516b) 10%,transparent)
}
.how-modal-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:12px}
.how-modal-kicker{font-size:10px;font-weight:900;letter-spacing:.14em;color:#2aa983}
.how-modal-top h2{font-size:29px;letter-spacing:-.04em;margin:3px 0 0}
.how-modal-close{
  width:38px;height:38px;border-radius:50%;border:0;background:var(--home-soft,#edf9fb);
  color:var(--home-ink,#07516b);font-size:26px;line-height:1;cursor:pointer
}
.how-stage{position:relative;border-radius:22px;background:var(--home-panel,#f1fbfd);padding:18px 16px 20px;overflow:hidden}
.how-road{position:relative;height:42px;margin:0 12px 12px;display:flex;align-items:center;justify-content:space-between}
.how-road-line{position:absolute;left:20px;right:20px;top:50%;height:4px;transform:translateY(-50%);background:#cbe5ec;border-radius:999px}
.how-node{
  position:relative;z-index:2;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  background:#d7eaf0;color:#70909f;font-size:11px;font-weight:900;border:3px solid var(--home-panel,#f1fbfd)
}
.how-node.active,.how-node.done{background:#27aa82;color:#fff}
.how-car{
  position:absolute;z-index:3;top:-5px;left:2%;font-size:24px;filter:drop-shadow(0 3px 5px rgba(0,0,0,.15));
  transition:left .65s cubic-bezier(.2,.8,.2,1)
}
.how-scene{
  min-height:350px;display:grid;grid-template-columns:1fr 1.04fr;gap:14px;align-items:center;
  transition:opacity .2s ease,transform .2s ease
}
.how-scene.is-changing{opacity:0;transform:translateY(8px)}
.how-scene-art-wrap{display:grid;place-items:center;min-height:250px}
.how-scene-art{
  display:block;width:100%;max-width:240px;max-height:270px;object-fit:contain;
  animation:howArtIn .55s cubic-bezier(.2,.8,.2,1)
}
.how-scene-copy{padding:4px 8px 4px 0}
.how-step-badge{
  display:inline-flex;padding:6px 10px;border-radius:999px;background:#dff6f1;color:#178c6e;
  font-size:10px;font-weight:900;letter-spacing:.05em;text-transform:uppercase
}
.how-scene-copy h3{font-size:25px;line-height:1.03;letter-spacing:-.04em;margin:11px 0 9px}
.how-scene-copy p{font-size:14px;line-height:1.45;color:var(--home-copy,#335f75);margin:0}
.how-progress{height:4px;background:#dbe9ed;border-radius:999px;overflow:hidden;margin:15px 2px 0}
.how-progress span{display:block;width:0;height:100%;background:#27aa82;border-radius:inherit}
.how-progress span.playing{animation:howProgress 3.4s linear forwards}
.how-modal-actions{display:flex;justify-content:center;gap:10px;min-height:48px;padding-top:14px}
.how-replay{
  border:1px solid var(--home-line,#dbecef);background:transparent;color:var(--home-ink,#07516b);
  border-radius:999px;padding:10px 15px;font-weight:850;cursor:pointer
}
.how-start-btn{font-size:14px!important;padding:11px 18px!important}
@keyframes howProgress{from{width:0}to{width:100%}}
@keyframes howArtIn{
  0%{opacity:0;transform:translateX(18px) scale(.96)}
  100%{opacity:1;transform:none}
}
html[data-theme="dark"] .how-modal-card{background:#101c25;color:#eaf5f7;border-color:#29414c}
html[data-theme="dark"] .how-stage{background:#142934}
html[data-theme="dark"] .how-node{border-color:#142934}
html[data-theme="dark"] .how-modal-close{background:#1a303b;color:#eaf5f7}
html[data-theme="dark"] .how-scene-copy p{color:#acc2cc}

@media(max-width:520px){
  .home-how-link{
    min-height:38px;
    padding:5px 11px 5px 6px!important;
    font-size:10.5px!important;
    gap:7px!important
  }
  .home-play{width:27px!important;height:27px!important;flex-basis:27px}
  .how-modal{padding:10px}
  .how-modal-card{width:100%;max-height:94dvh;border-radius:22px;padding:17px}
  .how-modal-top h2{font-size:24px}
  .how-stage{padding:14px 12px 16px}
  .how-road{margin-bottom:5px}
  .how-scene{min-height:390px;grid-template-columns:1fr;gap:2px;text-align:center}
  .how-scene-art-wrap{min-height:210px}
  .how-scene-art{max-width:220px;max-height:220px}
  .how-scene-copy{padding:0 7px}
  .how-scene-copy h3{font-size:22px;margin:8px 0 7px}
  .how-scene-copy p{font-size:13px;line-height:1.4}
  .how-step-badge{font-size:9px}
}
@media(prefers-reduced-motion:reduce){
  .how-car,.how-scene{transition:none}
  .how-scene-art,.how-progress span.playing{animation:none}
}

/* =========================================================
   Trajet Zen — authentication
   ========================================================= */
.auth-page{margin:0;min-height:100vh;background:#f5f8f9;color:#07516b}
.auth-topbar{max-width:760px;margin:0 auto;padding:18px 22px;background:#fff}
.auth-brand{display:inline-flex;align-items:center}
.auth-brand img{width:156px;height:auto;display:block}
.auth-shell{min-height:calc(100vh - 76px);display:grid;place-items:center;padding:24px 16px 42px}
.auth-card{width:min(100%,470px);background:#fff;border:1px solid #deebed;border-radius:28px;padding:32px 30px;box-shadow:0 22px 70px rgba(20,63,79,.10);text-align:center}
.auth-kicker{font-size:10px;letter-spacing:.17em;font-weight:900;color:#55798a;margin-bottom:12px}
.auth-card h1{font-size:38px;line-height:1.01;letter-spacing:-.045em;margin:0 0 14px;color:#07516b}
.auth-lead{max-width:360px;margin:0 auto 24px;color:#55798a;font-size:14px;line-height:1.48}
.auth-buttons{display:grid;gap:11px}
.oauth-btn{width:100%;height:54px;border-radius:999px;border:1px solid #cfdddf;background:#fff;color:#173b4c;display:flex;align-items:center;justify-content:center;gap:12px;font-size:15px;font-weight:850;cursor:pointer;transition:.16s ease}
.oauth-btn:hover{transform:translateY(-1px);box-shadow:0 9px 22px rgba(28,66,82,.10)}
.oauth-btn.apple{background:#111;color:#fff;border-color:#111}
.oauth-logo{width:24px;height:24px;display:grid;place-items:center;font-size:20px;font-weight:900}
.google-g{font-family:Arial,sans-serif;color:#4285f4}
.apple-logo{font-family:Arial,sans-serif;font-size:24px;font-weight:400}
.oauth-unavailable{opacity:.62}
.auth-status{margin:14px 0 0;padding:10px 12px;border-radius:12px;background:#fff6df;color:#775313;font-size:12px;font-weight:750}
.auth-status.hidden{display:none}
.auth-benefits{margin:25px 0 19px;padding:16px 0;border-top:1px solid #e5edef;border-bottom:1px solid #e5edef;display:grid;gap:12px;text-align:left}
.auth-benefits>div{display:grid;grid-template-columns:28px 1fr;gap:8px;align-items:start}
.auth-benefits>div>span{width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#dcf6ee;color:#168b69;font-size:12px;font-weight:900}
.auth-benefits p{margin:0;color:#678391;font-size:12px;line-height:1.35}
.auth-benefits strong{color:#163f51}
.auth-legal{font-size:10px;line-height:1.45;color:#8aa0aa;margin:0 auto 13px;max-width:360px}
.auth-back{color:#55798a;font-size:12px;font-weight:800;text-decoration:none}
@media(max-width:520px){
 .auth-topbar{padding:13px 18px}
 .auth-brand img{width:140px}
 .auth-shell{align-items:start;padding-top:26px}
 .auth-card{padding:26px 18px 23px;border-radius:23px}
 .auth-card h1{font-size:32px}
 .auth-lead{font-size:13px}
 .oauth-btn{height:52px;font-size:14px}
}

.google-button-host{width:100%;display:flex;justify-content:center;min-height:44px}
.google-button-host.hidden{display:none}

/* =========================================================
   Trajet Zen — paywall / pricing
   ========================================================= */
.paywall-wrap{position:fixed;inset:0;z-index:140;display:grid;place-items:end center}
.paywall-wrap.hidden{display:none}
.paywall-backdrop{position:absolute;inset:0;background:rgba(4,25,36,.58);backdrop-filter:blur(5px)}
.paywall-card{position:relative;z-index:1;width:min(100%,760px);max-height:94vh;overflow:auto;background:#fff;border-radius:28px 28px 0 0;padding:26px 22px 22px;box-shadow:0 -28px 80px rgba(4,32,45,.24)}
.paywall-close{position:absolute;top:14px;right:15px;width:38px;height:38px;border-radius:50%;border:1px solid #d8e6e8;background:#f7fbfb;color:#315c6e;font-size:24px;line-height:1;cursor:pointer}
.paywall-kicker{font-size:10px;letter-spacing:.16em;font-weight:900;color:#5c7b89;margin-bottom:7px;text-align:center}
.paywall-card h2{margin:0;text-align:center;color:#07516b;font-size:28px;line-height:1.05;letter-spacing:-.035em;padding:0 34px}
.paywall-lead{max-width:570px;margin:10px auto 18px;text-align:center;color:#64818e;font-size:13px;line-height:1.45}
.paywall-balance{margin:0 auto 14px;max-width:520px;padding:10px 13px;border-radius:13px;background:#eaf8f3;color:#126b55;text-align:center;font-size:12px;font-weight:850}
.paywall-balance.hidden{display:none}
.paywall-plans{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;align-items:stretch}
.paywall-plan{position:relative;border:1px solid #d9e7e9;border-radius:19px;padding:15px 13px 13px;background:#fff;display:flex;flex-direction:column;min-width:0}
.paywall-plan.featured{border:2px solid #28a982;background:#f3fcf8;box-shadow:0 10px 28px rgba(40,169,130,.11)}
.paywall-badge{position:absolute;top:-10px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#07516b;color:#fff;border-radius:999px;padding:5px 9px;font-size:8px;font-weight:900;letter-spacing:.08em}
.paywall-plan-eyebrow{font-size:8px;font-weight:900;letter-spacing:.13em;color:#6a8996}
.paywall-plan h3{margin:4px 0 10px;color:#07516b;font-size:18px}
.paywall-price{display:grid;gap:2px;margin-bottom:10px}
.paywall-price strong{font-size:25px;letter-spacing:-.04em;color:#123f52}
.paywall-price span{font-size:10px;color:#69838f;font-weight:750}
.paywall-plan p{margin:0 0 13px;color:#607b87;font-size:11px;line-height:1.35;flex:1}
.paywall-plan button{width:100%;border:0;border-radius:999px;padding:11px 9px;background:#e6f6f1;color:#0d765a;font-weight:900;font-size:11px;cursor:pointer}
.paywall-plan.featured button{background:linear-gradient(90deg,#25a77d,#31b58c);color:#fff}
.paywall-plan button:disabled{opacity:.55;cursor:wait}
.paywall-trust{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 14px;margin-top:15px;color:#6f8994;font-size:9.5px;font-weight:750}
.paywall-error{margin:12px auto 0;max-width:560px;padding:10px 12px;border-radius:11px;background:#fff0ee;color:#9a3e34;font-size:11px;text-align:center;font-weight:750}
.paywall-error.hidden{display:none}
.preview-locked-note{margin:10px 0 0;padding:12px;border-radius:14px;background:#f0f8f9;border:1px dashed #b9dadd;color:#456b7a;font-size:12px;line-height:1.4;text-align:center}
.preview-item.locked{position:relative;min-height:58px;overflow:hidden}
.preview-item.locked>div{filter:blur(5px);opacity:.45;user-select:none}
.preview-item.locked:after{content:"🔒 Activité disponible après déblocage";position:absolute;inset:0;display:grid;place-items:center;color:#315f70;font-size:11px;font-weight:900;background:rgba(247,251,252,.78)}
@media(max-width:620px){
 .paywall-card{padding:24px 14px 16px;border-radius:24px 24px 0 0}
 .paywall-card h2{font-size:24px}
 .paywall-lead{font-size:12px;margin-bottom:15px}
 .paywall-plans{grid-template-columns:1fr;gap:9px}
 .paywall-plan{display:grid;grid-template-columns:1fr auto;grid-template-areas:"head price" "copy copy" "button button";gap:0 10px;padding:12px 12px}
 .paywall-plan>div:first-of-type{grid-area:head}
 .paywall-plan .paywall-price{grid-area:price;text-align:right}
 .paywall-plan p{grid-area:copy;margin:3px 0 10px}
 .paywall-plan button{grid-area:button}
 .paywall-badge{top:-7px;left:auto;right:10px;transform:none}
 .paywall-plan h3{font-size:16px;margin-bottom:5px}
 .paywall-price strong{font-size:22px}
}
