*{box-sizing:border-box}
:root{
  color-scheme:light;
  --bg:#f6f5f0;--side:#fbfaf6;--surface:#fffefa;--surface2:#eef2eb;
  --text:#26332b;--muted:#7a837d;--line:#e2e4dd;--green:#58705d;
  --green-dark:#405646;--gold:#b28d49;--gold-soft:#f4ecda;
  --shadow:0 10px 30px rgba(45,58,49,.05)
}
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#111612;--side:#151b16;--surface:#1a211b;--surface2:#253027;
  --text:#edf1eb;--muted:#9da79f;--line:#2d382f;--green:#91a894;
  --green-dark:#78917c;--gold:#d2ad67;--gold-soft:#332d21;
  --shadow:0 12px 32px rgba(0,0,0,.18)
}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}
body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.55;-webkit-font-smoothing:antialiased}
button,input,textarea{font:inherit}button{cursor:pointer}
svg{display:block}
.shell{min-height:100vh;display:grid;grid-template-columns:250px minmax(0,1fr)}
aside{height:100vh;position:sticky;top:0;padding:32px 18px 22px;background:var(--side);border-right:1px solid var(--line);display:flex;flex-direction:column}
.brand{padding:0 10px;margin:0 0 31px}
.brand strong{display:block;font-family:Georgia,"Times New Roman",serif;font-size:17px;font-weight:600;line-height:1.2;color:var(--text)}
.brand small{display:block;max-width:175px;margin-top:7px;font-size:8px;font-weight:700;line-height:1.55;letter-spacing:.12em;color:var(--muted)}
.nav{width:100%;height:45px;margin:3px 0;padding:0 13px;border:0;border-radius:12px;background:transparent;color:#727c75;display:flex;align-items:center;gap:11px;text-align:left;font-size:13px;font-weight:600;transition:.16s}
.nav:hover,.nav.active{background:var(--surface2);color:var(--green-dark)}
.nav-icon{width:17px!important;height:17px!important;min-width:17px!important;max-width:17px!important;flex:0 0 17px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.65!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.sidebar-footer{margin-top:auto;padding:14px 10px 0;border-top:1px solid var(--line)}
.logout{color:var(--muted);font-size:13px;text-decoration:none}.logout:hover{color:var(--text)}
main{width:min(1060px,100%);margin:0 auto;padding:42px 38px 80px}
header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:30px}
header small,.hero small,.paper small,.journey small,.section-title small{font-size:10px;font-weight:800;letter-spacing:.15em;color:var(--gold)}
h1,h2{font-family:Georgia,"Times New Roman",serif;font-weight:500;letter-spacing:-.025em}
header h1{margin:5px 0 2px;font-size:37px;line-height:1.15}
.header-subtitle{margin:8px 0 0;color:var(--muted);font-size:13px}
.header-actions{display:flex;align-items:center;gap:9px}
.avatar,.theme-switch,.ai{width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--line);background:var(--surface);color:var(--green-dark)}
.avatar{border-radius:50%;font-size:12px}
.theme-switch{padding:0;border-radius:50%;transition:.16s}.theme-switch:hover{background:var(--surface2)}
.theme-icon{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.theme-moon{display:none}html[data-theme="dark"] .theme-sun{display:none}html[data-theme="dark"] .theme-moon{display:block}
.view{display:none}.view.active{display:block}
.hero,.card,.journey,.journalEntry,.messages,.paper{background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.hero{position:relative;overflow:hidden;padding:30px 34px;border-radius:20px}
.hero:after{content:"";position:absolute;right:-80px;top:-105px;width:220px;height:220px;border-radius:50%;background:var(--surface2);pointer-events:none}
.hero-orb{position:relative;z-index:1;width:38px;height:38px;margin-bottom:20px;border-radius:12px;background:var(--gold-soft);color:var(--gold);display:grid;place-items:center}
.hero small,.hero h2,.hero p,.hero button{position:relative;z-index:1}
.hero h2{max-width:720px;margin:8px 0 9px;font-size:38px;line-height:1.14}
.hero p{margin:0 0 20px;color:var(--muted);font-size:14px}
.primary,.secondary{padding:11px 16px;border-radius:10px;font-size:13px;font-weight:700}
.primary{border:1px solid var(--green-dark);background:var(--green-dark);color:#fff}.primary:hover{filter:brightness(.94)}
.secondary{border:1px solid var(--line);background:var(--surface);color:var(--green-dark)}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0}
.stats>div{min-height:88px;padding:16px 18px;border:1px solid var(--line);border-radius:15px;background:var(--surface);display:flex;flex-direction:column;justify-content:center}
.stats b{display:block;font-family:Georgia,"Times New Roman",serif;font-size:25px;font-weight:500;line-height:1;color:var(--green-dark)}
.stats span,.hint,#progressText{color:var(--muted);font-size:12px}
.card{padding:22px;border-radius:17px}.card h3{margin:0 0 12px;font-size:14px}
.progress{height:7px;border-radius:99px;background:var(--surface2);overflow:hidden}.progress span{display:block;width:0;height:100%;border-radius:99px;background:var(--green)}
.calendar{display:grid;grid-template-columns:repeat(10,1fr);gap:7px;margin-top:16px}
.calendar span{aspect-ratio:1;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;color:var(--muted);font-size:11px}
.calendar .done{background:var(--surface2);color:var(--green-dark)}.calendar .today{background:var(--gold-soft);color:var(--gold);border-color:var(--gold)}
.paper{max-width:810px;margin:auto;padding:35px;border-radius:20px}.paper h2{margin:7px 0 22px;font-size:34px}.paper h3{font-size:15px}.paper p{color:var(--muted)}.paper hr{margin:27px 0;border:0;border-top:1px solid var(--line)}.paper blockquote{margin-left:0;padding-left:17px;border-left:3px solid var(--gold);font-family:Georgia,"Times New Roman",serif;font-size:20px;color:var(--text)}
.moods{display:grid;grid-template-columns:1fr 1fr;gap:9px}.mood{padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);text-align:left}.mood:hover,.mood.active{background:var(--surface2);color:var(--green-dark)}
textarea{width:100%;min-height:120px;padding:14px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--text);outline:none;resize:vertical}
.row{display:flex;gap:9px;flex-wrap:wrap}
.chatHead{display:flex;align-items:center;gap:12px;margin-bottom:15px}.ai{border-radius:13px;background:var(--surface2)}.chatHead h2{margin:0;font-size:28px}.chatHead p{margin:2px 0 0;color:var(--muted);font-size:13px}
.messages{min-height:420px;padding:19px;border-radius:19px;display:flex;flex-direction:column;gap:11px}.bubble{max-width:82%;padding:12px 15px;border-radius:15px;font-size:14px;line-height:1.65;white-space:pre-wrap}.bot{background:var(--surface2);color:var(--text);border-bottom-left-radius:5px}.user{margin-left:auto;background:var(--green-dark);color:#fff;border-bottom-right-radius:5px}
.composer{display:flex;gap:8px;margin-top:11px;padding:5px;border:1px solid var(--line);border-radius:13px;background:var(--surface)}.composer input{flex:1;min-width:0;padding:10px;border:0;outline:0;background:transparent;color:var(--text)}.composer button{padding:0 18px;border:0;border-radius:9px;background:var(--green-dark);color:#fff;font-weight:700}
.section-title{margin-bottom:19px}.section-title h2{margin:5px 0 3px;font-size:34px}.section-title p{margin:0;color:var(--muted)}
.journalEntry{margin:10px 0;padding:18px;border-radius:15px}.journeyGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.journey{min-height:150px;padding:21px;border-radius:16px}.journey h3{font-family:Georgia,"Times New Roman",serif;font-size:20px}.journey p{color:var(--muted);font-size:13px}.locked{opacity:.55;box-shadow:none}
.mobile{display:none}
@media(max-width:800px){
 .shell{display:block}aside{display:none}main{padding:23px 14px 88px}header{align-items:center;margin-bottom:22px}header h1{font-size:29px}.header-subtitle{display:none}.avatar,.theme-switch{width:39px;height:39px}
 .hero{padding:25px 21px}.hero h2{font-size:31px}.hero-orb{margin-bottom:17px}.stats{gap:7px}.stats>div{min-height:78px;padding:12px 8px;text-align:center}.stats b{font-size:23px}.stats span{font-size:9.5px}
 .card{padding:18px 14px}.calendar{grid-template-columns:repeat(6,1fr)}.paper{padding:24px 17px}.paper h2{font-size:28px}.moods{grid-template-columns:1fr}
 .messages{min-height:57vh;padding:13px}.bubble{max-width:93%}.journeyGrid{grid-template-columns:1fr}
 .composer{position:sticky;bottom:67px;z-index:10}
 .mobile{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:50;padding:6px 5px calc(6px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:color-mix(in srgb,var(--side) 94%,transparent);backdrop-filter:blur(12px)}
 .mobile button{padding:5px 1px;border:0;background:transparent;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.mobile button.active{color:var(--green-dark)}.mobile span{font-size:9.5px;font-weight:600}
}
