:root{
  color-scheme:light;
  --bg:#f4f5f2;
  --surface:#ffffff;
  --surface-2:#eef0ec;
  --surface-3:#e6e9e3;
  --text:#17201c;
  --muted:#69736d;
  --line:rgba(23,32,28,.09);
  --accent:#6d5dfc;
  --accent-strong:#5645ef;
  --accent-soft:#ebe8ff;
  --green:#1d9b72;
  --green-soft:#e2f6ee;
  --blue:#2778d8;
  --blue-soft:#e4f0ff;
  --peach:#d96d43;
  --peach-soft:#fff0e9;
  --yellow:#b57810;
  --shadow:0 18px 46px rgba(29,40,34,.08);
  --shadow-soft:0 8px 24px rgba(29,40,34,.06);
  --radius-xl:24px;
  --radius-lg:20px;
  --radius-md:16px;
  --nav-h:76px;
  --safe-bottom:env(safe-area-inset-bottom,0px);
}

html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#101411;
  --surface:#171d19;
  --surface-2:#1d2520;
  --surface-3:#253029;
  --text:#f2f5f1;
  --muted:#a6b0a9;
  --line:rgba(238,245,240,.09);
  --accent:#9a8cff;
  --accent-strong:#b0a6ff;
  --accent-soft:#2b2650;
  --green:#5fd1a7;
  --green-soft:#17382d;
  --blue:#70aef6;
  --blue-soft:#182f49;
  --peach:#f29872;
  --peach-soft:#42271e;
  --yellow:#f0bf61;
  --shadow:0 18px 48px rgba(0,0,0,.25);
  --shadow-soft:0 10px 26px rgba(0,0,0,.2);
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{min-height:100%;background:var(--bg);scroll-behavior:smooth}
body{min-height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Arial,sans-serif;padding:0 14px calc(var(--nav-h) + var(--safe-bottom) + 28px);line-height:1.42;overflow-x:hidden}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.55}
img{max-width:100%}
[hidden]{display:none!important}

.state-view{min-height:82vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;color:var(--muted);padding:30px}
.state-view strong{color:var(--text);font-size:18px}
.state-view p{font-size:14px;max-width:300px}
.state-icon{font-size:38px}
.loader-orbit{width:52px;height:52px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;position:relative}
.loader-orbit::after{content:"";position:absolute;inset:4px;border:3px solid transparent;border-top-color:var(--accent);border-radius:50%;animation:spin .9s linear infinite}
.loader-orbit span{width:12px;height:12px;border-radius:4px;background:var(--accent);box-shadow:0 0 22px color-mix(in srgb,var(--accent) 70%,transparent)}
@keyframes spin{to{transform:rotate(360deg)}}

.screen{display:none;max-width:620px;margin:0 auto;animation:screen-in .24s ease}
.screen.active{display:block}
@keyframes screen-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.page-head{display:flex;align-items:center;justify-content:space-between;padding:18px 2px 14px;min-height:78px}
.home-head{padding-top:max(18px,env(safe-area-inset-top,0px))}
.page-head h1{font-size:29px;line-height:1.05;letter-spacing:-.8px;font-weight:730}
.overline,.eyebrow{text-transform:uppercase;letter-spacing:.11em;font-size:10px;font-weight:800;color:var(--muted)}
.overline{margin-bottom:5px}
.icon-button{width:42px;height:42px;border:1px solid var(--line);border-radius:14px;background:var(--surface);display:grid;place-items:center;box-shadow:var(--shadow-soft)}
.icon-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:18px;box-shadow:var(--shadow-soft);margin-bottom:14px}
.content-section{margin-top:24px;margin-bottom:18px}
.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin:0 2px 11px}
.section-heading h2{font-size:19px;line-height:1.15;letter-spacing:-.35px;margin-top:4px}
.section-heading>small{font-size:11px;color:var(--muted);text-align:right;max-width:130px}
.section-intro{display:flex;align-items:center;gap:11px;margin-bottom:14px}
.section-intro>div:not(.readiness-pill){flex:1}
.section-intro h2{font-size:19px;line-height:1.15;margin-top:3px;letter-spacing:-.3px}
.section-icon{width:42px;height:42px;flex:0 0 42px;border-radius:14px;display:grid;place-items:center;font-size:19px;font-weight:800}
.soft-green{background:var(--green-soft);color:var(--green)}
.soft-violet{background:var(--accent-soft);color:var(--accent)}
.soft-blue{background:var(--blue-soft);color:var(--blue)}
.soft-peach{background:var(--peach-soft);color:var(--peach)}
.supporting-text,.quest-description,.weekly-story-card>p,.path-hero-card>p{font-size:14px;color:var(--muted)}
.microcopy{font-size:11px;color:var(--muted);margin-top:8px}

.button{border:0;border-radius:15px;min-height:50px;padding:0 18px;font-weight:760;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .14s ease,filter .14s ease,background .14s ease;width:100%}
.button:active:not(:disabled){transform:scale(.985)}
.button.primary{background:var(--accent);color:#fff;box-shadow:0 10px 24px color-mix(in srgb,var(--accent) 24%,transparent)}
.button.primary:hover{filter:brightness(1.04)}
.button.secondary{background:var(--surface-2);color:var(--text);border:1px solid var(--line);box-shadow:none}
.button.compact{min-height:42px;width:auto;padding:0 15px;border-radius:13px}

/* World / hero */
.world-card{background:var(--surface);border-radius:var(--radius-xl);border:1px solid var(--line);box-shadow:var(--shadow);overflow:hidden;margin-bottom:12px}
.world-sky{height:326px;position:relative;overflow:hidden;background:linear-gradient(180deg,#d7e8f1 0%,#e8e4d7 61%,#adc79f 62%,#749969 100%);isolation:isolate;transition:background .6s ease}
html[data-theme="dark"] .world-sky{background:linear-gradient(180deg,#172336 0%,#2c3250 61%,#273a32 62%,#182a22 100%)}
.world-sky[data-accent="meadow"]{background:linear-gradient(180deg,#cae7f1 0%,#f2e9d3 61%,#a8c98c 62%,#5e905c 100%)}
.world-sky[data-accent="river"]{background:linear-gradient(180deg,#bfdceb 0%,#e5e6dc 58%,#8ebca0 59%,#5e8d77 77%,#557f9b 78%,#355c78 100%)}
.world-sky[data-accent="sunset"]{background:linear-gradient(180deg,#7f7199 0%,#d59c93 49%,#f2c28f 61%,#766d58 62%,#384d3a 100%)}
.world-sky[data-accent="night"]{background:linear-gradient(180deg,#10172e 0%,#2f3058 55%,#705d78 61%,#25372f 62%,#15281f 100%)}
.world-sky[data-accent="aurora"]{background:linear-gradient(180deg,#16203c 0%,#334d61 43%,#59a38f 59%,#314b3f 62%,#172a22 100%)}
.world-stars{position:absolute;inset:0;opacity:.12;background-image:radial-gradient(circle at 16% 18%,#fff 0 1px,transparent 2px),radial-gradient(circle at 70% 13%,#fff 0 1.4px,transparent 2px),radial-gradient(circle at 86% 32%,#fff 0 1px,transparent 2px),radial-gradient(circle at 45% 28%,#fff 0 1px,transparent 2px);background-size:100% 100%;z-index:-1}
.world-sky[data-accent="night"] .world-stars,.world-sky[data-accent="aurora"] .world-stars{opacity:.82;animation:twinkle 2.5s ease-in-out infinite alternate}
@keyframes twinkle{to{opacity:.45}}
.pixel-cloud{position:absolute;background:rgba(255,255,255,.56);width:58px;height:16px;box-shadow:12px -8px 0 rgba(255,255,255,.56),27px 0 0 rgba(255,255,255,.56);image-rendering:pixelated;opacity:.55}
.cloud-one{top:58px;left:9%;animation:cloud 16s linear infinite alternate}
.cloud-two{top:92px;right:18%;transform:scale(.68);opacity:.36;animation:cloud 21s linear infinite alternate-reverse}
@keyframes cloud{to{translate:28px 0}}
.world-ground{position:absolute;left:-9%;right:-9%;bottom:-52px;height:135px;border-radius:50%;background:rgba(39,68,44,.45);z-index:1}
.world-ground::before{content:"";position:absolute;width:18px;height:42px;background:#36553e;left:13%;top:8px;box-shadow:12px -12px 0 #466b4d,22px -2px 0 #36553e,250px 5px 0 #36553e,263px -17px 0 #4b704f;image-rendering:pixelated}
#avatarImg{position:absolute;z-index:5;width:190px;height:190px;object-fit:contain;image-rendering:pixelated;left:50%;bottom:28px;transform:translateX(-50%);filter:drop-shadow(0 15px 12px rgba(15,28,21,.25));transition:filter .4s ease}
@media(prefers-reduced-motion:no-preference){#avatarImg{animation:hero-breathe 3.8s ease-in-out infinite}}
@keyframes hero-breathe{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-4px)}}
#avatarImg.boing{animation:boing .42s cubic-bezier(.23,1.45,.38,1)!important}
@keyframes boing{30%{transform:translateX(-50%) translateY(-18px) scale(1.04,.96)}65%{transform:translateX(-50%) scale(.97,1.04)}100%{transform:translateX(-50%)}}
.hero-aura{position:absolute;z-index:2;width:185px;height:85px;border-radius:50%;background:rgba(255,225,131,.5);filter:blur(25px);left:50%;bottom:35px;transform:translateX(-50%)}
.world-sky.m-sleepy #avatarImg{filter:saturate(.65) brightness(.9) drop-shadow(0 15px 12px rgba(15,28,21,.25))}
.world-sky.m-glow .hero-aura{background:rgba(255,232,130,.9);filter:blur(19px)}
.world-sky.m-sad #avatarImg{filter:saturate(.45) brightness(.88) drop-shadow(0 15px 12px rgba(15,28,21,.25))}
.hero-speech{position:absolute;z-index:8;top:35px;left:50%;transform:translateX(-50%);border:0;background:rgba(255,255,255,.86);color:#27332d;border-radius:14px;padding:8px 12px;font-size:12px;font-weight:750;box-shadow:0 9px 20px rgba(25,38,31,.13);backdrop-filter:blur(8px);max-width:74%}
.hero-speech::after{content:"";position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);border:7px solid transparent;border-top-color:rgba(255,255,255,.86);border-bottom:0}
.world-landmark{position:absolute;z-index:3;right:13%;bottom:39px;width:44px;height:82px;background:#4b514b;box-shadow:8px 0 0 #353b37;image-rendering:pixelated;opacity:.78;transition:all .5s ease}
.world-landmark::before{content:"";position:absolute;left:-7px;top:-15px;width:58px;height:17px;background:#6b6f66;box-shadow:5px -5px 0 #777b70}
.world-landmark::after{content:"";position:absolute;left:12px;bottom:0;width:12px;height:26px;background:#242b27}
.landmark-light{position:absolute;left:11px;top:8px;width:22px;height:14px;background:#ffd978;box-shadow:0 0 22px 8px rgba(255,220,116,.56)}
.world-sky[data-accent="dawn"] .world-landmark{height:46px;width:24px;right:16%;background:#64513b;box-shadow:none}
.world-sky[data-accent="dawn"] .world-landmark::before{left:-4px;top:-12px;width:32px;height:15px;background:#765f43;box-shadow:none}
.world-sky[data-accent="dawn"] .world-landmark::after{display:none}
.world-sky[data-accent="dawn"] .landmark-light{left:6px;top:4px;width:12px;height:12px}
.world-info{padding:17px 18px 18px}
.world-info h2{font-size:20px;letter-spacing:-.35px;margin:3px 0 5px}
.world-info p:not(.eyebrow){font-size:13px;color:var(--muted)}
.world-progress{margin-top:14px}
.world-progress small{display:block;color:var(--muted);font-size:11px;margin-top:7px}
.progress-track{height:9px;border-radius:999px;background:var(--surface-3);overflow:hidden}
.progress-track>span{display:block;height:100%;width:0;border-radius:inherit;background:var(--accent);transition:width .55s cubic-bezier(.2,.8,.2,1)}
.progress-track.slim{height:7px}
.progress-track.light{background:rgba(255,255,255,.22)}
.progress-track.light>span{background:#fff}

.signal-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:14px}
.signal-card{border:1px solid var(--line);background:var(--surface);border-radius:17px;padding:12px;display:flex;align-items:center;gap:9px;text-align:left;box-shadow:var(--shadow-soft);min-width:0}
.signal-card>span:nth-child(2){min-width:0;flex:1}
.signal-card small{display:block;color:var(--muted);font-size:10px;margin-bottom:2px}
.signal-card strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.signal-card svg{width:17px;height:17px;fill:none;stroke:var(--muted);stroke-width:1.8}
.signal-icon{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:var(--surface-2);color:var(--accent);font-weight:800}

/* Check-in, forms */
.readiness-pill{margin-left:auto;text-align:center;background:var(--surface-2);border-radius:13px;padding:7px 10px;min-width:72px}
.readiness-pill span{display:block;font-weight:800;font-size:15px}.readiness-pill small{font-size:9px;color:var(--muted)}
.range-stack{display:grid;gap:13px;margin:17px 0}
.range-row{display:grid;grid-template-columns:1fr auto;gap:7px 12px;font-size:13px;font-weight:680;align-items:center}
.range-row input{grid-column:1/-1;width:100%;accent-color:var(--accent)}
.range-row b{font-size:12px;color:var(--accent)}
.range-row.effort{margin:16px 0}
.field-label{display:grid;gap:7px;font-size:12px;font-weight:700;color:var(--muted);margin:12px 0}
input,select,textarea{width:100%;border:1px solid var(--line);background:var(--surface-2);border-radius:13px;min-height:46px;padding:0 13px;outline:none}
textarea{min-height:82px;padding:12px;resize:vertical;margin:12px 0}
input:focus,select:focus,textarea:focus{border-color:color-mix(in srgb,var(--accent) 58%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 12%,transparent)}

/* Tutorial */
.tutorial-list{display:grid;gap:9px;margin-bottom:12px}
.tutorial-row{display:flex;align-items:center;gap:10px;padding:10px;border-radius:14px;background:var(--surface-2)}
.tutorial-row.done{background:var(--green-soft)}
.tutorial-check{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:var(--surface);font-size:12px;font-weight:800;color:var(--muted)}
.tutorial-row.done .tutorial-check{background:var(--green);color:#fff}
.tutorial-copy{flex:1}.tutorial-copy strong{display:block;font-size:13px}.tutorial-copy small{font-size:11px;color:var(--muted)}
.tutorial-row button{border:0;background:var(--surface);border-radius:10px;padding:8px 10px;font-weight:700;font-size:11px}
.practice-note{background:var(--accent-soft);border-radius:15px;padding:14px;font-size:13px;margin:12px 0}
.practice-note p{white-space:pre-line;color:var(--muted);margin-bottom:12px}

/* Quests */
.quest-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.quest-option{border:1px solid var(--line);background:var(--surface);border-radius:18px;padding:13px 10px;text-align:left;min-height:142px;display:flex;flex-direction:column;box-shadow:var(--shadow-soft);position:relative;overflow:hidden}
.quest-option.selected{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 15%,transparent)}
.quest-option.recommended::before{content:"выбор дня";position:absolute;top:0;right:0;background:var(--accent);color:#fff;font-size:8px;text-transform:uppercase;letter-spacing:.06em;font-weight:800;padding:5px 7px;border-radius:0 0 0 10px}
.quest-option.unavailable{opacity:.48}
.quest-option .mode-icon{font-size:21px;margin-bottom:16px}
.quest-option strong{font-size:12px;line-height:1.2;margin-bottom:6px}
.quest-option small{font-size:10px;color:var(--muted);margin-top:auto}
.selected-quest{padding:0;overflow:hidden}
.quest-hero-row{display:flex;gap:12px;align-items:center;padding:18px 18px 12px}
.quest-hero-row>div{flex:1}.quest-hero-row h2{font-size:21px;letter-spacing:-.35px;margin-top:3px}
.quest-symbol{width:48px;height:48px;border-radius:16px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:22px}
.quest-description{padding:0 18px}
.tag-row{display:flex;flex-wrap:wrap;gap:7px;padding:13px 18px}
.tag{font-size:10px;font-weight:750;border-radius:999px;padding:6px 9px;background:var(--surface-2);color:var(--muted)}
.reason-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:3px}
.reason-grid>div{background:var(--surface);padding:14px}
.reason-grid small{display:block;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-size:9px;font-weight:800;margin-bottom:5px}
.reason-grid p{font-size:12px}
.quest-complete{margin:14px 18px 18px;width:calc(100% - 36px)}
.quest-complete.done{background:var(--green-soft);color:var(--green);box-shadow:none}
.video-frame{position:relative;padding-top:56.25%;margin:14px 18px 0;border-radius:15px;overflow:hidden;background:#000}
.video-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.video-link,.audio-card{margin:14px 18px 0;border-radius:14px;background:var(--surface-2);padding:12px;font-size:12px}
.audio-card small{display:block;margin-top:4px;color:var(--muted);line-height:1.4}.audio-card audio{width:100%;margin-top:8px}.audio-card .button{width:100%;margin-top:10px}
.choice-segment{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.choice-segment button{border:1px solid var(--line);background:var(--surface-2);border-radius:13px;min-height:44px;font-size:12px;font-weight:700}
.choice-segment button.active{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.toggle-line{display:flex;align-items:center;gap:9px;margin:14px 1px;font-size:12px;color:var(--muted)}
.toggle-line input{width:19px;height:19px;min-height:0;accent-color:var(--accent)}

/* Trackers */
.tracker-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.tracker-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:var(--shadow-soft);min-width:0}
.tracker-card.water-card{grid-column:1/-1}
.tracker-head{display:flex;align-items:center;gap:9px;margin-bottom:12px}
.tracker-head>span{font-size:21px}.tracker-head small{display:block;color:var(--muted);font-size:10px}.tracker-head strong{font-size:13px}
.water-dots{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.water-dot{width:22px;height:29px;border:1px solid color-mix(in srgb,var(--blue) 45%,var(--line));border-radius:11px 11px 13px 13px;background:var(--surface-2)}
.water-dot.done{background:var(--blue);border-color:var(--blue);box-shadow:inset 0 6px 0 rgba(255,255,255,.16)}
.inline-entry{display:flex;gap:6px;margin-top:11px}
.inline-entry input{min-width:0;min-height:39px;padding:0 9px}
.inline-entry button{border:0;border-radius:11px;background:var(--surface-3);padding:0 10px;font-size:11px;font-weight:750}
.tracker-hint{font-size:10px;color:var(--muted);min-height:28px}

/* Path */
.path-hero-card{background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 13%,var(--surface)),var(--surface));padding:20px}
.path-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.path-title-row h2{font-size:22px;margin-top:4px}.path-title-row>strong{font-size:11px;background:var(--surface);border:1px solid var(--line);padding:7px 9px;border-radius:999px}
.path-hero-card .progress-track{margin:16px 0 7px}
.path-hero-card>small{color:var(--muted);font-size:11px}
.world-map{position:relative;display:grid;gap:10px;padding-left:9px}
.world-map::before{content:"";position:absolute;left:26px;top:25px;bottom:25px;width:2px;background:var(--surface-3)}
.map-node{position:relative;display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:17px;padding:12px 13px;box-shadow:var(--shadow-soft)}
.map-dot{z-index:1;width:31px;height:31px;border-radius:11px;background:var(--surface-3);border:4px solid var(--surface);display:grid;place-items:center;font-size:12px;flex:0 0 31px}
.map-node.done .map-dot{background:var(--green);color:#fff}.map-node.current{border-color:var(--accent)}.map-node.current .map-dot{background:var(--accent);color:#fff;box-shadow:0 0 0 4px var(--accent-soft)}
.map-node.locked{opacity:.55}.map-copy{flex:1}.map-copy strong{font-size:13px;display:block}.map-copy small{font-size:10px;color:var(--muted)}
.map-node>span:last-child{font-size:10px;color:var(--muted)}
.rhythm-card p{font-size:13px;color:var(--muted);margin-bottom:15px}
.rhythm-card .section-intro>strong{font-size:13px;color:var(--accent)}
.rhythm-days{display:grid;grid-template-columns:repeat(14,1fr);gap:5px}
.rhythm-day{height:31px;border-radius:9px;background:var(--surface-2);position:relative}
.rhythm-day.done{background:var(--green)}
.rhythm-day.today{outline:2px solid var(--accent);outline-offset:1px}
.rhythm-day::after{content:"";position:absolute;left:50%;top:50%;width:4px;height:4px;border-radius:50%;background:color-mix(in srgb,var(--muted) 50%,transparent);transform:translate(-50%,-50%)}
.rhythm-day.done::after{background:#fff}
.rhythm-legend{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:9px;margin-top:10px}.rhythm-legend span{display:flex;align-items:center;gap:5px}.rhythm-legend i{width:9px;height:9px;border-radius:3px;background:var(--surface-2)}.rhythm-legend i.done{background:var(--green)}
.victory-list{display:grid;gap:9px}
.victory-card{display:flex;gap:11px;background:var(--surface);border:1px solid var(--line);border-radius:17px;padding:13px;box-shadow:var(--shadow-soft)}
.victory-icon{width:38px;height:38px;border-radius:13px;background:var(--green-soft);display:grid;place-items:center;font-size:18px;flex:0 0 38px}.victory-card strong{font-size:13px;display:block;margin:1px 0 3px}.victory-card p{font-size:11px;color:var(--muted)}
.weekly-story-card{background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--blue) 8%,var(--surface)))}
.weekly-story-card h2{font-size:20px;margin:4px 0 7px}
.weekly-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:14px}
.weekly-metric{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:9px;text-align:center}.weekly-metric b{display:block;font-size:15px}.weekly-metric small{font-size:9px;color:var(--muted)}
.artifact-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}
.artifact-card{background:var(--surface);border:1px solid var(--line);border-radius:17px;padding:13px;box-shadow:var(--shadow-soft);min-height:118px}.artifact-card .artifact-icon{font-size:24px;margin-bottom:8px}.artifact-card strong{font-size:12px;display:block}.artifact-card small{font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}.artifact-card p{font-size:10px;color:var(--muted);margin-top:7px}
.empty-state{grid-column:1/-1;padding:20px;border:1px dashed var(--line);border-radius:17px;color:var(--muted);text-align:center;font-size:12px}

/* Together */
.community-card{border-radius:var(--radius-xl);overflow:hidden;background:linear-gradient(145deg,#5a4ee4,#352aa7);color:#fff;box-shadow:0 18px 42px rgba(75,62,203,.24);margin-bottom:18px;position:relative;min-height:260px}
.community-art{height:126px;position:relative;overflow:hidden;background:linear-gradient(180deg,#1d2251,#5b4d9a 72%,#33483e 73%)}
.community-lighthouse{position:absolute;left:50%;bottom:0;width:38px;height:84px;background:#e9e4db;transform:translateX(-50%);box-shadow:8px 0 0 #aca6a0}.community-lighthouse::before{content:"";position:absolute;left:-7px;top:-14px;width:53px;height:17px;background:#2d3042}.community-lighthouse::after{content:"";position:absolute;left:11px;top:10px;width:17px;height:14px;background:#ffd66e;box-shadow:0 0 20px 6px rgba(255,218,110,.58)}
.beam{position:absolute;left:50%;top:26px;width:130px;height:34px;background:linear-gradient(90deg,rgba(255,229,140,.75),transparent);transform-origin:left center;clip-path:polygon(0 38%,100% 0,100% 100%,0 62%)}
.beam-one{transform:rotate(-18deg)}.beam-two{transform:rotate(198deg)}
.community-copy{padding:17px 18px 19px}.community-copy .eyebrow{color:rgba(255,255,255,.65)}.community-copy h2{font-size:21px;margin:4px 0 6px}.community-copy p{font-size:12px;color:rgba(255,255,255,.78)}.community-copy .progress-track{margin:14px 0 6px}.community-copy small{font-size:10px;color:rgba(255,255,255,.72)}
.social-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.social-choice{background:var(--surface);border:1px solid var(--line);border-radius:19px;padding:15px;box-shadow:var(--shadow-soft);display:flex;flex-direction:column;min-height:220px}.social-choice-icon{font-size:26px}.social-choice h3{font-size:16px;margin:10px 0 6px}.social-choice p{font-size:11px;color:var(--muted);margin-bottom:15px;flex:1}.social-choice .button{font-size:11px;min-height:43px;padding:0 8px}
.join-card{margin-top:10px}.join-card h2{font-size:18px;margin-top:3px}.join-row{display:flex;gap:7px;margin-top:13px}.join-row input{text-transform:uppercase;letter-spacing:.12em;font-weight:800}
.fairness-card,.safety-card{display:flex;gap:12px;align-items:flex-start}.fairness-card h3,.safety-card h3{font-size:15px;margin:2px 0 5px}.fairness-card p,.safety-card p{font-size:11px;color:var(--muted)}
.challenge-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:18px;box-shadow:var(--shadow);margin-bottom:18px}.challenge-head{display:flex;justify-content:space-between;gap:12px}.challenge-head h2{font-size:20px;margin-top:3px}.challenge-head>span{font-size:10px;color:var(--muted);background:var(--surface-2);border-radius:999px;padding:7px 9px;height:max-content}.invite-panel{background:var(--accent-soft);border-radius:15px;padding:12px;margin:14px 0}.invite-panel small{font-size:9px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-weight:800}.invite-code{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:4px}.invite-code strong{font-size:22px;letter-spacing:.13em}.invite-code button{border:0;background:var(--surface);border-radius:11px;padding:8px 10px;font-size:11px;font-weight:750}
.member-list{display:grid;gap:9px;margin:14px 0}.member-row{background:var(--surface-2);border-radius:14px;padding:11px}.member-top{display:flex;justify-content:space-between;font-size:12px;margin-bottom:7px}.member-top small{color:var(--muted)}.challenge-summary{font-size:12px;color:var(--muted);margin-bottom:12px}.support-button{background:var(--green-soft)!important;color:var(--green)!important}.waiting-card{border:1px dashed var(--line);border-radius:15px;padding:13px;text-align:center;color:var(--muted);font-size:11px;margin:12px 0}

/* Me */
.profile-identity{display:flex;align-items:center;gap:14px;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--green) 8%,var(--surface)))}
.profile-identity img{width:82px;height:82px;image-rendering:pixelated;object-fit:contain;border-radius:20px;background:var(--surface-2)}
.profile-identity h2{font-size:20px;margin:3px 0}.profile-identity p:last-child{font-size:11px;color:var(--muted)}
.profile-card fieldset{border:1px solid var(--line);border-radius:16px;padding:13px;margin:13px 0}.profile-card legend{padding:0 6px;font-size:11px;color:var(--muted);font-weight:750}
.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px}.three-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.three-fields label{font-size:10px;color:var(--muted);font-weight:700}.three-fields input{margin-top:5px;padding:0 8px}
.checkbox-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.checkbox-item{display:flex;align-items:center;gap:7px;border-radius:12px;background:var(--surface-2);padding:9px;font-size:11px}.checkbox-item input{width:17px;height:17px;min-height:0;accent-color:var(--accent)}

/* Nav */
#nav{position:fixed;z-index:40;left:10px;right:10px;bottom:calc(8px + var(--safe-bottom));height:68px;background:color-mix(in srgb,var(--surface) 88%,transparent);border:1px solid var(--line);border-radius:22px;display:grid;grid-template-columns:repeat(4,1fr);padding:5px;box-shadow:0 16px 42px rgba(20,30,25,.18);backdrop-filter:blur(18px);max-width:620px;margin:0 auto}
#nav button{border:0;background:transparent;border-radius:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--muted);font-size:9px;font-weight:720;transition:.18s ease}
#nav button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#nav button.active{background:var(--accent-soft);color:var(--accent)}

/* Modals and toast */
.modal{position:fixed;z-index:80;inset:0;background:rgba(8,12,10,.42);display:none;align-items:flex-end;justify-content:center;backdrop-filter:blur(5px)}
.modal.show{display:flex;animation:modal-fade .18s ease}@keyframes modal-fade{from{opacity:0}to{opacity:1}}
.modal-sheet{width:100%;max-width:620px;background:var(--surface);border-radius:26px 26px 0 0;padding:14px 18px calc(20px + var(--safe-bottom));box-shadow:0 -20px 50px rgba(0,0,0,.18);animation:sheet-up .24s ease}
@keyframes sheet-up{from{transform:translateY(30px);opacity:.7}to{transform:none;opacity:1}}
.modal-handle{width:42px;height:4px;border-radius:999px;background:var(--surface-3);margin:0 auto 18px}.modal-sheet h2{font-size:23px;letter-spacing:-.45px;margin:5px 0 16px}.help-list{display:grid;gap:9px;margin-bottom:17px}.help-list p{background:var(--surface-2);border-radius:14px;padding:11px}.help-list b{display:block;font-size:12px}.help-list span{display:block;font-size:11px;color:var(--muted);margin-top:2px}.discovery-sheet{text-align:center}.discovery-icon{font-size:42px;margin:8px 0}.discovery-sheet p:not(.eyebrow){color:var(--muted);font-size:13px;margin-bottom:18px}
#toast{position:fixed;z-index:100;left:50%;bottom:calc(var(--nav-h) + var(--safe-bottom) + 17px);transform:translateX(-50%) translateY(10px);background:#18211c;color:#fff;border-radius:14px;padding:11px 14px;font-size:12px;font-weight:700;box-shadow:0 14px 34px rgba(0,0,0,.26);display:none;max-width:calc(100vw - 30px);text-align:center}
html[data-theme="dark"] #toast{background:#eef4f0;color:#17201c}
#confetti{position:fixed;inset:0;pointer-events:none;z-index:95;overflow:hidden}.confetti-piece{position:absolute;top:-15px;width:8px;height:13px;border-radius:2px;animation:confetti-fall 2.8s ease-in forwards}@keyframes confetti-fall{to{transform:translate(var(--drift),110vh) rotate(720deg);opacity:.2}}

@media(max-width:390px){
  body{padding-left:10px;padding-right:10px}.world-sky{height:300px}#avatarImg{width:174px;height:174px}.quest-options{gap:6px}.quest-option{padding:11px 8px}.quest-option strong{font-size:11px}.reason-grid{grid-template-columns:1fr}.signal-card{padding:10px}.signal-card strong{font-size:11px}.three-fields{grid-template-columns:1fr 1fr}.three-fields label:last-child{grid-column:1/-1}.social-choice-grid{grid-template-columns:1fr}.social-choice{min-height:auto}.rhythm-days{gap:3px}.rhythm-day{height:28px}.page-head h1{font-size:27px}
}

@media(min-width:621px){body{padding-left:20px;padding-right:20px}.world-sky{height:350px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* FitQuest v5.1 — progressive disclosure and asset layers */
[hidden]{display:none!important}
.world-sky.has-world-art{background-position:center;background-size:cover;background-repeat:no-repeat}
.world-sky.has-world-art .pixel-cloud,.world-sky.has-world-art .world-ground,.world-sky.has-world-art .world-landmark{opacity:.22}
.checkin-card.compact-state{padding-bottom:13px}
.checkin-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--surface-2);border-radius:15px;padding:11px 12px;margin-top:10px}
.checkin-summary div{display:grid;gap:2px}.checkin-summary small{font-size:10px;color:var(--muted)}.checkin-summary strong{font-size:14px}
.checkin-summary button{border:0;background:transparent;color:var(--accent);font-weight:750;padding:8px}
.readiness-pill{max-width:128px;min-width:94px}.readiness-pill span{font-size:11px;line-height:1.2}.readiness-pill small{margin-top:3px;display:block}
.sensation-card{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.sensation-card>div{background:var(--surface-2);border-radius:14px;padding:12px}
.sensation-card small,.chapter-meaning small{display:block;font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:800;margin-bottom:5px}
.sensation-card p,.chapter-meaning p{font-size:12px;line-height:1.45;color:var(--text)}
.sensation-card .stop-guidance{background:color-mix(in srgb,var(--peach) 18%,var(--surface))}
.reason-grid{grid-template-columns:1fr 1fr}
.reason-grid>div{min-height:104px}
.disclosure-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-xl);box-shadow:var(--shadow);padding:0;margin-top:14px;overflow:hidden}
.disclosure-card>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 17px;cursor:pointer}
.disclosure-card>summary::-webkit-details-marker{display:none}.disclosure-card>summary span{display:grid;gap:3px}.disclosure-card>summary small{font-size:9px;color:var(--muted);letter-spacing:.1em}.disclosure-card>summary strong{font-size:17px}.disclosure-card>summary em{font-style:normal;font-size:10px;color:var(--muted);text-align:right;max-width:48%}
.disclosure-card[open]>summary{border-bottom:1px solid var(--line)}.disclosure-card .tracker-grid{padding:14px}
.chapter-meaning{display:grid;grid-template-columns:1fr;gap:8px;margin:14px 0}
.chapter-meaning>div{background:var(--surface-2);border-radius:14px;padding:11px 12px}
.social-intro{margin:-2px 0 13px}
.social-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.social-choice{min-height:225px;display:flex;flex-direction:column}.social-choice .button{margin-top:auto}
.social-disabled{display:flex;gap:12px;align-items:flex-start}.social-disabled h3{margin-bottom:4px}.social-disabled p{color:var(--muted);font-size:13px}
#questChoiceSection{scroll-margin-top:12px}#questCard{scroll-margin-top:12px}
.profile-card fieldset .toggle-line{margin:8px 0}
@media(max-width:420px){.sensation-card,.reason-grid,.social-choice-grid{grid-template-columns:1fr}.reason-grid>div{min-height:auto}.readiness-pill{max-width:110px}.disclosure-card>summary em{max-width:52%;font-size:9px}}

/* FitQuest v5.3 — visible human progress, progressive text and beta flags */
.hero-path-progress{margin-top:14px;padding-top:13px;border-top:1px solid var(--line)}
.hero-path-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}
.hero-path-heading small{font-size:9px;letter-spacing:.1em;color:var(--muted);font-weight:800}
.hero-path-heading strong{font-size:12px;color:var(--text)}
.hero-path-progress>small{display:block;color:var(--muted);font-size:11px;margin-top:7px}
.hero-path-track{position:relative;height:8px}
.hero-path-track>span{background:linear-gradient(90deg,var(--green),var(--accent))}
.progress-pulse{animation:progress-pulse .82s ease-out}
@keyframes progress-pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 45%,transparent)}45%{box-shadow:0 0 0 8px transparent}100%{box-shadow:none}}
.progress-spark{position:fixed;z-index:120;pointer-events:none;transform:translate(-50%,-50%);font-size:24px;line-height:1;color:#f3c852;text-shadow:0 0 14px rgba(255,220,100,.9);animation:spark-to-path .64s cubic-bezier(.2,.75,.22,1) forwards}
@keyframes spark-to-path{0%{opacity:0;transform:translate(-50%,-50%) scale(.5) rotate(0)}12%{opacity:1}60%{transform:translate(calc(-50% + var(--spark-x)*.65),calc(-50% + var(--spark-y)*.45 - 34px)) scale(1.18) rotate(130deg)}100%{opacity:0;transform:translate(calc(-50% + var(--spark-x)),calc(-50% + var(--spark-y))) scale(.45) rotate(260deg)}}

.why-today-card{margin:12px 0 9px;padding:12px 13px;border-radius:15px;background:color-mix(in srgb,var(--accent) 8%,var(--surface-2))}
.why-today-card small,.body-focus-row small{display:block;font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:800}
.why-today-card p{font-size:12px;line-height:1.45;margin-top:5px}
.body-focus-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 9px}
.body-focus-row span{font-size:11px;font-weight:720;padding:6px 9px;border-radius:999px;background:var(--green-soft);color:var(--green)}
.quest-disclosure{border:1px solid var(--line);border-radius:15px;background:var(--surface-2);margin:8px 0;overflow:hidden}
.quest-disclosure>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;font-size:11px;font-weight:800;color:var(--text)}
.quest-disclosure>summary::-webkit-details-marker{display:none}
.quest-disclosure>summary span{color:var(--muted);transition:transform .18s ease}
.quest-disclosure[open]>summary span{transform:rotate(180deg)}
.quest-disclosure[open]>summary{border-bottom:1px solid var(--line)}
.quest-disclosure .sensation-card,.quest-disclosure .reason-grid{margin:0;padding:9px;gap:7px}
.quest-disclosure .sensation-card>div,.quest-disclosure .reason-grid>div{background:var(--surface);min-height:auto}
.context-disclosure{margin-bottom:11px}
.rhythm-progress{margin:11px 0 12px}
#nav.social-off{grid-template-columns:repeat(3,1fr)}

@media(max-width:360px){
  .selected-quest.experienced .quest-description{font-size:11px;line-height:1.38}
  .selected-quest.experienced .why-today-card{padding:10px 11px;margin:9px 0 7px}
  .selected-quest.experienced .why-today-card p{font-size:11px}
  .selected-quest.experienced .quest-disclosure>summary{padding:9px 10px}
  .selected-quest.experienced .tag-row{margin-top:8px}
}

@media(prefers-reduced-motion:reduce){
  .progress-spark{display:none!important}
  .progress-pulse{animation:none!important}
}
.signal-grid.social-off{grid-template-columns:1fr}
