@font-face {
  font-family: "Mona Sans";
  src: url("./assets/mona-sans.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  font-family: "Mona Sans", sans-serif;
  color: #333932;
  background: #eeede8;
  font-synthesis: none;
  --app-bg: #17262f;
  --app-surface: #253b47;
  --app-surface-hover: #304c5b;
  --app-line: #3a5563;
  --text: #f3f6f5;
  --muted: #b6c8cf;
  --gold: #d9bb78;
  --gold-ink: #29281e;
  --gold-shadow: #927843;
  --success: #8cdda6;
  --gold-ring: #ab965f;
  --route-rest: #405a66;
  --route-done: #74b48e;
  --banner-bg: #147f79;
  --banner-hover: #178a82;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --phone-scale: .75;
}

* { box-sizing: border-box; }
body { margin: 0; padding: 26px 40px; min-height: 100svh; }
button, input, select { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #b59350; outline-offset: 4px; }
button svg, a svg { pointer-events: none; }
svg.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
::selection { color: #171c17; background: #dcc58e; }
.presentation-header { max-width: 1080px; margin: 0 auto; height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.presentation-brand { display: flex; align-items: center; gap: 18px; text-decoration: none; color: #333932; font-weight: 750; font-size: 22px; letter-spacing: -.04em; }
.presentation-brand span { font-size: 12px; font-weight: 500; letter-spacing: 0; color: #646d5e; border-left: 1px solid #caccc2; padding-left: 18px; }
.study-label { font-size: 11px; color: #646d5e; padding-top: 7px; }
.presentation-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(310px, 480px) minmax(300px, 375px); gap: 80px; align-items: start; }
.device-area { height: calc(100svh - 104px); min-height: 380px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; }
.device-wrap { width: 312.75px; height: 657px; flex-shrink: 0; }
.phone { position: relative; width: 417px; padding: 10px; border: 2px solid #444b44; border-radius: 54px; background: #0d100e; box-shadow: 0 18px 44px #1c281f21, inset 0 0 0 3px #151b17; transform: scale(var(--phone-scale)); transform-origin: top left; }
.phone-screen { position: relative; width: 393px; height: 852px; border-radius: 41px; overflow: hidden; background: var(--app-bg); color: var(--text); color-scheme: dark; isolation: isolate; }
.side-button { position: absolute; width: 3px; height: 36px; left: -5px; top: 143px; border-radius: 2px 0 0 2px; background: #525950; }
.side-button-two { top: 192px; height: 54px; }
.phone-camera { position: absolute; z-index: 5; width: 106px; height: 24px; background: #0d100e; border-radius: 0 0 17px 17px; top: 0; left: 50%; transform: translateX(-50%); pointer-events: none; }
.phone-camera i { position: absolute; right: 13px; top: 7px; width: 7px; height: 7px; background: #1f2d30; border: 2px solid #182222; border-radius: 50%; }
.app-shell { height: 100%; display: flex; flex-direction: column; }
.status-bar { height: 33px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 3px 26px 0; font-size: 11px; }
.status-bar b { font-weight: 650; }
.status-bar > span { display: flex; gap: 4px; }
.status-bar svg { width: 15px; height: 15px; stroke-width: 1.8; }
.app-header { height: 53px; display: flex; align-items: center; justify-content: space-between; padding: 0 19px; gap: 8px; flex-shrink: 0; }
.app-brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 9px; }
.app-brand > span:last-child { font-size: 11px; font-weight: 600; letter-spacing: .19em; white-space: nowrap; }
.app-brand b { font-weight: 400; color: var(--muted); }
.brand-mark { display: block; width: 30px; height: 34px; position: relative; overflow: hidden; }
.brand-mark img { position: absolute; width: 38px; height: 38px; max-width: none; top: -2px; left: -3px; filter: brightness(var(--art-brightness, 1)); }
.icon-button { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 0; color: var(--muted); background: transparent; border-radius: 12px; transition: background-color 150ms ease, transform 130ms var(--ease-out); }
.icon-button:active { transform: scale(.95); }
.icon-button svg { width: 20px; height: 20px; }
.header-back { margin-left: -9px; width: 32px; }
.header-back:not([hidden]) + .app-brand { margin-right: auto; gap: 6px; }
.header-back:not([hidden]) + .app-brand > span:last-child { font-size: 11px; letter-spacing: .12em; }
.app-main { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--app-line) transparent; outline: none; }
.home-page { display: flex; flex-direction: column; min-height: 100%; }
.journey-heading { padding: 11px 23px 15px; }
.journey-heading h1 { font-size: 25px; line-height: 1.2; letter-spacing: -.035em; margin: 0 0 6px; font-weight: 750; }
.journey-heading p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.map-banner { margin: 0 20px; padding: 13px 14px; border-radius: 14px; background: var(--banner-bg); display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; text-align: left; color: #fff; flex-shrink: 0; transition: background-color 150ms ease; }
.map-banner h2 { margin: 0 0 4px; font-size: 15px; line-height: 1.25; font-weight: 650; }
.map-banner p { color: #f2fcfa; font-size: 11px; line-height: 1.4; margin: 0; }
.map-banner > svg { color: #fff; width: 19px; height: 19px; }
.journey-board { position: relative; flex: 1; min-height: 418px; margin: 1px 20px 0; }
.route-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.route-line { fill: none; stroke: var(--route-rest); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 9; }
.route-explored { fill: none; stroke: var(--route-done); stroke-width: 3; stroke-linecap: round; }
.route-current { fill: none; stroke: #b59c68; stroke-width: 3; stroke-linecap: round; }
.orbit-line { fill: none; stroke: #a68b54; stroke-width: .7; opacity: .1; }
.map-stop { position: absolute; display: flex; align-items: center; gap: 12px; transform: translate(-50%, -50%); }
/* Map color describes the subject; text, check and the gold ring describe state.
   These same computed tokens feed the desktop Three.js scene. */
.stop-cartografia, .palette-cartografia {
  --map-face: #419b63; --map-focus: #46a069; --map-edge: #286b44;
  --map-ink: #f2fff5; --map-label: #a1e3b4;
  --map-panel: #2d7351; --map-panel-ink: #fff;
  --map-action: #d4f1df; --map-action-ink: #224631;
}
.stop-padroes, .palette-padroes, .stop-escolhas, .palette-escolhas, .stop-recursos, .palette-recursos {
  --map-face: #2bb8aa; --map-focus: #51cbbb; --map-edge: #197e76;
  --map-ink: #123b36; --map-label: #8de4d8;
  --map-panel: #126e68; --map-panel-ink: #fff;
  --map-action: #d0f3ec; --map-action-ink: #16483f;
}
.stop-vinculos, .palette-vinculos, .stop-relacoes, .palette-relacoes, .stop-necessidades, .palette-necessidades {
  --map-face: #9472d4; --map-focus: #9d7dd7; --map-edge: #624291;
  --map-ink: #fff; --map-label: #cbb5ef;
  --map-panel: #634599; --map-panel-ink: #fff;
  --map-action: #e8ddfb; --map-action-ink: #432965;
}
.stop-autoimagem, .palette-autoimagem, .stop-medos, .palette-medos {
  --map-face: #df8792; --map-focus: #eba0aa; --map-edge: #a45469;
  --map-ink: #4b2432; --map-label: #f0b1bf;
  --map-panel: #8b435d; --map-panel-ink: #fff;
  --map-action: #f8dfe7; --map-action-ink: #542b3b;
}
.stop-identidade, .palette-identidade, .stop-corpo, .palette-corpo {
  --map-face: #6aa9d9; --map-focus: #88bee5; --map-edge: #3b719b;
  --map-ink: #15334a; --map-label: #add6f4;
  --map-panel: #286d9c; --map-panel-ink: #fff;
  --map-action: #d9edfa; --map-action-ink: #204563;
}
.map-stop.is-completed {
  --map-face: #419b63; --map-focus: #46a069; --map-edge: #286b44;
  --map-ink: #f2fff5; --map-label: #a1e3b4;
  --map-panel: #2d7351; --map-panel-ink: #fff;
  --map-action: #d4f1df; --map-action-ink: #224631;
}
.map-stop.is-current {
  --map-face: var(--gold); --map-focus: var(--gold); --map-edge: var(--gold-shadow);
  --map-ink: var(--gold-ink); --map-label: var(--gold);
  --map-panel: var(--gold); --map-panel-ink: var(--gold-ink);
  --map-action: #f4ecd8; --map-action-ink: var(--gold-ink);
}
.stop-control { width: 58px; height: 58px; position: relative; border-radius: 50%; display: grid; place-items: center; background: var(--map-face); color: var(--map-ink); border: 0; box-shadow: 0 5px 0 var(--map-edge); transition: transform 130ms var(--ease-out), background-color 150ms ease, box-shadow 130ms ease; }
.stop-control > svg { width: 24px; height: 24px; }
.stop-control:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--map-edge); }
.map-stop.is-completed .stop-control { background: var(--map-face); color: var(--map-ink); box-shadow: 0 5px 0 var(--map-edge); }
.map-stop.is-current .stop-control { width: 70px; height: 70px; background: var(--gold); color: var(--gold-ink); box-shadow: 0 6px 0 var(--gold-shadow); }
.map-stop.is-current .stop-control:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-shadow); }
.map-stop.is-current .stop-control > svg { width: 29px; height: 29px; stroke-width: 2; }
.current-outline { position: absolute; inset: -8px; border: 2px solid var(--gold-ring); border-radius: 50%; pointer-events: none; }
.stop-label { position: absolute; width: 145px; left: 72px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.stop-label b { display: block; font-size: 13px; line-height: 1.45; font-weight: 550; color: var(--map-label); }
.stop-label small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); line-height: 1.4; }
.map-stop.is-completed .stop-label b { color: var(--map-label); }
.map-stop.is-completed .stop-label small { color: var(--success); }
.map-stop.is-current .stop-label { top: 84px; left: 50%; width: 150px; text-align: center; transform: translateX(-50%); }
.map-stop.is-current .stop-label b { color: var(--text); font-size: 13px; font-weight: 600; }
.map-stop.is-current .stop-label small { color: var(--gold); font-size: 11px; }
.map-stop.stop-cartografia { left: 27%; top: 88%; }
.map-stop.stop-padroes { left: 67%; top: 62%; }
.map-stop.stop-padroes:not(.is-current) .stop-label { top: 75px; left: 50%; width: 160px; text-align: center; transform: translateX(-50%); }
.map-stop.stop-vinculos { left: 72%; top: 36%; }
.map-stop.stop-vinculos .stop-label { left: auto; right: 72px; width: 152px; text-align: right; }
.map-stop.stop-autoimagem { left: 46%; top: 18%; }
.map-stop.stop-autoimagem .stop-label { left: auto; right: 71px; width: 110px; text-align: right; }
.map-stop.stop-identidade { left: 73%; top: 8%; }
.map-stop.stop-identidade .stop-label { left: auto; right: 69px; width: 137px; text-align: right; }
.map-stop.is-current.stop-cartografia .stop-label { top: 0; left: 88px; text-align: left; transform: none; width: 155px; }
.map-stop.is-current.stop-vinculos .stop-label { top: 77px; right: auto; left: 50%; text-align: center; width: 152px; }
.guide-group { position: absolute; left: -14px; top: 45%; width: 150px; height: 220px; pointer-events: none; }
.guide-character { position: absolute; top: 72px; left: -16px; width: 116px; height: 174px; object-fit: contain; }
.guide-speech { position: absolute; z-index: 1; left: 15px; top: -14px; width: 148px; padding: 12px 13px; border: 1px solid #587782; background: var(--app-surface); border-radius: 13px; font-size: 13px; line-height: 1.5; font-weight: 500; color: #e1edf1; }
.guide-speech::after { content: ""; position: absolute; left: 38px; bottom: -6px; width: 10px; height: 10px; border-right: 1px solid #587782; border-bottom: 1px solid #587782; background: var(--app-surface); transform: rotate(45deg); }
.home-page[data-guide="false"] .guide-group { display: none; }
.home-page[data-scenario="first"] .guide-group { top: 45%; }
.journey-action { padding: 12px 20px 10px; flex-shrink: 0; }
.primary-button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 12px 16px; border: 0; border-radius: 13px; background: var(--gold); color: var(--gold-ink); font-size: 14px; line-height: 1.4; font-weight: 700; box-shadow: 0 4px 0 var(--gold-shadow); transition: transform 130ms var(--ease-out), background-color 150ms ease, box-shadow 130ms ease; }
.primary-button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-shadow); }
.primary-button svg { width: 18px; height: 18px; }
.bottom-nav { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px 16px 0; height: 63px; border-top: 1px solid var(--app-line); flex-shrink: 0; }
.bottom-nav button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; color: var(--muted); background: transparent; border: 0; padding: 5px 0; font-size: 11px; font-weight: 500; border-radius: 10px; transition: color 150ms ease, background-color 150ms ease; }
.bottom-nav [data-tab="journey"] { --tab-accent: var(--gold); --tab-bg: #414032; }
.bottom-nav [data-tab="discoveries"] { --tab-accent: #8dcde8; --tab-bg: #264555; }
.bottom-nav [data-tab="profile"] { --tab-accent: #f0b1bf; --tab-bg: #49394b; }
.bottom-nav button > span:first-child { color: var(--tab-accent); }
.bottom-nav button svg { width: 22px; height: 22px; }
.bottom-nav button[aria-current="page"] { color: var(--text); }
.bottom-nav button[aria-current="page"] > span:first-child { position: relative; }
.bottom-nav button[aria-current="page"] > span:first-child::before { content: ""; position: absolute; width: 38px; height: 28px; background: var(--tab-bg); border-radius: 9px; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: -1; }
.home-area { height: 19px; flex-shrink: 0; display: grid; place-items: center; }
.home-area span { width: 109px; height: 4px; border-radius: 3px; background: #e8ece5; opacity: .8; }
.page-content { padding: 18px 23px 24px; }
.page-content h1 { font-size: 26px; line-height: 1.25; letter-spacing: -.03em; margin: 0 0 11px; }
.page-lead { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 26px; }
.detail-symbol { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 19px; color: var(--map-ink, var(--gold)); background: var(--map-face, var(--app-surface)); margin: 18px 0 23px; }
.detail-symbol svg { width: 29px; height: 29px; }
.detail-state { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); font-size: 12px; margin: 0 0 20px; }
.detail-state svg { width: 15px; height: 15px; }
.detail-state.completed { color: var(--success); }
.detail-note { border-top: 1px solid var(--app-line); margin: 4px 0 22px; padding-top: 20px; }
.detail-note h2, .empty-message h2 { font-size: 16px; margin: 0 0 8px; line-height: 1.4; }
.detail-note p, .empty-message p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0; }
.secondary-button { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid #6c8792; background: transparent; border-radius: 12px; color: var(--text); font-weight: 600; font-size: 13px; transition: background-color 150ms ease, transform 130ms var(--ease-out); }
.secondary-button:active { transform: scale(.98); }
.empty-message { padding: 32px 0; }
.empty-message > svg { color: var(--gold); width: 37px; height: 37px; margin-bottom: 19px; }
.discovery-row { padding: 20px 0; border-bottom: 1px solid var(--app-line); display: flex; gap: 13px; align-items: center; }
.discovery-row > svg { color: var(--success); width: 22px; height: 22px; }
.discovery-row h2 { margin: 0 0 4px; font-size: 14px; line-height: 1.4; font-weight: 600; }
.discovery-row p { color: var(--muted); margin: 0; font-size: 12px; }
.profile-identity { display: flex; align-items: center; gap: 14px; padding: 21px 0 30px; }
.profile-avatar { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #49394b; color: #f0b1bf; }
.profile-avatar svg { width: 26px; height: 26px; }
.profile-identity h2 { margin: 0 0 5px; font-size: 17px; }
.profile-identity p { font-size: 12px; color: var(--muted); margin: 0; }
.profile-row { display: flex; align-items: center; gap: 12px; width: 100%; color: var(--text); padding: 17px 0; background: transparent; border: 0; border-top: 1px solid var(--app-line); text-align: left; font-size: 13px; }
.profile-row > svg:first-child { color: var(--muted); width: 20px; }
.profile-row > svg:last-child { margin-left: auto; width: 17px; }
.sheet-overlay { position: absolute; inset: 0; z-index: 10; display: flex; align-items: flex-end; overflow: hidden; }
.sheet-backdrop { position: absolute; inset: 0; background: #050a07b3; opacity: 0; transition: opacity 180ms var(--ease-out); }
.sheet { width: 100%; position: relative; background: var(--app-surface); border-radius: 26px 26px 0 0; padding: 13px 23px 31px; max-height: 82%; overflow-y: auto; overscroll-behavior: contain; transform: translateY(24px); opacity: 0; transition: transform 220ms var(--ease-out), opacity 180ms var(--ease-out); scrollbar-color: #6c8792 transparent; scrollbar-width: thin; }
.sheet-overlay.is-open .sheet { transform: translateY(0); opacity: 1; }
.sheet-overlay.is-open .sheet-backdrop { opacity: 1; }
.sheet-grab { display: block; width: 36px; height: 4px; border-radius: 3px; background: #69818b; margin: 0 auto 17px; }
.sheet-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-heading h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.02em; margin: 10px 0 10px; }
.sheet-heading > button { margin-right: -10px; }
.sheet-copy { color: #d4e1e7; font-size: 13px; line-height: 1.7; margin: 0 0 22px; }
.sheet .toggle-row { color: var(--text); border-bottom-color: var(--app-line); }
.sheet .primary-button { margin-top: 24px; }
.sheet .secondary-button { margin-top: 12px; }
.sheet-help { color: var(--muted); font-size: 12px; line-height: 1.6; padding-top: 18px; }
.pwa-preferences { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--app-line); }
.pwa-preferences h3, .install-platform h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.4; }
.pwa-preferences p { margin: 0 0 10px; color: #d4e1e7; font-size: 13px; line-height: 1.65; }
.pwa-preferences .pwa-status { font-size: 12px; color: var(--muted); }
.pwa-preferences #installPwaButton { color: var(--gold); border-color: #ab965f; }
.pwa-preferences .pwa-install-hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.install-platform { margin: 0 0 20px; }
.install-platform ol { margin: 0; padding-left: 20px; color: #d4e1e7; font-size: 13px; line-height: 1.65; }
.install-platform li + li { margin-top: 6px; }
.app-announcement { position: absolute; bottom: 158px; left: 25px; right: 25px; text-align: center; background: #304c5b; color: var(--text); font-size: 12px; padding: 12px 16px; border-radius: 12px; z-index: 12; margin: 0; opacity: 0; transform: translateY(5px); pointer-events: none; transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }
.app-announcement.is-visible { opacity: 1; transform: translateY(0); }
.device-caption { font-size: 11px; color: #626d5c; margin: 0; text-align: center; }
.device-caption span { padding: 0 5px; }
.presentation-panel { padding: 4px 0; }
.presentation-panel > h1 { font-size: 32px; letter-spacing: -.04em; line-height: 1.13; margin: 0 0 14px; font-weight: 700; }
.panel-intro { font-size: 13px; line-height: 1.7; color: #626d5c; margin: 0 0 16px; max-width: 37ch; }
.scope-note { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #596a50; margin-bottom: 19px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #7d906a; }
.presentation-controls { border-top: 1px solid #cfd2c7; border-bottom: 1px solid #cfd2c7; }
.presentation-controls summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 650; padding: 14px 0; }
.presentation-controls summary::-webkit-details-marker { display: none; }
.presentation-controls summary svg { width: 16px; height: 16px; transition: transform 150ms var(--ease-out); }
.presentation-controls[open] summary svg { transform: rotate(180deg); }
.controls-body { padding: 3px 0 9px; }
.control-heading { display: flex; justify-content: space-between; font-size: 12px; color: #535e4d; margin-bottom: 10px; }
.control-heading output { font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: #8c754b; cursor: pointer; height: 20px; margin: 0; }
.quiet-button { display: flex; justify-content: center; align-items: center; gap: 9px; width: 100%; margin: 12px 0 17px; min-height: 36px; border: 1px solid #bfc5b6; background: transparent; border-radius: 8px; font-size: 12px; color: #515f47; transition: background-color 150ms ease; }
.quiet-button svg { width: 15px; height: 15px; }
.scenario-fieldset { border: 0; margin: 0 0 19px; padding: 0; }
.scenario-fieldset legend { font-size: 12px; margin-bottom: 11px; color: #535e4d; }
.scenario-buttons { display: grid; grid-template-columns: .85fr 1.3fr 1fr; gap: 3px; padding: 3px; background: #e1e3da; border-radius: 9px; }
.scenario-buttons button { border: 0; border-radius: 6px; padding: 9px 5px; font-size: 11px; background: transparent; color: #536048; transition: background-color 150ms ease, color 150ms ease; }
.scenario-buttons button[aria-pressed="true"] { color: #303a2a; background: #fbfaf6; }
.toggle-row { display: flex; align-items: center; position: relative; justify-content: space-between; gap: 15px; min-height: 45px; font-size: 12px; color: #535e4d; cursor: pointer; }
.toggle-row input { position: absolute; right: 0; width: 35px; height: 21px; opacity: 0; margin: 0; }
.switch { width: 35px; height: 21px; border-radius: 20px; background: #a0a79a; position: relative; flex-shrink: 0; transition: background-color 150ms ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #f9faf5; transition: transform 150ms var(--ease-out); }
.toggle-row input:checked + .switch { background: var(--banner-bg); }
.toggle-row input:checked + .switch::after { transform: translateX(14px); }
.toggle-row input:focus-visible + .switch { outline: 3px solid #b59350; outline-offset: 4px; }
.comparison-notes { margin-top: 17px; }
.comparison-notes h2 { font-size: 12px; margin: 0 0 14px; font-weight: 650; }
.comparison-notes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.comparison-notes li { display: flex; gap: 11px; align-items: center; color: #5c6953; font-size: 12px; line-height: 1.5; }
.comparison-notes svg { width: 16px; height: 16px; color: #657358; }
.reset-button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 18px 0 0; font-size: 11px; color: #5b6851; }
.reset-button svg { width: 15px; height: 15px; }
.presentation-footnote { color: #626f58; font-size: 11px; line-height: 1.6; margin: 14px 0 0; max-width: 46ch; }

/* The trail owns its scroll; app chrome and navigation stay in place. */
.app-main.is-journey { overflow: hidden; }
.home-page { height: 100%; min-height: 0; }
.journey-viewport { position: relative; flex: 1; min-height: 0; margin: 12px 20px 0; overflow: hidden; isolation: isolate; }
.journey-three-host { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.journey-three-host canvas { width: 100%; height: 100%; display: block; }
.journey-scroll { position: relative; z-index: 1; width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; overflow-anchor: none; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; scrollbar-width: none; cursor: grab; outline-offset: -3px; }
.journey-scroll::-webkit-scrollbar { display: none; }
.journey-scroll.is-dragging { cursor: grabbing; }
.journey-board { width: 100%; height: 1060px; min-height: 1060px; margin: 0; flex: none; user-select: none; }
.journey-board .route-lines { height: 1120px; }
.journey-viewport::before, .journey-viewport::after { content: ""; position: absolute; left: 0; right: 0; height: 15px; pointer-events: none; z-index: 2; }
.journey-viewport::before { top: 0; background: linear-gradient(var(--app-bg), transparent); }
.journey-viewport::after { bottom: 0; background: linear-gradient(transparent, var(--app-bg)); }
.journey-board .map-stop { will-change: opacity; }
.journey-board .stop-vinculos:not(.is-current) .stop-label { top: 74px; left: 50%; right: auto; width: 164px; text-align: center; transform: translateX(-50%); }
.journey-board .stop-control { transform: perspective(400px) rotateX(27deg); box-shadow: 0 8px 0 var(--map-edge); }
.journey-board .is-completed .stop-control { box-shadow: 0 8px 0 var(--map-edge); }
.journey-board .is-current .stop-control { box-shadow: 0 9px 0 var(--gold-shadow); }
.stop-visual { transform: scale(1); transform-origin: center; transition: transform 200ms var(--ease-out); will-change: transform; backface-visibility: hidden; }
.journey-board .stop-control:active, .journey-board .is-current .stop-control:active { transform: perspective(400px) translateY(4px) rotateX(27deg); box-shadow: 0 3px 0 var(--map-edge); }
.stop-glyph { position: relative; z-index: 1; display: grid; place-items: center; pointer-events: none; }
.stop-sheen { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease-out); }
.stop-focus-tint { position: absolute; inset: 0; border-radius: 50%; background: var(--map-focus); opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease-out); }
.is-current .stop-focus-tint, .scene-ready .stop-focus-tint { display: none; }
.stop-sheen::before, .stop-sheen::after { content: ""; position: absolute; top: -16px; height: calc(100% + 32px); background: #fff; transform: translateX(-32px) skewX(-25deg); animation: stop-sheen 2600ms linear infinite paused; }
.stop-sheen::before { left: -35px; width: 8px; opacity: .18; }
.stop-sheen::after { left: -14px; width: 4px; opacity: .09; }
.map-stop.is-guide-lit .stop-sheen::before, .map-stop.is-guide-lit .stop-sheen::after { animation-play-state: running; }
.journey-viewport[data-guide-paused="true"] .stop-sheen::before, .journey-viewport[data-guide-paused="true"] .stop-sheen::after,
body[data-page-hidden="true"] .stop-sheen::before, body[data-page-hidden="true"] .stop-sheen::after { animation-play-state: paused; }
@keyframes stop-sheen {
  0%, 13% { transform: translateX(-32px) skewX(-25deg); }
  61%, 100% { transform: translateX(138px) skewX(-25deg); }
}
.stop-glyph svg { width: 24px; height: 24px; }
.is-current .stop-glyph svg { width: 29px; height: 29px; stroke-width: 2; }
.scene-ready .route-lines { visibility: hidden; }
.scene-ready .journey-board .stop-control, .scene-ready .journey-board .stop-control:hover, .scene-ready .journey-board .stop-control:active { background: transparent; box-shadow: none; }
.scene-ready .current-outline { display: none; }
.scene-ready .stop-visual { transition: none; }
.trail-endnote { position: absolute; top: 22px; left: 24px; right: 24px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.map-popover-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.map-popover { --popover-bg: var(--map-panel, var(--gold)); --popover-text: var(--map-panel-ink, var(--gold-ink)); position: absolute; left: 12px; right: 12px; padding: 16px; border-radius: 15px; background: var(--popover-bg); color: var(--popover-text); pointer-events: auto; opacity: 0; transform: scale(.97); transform-origin: var(--pointer-x) 0; transition: transform 180ms var(--ease-out), opacity 150ms var(--ease-out); box-shadow: 0 8px 20px #0b162324; }
.map-popover[data-side="above"] { transform-origin: var(--pointer-x) 100%; }
.map-popover::before { content: ""; position: absolute; top: -7px; left: calc(var(--pointer-x) - 7px); width: 14px; height: 14px; background: var(--popover-bg); transform: rotate(45deg); border-radius: 2px; }
.map-popover[data-side="above"]::before { top: auto; bottom: -7px; }
.map-popover.is-open { opacity: 1; transform: scale(1); }
.map-popover[data-keyboard="true"] { transition: none; }
.map-popover h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.map-popover p { margin: 0 0 15px; font-size: 12px; line-height: 1.5; }
.map-popover-action { position: relative; display: flex; justify-content: center; align-items: center; gap: 13px; width: 100%; min-height: 45px; overflow: hidden; border: 0; border-radius: 10px; padding: 11px 13px; background: var(--map-action, #f4ecd8); color: var(--map-action-ink, var(--gold-ink)); font-size: 13px; font-weight: 750; box-shadow: 0 4px 0 var(--map-edge, #a58c53); transition: transform 130ms var(--ease-out), box-shadow 130ms var(--ease-out); }
.map-popover-action > span:not(.button-shine), .map-popover-action > svg { z-index: 1; position: relative; }
.map-popover-action > svg { width: 17px; height: 17px; }
.map-popover-action:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--map-edge, #a58c53); }
.button-shine { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.button-shine::before, .button-shine::after { content: ""; position: absolute; top: -16px; height: calc(100% + 32px); background: #fff; opacity: .56; transform: translateX(-100px) skewX(-25deg); animation: none; }
.button-shine::before { left: 0; width: 28px; }
.button-shine::after { left: 43px; width: 13px; opacity: .32; }
.map-popover.is-open .button-shine::before, .map-popover.is-open .button-shine::after { animation: button-sheen 2600ms linear infinite; }
body[data-page-hidden="true"] .button-shine::before, body[data-page-hidden="true"] .button-shine::after { animation-play-state: paused; }
@keyframes button-sheen {
  0%, 13% { transform: translateX(-100px) skewX(-25deg); }
  61%, 100% { transform: translateX(440px) skewX(-25deg); }
}

/* The guide is anchored in viewport space, independent of trail scrolling. */
.home-page .journey-viewport .guide-group.fixed-guide { position: absolute; z-index: 3; left: -14px; top: min(calc(50% - 150px), calc(100% - 366px)); width: 166px; height: 366px; pointer-events: none; }
.home-page .fixed-guide .guide-character { top: 192px; left: -16px; width: 116px; height: 174px; }
.guide-fallback, .guide-rig-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.guide-character[data-rig="articulated"] .guide-fallback { visibility: hidden; }
.guide-rig-canvas { display: block; }
.home-page .fixed-guide .guide-speech { top: 54px; left: 15px; width: 152px; padding: 11px 12px; font-size: 12px; transition: opacity 150ms var(--ease-out), visibility 150ms; }
.guide-map-title { display: block; min-height: 34px; margin: 0 0 5px; font-size: 13px; line-height: 1.3; color: var(--gold); font-weight: 650; }
.guide-map-description { min-height: 52px; margin: 0; font-size: 12px; line-height: 1.45; font-weight: 400; color: #e1edf1; }
.fixed-guide[data-paused="true"] .guide-speech, .fixed-guide[data-near="false"] .guide-speech { opacity: 0; visibility: hidden; }
.journey-board .map-stop.is-guide-focus .stop-label b { color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover { background: var(--app-surface-hover); }
  .map-banner:hover { background: var(--banner-hover); }
  .stop-control:hover { background: var(--map-focus); }
  .map-stop.is-current .stop-control:hover, .primary-button:hover { background: #e1c78b; }
  .map-stop.is-completed .stop-control:hover { background: var(--map-focus); }
  .secondary-button:hover { background: var(--app-surface-hover); }
  .bottom-nav button:hover { background: var(--app-surface); }
  .quiet-button:hover { background: #e3e6dc; }
  .reset-button:hover { color: #293921; }
}

body[data-reduced-motion="true"] *, body[data-reduced-motion="true"] *::before, body[data-reduced-motion="true"] *::after { animation: none !important; transition-duration: 0s !important; }
body[data-reduced-motion="true"] .sheet { transform: none; }
body[data-reduced-motion="true"] button:active { transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
  .sheet, .app-announcement { transform: none; }
  button:active { transform: none !important; }
}
@media (max-width: 940px) {
  body { padding: 22px; }
  .presentation-grid { grid-template-columns: minmax(270px, 1fr) minmax(280px, 330px); gap: 30px; }
  .presentation-panel > h1 { font-size: 29px; }
  .panel-intro { font-size: 13px; }
}
@media (max-width: 650px) {
  body { padding: 16px; }
  .presentation-header { height: 38px; align-items: flex-start; }
  .presentation-brand { font-size: 20px; gap: 10px; }
  .presentation-brand span { font-size: 11px; padding-left: 10px; }
  .study-label { display: none; }
  .presentation-grid { display: block; }
  .device-area { height: calc(100svh - 80px); min-height: 380px; }
  .presentation-panel { max-width: 390px; margin: 20px auto 0; padding: 20px 0; }
  .presentation-panel > h1 br { display: none; }
}

/* The same app fills a real phone; the presentation shell stays on desktop. */
@media (max-width: 767px), (max-width: 1024px) and (max-height: 600px) and (pointer: coarse) {
  :root { background: var(--app-bg); color-scheme: dark; }
  html { width: 100%; height: 100%; overflow: hidden; }
  body { position: fixed; inset: 0; width: 100%; height: 100svh; height: 100dvh; min-height: 0; padding: 0; overflow: hidden; overscroll-behavior: none; background: var(--app-bg); }
  .presentation-header, .presentation-panel, .device-caption,
  .side-button, .phone-camera, .status-bar, .home-area { display: none !important; }
  .presentation-grid { position: fixed; top: var(--app-visible-top, 0px); left: 0; display: block; width: 100%; height: var(--app-visible-height, 100%); max-width: none; margin: 0; }
  .device-area { display: block; width: 100%; height: 100%; min-height: 0; }
  .device-wrap { width: 100% !important; height: 100% !important; }
  .phone { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; box-shadow: none; transform: none; background: var(--app-bg); }
  .phone-screen { width: 100%; height: 100%; border-radius: 0; }
  .app-shell { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
  .sheet-overlay { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .sheet { max-height: calc(100% - env(safe-area-inset-top, 0px) - 12px); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .app-announcement { bottom: calc(95px + env(safe-area-inset-bottom, 0px)); }
  .journey-board .orbit-line { display: none; }
  /* A touch that turns into a pan must not first depress or lift the map. */
  .journey-board .stop-control:active, .journey-board .is-current .stop-control:active { transform: perspective(400px) rotateX(27deg); box-shadow: 0 8px 0 var(--map-edge); }
  .journey-board .is-completed .stop-control:active { box-shadow: 0 8px 0 var(--map-edge); }
  .journey-board .is-current .stop-control:active { box-shadow: 0 9px 0 var(--gold-shadow); }
}

@media (max-width: 1024px) and (max-height: 600px) and (pointer: coarse) {
  .app-header { height: 46px; }
  .journey-heading { padding: 4px 20px 8px; }
  .journey-heading h1 { font-size: 22px; }
  .journey-heading p { display: none; }
  .map-banner { padding: 8px 12px; }
  .journey-action { padding: 6px 20px 8px; }
  .journey-action .primary-button { min-height: 42px; padding: 9px 16px; }
  .bottom-nav { height: 50px; }
  .home-page .journey-viewport .guide-group.fixed-guide { top: 0; height: 100%; }
  .home-page .fixed-guide .guide-character { top: auto; bottom: 0; left: -4px; width: 96px; height: 144px; }
  .home-page .fixed-guide .guide-speech { top: 0; padding: 8px 10px; }
  .guide-map-title { min-height: 0; margin: 0; font-size: 12px; }
  .guide-map-description { display: none; }
}
