/* XIRCLE V2: root-only styles. Legacy story routes do not import this file. */
:root{color-scheme:dark;--forest:#102c28;--ink:#193b34;--paper:#f4f3e9;--muted:#b9c8bf;--lime:#d1edb9;--sleep:#728ed1;--food:#c97559;--move:#6c9970;--gold:#dcc391}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{scroll-behavior:smooth;background:var(--forest)}
body{margin:0;color:var(--paper);font-family:var(--font-thai);font-size:17px;line-height:1.6;background:radial-gradient(ellipse at 85% 18%,#24443c 0,transparent 50%),var(--forest);min-height:100svh}
button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{font:inherit;cursor:pointer}
a{color:inherit;text-underline-offset:5px}
button:disabled{cursor:default}
button:focus-visible,a:focus-visible{outline:3px solid var(--gold);outline-offset:5px}
h1,h2,h3,p{margin:0}
button:active,.button:active{transform:translateY(1px)}
.page-shell{max-width:1440px;margin:auto;padding:0 56px}
.masthead{display:flex;align-items:center;gap:26px;padding:29px 0;border-bottom:1px solid #afc6b529;min-height:100px}
.brand{display:inline-flex;align-items:center;gap:10px;font-family:var(--font-ui);font-weight:800;letter-spacing:.09em;font-size:24px;text-decoration:none;line-height:1}
.brand-mark{width:27px;height:27px;border:6px solid var(--lime);border-right-color:transparent;border-radius:50%;transform:rotate(-30deg)}
.masthead-note{font-size:15px;color:var(--muted)}
.sample-badge{margin-left:auto;display:flex;align-items:center;gap:8px;font-size:14px;color:#d3ded6}
.sample-badge>span{width:6px;height:6px;background:var(--gold);border-radius:50%;flex-shrink:0}
.demo-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'intro record' 'interaction record';column-gap:76px;padding:64px 0 58px;align-items:start}
.story-intro{grid-area:intro;align-self:end;padding-bottom:28px;min-width:0}
.chapter{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:14px;margin-bottom:25px}
#step-number{font-family:var(--font-ui);font-variant-numeric:tabular-nums;color:var(--lime);white-space:nowrap}
.chapter-line{height:1px;background:#a4c5b045;width:32px}
h1{font-size:clamp(36px,4.2vw,58px);font-weight:600;line-height:1.27;letter-spacing:-.035em;outline:none}
.prompt-copy{margin-top:22px;color:#c3d0c7;font-size:19px;line-height:1.7;max-width:440px}
.interaction{grid-area:interaction;min-width:0;align-self:start}
.control-label{font-size:15px;color:#d7e0d9;margin-bottom:12px}
.choices{display:flex;gap:9px;flex-wrap:wrap}
.choices button{background:transparent;border:1px solid #90b7a65e;border-radius:12px;min-height:54px;padding:11px 15px;color:var(--paper);font-size:16px;font-weight:600;transition:background .15s,border-color .15s,transform .1s}
.three-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.three-choices button{padding-inline:7px;white-space:nowrap}
.choices button[aria-pressed=true]{background:var(--lime);border-color:var(--lime);color:var(--forest)}
.interaction-panel{animation:arrive .24s ease-out}
.interaction-hint{margin-top:18px;color:var(--muted);font-size:14px}
.demo-navigation{display:flex;gap:24px;margin-top:23px;min-height:38px}
.demo-navigation button{border:0;background:transparent;color:var(--muted);padding:8px 0;min-height:48px;font-size:14px}
.button{display:inline-flex;align-items:center;justify-content:space-between;gap:24px;min-height:56px;padding:14px 23px;border-radius:10px;border:1px solid transparent;font-size:17px;font-weight:600;text-decoration:none;line-height:1.5;transition:background .15s,transform .1s}
.button>span{font-family:var(--font-ui);font-size:23px;line-height:1}
.button-lime{background:var(--lime);color:var(--forest);min-width:260px}
.button-forest{background:var(--forest);color:var(--paper);width:100%}
.overview-note{margin-bottom:22px;color:#d4dfd5;font-size:20px;line-height:1.7}
/* One persistent day, with an actual record in each slot. Arcs mean collected, not health. */
.day-record{grid-area:record;color:var(--ink);background:var(--paper);border:1px solid #fff5;border-radius:26px;padding:27px 27px 18px;box-shadow:0 24px 60px #0002;position:relative;isolation:isolate;min-width:0;transition:background .35s}
.record-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.eyebrow{font-family:var(--font-ui);font-size:11px;letter-spacing:.15em;font-weight:700;display:block}
.record-heading .eyebrow{color:#67796e}
.record-heading h2{font-size:22px;font-weight:600;line-height:1.5;margin-top:4px}
.record-count{font-size:13px;white-space:nowrap;color:#607568;border:1px solid #c9d1c4;border-radius:20px;padding:4px 10px;font-variant-numeric:tabular-nums}
.day-visual{width:260px;height:260px;max-width:100%;position:relative;margin:18px auto 6px;display:grid;place-items:center}
.day-rings{width:100%;height:100%;overflow:visible;transform:rotate(-90deg)}
.day-rings circle{fill:none;stroke-width:9}
.ring-track{stroke:#dce1d5}
.ring{stroke-linecap:round;stroke-dasharray:0 100;transition:stroke-dasharray .35s ease-out}
.ring-sleep{stroke:var(--sleep)}.ring-food{stroke:var(--food)}.ring-move{stroke:var(--move)}
.ring.is-filled{stroke-dasharray:93 100}
.day-center{position:absolute;text-align:center;display:flex;flex-direction:column;gap:6px;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:63%}
.day-center>span{font-size:14px;color:#607468}
.day-center strong{font-size:24px;line-height:1.4;font-weight:600;color:var(--ink)}
#center-note{font-size:13px}
.record-feedback{font-size:14px;color:#546d5e;text-align:center;margin:0 auto 18px;min-height:23px}
.record-pieces{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid #d5dccf;border-bottom:1px solid #d5dccf}
.record-piece{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;border:0;background:transparent;border-radius:0;text-align:left;position:relative;min-width:0;padding:15px 8px 14px 0;color:var(--ink);font:inherit}
.record-piece+.record-piece{border-left:1px solid #d5dccf;padding-left:16px}
.piece-label{display:flex;align-items:center;gap:6px;font-size:14px;color:#627769;white-space:nowrap}
.piece-dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0;background:var(--sleep)}
.piece-food .piece-dot{background:var(--food)}.piece-move .piece-dot{background:var(--move)}
.record-piece strong{display:block;font-family:var(--font-ui);font-size:22px;font-weight:700;line-height:1.4;margin-top:7px;white-space:nowrap;font-variant-numeric:tabular-nums}
.record-piece small{display:block;font-size:13px;color:#677c6c;line-height:1.5;margin-top:3px}
.record-piece.is-filled .piece-label{color:var(--ink)}
.record-piece:not(:disabled):is(button){cursor:pointer}
.record-piece:focus-visible{outline:2px solid var(--ink);outline-offset:0}
.record-footnote{font-size:13px;line-height:1.6;color:#6b7b6c;margin-top:13px;text-align:center}
.camera{position:absolute;inset:19px -2px 16px;display:flex;flex-direction:column;gap:8px;background:var(--paper);border-radius:16px;animation:arrive .24s ease-out}
.camera-frame{position:relative;flex:1;min-height:0;border-radius:14px;overflow:hidden;background:#e8dfc9}
.camera-frame img,.meal-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 100%;transform:scale(2.1);transform-origin:50% 100%}
.camera-corner{position:absolute;width:24px;height:24px;border-color:#fff;border-style:solid;filter:drop-shadow(0 1px 3px #0005)}
.corner-tl{left:12px;top:12px;border-width:2px 0 0 2px}.corner-tr{right:12px;top:12px;border-width:2px 2px 0 0}.corner-bl{left:12px;bottom:12px;border-width:0 0 2px 2px}.corner-br{right:12px;bottom:12px;border-width:0 2px 2px 0}
.camera-caption{text-align:center;font-size:13px;color:#627364}
.shutter-action{display:flex;align-items:center;gap:20px;background:transparent;border:0;padding:4px 8px 4px 0;text-align:left;color:var(--paper);min-height:72px;font-weight:600;font-size:19px}
.shutter-action small{display:block;font-size:14px;font-weight:400;color:var(--muted);margin-top:4px}
.shutter-icon{display:grid;place-items:center;width:68px;height:68px;border-radius:50%;border:2px solid #edeee0;flex-shrink:0}
.shutter-icon>span{background:var(--paper);width:54px;height:54px;border-radius:50%;transition:transform .1s}
.shutter-action:active .shutter-icon>span{transform:scale(.86)}
.meal-thumb{display:block;position:relative;width:36px;height:26px;margin-top:4px;border-radius:5px;overflow:hidden;box-shadow:0 2px 5px #0001}
.piece-food.is-filled #food-note{display:none}
.day-record.just-captured{animation:capture .28s ease-out}
.movement-strip{display:flex;align-items:center;gap:10px;margin-top:14px;font-size:12px;color:#647969}
.movement-strip>span{white-space:nowrap}
.movement-bars{display:flex;align-items:flex-end;gap:3px;flex:1;height:24px}
.movement-bars i{flex:1;min-width:0;background:var(--move);border-radius:2px;height:var(--bar)}
/* Time stays fixed when context changes. */
.history{margin:27px 0 12px}
.history-heading{display:flex;justify-content:space-between;gap:8px;font-size:14px;color:#5f7567;margin-bottom:7px}
.history-heading strong{font-weight:600;color:#775f38}
.sleep-chart{display:block;width:100%;height:auto;overflow:visible;font-family:var(--font-ui)}
.late-window{fill:#e8dec2}.chart-grid path{fill:none;stroke:#cdd5c9;stroke-dasharray:3 5}
.axis-label{fill:#667665;font-size:14px}.day-label{fill:#687868;text-anchor:middle;font-size:14px}
.chart-line{stroke:var(--sleep);stroke-width:3;fill:none;stroke-linejoin:round}.chart-dots{fill:var(--sleep);stroke:var(--paper);stroke-width:2}.latest-night{stroke:var(--ink);stroke-width:2}
.context-note{font-size:14px;padding:10px 12px;border:1px dashed #b8bb9e;border-radius:9px;margin-top:15px;color:#736548;min-height:45px}
.context-note.has-context{background:#ece4ce;border-style:solid}
.context-note:not(.has-context){display:none}
.conversation-label{font-size:13px;color:var(--muted);margin-bottom:17px}
.human-line{display:flex;gap:13px;align-items:flex-start;margin-bottom:17px}
.human-line img{width:45px;height:45px;object-fit:cover;object-position:50% 24%;border-radius:50%;flex-shrink:0;background:#405b4f}
.human-line p{font-size:17px;line-height:1.6;min-width:0}
.human-line strong{font-size:14px;display:block;color:var(--gold);margin-bottom:3px}
.human-line strong span{font-size:13px;font-weight:400;color:var(--muted);margin-left:8px}
.context-label{margin-top:22px}
.context-choices{gap:7px}
.context-choices button{font-size:15px;padding:10px 13px;min-height:48px}
.human-result{border-left:2px solid var(--gold);padding:4px 0 4px 20px;margin-top:24px;animation:arrive .24s ease-out}
.human-result .eyebrow{font-family:var(--font-thai);font-size:14px;letter-spacing:0;color:var(--gold)}
.human-result h2{font-size:23px;font-weight:600;line-height:1.5;margin:7px 0}
.human-result p{font-size:15px;color:#c8d4ca;line-height:1.7}
.compare-hint{display:block;font-size:13px;line-height:1.7;color:#a7baab;margin-top:12px}
.demo-layout[data-step=context],.demo-layout[data-step=result]{padding-top:44px}
.demo-layout:is([data-step=context],[data-step=result]) h1{font-size:clamp(32px,3.4vw,46px)}
.demo-layout:is([data-step=context],[data-step=result]) .prompt-copy{font-size:17px}
.demo-layout:is([data-step=context],[data-step=result]) .day-record{align-self:start;position:sticky;top:30px}
.demo-layout:is([data-step=context],[data-step=result]) .record-footnote{display:none}
/* Two real doors, both visible and usable. */
.start-section{color:var(--ink);background:var(--paper);padding:52px 54px 30px;border-radius:24px;margin:0 0 35px;scroll-margin-top:20px}
.start-heading{display:grid;grid-template-columns:1fr 1fr;column-gap:50px;align-items:center;margin-bottom:38px}
.start-heading>.eyebrow{grid-column:1/-1;color:#71806e;margin-bottom:16px}
.start-heading h2{font-size:42px;font-weight:600;line-height:1.35;letter-spacing:-.03em;outline:none}
.start-heading>p{font-size:18px;line-height:1.8;color:#546d5d}
.mobile-break{display:none}
.start-doors{display:grid;grid-template-columns:1fr 1fr;gap:50px;border-top:1px solid #cdd5c6;padding-top:28px}
.app-door{padding-right:50px;border-right:1px solid #cdd5c6}
.door-number{font-family:var(--font-ui);font-size:14px;color:#6b816b;display:flex;gap:11px;align-items:center}
.door-number>span{font-family:var(--font-thai)}
.start-doors h3{font-size:27px;font-weight:600;line-height:1.5;margin-top:9px}
.sequence{font-size:19px;margin:13px 0 23px;color:#5c7361}
.sequence>span{margin:0 10px}
.human-door-copy{font-size:19px;color:#5c7361;margin:13px 0 23px;line-height:1.65}
.door-help{font-size:14px;color:#637962;line-height:1.8;margin-top:11px}
.download-area{margin-top:24px;padding-top:20px;border-top:1px solid #d6ddcf}
.setup-followthrough{max-width:calc(50% - 25px);padding-right:50px}.setup-followthrough .download-area{margin-top:16px}
.download-label{font-size:15px;font-weight:600;margin-bottom:10px}
.store-links{display:flex;gap:9px;flex-wrap:wrap}
.store-links a{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #aabda5;border-radius:9px;text-decoration:none;min-height:48px;padding:10px 14px;font-size:14px;font-family:var(--font-ui);font-weight:700;flex:1;white-space:nowrap}
.store-links a.is-preferred{background:#e0ebd5;border-color:#879f7f;order:-1}
.download-area.is-next .store-links a{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
#register-link.is-opened{background:transparent;border-color:#9aaf97;color:var(--ink)}
.device-note{font-size:14px;color:#677d65;line-height:1.8;margin-top:20px}
.sharing-note{font-size:15px;color:#687d66;line-height:1.8;margin-top:27px;border-top:1px solid #d6ddcf;padding-top:22px}
.official-link,.resume-demo{display:inline-flex;min-height:48px;align-items:center;font-size:14px;color:#587350;margin-top:25px}
.resume-demo{float:right}
.page-footer{display:flex;align-items:center;gap:24px;padding:0 0 28px;color:#9bb09f;font-size:13px}
.page-footer p{margin-left:auto;text-align:right}
.page-footer a{min-height:48px;display:inline-flex;align-items:center}
.no-script{margin:24px auto;padding:20px;max-width:700px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:fixed;top:10px;left:15px;padding:12px;background:var(--paper);color:var(--ink);z-index:20;transform:translateY(-160%)}
.skip-link:focus{transform:none}
@keyframes arrive{from{opacity:.45;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes capture{0%{box-shadow:0 0 0 2px #eee6c7}60%{box-shadow:0 0 0 7px #eee6c700}100%{box-shadow:0 24px 60px #0002}}
@media(hover:hover){.choices button:hover{background:#2a493e;border-color:#b8d3b7}.choices button[aria-pressed=true]:hover{background:var(--lime)}.button-lime:hover{background:#e2f5d3}.button-forest:hover{background:#28503f}.store-links a:hover{background:#e0ebd5}.record-piece:not(:disabled):is(button):hover{background:#e7ebdf}}
@media(min-width:1500px){.demo-layout{padding-top:78px;column-gap:100px}}
@media(max-width:1100px){.page-shell{padding:0 35px}.demo-layout{column-gap:36px}.day-record{padding:22px 20px 16px}.start-section{padding:38px 32px 25px}.start-doors{gap:30px}.app-door{padding-right:30px}.setup-followthrough{padding-right:30px;max-width:calc(50% - 15px)}.day-center strong{font-size:23px}.record-piece+.record-piece{padding-left:10px}}
@media(max-width:720px){
  body{font-size:16px;background:radial-gradient(ellipse at 90% 20%,#214238 0,transparent 60%),var(--forest)}
  .page-shell{padding:0 22px}.masthead{padding:20px 0 16px;min-height:76px;gap:10px;flex-wrap:wrap}.brand{font-size:21px}.brand-mark{width:23px;height:23px;border-width:5px}.masthead-note{font-size:13px;margin-left:auto}.sample-badge{width:100%;margin:3px 0 0;font-size:13px;gap:7px}
  .demo-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:'intro' 'record' 'interaction';gap:0;padding:26px 0 22px}
  .story-intro{padding-bottom:22px}.chapter{font-size:13px;margin-bottom:14px;gap:11px}.chapter-line{width:23px}h1{font-size:36px;line-height:1.3}.prompt-copy{margin-top:12px;font-size:16px;line-height:1.65}
  .day-record{padding:18px 18px 13px;border-radius:21px}.record-heading .eyebrow{font-size:9px;letter-spacing:.13em}.record-heading h2{font-size:18px;margin-top:2px}.record-count{font-size:12px;padding:3px 8px}.day-visual{width:180px;height:180px;margin:8px auto 1px}.day-rings circle{stroke-width:10}.day-center{gap:2px;width:67%}.day-center strong{font-size:18px}.day-center>span{font-size:13px}#center-note{font-size:12px}.record-feedback{font-size:13px;margin-bottom:11px;min-height:21px}
  .record-piece{padding:11px 6px 9px 0}.record-piece+.record-piece{padding-left:10px}.piece-label{font-size:13px;gap:5px}.record-piece strong{font-size:19px;margin-top:4px}.record-piece small{font-size:12px;margin-top:1px}.record-footnote{font-size:12px;margin-top:9px}.camera{inset:0 -25px 4px;gap:5px}.camera-caption{font-size:12px}.camera-frame{border-radius:11px}.camera-corner{width:18px;height:18px}.camera-frame img{transform:scale(2.1)}
  .interaction{padding-top:20px}.control-label{font-size:14px;margin-bottom:10px}.choices{gap:7px}.choices button{font-size:15px;min-height:50px;border-radius:10px;padding-block:10px}.interaction-hint{font-size:13px;margin-top:12px}.demo-navigation{margin-top:10px;min-height:0}.demo-navigation:has(button:not([hidden])){min-height:48px}.demo-navigation button{font-size:14px}.overview-note{font-size:18px;margin-bottom:16px}.button-lime{width:100%}.button{font-size:16px;min-height:54px}
  .shutter-action{font-size:18px;gap:16px}.shutter-icon{width:60px;height:60px}.shutter-icon>span{width:47px;height:47px}.shutter-action small{font-size:14px}.movement-strip{font-size:12px;gap:7px;margin-top:10px}.movement-bars{height:20px}
  .demo-layout:is([data-step=context],[data-step=result]){padding-top:26px}.demo-layout:is([data-step=context],[data-step=result]) .day-record{position:relative;top:auto}.demo-layout:is([data-step=context],[data-step=result]) h1{font-size:31px}.demo-layout:is([data-step=context],[data-step=result]) .prompt-copy{font-size:16px}.history{margin:16px 0 10px}.history-heading{font-size:14px}.context-note{font-size:14px;margin-top:10px;padding:9px 10px}.sleep-chart{min-height:158px}.conversation-label{font-size:13px;margin-bottom:16px}.human-line{margin-bottom:14px;gap:11px}.human-line p{font-size:16px}.human-line img{width:42px;height:42px}.context-label{margin-top:17px}.context-choices button{font-size:14px;padding:10px 12px;min-height:48px}.human-result{padding-left:15px;margin-top:20px}.human-result h2{font-size:22px}.human-result p{font-size:15px}.compare-hint{font-size:13px}
  .start-section{margin:5px -8px 24px;padding:30px 22px 20px;border-radius:20px}.start-heading{display:block;margin-bottom:27px}.start-heading>.eyebrow{font-size:10px;line-height:1.8;letter-spacing:.09em;margin-bottom:12px}.start-heading h2{font-size:31px}.start-heading>p{font-size:16px;line-height:1.75;margin-top:13px}.start-doors{grid-template-columns:1fr;gap:0;padding-top:24px}.app-door{padding:0;border:0}.human-door{border-top:1px solid #cdd5c6;padding-top:27px;margin-top:29px}.start-doors h3{font-size:25px}.sequence{font-size:18px;margin:10px 0 19px}.human-door-copy{font-size:18px;margin:10px 0 19px}.door-help,.device-note{font-size:14px}.download-area{margin-top:20px;padding-top:17px}.store-links a{font-size:14px;padding:10px 12px;gap:8px}.sharing-note{font-size:14px;margin-top:20px;padding-top:17px}.official-link,.resume-demo{font-size:13px;margin-top:17px}.resume-demo{float:none;margin-top:0}.page-footer{display:block;font-size:12px;padding-bottom:20px}.page-footer p{text-align:left;margin:4px 0 0;line-height:1.8}
}
@media(max-width:359px){.page-shell{padding-inline:16px}.masthead-note{font-size:12px}.sample-badge{font-size:12px}h1{font-size:32px}.day-record{padding-inline:13px}.record-count{font-size:11px}.record-heading h2{font-size:17px}.record-piece+.record-piece{padding-left:8px}.record-piece strong{font-size:17px}.piece-label{font-size:12px}.choices button{font-size:14px}.context-choices{gap:6px}.context-choices button{padding-inline:9px}.start-section{padding-inline:19px}.start-heading h2{font-size:29px}.start-doors h3{font-size:23px}.store-links{flex-direction:column}.mobile-break{display:block}}
@media(max-width:720px){.setup-followthrough{max-width:none;padding-right:0;margin-top:26px}.setup-followthrough .download-area{padding-top:22px}.record-piece small,.piece-label,.record-footnote,.record-feedback,.sample-badge{font-size:14px}.record-piece strong{font-size:20px}.record-count{font-size:12px}.day-visual{width:165px;height:165px}.day-center strong{font-size:18px}.demo-layout[data-step=sleep] .record-feedback,.demo-layout[data-step=sleep] .record-footnote{display:none}.demo-layout[data-step=sleep] .day-visual{margin-bottom:12px}.demo-layout[data-step=sleep] .story-intro{padding-bottom:18px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:720px){.demo-layout:is([data-step=context],[data-step=result]) .record-heading .eyebrow{display:none}.axis-label,.day-label{font-size:20px}.mobile-break{display:block}}
@media(max-width:359px){.axis-label,.day-label{font-size:22px}}
