@charset "utf-8";
/* ============================================================
   MoodSlip — mobile app prototype
   cream paper · deep burgundy · editorial
   한글 Pretendard · 영문 포인트 태-흘림 · 숫자/디스플레이 Cormorant
   ============================================================ */

/* ── 1. Fonts ─────────────────────────────────────────────── */
@font-face{
  font-family:"Cormorant Garamond";
  src:url("fonts/CormorantGaramond-latin.woff2") format("woff2");
  font-weight:300 700; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Pretendard";
  src:url("fonts/PretendardVariable.woff2") format("woff2");
  font-weight:100 900; font-display:swap;
}
/* 태-흘림 (태시스템 · TSTHlmL) — 눈누 noonnu.cc/font_page/1382
   개인·기업 무료, 웹사이트 사용 가능. 파일 수정·개작·재배포 금지. */
@font-face{
  font-family:"TaeHeullim";
  src:url("fonts/TaeHeullim.woff2") format("woff2");
  unicode-range:U+0020-007E;
  font-weight:400; font-style:normal; font-display:swap;
}

/* ── 2. Tokens ────────────────────────────────────────────── */
:root{
  /* 2026-12-05 confirmed palette */
  --canvas:#fbf9f8;          /* canvas soft */
  --cream:#fbf9f8;
  --paper:#ffffff;
  --paper-2:#f5f1ee;
  --brand:#c74634;           /* brand mark · CTA */
  --burgundy:#c74634;
  --burgundy-soft:rgba(199,70,52,.09);
  --sage-accent:#8fa395;     /* sage accent */
  --sage-soft:#dce5df;       /* soft sage badge / highlight */
  --sage-ink:#4d6154;
  --sage-bg:#f7faf8;
  --forest:#33553c;          /* secondary accent / band */
  --sage:#33553c;
  --ink:#211e1c;
  --line:#e6e0da;
  --line-2:#d8d0c8;
  --muted:rgba(33,30,28,.66);
  --faint:rgba(33,30,28,.42);
  --slate:#5f6b72;
  --brick:#a33526;
  --ok:#33553c;
  --danger:#a33526;

  --sans:"Pretendard",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --point:"TaeHeullim","Pretendard",serif;
  --display:"Cormorant Garamond","Times New Roman",serif;

  --ease:cubic-bezier(.2,.6,.2,1);
}

/* ── 3. Base ──────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0; min-height:100vh;
  background:#ece7e2;
  color:var(--ink);
  font-family:var(--sans);
  font-size:14px; line-height:1.62;
  letter-spacing:-.006em;
  -webkit-font-smoothing:antialiased;
}
body::before{
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none; opacity:.032;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
img{display:block;max-width:100%;height:auto;}
a{color:inherit;text-decoration:none;}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;}
p,h1,h2,h3,h4,ul,ol,dl,dd,figure{margin:0;padding:0;}
ul,ol{list-style:none;}
em{font-style:normal;}
b,strong{font-weight:600;}
::selection{background:var(--burgundy);color:var(--paper);}
:focus-visible{outline:1px solid var(--burgundy);outline-offset:3px;}
input,textarea,select{font:inherit;color:inherit;}

/* ── 4. App shell ─────────────────────────────────────────── */
.shell{position:relative; z-index:1; display:flex; min-height:100vh;}
.sidebar{display:none;}
.main{
  position:relative; flex:1; min-width:0;
  display:flex; flex-direction:column; height:100dvh; min-height:100dvh;
  background:var(--canvas);
}
.screen{
  position:relative; flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain;
  scrollbar-width:thin; scrollbar-color:var(--line-2) transparent;
  background:var(--canvas);
  scroll-behavior:smooth;
}
.screen::-webkit-scrollbar{width:8px;}
.screen::-webkit-scrollbar-thumb{background:var(--line-2);}
.page{padding:22px 20px 40px; min-height:100%; animation:pagein .34s var(--ease) both;}
@keyframes pagein{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}

/* ── 4b. Desktop sidebar ──────────────────────────────────── */
.side__brand{display:flex; flex-direction:column; gap:6px; padding:26px 22px 22px; border-bottom:1px solid var(--line);}
.side__brand img{width:118px; height:auto; opacity:.94;}
.side__brand span{font-family:var(--point); font-size:9.5px; letter-spacing:.08em; color:var(--faint); text-transform:lowercase;}
.side__nav{flex:1; display:flex; flex-direction:column; gap:2px; padding:16px 12px; overflow-y:auto;}
.side__item{
  display:flex; align-items:center; gap:11px; width:100%;
  padding:10px 12px; font-size:13px; line-height:1.3; color:var(--muted);
  border:1px solid transparent; text-align:left;
  transition:background .15s, color .15s, border-color .15s;
}
.side__item svg{width:18px; height:18px; flex:none; stroke-width:1.35;}
.side__item:hover{background:var(--paper-2); color:var(--ink);}
.side__item.is-on{background:var(--paper); border-color:var(--line); color:var(--burgundy); font-weight:600;}
.side__item .no{font-family:var(--display); font-size:10px; letter-spacing:.08em; color:var(--faint); margin-left:auto;}
.side__item.is-on .no{color:var(--burgundy);}
.side__item--home{margin-bottom:10px;}
.side__foot{display:flex; flex-direction:column; gap:2px; padding:14px 18px 20px; border-top:1px solid var(--line);}
.side__switch{display:flex; align-items:center; gap:8px; padding:8px 4px; font-size:11px; color:var(--faint); text-align:left;}
.side__switch svg{width:14px; height:14px; flex:none;}
.side__switch:hover{color:var(--burgundy);}
.side__link{display:flex; align-items:center; gap:8px; padding:7px 4px; font-size:11.5px; color:var(--muted);}
.side__link svg{width:14px; height:14px; flex:none;}
.side__link:hover{color:var(--burgundy);}
.proto-fab{display:none;}

/* ── 5. Typography ────────────────────────────────────────── */
.eyebrow{
  font-family:var(--point); font-size:10.5px; letter-spacing:.055em;
  color:var(--burgundy); text-transform:lowercase; line-height:1.5;
}
.h1{font-size:23px; line-height:1.34; font-weight:600; letter-spacing:-.028em;}
.h2{font-size:17px; line-height:1.42; font-weight:600; letter-spacing:-.02em;}
.h3{font-size:14.5px; line-height:1.45; font-weight:600; letter-spacing:-.015em;}
.lead{font-size:13px; color:var(--muted); line-height:1.7; letter-spacing:-.004em;}
.muted{color:var(--muted);}
.faint{color:var(--faint);}
.tiny{font-size:11.5px; line-height:1.6; color:var(--muted);}
.num{font-family:var(--display); font-weight:400; letter-spacing:.01em; font-variant-numeric:lining-nums;}
.serif{font-family:var(--display);}
.mono{font-variant-numeric:tabular-nums;}
.cap{font-family:var(--point); font-size:10.5px; letter-spacing:.05em; color:var(--faint); text-transform:lowercase;}
.strong{font-weight:600;}
.u{text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--line-2);}
.danger-text{color:var(--danger);}
.ok{color:var(--ok);}
.center{text-align:center;}

/* ── 6. Layout helpers ────────────────────────────────────── */
.shead{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:20px;}
.shead__tx{display:flex; flex-direction:column; gap:6px;}
.shead__side{display:flex; align-items:center; gap:8px; flex:none; padding-top:2px;}
.shead__side .btn{white-space:nowrap;}
.stack{display:flex; flex-direction:column; gap:14px;}
.stack-s{display:flex; flex-direction:column; gap:8px;}
.stack-xs{display:flex; flex-direction:column; gap:5px;}
.stack-l{display:flex; flex-direction:column; gap:22px;}
.row{display:flex; align-items:center; gap:10px;}
.row-s{display:flex; align-items:center; gap:6px;}
.between{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.wrap{flex-wrap:wrap;}
.grow{flex:1; min-width:0;}
.mt-4{margin-top:4px;} .mt-8{margin-top:8px;} .mt-12{margin-top:12px;}
.mt-16{margin-top:16px;} .mt-20{margin-top:20px;} .mt-24{margin-top:24px;}
.mb-8{margin-bottom:8px;} .mb-12{margin-bottom:12px;}
.section{margin-top:26px;}
.section:first-child{margin-top:0;}
.divider{height:1px;background:var(--line);border:0;margin:0;}
.dash{border:0;border-top:1px dashed var(--line-2);margin:0;}
.jsb{justify-content:space-between;}

/* ── 6b. Screen badges / home ─────────────────────────────── */
.page-badges{display:flex; gap:5px; margin-bottom:10px;}
.home{
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; margin-right:6px; border:1px solid var(--line-2);
  color:var(--muted); vertical-align:-3px; background:transparent;
}
.home:hover{border-color:var(--brand); color:var(--brand);}
.home svg{width:9px; height:9px;}
.brand-home{
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--display); font-size:13px; letter-spacing:.02em; color:var(--ink);
}
.brand-home img{width:46px; opacity:.9;}

/* ── 7. Section label ─────────────────────────────────────── */
.sect-head{display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:10px;}
.sect-head .cap{white-space:nowrap;}
.sect-title{display:flex; align-items:baseline; gap:8px;}
.sect-title .h3{flex:none;}
.sect-title .cap{transform:translateY(-1px);}

/* ── 8. Cards ─────────────────────────────────────────────── */
.card{
  background:var(--paper);
  border:1px solid var(--line);
  padding:16px;
}
.card--flat{background:transparent; border-color:var(--line-2);}
.card--wash{background:var(--paper-2); border-color:transparent;}
.card--ink{background:var(--ink); color:var(--paper); border-color:var(--ink);}
.card--ink .muted,.card--ink .lead{color:rgba(255,255,255,.68);}
.card--burgundy{background:var(--burgundy); color:#ffffff; border-color:var(--burgundy);}
.card--burgundy .eyebrow,.card--burgundy .cap{color:rgba(255,255,255,.66);}
.card--burgundy .muted{color:rgba(255,255,255,.74);}
.card__head{display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px;}
.card__k{font-size:12px; color:var(--muted);}

/* receipt / ticket */
.ticket{
  position:relative; background:var(--paper); border:1px solid var(--line);
  padding:16px; overflow:hidden;
}
.ticket::before{
  content:""; position:absolute; left:0; right:0; top:0; height:5px;
  background-image:radial-gradient(circle at 4px -1px, transparent 4px, var(--cream) 4.5px);
  background-size:8px 6px; background-repeat:repeat-x;
}
.ticket__meta{
  display:flex; justify-content:space-between; align-items:baseline;
  font-family:var(--point); font-size:10px; letter-spacing:.06em; color:var(--faint);
  padding-bottom:8px; border-bottom:1px dashed var(--line-2); margin-bottom:12px;
}
.ticket__no{font-family:var(--display); font-size:12px; letter-spacing:.1em; color:var(--burgundy);}

/* ── 9. Buttons ───────────────────────────────────────────── */
.btn>svg{width:14px;height:14px;flex:none;}
.btn--sm>svg{width:12px;height:12px;}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  padding:12px 16px; border:1px solid var(--line-2);
  background:transparent; color:var(--ink);
  font-size:13px; font-weight:500; letter-spacing:-.01em; line-height:1.2;
  transition:background .18s, border-color .18s, color .18s, opacity .18s;
  text-align:center;
}
.btn:hover{border-color:var(--ink);}
.btn:active{transform:translateY(.5px);}
.btn--primary{background:var(--burgundy); border-color:var(--burgundy); color:#ffffff;}
.btn--primary:hover{background:#ab3626; border-color:#ab3626;}
.btn--ink{background:var(--ink); border-color:var(--ink); color:var(--paper);}
.btn--ink:hover{background:#1E1917; border-color:#1E1917;}
.btn--ghost{background:var(--paper); border-color:var(--line);}
.btn--line{border-color:var(--forest); color:var(--forest);}
.btn--line:hover{background:rgba(51,85,60,.07);}
.btn--danger{border-color:rgba(163,53,38,.5); color:var(--danger);}
.btn--danger:hover{background:rgba(163,53,38,.06); border-color:var(--danger);}
.btn--text{border:0; padding:6px 2px; color:var(--burgundy); font-size:12.5px;}
.btn--text:hover{text-decoration:underline; text-underline-offset:3px;}
.btn--sm{padding:8px 11px; font-size:11.5px;}
.btn--xs{padding:6px 9px; font-size:10.5px; letter-spacing:.01em;}
.btn--block{display:flex; width:100%;}
.btn[disabled],.btn.is-off{opacity:.34; pointer-events:none;}
.btn-row{display:flex; gap:8px;}
.btn-row .btn{flex:1;}
.btn-row--end{display:flex; gap:8px; justify-content:flex-end;}

.iconbtn{
  display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; border:1px solid transparent; color:var(--muted);
}
.iconbtn:hover{border-color:var(--line); color:var(--ink);}
.link{color:var(--burgundy); text-decoration:underline; text-underline-offset:3px; text-decoration-color:rgba(199,70,52,.32);}
.link:hover{text-decoration-color:var(--burgundy);}
.back{
  display:inline-flex; align-items:center; gap:5px;
  font-family:var(--point); font-size:11px; letter-spacing:.04em; color:var(--muted);
  margin-bottom:14px;
}
.back:hover{color:var(--burgundy);}
.back svg{width:13px; height:13px;}

/* ── 10. Badges ───────────────────────────────────────────── */
.badge{
  display:inline-flex; align-items:center; gap:4px; flex:none;
  padding:2px 6px 2.5px; border:1px solid var(--line-2);
  font-size:9.5px; line-height:1.3; letter-spacing:.02em; color:var(--muted);
  background:rgba(255,255,255,.72); white-space:nowrap; vertical-align:middle;
}
.badge--none{border-color:rgba(199,70,52,.34); color:var(--brand); background:transparent;}
.badge--idea{border-color:rgba(51,85,60,.4); color:var(--slate); background:transparent;}
.badge--second{border-color:#c6d4ca; color:#445a4c; background:var(--sage-soft);}
.badge--state{border-style:dashed; border-color:var(--line-2); color:var(--muted); padding:3px 7px; font-size:10px;}
body.hide-badges .badge--none,body.hide-badges .badge--idea,body.hide-badges .badge--second{display:none;}

/* ── 11. Forms ────────────────────────────────────────────── */
.field{display:flex; flex-direction:column; gap:6px;}
.flabel{display:flex; align-items:baseline; justify-content:space-between; gap:8px; font-size:12px; font-weight:500; color:var(--ink);}
.flabel .opt{font-size:10.5px; font-weight:400; color:var(--faint);}
.flabel .req{font-size:9px; color:var(--burgundy); letter-spacing:.04em; transform:translateY(-1px);}
.input,.textarea,.select{
  width:100%; padding:11px 12px;
  background:var(--paper); border:1px solid var(--line);
  font-size:13.5px; line-height:1.5; color:var(--ink);
  border-radius:0; transition:border-color .15s, background .15s;
  appearance:none;
}
.input::placeholder,.textarea::placeholder{color:rgba(33,30,28,.32);}
.input:focus,.textarea:focus,.select:focus{outline:0; border-color:var(--burgundy); background:#ffffff;}
.textarea{resize:vertical; min-height:120px;}
.input.is-err,.textarea.is-err{border-color:var(--danger);}
.help{font-size:10.5px; line-height:1.55; color:var(--faint);}
.err{font-size:10.5px; line-height:1.55; color:var(--danger);}
.okline{font-size:10.5px; color:var(--ok);}
.count{font-family:var(--point); font-size:10px; letter-spacing:.04em; color:var(--faint);}
.input-group{display:flex; gap:6px;}
.input-group .input{flex:1; min-width:0;}
.input-group .btn{flex:none; white-space:nowrap;}
.code-input{letter-spacing:.42em; font-size:16px; text-align:center; font-family:var(--display); padding-left:.42em;}

.checkrow{
  display:flex; align-items:flex-start; gap:9px; padding:9px 0;
  font-size:12.5px; line-height:1.5; cursor:pointer;
}
.checkrow input{position:absolute; opacity:0; width:1px; height:1px;}
.box{
  flex:none; width:16px; height:16px; margin-top:1.5px;
  border:1px solid var(--line-2); background:var(--paper); position:relative;
}
.checkrow input:checked + .box{background:var(--burgundy); border-color:var(--burgundy);}
.checkrow input:checked + .box::after{
  content:""; position:absolute; left:5px; top:1.5px; width:4px; height:8px;
  border:solid #ffffff; border-width:0 1.4px 1.4px 0; transform:rotate(42deg);
}
.checkrow input:focus-visible + .box{outline:1px solid var(--burgundy); outline-offset:2px;}
.checkrow .box + span{flex:1;}
.checkrow--all{border-top:1px solid var(--line); margin-top:4px; padding-top:12px; font-weight:500;}

.switch{position:relative; flex:none; width:34px; height:20px; display:inline-block;}
.switch input{position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer;}
.switch .track{
  position:absolute; inset:0; background:#ece7e2; border:1px solid var(--line-2);
  transition:background .2s, border-color .2s;
}
.switch .track::after{
  content:""; position:absolute; left:2px; top:2px; width:14px; height:14px;
  background:var(--paper); border:1px solid var(--line-2); transition:transform .2s var(--ease);
}
.switch input:checked + .track{background:var(--burgundy); border-color:var(--burgundy);}
.switch input:checked + .track::after{transform:translateX(14px); background:#ffffff; border-color:var(--burgundy);}

.segmented{display:flex; border:1px solid var(--line); background:var(--paper);}
.segmented button{
  flex:1; padding:9px 6px; font-size:11.5px; color:var(--muted);
  border-right:1px solid var(--line); transition:background .15s, color .15s;
}
.segmented button:last-child{border-right:0;}
.segmented button.is-on{background:var(--ink); color:var(--paper);}
.segmented--light button.is-on{background:var(--burgundy);}

/* ── 12. Chips / tags ─────────────────────────────────────── */
.chips{display:flex; flex-wrap:wrap; gap:6px;}
.chip{
  display:inline-flex; align-items:center; gap:4px; white-space:nowrap;
  padding:5px 9px; border:1px solid var(--line); background:var(--paper);
  font-size:11px; color:var(--muted); line-height:1.35;
}
.chip.is-on{border-color:var(--burgundy); color:var(--burgundy); background:rgba(199,70,52,.045);}
.chip--plain{border-color:transparent; background:transparent; padding-left:0; padding-right:0;}
.tag{
  display:inline-block; padding:3px 7px; background:var(--paper-2);
  font-size:10.5px; color:var(--muted); line-height:1.3;
}
.tag--line{background:transparent; border:1px solid var(--line);}

/* ── 13. Lists ────────────────────────────────────────────── */
.list{display:flex; flex-direction:column; border-top:1px solid var(--line);}
.lrow{display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); width:100%; text-align:left;}
.lrow:hover{background:rgba(255,255,255,.62);}
.lrow__main{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.lrow__k{font-size:13px; font-weight:500;}
.lrow__s{font-size:11px; color:var(--muted); line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.lrow__v{flex:none; font-family:var(--display); font-size:15px; color:var(--muted);}
.lrow__chev{flex:none; color:var(--faint);}
.lrow--plain:hover{background:none;}

.empty{
  padding:26px 16px; text-align:center; border:1px dashed var(--line-2);
  color:var(--muted); font-size:12px; line-height:1.7; background:rgba(255,255,255,.55);
}
.empty .cap{display:block; margin-bottom:6px;}

/* ── 14. Home ─────────────────────────────────────────────── */
.home-top{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-top:2px;}
.home-date{display:flex; align-items:baseline; gap:10px;}
.home-date .d{font-family:var(--display); font-size:38px; line-height:1; letter-spacing:.01em; color:var(--burgundy);}
.home-date .day{font-size:12px; color:var(--muted);}
.home-hi{margin-top:10px; font-size:20px; font-weight:600; letter-spacing:-.03em; line-height:1.4;}
.home-hi span{font-weight:400; color:var(--muted); font-size:13px;}
.week-dots{display:flex; gap:5px; align-items:center;}
.week-dots i{width:6px; height:6px; border:1px solid var(--line-2); border-radius:50%; display:block;}
.week-dots i.on{background:var(--burgundy); border-color:var(--burgundy);}

.today-grid{display:grid; grid-template-columns:1fr 1fr 1fr; gap:1px; background:var(--line); border:1px solid var(--line);}
.today-cell{background:var(--paper); padding:12px 10px 11px; display:flex; flex-direction:column; gap:3px; min-height:76px;}
.today-cell .k{font-family:var(--point); font-size:10px; letter-spacing:.05em; color:var(--faint);}
.today-cell .v{font-size:12.5px; font-weight:500;}
.today-cell .s{font-size:10px; color:var(--faint); margin-top:auto;}
.today-cell.is-done{background:#f5f1ee;}
.today-cell .tick{color:var(--burgundy);}

.stat3{display:grid; grid-template-columns:1fr 1fr 1fr; border:1px solid var(--line); background:var(--paper);}
.stat{padding:12px 10px 11px; border-right:1px solid var(--line); display:flex; flex-direction:column; gap:2px;}
.stat:last-child{border-right:0;}
.stat__k{font-size:10px; color:var(--muted); letter-spacing:.01em;}
.stat__v{font-family:var(--display); font-size:26px; line-height:1.1; color:var(--ink);}
.stat__v small{font-family:var(--point); font-size:9px; color:var(--faint); margin-left:2px; letter-spacing:.04em;}
.stat__d{font-size:9.5px; color:var(--faint);}
.stat--bar{padding-bottom:9px;}
.mini-bar{height:2px; background:var(--paper-2); margin-top:4px; position:relative;}
.mini-bar i{position:absolute; left:0; top:0; bottom:0; background:var(--burgundy); opacity:.7;}

.kring-strip{display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; margin:0 -20px; padding-left:20px; padding-right:20px;}
.kring-mini{flex:none; width:78px; border:1px solid var(--line); background:var(--paper); padding:10px 8px; display:flex; flex-direction:column; align-items:center; gap:5px; text-align:center;}
.kring-mini .nm{font-size:10.5px; font-weight:500;}
.kring-mini .tr{font-family:var(--point); font-size:8.5px; color:var(--faint); letter-spacing:.03em;}

.quick{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.quick a{border:1px solid var(--line); background:var(--paper); padding:13px 12px; display:flex; flex-direction:column; gap:8px;}
.quick a:hover{border-color:var(--line-2); background:#ffffff;}
.quick .qi{color:var(--burgundy);}
.quick .qt{font-size:12.5px; font-weight:500;}
.quick .qs{font-size:10px; color:var(--faint);}

.crisis-banner{
  display:flex; align-items:center; gap:10px; width:100%; text-align:left;
  padding:12px 13px; border:1px solid rgba(199,70,52,.22); background:rgba(199,70,52,.05);
}
.crisis-banner .t{font-size:12px; font-weight:500; color:var(--burgundy);}
.crisis-banner .s{font-size:10.5px; color:var(--muted);}
.crisis-banner .arrow{margin-left:auto; color:var(--burgundy); flex:none;}

/* ── 15. Keyring avatar / icons ───────────────────────────── */
.kavatar{
  width:44px; height:44px; flex:none; display:grid; place-items:center;
  border:1px solid rgba(33,30,28,.16); position:relative; overflow:hidden;
}
.kavatar svg{width:66%; height:66%; display:block;}
.kavatar--sm{width:30px; height:30px;}
.kavatar--lg{width:70px; height:70px;}
.kavatar--xl{width:84px; height:84px;}
.kavatar .ring{
  position:absolute; top:-7px; left:50%; transform:translateX(-50%);
  width:12px; height:12px; border:1px solid rgba(255,255,255,.78); border-radius:50%;
}
.keyring-card{border:1px solid var(--line); background:var(--paper); padding:14px 12px; display:flex; flex-direction:column; align-items:center; gap:7px; text-align:center; position:relative;}
.keyring-card .nm{font-size:13px; font-weight:600;}
.keyring-card .tr{font-family:var(--point); font-size:9px; letter-spacing:.04em; color:var(--faint);}
.keyring-card .ds{font-size:10.5px; color:var(--muted); line-height:1.5;}
.keyring-card.is-active{outline:1px solid var(--burgundy); outline-offset:-1px;}
.keyring-card .del{position:absolute; top:4px; right:4px; color:var(--faint); font-size:10px; padding:2px 4px;}
.keyring-card .del:hover{color:var(--danger);}
.k-grid{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.k-default-grid{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.k-default{border:1px solid var(--line); background:var(--paper); padding:11px; display:flex; gap:9px; align-items:flex-start;}
.k-default .kavatar{width:34px; height:34px;}
.k-default .grow{min-width:0;}
.k-default .nm{display:block; font-size:11.5px; font-weight:500; line-height:1.35;}
.k-default .sn{display:block; font-size:9.5px; color:var(--faint); line-height:1.4; margin-top:2px;}
.k-default .use{margin-left:auto; color:var(--burgundy); font-size:10px; flex:none; white-space:nowrap; padding-left:4px;}

.icon-grid{display:grid; grid-template-columns:repeat(6,1fr); gap:6px;}
.icon-pick{
  aspect-ratio:1; border:1px solid var(--line); background:var(--paper);
  display:grid; place-items:center; color:var(--ink);
}
.icon-pick svg{width:60%; height:60%;}
.icon-pick.is-on{border-color:var(--burgundy); box-shadow:0 0 0 1px var(--burgundy) inset;}
.color-grid{display:flex; gap:7px; flex-wrap:wrap;}
.swatch{width:26px; height:26px; border:1px solid rgba(33,30,28,.18); position:relative;}
.swatch.is-on::after{content:""; position:absolute; inset:-4px; border:1px solid var(--ink);}

/* ── 16. Chart ────────────────────────────────────────────── */
.chart-box{border:1px solid var(--line); background:var(--paper); padding:14px 10px 8px;}
.chart{width:100%; height:auto; display:block; overflow:visible;}
.chart text{font-family:var(--point); font-size:7px; fill:var(--faint); letter-spacing:.02em;}
.chart .grid-l{stroke:var(--line); stroke-width:.6;}
.chart .axis{stroke:var(--line-2); stroke-width:.7;}
.legend{display:flex; gap:12px; flex-wrap:wrap; padding:9px 4px 2px;}
.legend span{display:inline-flex; align-items:center; gap:5px; font-size:10px; color:var(--muted);}
.legend i{width:12px; height:2px; display:block;}
.legend .dot{width:5px;height:5px;border-radius:50%;}

.distbar{display:flex; height:9px; width:100%; overflow:hidden; background:var(--paper-2);}
.distbar i{display:block; height:100%;}

/* ── 17. Emotions ─────────────────────────────────────────── */
.emo{display:inline-flex; align-items:center; gap:5px; vertical-align:-2px; font-size:11.5px; color:var(--muted); white-space:nowrap;}
.emo i{width:7px; height:7px; border-radius:50%; display:block; flex:none;}
.emo-name{display:inline-flex; align-items:center; gap:6px; font-weight:500; color:var(--ink);}
.emo-list{display:flex; flex-direction:column; gap:7px;}
.emo-row{display:grid; grid-template-columns:62px 1fr 30px; align-items:center; gap:8px; font-size:11px;}
.emo-row .bar{height:4px; background:var(--paper-2); position:relative;}
.emo-row .bar i{position:absolute; inset:0 auto 0 0;}
.emo-row .v{font-family:var(--display); font-size:11px; color:var(--muted); text-align:right;}

/* ── 18. Chat ─────────────────────────────────────────────── */
.chat-body{display:flex; flex-direction:column; gap:12px; padding:16px 0 8px;}
.chat-note{
  font-size:10.5px; color:var(--muted); line-height:1.55; text-align:center;
  padding:8px 12px; border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.72);
}
.bubble-wrap{display:flex; flex-direction:column; gap:4px; max-width:86%;}
.bubble-wrap--me{align-self:flex-end; align-items:flex-end;}
.bubble-wrap--ai{align-self:flex-start;}
.bubble-name{font-family:var(--point); font-size:10px; letter-spacing:.045em; color:var(--faint); padding-left:2px;}
.bubble{padding:10px 13px; font-size:13px; line-height:1.65; letter-spacing:-.005em;}
.bubble--ai{background:var(--paper); border:1px solid var(--line);}
.bubble--me{background:var(--burgundy); color:#ffffff; border:1px solid var(--burgundy);}
.bubble--plain{background:transparent; border:1px dashed var(--line-2);}
.bubble-time{font-family:var(--point); font-size:8.5px; color:var(--faint); letter-spacing:.03em;}
.typing{display:inline-flex; gap:3px; align-items:center; height:10px;}
.typing i{width:4px; height:4px; border-radius:50%; background:var(--faint); animation:blink 1.1s infinite;}
.typing i:nth-child(2){animation-delay:.15s;} .typing i:nth-child(3){animation-delay:.3s;}
@keyframes blink{0%,60%,100%{opacity:.25;}30%{opacity:1;}}
.stream-caret::after{content:""; display:inline-block; width:4px; height:12px; background:var(--burgundy); margin-left:2px; vertical-align:-1px; animation:cursor .9s steps(1) infinite;}
@keyframes cursor{50%{opacity:0;}}

.suggest{
  border:1px solid var(--line-2); background:var(--paper); padding:12px;
  margin:2px 0 0; display:flex; flex-direction:column; gap:3px;
}
.suggest .cap{color:var(--burgundy);}
.suggest .nm{font-size:13px; font-weight:600;}
.suggest .ds{font-size:11px; color:var(--muted); line-height:1.5;}

.composer{
  flex:none; border-top:1px solid var(--line); background:var(--paper);
  padding:9px 12px calc(9px + env(safe-area-inset-bottom)); display:flex; gap:8px; align-items:flex-end;
}
.composer textarea{
  flex:1; min-height:38px; max-height:96px; resize:none; padding:9px 10px;
  border:1px solid var(--line); background:var(--cream); font-size:13px; line-height:1.45;
}
.composer textarea:focus{outline:0; border-color:var(--burgundy);}
.composer .send{width:38px; height:38px; flex:none; display:grid; place-items:center; background:var(--burgundy); color:#ffffff;}
.composer .send[disabled]{background:var(--line-2); color:var(--paper);}
.composer-meta{font-family:var(--point); font-size:9.5px; color:var(--faint); letter-spacing:.04em;}

/* ── 18b. Chat layout ─────────────────────────────────────── */
.chat-page{height:100%; display:flex; flex-direction:column; padding:16px 0 0; min-height:0; animation:pagein .3s var(--ease) both;}
.screen:has(.chat-page){overflow:hidden;}
.chat-top{flex:none; display:flex; flex-direction:column; padding:0 20px;}
.chat-scroll{flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:10px 20px 0; border-top:1px solid var(--line);}
.chat-page .composer{margin:0; padding:9px 20px 9px;}
.composer-foot{padding:5px 20px 9px; flex:none;}
.chat-page .chat-body{padding-top:2px;}

/* ── 19. Crisis panel ─────────────────────────────────────── */
.crisis-wrap{position:absolute; inset:0; z-index:40; display:flex; flex-direction:column; background:var(--cream); animation:pagein .3s var(--ease);}
.crisis{
  position:absolute; inset:0; background:var(--cream); overflow-y:auto;
  padding:26px 22px 30px; display:flex; flex-direction:column; gap:18px;
  border-top:3px solid var(--burgundy);
}
.crisis__close{position:absolute; top:12px; right:12px;}
.crisis__kicker{font-family:var(--point); font-size:10.5px; letter-spacing:.08em; color:var(--burgundy); text-transform:lowercase;}
.crisis__title{font-size:24px; font-weight:600; letter-spacing:-.03em; line-height:1.32; margin-top:2px;}
.crisis__lead{font-size:12.5px; color:var(--muted); line-height:1.72;}
.crisis__block{border-top:1px solid var(--line); padding-top:14px; display:flex; flex-direction:column; gap:8px;}
.crisis__block .cap{margin-bottom:2px;}
.crisis__call{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  border:1px solid var(--line-2); background:var(--paper); padding:11px 13px;
}
.crisis__call:hover{border-color:var(--burgundy);}
.crisis__call .n{font-family:var(--sans); font-weight:600; font-size:19px; letter-spacing:.01em; color:var(--brand);}
.crisis__call .l{font-size:11px; color:var(--muted);}
.crisis__call .go{font-family:var(--point); font-size:10px; color:var(--faint); letter-spacing:.04em;}
.crisis__try{display:flex; flex-direction:column; gap:1px; background:var(--line); border:1px solid var(--line);}
.crisis__try button{background:var(--paper); padding:12px 13px; display:flex; align-items:center; gap:9px; font-size:12.5px; text-align:left;}
.crisis__try button:hover{background:#ffffff;}
.crisis__try .box{width:15px;height:15px;margin:0;}
.crisis__try button.done .box{background:var(--burgundy); border-color:var(--burgundy);}
.crisis__try button.done .box::after{content:""; position:absolute; left:4.5px; top:1px; width:4px; height:8px; border:solid #ffffff; border-width:0 1.3px 1.3px 0; transform:rotate(42deg);}
.crisis__try .box{position:relative;}
.crisis__note{font-size:10.5px; color:var(--faint); line-height:1.6;}
.crisis--inline{position:relative; inset:auto; border:1px solid rgba(199,70,52,.24); border-top-width:3px; padding:16px;}

/* ── 20. Modal / sheet ────────────────────────────────────── */
#modalRoot{position:absolute; inset:0; z-index:50; pointer-events:none;}
#modalRoot:empty{display:none;}
.scrim{position:absolute; inset:0; background:rgba(35,29,26,.34); pointer-events:auto; animation:fade .2s both;}
@keyframes fade{from{opacity:0;}to{opacity:1;}}
.sheet{
  position:absolute; left:0; right:0; bottom:0; max-height:86%; overflow-y:auto;
  background:var(--cream); border-top:1px solid var(--line-2);
  padding:20px 20px calc(22px + env(safe-area-inset-bottom));
  pointer-events:auto; animation:up .28s var(--ease) both;
  box-shadow:0 -18px 40px -30px rgba(42,36,33,.6);
}
@keyframes up{from{transform:translateY(18px);opacity:0;}to{transform:none;opacity:1;}}
.sheet--center{
  top:50%; bottom:auto; left:16px; right:16px; transform:translateY(-50%);
  border:1px solid var(--line-2); max-height:80%; animation:pop .22s var(--ease) both;
}
@keyframes pop{from{opacity:0; transform:translateY(-47%) scale(.985);}to{opacity:1; transform:translateY(-50%);}}
.sheet__head{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px;}
.sheet__title{font-size:16px; font-weight:600; letter-spacing:-.02em;}
.sheet__body{font-size:12.5px; color:var(--muted); line-height:1.7;}
.sheet__foot{display:flex; gap:8px; margin-top:18px;}
.sheet__foot .btn{flex:1;}
.sheet .grab{width:34px;height:3px;background:var(--line-2); margin:-6px auto 14px;}

/* toast */
.toast{
  position:absolute; left:50%; bottom:84px; transform:translate(-50%,8px); z-index:60;
  background:var(--ink); color:var(--paper); padding:9px 14px; font-size:11.5px;
  opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; max-width:80%; text-align:center;
}
.toast.is-on{opacity:1; transform:translate(-50%,0);}

/* ── 21. Bands / loading / offline ────────────────────────── */
.band{
  display:flex; align-items:center; gap:8px; padding:9px 12px;
  border:1px solid rgba(163,53,38,.26); background:rgba(142,58,44,.05);
  font-size:11px; color:var(--danger); line-height:1.5;
}
.band .btn--text{color:var(--danger); margin-left:auto; font-size:11px; padding:0; flex:none;}
.band--note{border-color:#c3d2c7; background:rgba(220,229,223,.72); color:#4f6355;}
.band--info{border-color:var(--line-2); background:var(--paper); color:var(--muted);}
.band--ok{border-color:rgba(51,85,60,.3); background:rgba(51,85,60,.06); color:var(--ok);}
.band__icon{flex:none; display:grid; place-items:center;}

.offline{position:absolute; inset:0; z-index:45; background:var(--cream); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:32px; text-align:center;}
.offline .t{font-size:16px; font-weight:600;}
.offline .s{font-size:12px; color:var(--muted); line-height:1.7;}

.sk{background:linear-gradient(90deg,#f2eeea 20%,#fbf9f8 40%,#f2eeea 60%); background-size:220% 100%; animation:shine 1.3s linear infinite; height:11px;}
@keyframes shine{to{background-position:-120% 0;}}
.sk-card{border:1px solid var(--line); padding:16px; display:flex; flex-direction:column; gap:10px; background:var(--paper);}
.sk-line{display:flex; flex-direction:column; gap:8px;}

/* ── 22. Sleep ────────────────────────────────────────────── */
.big-metric{display:flex; align-items:baseline; gap:8px;}
.big-metric .v{font-family:var(--display); font-size:34px; line-height:1; letter-spacing:.005em;}
.big-metric .u{font-size:11px; color:var(--muted);}
.metrics{display:grid; grid-template-columns:1fr 1fr 1fr; border-top:1px solid var(--line); margin-top:12px;}
.metrics>div{padding:10px 8px 0 0; display:flex; flex-direction:column; gap:2px;}
.metrics .k{font-size:10px; color:var(--muted);}
.metrics .v{font-family:var(--display); font-size:20px; line-height:1.15;}
.metrics .u{font-family:var(--point); font-size:9px; color:var(--faint); letter-spacing:.03em;}
.goal-bar{display:flex; flex-direction:column; gap:4px;}
.goal-bar .top{display:flex; justify-content:space-between; font-size:11px;}
.goal-bar .trackline{height:3px;background:var(--paper-2);position:relative;}
.goal-bar .trackline i{position:absolute;inset:0 auto 0 0;background:var(--sage);}
.time-fields{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.time-field{display:flex; flex-direction:column; gap:6px;}

/* ── 22b. Forest band ────────────────────────────────────── */
.card--forest{background:var(--forest); border-color:var(--forest); color:#f8f6f1;}
.card--forest .cap{color:rgba(255,255,255,.58);}
.card--forest .tiny,.card--forest .muted,.card--forest .lead{color:rgba(255,255,255,.76);}
.card--forest .legal{color:rgba(255,255,255,.56);}
.card--forest .h3,.card--forest .h2{color:#fff;}
.card--forest .kv{border-bottom-color:rgba(255,255,255,.16);}
.card--forest .kv .k{color:rgba(255,255,255,.66);}
.card--forest .kv .v{color:#fff;}
.card--forest .badge--state{border-color:rgba(255,255,255,.34); color:rgba(255,255,255,.8);}
.card--forest .goal-bar .trackline{background:rgba(255,255,255,.2);}
.card--forest .goal-bar .trackline i{background:var(--sage-soft);}
.card--forest .btn--ghost{border-color:rgba(255,255,255,.42); color:#fff; background:transparent;}
.card--forest .btn--ghost:hover{background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.7);}
.card--forest .dash{border-top-color:rgba(255,255,255,.2);}

/* ── 23. Activities ───────────────────────────────────────── */
.act-tabs{display:flex; gap:0; overflow-x:auto; border-bottom:1px solid var(--line); margin:0 -20px; padding:0 20px;}
.act-tabs button{flex:none; padding:10px 2px 9px; margin-right:16px; font-size:12px; color:var(--muted); border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap;}
.act-tabs button.is-on{color:var(--ink); border-bottom-color:var(--burgundy); font-weight:500;}
.act-row{display:flex; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid var(--line);}
.act-row .nm{font-size:12.5px;}
.act-row .mi{font-family:var(--point); font-size:10px; color:var(--faint); letter-spacing:.03em; margin-left:6px;}
.rank{display:flex; align-items:center; gap:10px; padding:9px 0;}
.rank .no{font-family:var(--display); font-size:16px; width:16px; color:var(--faint);}
.rank .nm{flex:1; font-size:12.5px;}
.rank .ct{font-size:10px; color:var(--faint); width:46px; text-align:right;}
.rank .dl{font-family:var(--display); font-size:14px; width:38px; text-align:right; color:var(--ok);}

/* ── 24. Reports ──────────────────────────────────────────── */
.report-cover{border:1px solid var(--line); background:var(--paper); padding:20px 18px; position:relative;}
.report-cover .no{font-family:var(--display); font-size:11px; letter-spacing:.17em; color:var(--faint);}
.report-cover .t{font-size:22px; font-weight:600; letter-spacing:-.03em; margin-top:8px; line-height:1.35;}
.report-cover .p{font-size:11.5px; color:var(--muted); margin-top:4px;}
.report-cover::after{content:""; position:absolute; left:18px; right:18px; bottom:0; height:1px; background:repeating-linear-gradient(90deg,var(--line-2) 0 3px,transparent 3px 6px);}
.pattern{border-left:2px solid var(--burgundy); padding:2px 0 2px 12px; font-size:12px; line-height:1.65;}
.pattern b{display:block; font-family:var(--point); font-size:9.5px; letter-spacing:.05em; color:var(--burgundy); font-weight:400; margin-bottom:3px;}

.quote-card{border:1px solid #d7e2da; background:var(--sage-bg); padding:18px; position:relative;}
.quote-card .cap{color:var(--sage-ink);}
.quote-card .q{font-family:var(--display); font-size:19px; line-height:1.5; letter-spacing:.005em;}
.quote-card .by{font-size:10.5px; color:var(--muted); margin-top:10px;}
.quote-card .act{display:flex; gap:6px; margin-top:12px;}

.music-card{display:flex; align-items:center; gap:12px; border:1px solid var(--line); background:var(--paper); padding:13px;}
.music-card .art{width:46px;height:46px;flex:none;background:var(--paper-2);display:grid;place-items:center;color:var(--burgundy);border:1px solid var(--line);}
.music-card .t{font-size:13px; font-weight:500;}
.music-card .s{font-size:10.5px; color:var(--muted);}
.music-card .links{display:flex; gap:8px; margin-top:3px;}

/* ── 25. Keyring / consent bits ───────────────────────────── */
.consent-row{display:flex; align-items:center; gap:8px; padding:10px 0; border-bottom:1px solid var(--line);}
.consent-row .nm{font-size:12px; flex:1;}
.consent-row .st{font-size:10px; flex:none;}
.consent-row .st--on{color:var(--ok);}
.consent-row .st--off{color:var(--faint);}

/* ── 26. Tabbar ───────────────────────────────────────────── */
.tabbar{
  flex:none; display:grid; grid-template-columns:repeat(6,1fr); min-height:62px;
  border-top:1px solid var(--line); background:rgba(255,255,255,.94);
  backdrop-filter:blur(8px); z-index:6;
  padding-bottom:env(safe-area-inset-bottom);
}
.tabbar__item{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  padding:9px 0 9px; color:var(--faint); position:relative;
  transition:color .15s;
}
.tabbar__item svg{width:19px; height:19px; stroke-width:1.35;}
.tabbar__item .lb{font-family:var(--point); font-size:9.5px; letter-spacing:.04em; line-height:1.05;}
.tabbar__item.is-on{color:var(--burgundy);}
.tabbar__item.is-on::before{content:""; position:absolute; top:0; left:50%; width:12px; height:2px; background:var(--burgundy); transform:translateX(-50%);}
.tabbar__item:hover{color:var(--ink);}

/* ── 27. Rail ─────────────────────────────────────────────── */
.rail{
  position:sticky; top:32px; width:336px; flex:none;
  max-height:calc(100vh - 64px); display:flex; flex-direction:column;
  border:1px solid #e2dcd6; background:var(--paper);
}
.rail__head{padding:20px 20px 14px; border-bottom:1px solid var(--line);}
.rail__kicker{font-family:var(--point); font-size:10px; letter-spacing:.09em; color:var(--burgundy); text-transform:lowercase;}
.rail__title{font-family:var(--display); font-size:27px; font-weight:500; letter-spacing:.01em; line-height:1.15; margin-top:6px; display:flex; align-items:baseline; gap:8px;}
.rail__title em{font-style:normal; font-family:var(--point); font-size:10px; letter-spacing:.06em; color:var(--faint);}
.rail__sub{font-size:11px; color:var(--muted); margin-top:6px; line-height:1.55;}
.rail__body{flex:1; overflow-y:auto; padding:6px 0 14px; scrollbar-width:thin;}
.rail__foot{display:flex; align-items:center; justify-content:space-between; gap:8px; padding:11px 20px; border-top:1px solid var(--line); font-size:10px;}
.rail__link{color:var(--burgundy); font-family:var(--point); letter-spacing:.03em;}
.rail__ver{font-family:var(--point); color:var(--faint); letter-spacing:.04em;}

.rgroup{padding:12px 14px 0;}
.rgroup__t{display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:0 6px 6px; font-family:var(--point); font-size:9.5px; letter-spacing:.09em; color:var(--faint); text-transform:lowercase;}
.rlist{display:flex; flex-direction:column; gap:1px;}
.ritem{
  display:flex; align-items:center; gap:9px; padding:6px 6px; text-align:left; width:100%;
  border:1px solid transparent; transition:background .13s, border-color .13s;
}
.ritem:hover{background:var(--paper-2);}
.ritem.is-on{background:var(--cream); border-color:var(--line);}
.ritem__no{font-family:var(--display); font-size:11.5px; letter-spacing:.06em; color:var(--faint); width:19px; flex:none; text-align:right;}
.ritem.is-on .ritem__no{color:var(--burgundy);}
.ritem__t{flex:1; min-width:0; font-size:11.5px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.ritem.is-on .ritem__t{font-weight:600;}
.ritem__b{display:flex; gap:3px; flex:none;}
.rdot{width:4px;height:4px;border-radius:50%;background:var(--line-2);}
.rdot--none{background:var(--burgundy);}
.rdot--idea{background:var(--forest);}
.rdot--second{background:var(--sage-accent);}

.rpanel{border-bottom:1px solid var(--line); padding:12px 20px 12px; background:rgba(251,249,248,.6);}
.rpanel .cap{margin-bottom:8px; display:block;}
.rchips{display:flex; flex-wrap:wrap; gap:5px;}
.rchip{
  border:1px solid var(--line); background:var(--paper); padding:4px 8px; font-size:10.5px; color:var(--muted);
}
.rchip.is-on{background:var(--burgundy); border-color:var(--burgundy); color:#ffffff;}
.rchip:hover{border-color:var(--line-2);}
.rswitch{display:flex; flex-direction:column; gap:6px; margin-top:4px;}
.rtoggle{display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:11px; padding:4px 0;}
.rline{display:flex; gap:6px; margin-top:10px;}
.rline .btn{flex:1;}
.rnote{font-size:10px; color:var(--faint); line-height:1.55; margin-top:8px;}

/* ── 27b. Screen number grid ─────────────────────────────── */
.rgrid-wrap{padding:0 14px 10px; border-bottom:1px solid var(--line); margin-bottom:4px;}
.rgrid{display:grid; grid-template-columns:repeat(8,1fr); border:1px solid var(--line); background:var(--paper);}
.rnum{
  height:26px; display:flex; align-items:center; justify-content:center;
  font-family:var(--display); font-size:11.5px; letter-spacing:.05em; color:var(--muted);
  border-right:1px solid var(--line); border-bottom:1px solid var(--line);
}
.rnum:nth-child(8n){border-right:0;}
.rnum:nth-last-child(-n+8){border-bottom:0;}
.rnum:hover{background:var(--paper-2); color:var(--ink);}
.rnum.is-on{background:var(--brand); color:#fff;}
.rnum.is-on:hover{background:var(--brand);}

/* ── 28. Drawer & mobile index ────────────────────────────── */
.mobile-index{
  display:none; position:fixed; right:0; top:50%; transform:translateY(-50%); z-index:70;
  width:14px; height:48px; border-radius:7px 0 0 7px;
  background:rgba(33,30,28,.26); color:var(--paper); align-items:center; justify-content:center;
  backdrop-filter:blur(4px); opacity:.8; transition:opacity .2s, background .2s;
}
.mobile-index svg{width:12px;height:12px;}
.mobile-index:hover{opacity:1;}
body.is-overlay .mobile-index{display:none !important;}
.drawer{position:fixed; inset:0; z-index:90; display:flex; align-items:flex-end;}
.drawer[hidden]{display:none;}
.drawer::before{content:""; position:absolute; inset:0; background:rgba(35,29,26,.35);}
.drawer__panel{
  position:relative; width:100%; max-height:88vh; background:var(--paper);
  display:flex; flex-direction:column; border-top:1px solid var(--line-2);
  animation:up .26s var(--ease) both;
}
.drawer__bar{display:flex; align-items:center; justify-content:space-between; padding:12px 18px; border-bottom:1px solid var(--line); font-size:12px; font-weight:500;}
.drawer .rail__body{background:var(--paper);}
.drawer .rpanel{background:transparent;}
.drawer .rgroup{padding-left:6px; padding-right:6px;}

/* ── 28b. Range · details · self-check ───────────────────── */
input[type="range"].range{
  -webkit-appearance:none; appearance:none; width:100%; height:22px; background:transparent; margin:2px 0;
}
input[type="range"].range::-webkit-slider-runnable-track{height:2px;background:var(--line-2);}
input[type="range"].range::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none; width:14px; height:14px; margin-top:-6px;
  border-radius:50%; background:var(--burgundy); border:2px solid var(--paper);
}
details>summary{list-style:none;}
details>summary::-webkit-details-marker{display:none;}
details>summary::after{content:"+"; float:right; color:var(--faint); font-family:var(--point);}
details[open]>summary::after{content:"−";}

.qcard{border:1px solid var(--line); background:var(--paper); padding:12px;}
.qno{font-size:15px; color:var(--black,var(--burgundy)); width:22px; flex:none; line-height:1.5;}
.qtext{font-size:12.5px; line-height:1.6; flex:1;}
.scale4{display:grid; grid-template-columns:repeat(4,1fr); gap:0; margin-top:9px; border:1px solid var(--line);}
.s4{position:relative; text-align:center; cursor:pointer; border-right:1px solid var(--line);}
.s4:last-child{border-right:0;}
.s4 input{position:absolute; opacity:0; width:1px; height:1px;}
.s4 span{display:block; padding:7px 2px; font-size:9.5px; color:var(--muted); line-height:1.3;}
.s4 input:checked + span{background:var(--burgundy); color:#ffffff;}
.chip input{position:absolute;opacity:0;width:1px;height:1px;}

/* ── 29. Misc ─────────────────────────────────────────────── */
.kv{display:flex; align-items:baseline; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); font-size:12px;}
.kv:last-child{border-bottom:0;}
.kv .k{color:var(--muted); font-size:11.5px;}
.kv .v{text-align:right;}
.note-box{background:rgba(199,70,52,.05); border:1px solid rgba(199,70,52,.16); padding:12px 13px; font-size:11.5px; line-height:1.65; color:var(--muted);}
.note-box .h{font-weight:600; color:var(--ink); font-size:12px; margin-bottom:4px;}
.num-big{font-family:var(--display); font-size:44px; line-height:1; letter-spacing:.01em;}
.rule-l{display:flex; align-items:center; gap:10px; color:var(--faint); font-family:var(--point); font-size:9.5px; letter-spacing:.08em;}
.rule-l::before,.rule-l::after{content:""; flex:1; height:1px; background:var(--line);}
.legal{font-size:10.5px; line-height:1.75; color:var(--faint);}
.legal b{color:var(--muted); font-weight:500;}
.avatar-choice{display:flex; align-items:center; gap:12px;}
.week-bar{display:flex; gap:4px; align-items:flex-end; height:44px;}
.week-bar i{flex:1; background:var(--paper-2); position:relative;}
.week-bar i span{position:absolute; left:0; right:0; bottom:0; background:rgba(51,85,60,.5);}
.week-labels{display:flex; gap:4px; margin-top:4px;}
.week-labels span{flex:1; text-align:center; font-family:var(--point); font-size:8px; color:var(--faint);}

/* ── 28c. Mood chips · visual gauges ─────────────────────── */
.mood-chips{display:flex;flex-wrap:wrap;gap:6px;}
.mchip{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid var(--line);background:var(--paper);font-size:11.5px;color:var(--muted);line-height:1.2;}
.mchip i{width:7px;height:7px;border-radius:50%;flex:none;}
.mchip.is-on{border-color:var(--ink);color:var(--ink);background:#fff;font-weight:500;}
details.more{border:1px solid var(--line);background:var(--paper-2);padding:0 14px;}
details.more summary{padding:12px 0;font-size:12px;font-weight:500;cursor:pointer;}
details.more[open]{padding-bottom:14px;}

.mood-visual{display:flex;flex-direction:column;gap:16px;}
.mood-badge{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;padding:7px 11px;border:1px solid var(--line);background:var(--paper-2);font-size:12px;font-weight:500;line-height:1.2;}
.mood-badge i{width:7px;height:7px;border-radius:50%;background:var(--forest);flex:none;}
.mood-bars{display:grid;grid-template-columns:1fr;gap:8px;}
.mood-bar{display:grid;grid-template-columns:54px minmax(0,1fr) 22px;align-items:center;gap:10px;font-size:11px;color:var(--muted);}
.mood-bar .tr{height:6px;background:var(--paper-2);position:relative;overflow:hidden;border-radius:1px;}
.mood-bar .tr i{position:absolute;inset:0 auto 0 0;border-radius:1px;min-width:2px;}
.mood-bar .v{text-align:right;font-family:var(--display);font-size:12px;color:var(--muted);}
.gauges{display:flex;flex-direction:column;gap:9px;}
.gauge{display:grid;grid-template-columns:62px minmax(0,1fr) 30px;align-items:center;gap:10px;font-size:11px;color:var(--muted);}
.gauge .tr{height:8px;background:var(--paper-2);position:relative;overflow:hidden;border-radius:1px;}
.gauge .tr i{position:absolute;inset:0 auto 0 0;}
.gauge .v{font-family:var(--display);font-size:13px;text-align:right;color:var(--ink);}
@media (min-width:900px){
  .mood-bars{grid-template-columns:1fr 1fr;gap:9px 32px;}
  .mood-visual{gap:18px;}
}

/* ── 28d. Wellness · report components ───────────────────── */
.wellness{display:flex;flex-direction:column;gap:16px;}
.wg{text-align:center;}
.wg svg{width:100%;max-width:250px;display:block;margin:0 auto;overflow:visible;}
.wg-v{font-family:var(--display);font-size:40px;fill:var(--ink);}
.wg-s{font-family:var(--point);font-size:10px;fill:var(--muted);letter-spacing:.08em;}
.wg-sum{font-size:12px;color:var(--muted);margin-top:2px;}
.wg-sum b{color:var(--brand);font-weight:600;}
.stage-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.stage-card{border:1px solid var(--line);background:var(--paper);padding:12px;display:flex;flex-direction:column;gap:7px;}
.stage-card .k{font-size:11px;color:var(--muted);}
.stage-card .v{font-size:17px;font-weight:600;line-height:1.1;}
.stage-card .sb{display:flex;gap:3px;}
.stage-card .sb i{flex:1;height:8px;border-radius:1px;}
.wellness .sub{padding-top:14px;border-top:1px solid var(--line);}
.stack-bar{display:flex;height:10px;overflow:hidden;border-radius:2px;background:var(--paper-2);margin-top:8px;}
.stack-bar i{height:100%;}
.stack-list{display:flex;flex-direction:column;gap:6px;margin-top:10px;}
.stack-row{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--muted);}
.stack-row .no{width:12px;font-family:var(--display);color:var(--faint);}
.stack-row .dot{width:7px;height:7px;border-radius:50%;flex:none;}
.stack-row .pc{margin-left:auto;font-family:var(--display);font-size:12px;color:var(--ink);}

.wkstrip{display:flex;justify-content:space-between;gap:4px;margin-bottom:14px;}
.wkday{display:flex;flex-direction:column;align-items:center;gap:5px;font-size:10px;color:var(--faint);}
.wkday b{width:26px;height:26px;display:grid;place-items:center;border:1px solid var(--line);font-family:var(--display);font-weight:400;font-size:12px;color:var(--muted);}
.wkday.is-on b{background:var(--forest);border-color:var(--forest);color:#fff;}
.ringrow{display:flex;align-items:center;gap:18px;}
.ring{position:relative;width:132px;height:132px;flex:none;}
.ring svg{width:100%;height:100%;transform:rotate(-90deg);}
.ring .in{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;}
.ring .v{font-family:var(--display);font-size:38px;line-height:1;color:var(--ink);}
.ring .s{font-size:9.5px;color:var(--faint);letter-spacing:.04em;}
.sleepchips{display:flex;flex-direction:column;gap:8px;flex:1;min-width:0;}
.sleepchip{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--line);background:var(--paper-2);padding:11px 12px;font-size:10.5px;color:var(--muted);}
.sleepchip b{font-size:13px;color:var(--ink);font-weight:600;}

.act-mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:720px;}
.act-mini{border:1px solid var(--line);background:var(--paper);padding:12px;display:flex;flex-direction:column;gap:6px;text-align:left;}
.act-mini .ic{width:20px;height:20px;color:var(--brand);}
.act-mini .ic svg{width:20px;height:20px;}
.act-mini .nm{font-size:11px;color:var(--muted);}
.act-mini .v{font-family:var(--display);font-size:20px;color:var(--ink);}
.act-mini .v small{font-family:var(--point);font-size:9px;color:var(--faint);margin-left:2px;}
.act-mini .mb{display:flex;align-items:flex-end;gap:2px;height:20px;margin-top:4px;}
.act-mini .mb i{flex:1;background:var(--sage);border-radius:1px;}

.ai-card{border:1px solid #d7e2da;background:var(--sage-bg);padding:16px 16px 12px;}
.ai-head{display:flex;align-items:center;gap:9px;margin-bottom:9px;}
.ai-head .t{font-size:12.5px;font-weight:600;}
.ai-body{font-size:12.5px;line-height:1.75;color:var(--muted);}
.ai-re{display:inline-flex;align-items:center;gap:5px;margin-top:10px;font-size:11px;color:var(--brand);}
.ai-re svg{width:12px;height:12px;}

.big-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.big-metric-card{border:1px solid var(--line);background:var(--paper);padding:16px;display:flex;flex-direction:column;gap:4px;}
.big-metric-card .v{font-family:var(--display);font-size:30px;line-height:1.05;color:var(--ink);}
.big-metric-card .v small{font-size:12px;color:var(--muted);}
.big-metric-card .k{font-size:10.5px;color:var(--muted);}

.flowbar{display:flex;flex-direction:column;gap:8px;}
.flowbar .track{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;}
.flowbar .cell{height:34px;border-radius:2px;background:var(--paper-2);display:flex;align-items:flex-end;justify-content:center;font-size:8px;color:rgba(255,255,255,.85);padding-bottom:4px;}
.detail4{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.detail{display:flex;gap:9px;align-items:flex-start;border:1px solid var(--line);background:var(--paper);padding:12px;}
.detail .ic{width:18px;height:18px;color:var(--brand);flex:none;}
.detail .ic svg{width:18px;height:18px;}
.detail .k{display:block;font-size:10px;color:var(--muted);}
.detail .v{display:block;font-size:13px;font-weight:600;margin-top:1px;}
.detail .st{display:inline-block;font-size:9.5px;margin-top:3px;color:var(--forest);}
.detail .st.warn{color:var(--brand);}

/* ── 28e. Emotion calendar ───────────────────────────────── */
.cal-wrap{max-width:500px;margin:0 auto 6px;}
.cal-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:12px;}
.cal-head .serif{font-size:22px;}
.cal-dow{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:10px;color:var(--faint);margin-bottom:6px;}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;}
.cal-cell{position:relative;aspect-ratio:1;height:auto;border-radius:50%;display:grid;place-items:center;background:rgba(220,229,223,.28);border:1px solid transparent;min-width:0;}
.cal-cell.is-blank{background:transparent;}
.cal-cell.has{background:transparent;}
.cal-cell .face{width:70%;height:70%;border-radius:50%;display:grid;place-items:center;background:#fffdfb;border:1px solid var(--c);color:var(--c);}
.cal-cell .face svg{width:62%;height:62%;}
.cal-cell .dn{position:absolute;bottom:1px;font-family:var(--display);font-size:9px;color:var(--faint);}
.cal-cell.is-on{box-shadow:inset 0 0 0 1.5px var(--ink);}
.cal-cell.is-on .dn{color:var(--ink);font-weight:600;}
.cal-legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px;font-size:10px;color:var(--faint);}
.cal-legend span{display:inline-flex;align-items:center;gap:5px;}
.cal-legend i{width:6px;height:6px;border-radius:50%;}
.cal-panel{margin-top:18px;}
.chat-close{padding:0 20px 8px;}

/* ── 29b. Spacing · icon rhythm ───────────────────────────── */
.btn>svg,.iconbtn>svg,.lrow__chev>svg,.side__item>svg,.tabbar__item>svg{flex:none;display:block;}
.btn{gap:8px;}
.lrow__chev{display:inline-flex;align-items:center;}
.lrow__chev svg{width:14px;height:14px;}
.iconbtn svg{width:18px;height:18px;}
.card>*+*{margin-top:0;}
.card .stack{margin-top:0;}
.card{padding:18px;}
.stack>.card,.stack>.section{margin-top:0;}
.list .lrow:last-child{border-bottom:0;}
.sect-head{margin-bottom:12px;}
.section>.sect-head+.card{margin-top:0;}
.badge svg{width:11px;height:11px;flex:none;}
.chip svg{width:12px;height:12px;flex:none;}
.legend{align-items:center;}

/* ── 30. Responsive ───────────────────────────────────────── */

/* 모바일 (390 기준) — 풀스크린 + 하단 탭바 */
@media (max-width:899px){
  .shell{display:block;}
  .main{height:100dvh;}
  .sidebar{display:none;}
  .tabbar{display:grid;}
  .mobile-index{display:flex;}
  .page{padding:20px 18px 34px;}
  .kring-strip{margin:0 -18px; padding-left:18px; padding-right:18px;}
  .act-tabs{margin:0 -18px; padding:0 18px;}
  .proto-fab{display:none;}
}

/* 데스크톱 (900 이상) — 좌측 사이드바 + 넓은 본문 */
@media (min-width:900px){
  .shell{display:flex; min-height:100vh;}
  .sidebar{
    display:flex; flex-direction:column; flex:none;
    width:236px; height:100vh; position:sticky; top:0;
    background:var(--paper); border-right:1px solid var(--line);
    z-index:20;
  }
  .main{height:100vh; min-height:100vh;}
  .tabbar{display:none !important;}
  .mobile-index{display:none;}
  .page{max-width:1060px; margin:0 auto; width:100%; padding:38px 48px 64px;}
  body.is-auth .sidebar{display:none;}
  body.is-auth .page{max-width:520px; padding-top:12vh;}
  body.is-auth .proto-fab{
    display:flex; align-items:center; gap:6px; position:fixed; top:16px; right:20px; z-index:25;
    padding:7px 11px; border:1px solid var(--line); background:var(--paper);
    font-size:11px; color:var(--muted);
  }
  body.is-auth .proto-fab:hover{border-color:var(--line-2); color:var(--ink);}

  /* 카드·여백 리듬 */
  .card{padding:20px;}
  .section{margin-top:30px;}
  .stack{gap:16px;}
  .h1{font-size:30px;}
  .h2{font-size:20px;}
  .lead{font-size:14px;}
  .btn{padding:12px 18px; font-size:13px;}
  .btn>svg{width:15px; height:15px;}
  .tabbar__item svg{width:19px; height:19px;}

  /* 대화 — 화면 높이를 채우고 가운데 정렬 */
  .page.chat-page{max-width:none; height:100%; padding:0; display:flex; flex-direction:column;}
  .chat-top{width:100%; max-width:880px; margin:0 auto; padding:22px 32px 0;}
  .chat-scroll{padding:14px 32px 0;}
  .chat-scroll .chat-body{max-width:816px; margin:0 auto;}
  .chat-page .composer{width:100%; max-width:816px; margin:0 auto; padding:10px 0 12px;}
  .composer-foot{width:100%; max-width:816px; margin:0 auto; padding:6px 0 16px;}
  .bubble-wrap{max-width:76%;}
  .bubble{font-size:13.5px; padding:11px 14px;}

  /* 00 대시보드 — 2단 */
  body[data-screen="00"] .page{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 28px; align-items:start;}
  body[data-screen="00"] .page > *{margin-top:0 !important; min-width:0;}
  body[data-screen="00"] .page > .page-badges,
  body[data-screen="00"] .page > .home-top,
  body[data-screen="00"] .page > .home-hi,
  body[data-screen="00"] .page > .legal{grid-column:1/-1;}
  body[data-screen="00"] .home-date .d{font-size:54px;}
  body[data-screen="00"] .home-hi{font-size:26px;}
  body[data-screen="00"] .kring-strip{display:grid; grid-template-columns:repeat(4,1fr); margin:0; padding:0; overflow:visible;}
  body[data-screen="00"] .quick{grid-template-columns:repeat(2,1fr);}

  /* 05 일기 — 감정 캘린더 (단일 흐름) */
  body[data-screen="05"] .page{display:block;max-width:880px;}

  /* 14 키링 — 4열 */
  body[data-screen="14"] .k-grid{grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px;}
  body[data-screen="14"] .k-default-grid{grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px;}
  body[data-screen="14"] .keyring-card{min-height:176px; padding:18px 14px;}

  /* 15 수면 — 요약 | 입력 */
  body[data-screen="15"] .page{display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:24px 30px; align-items:start;}
  body[data-screen="15"] .page > *{margin-top:0 !important; min-width:0;}
  body[data-screen="15"] .page > .shead,
  body[data-screen="15"] .page > .section:last-of-type,
  body[data-screen="15"] .page > .legal{grid-column:1/-1;}
  body[data-screen="15"] .big-metric .v{font-size:44px;}

  /* 22 리포트 — 2단 대시보드 */
  body[data-screen="22"] .page{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:26px 30px; align-items:start;}
  body[data-screen="22"] .page > *{margin-top:0 !important; min-width:0;}
  body[data-screen="22"] .page > .shead,
  body[data-screen="22"] .page > .report-cover,
  body[data-screen="22"] .page > .legal{grid-column:1/-1;}
  body[data-screen="22"] .section{display:flex; flex-direction:column; height:100%;}
  body[data-screen="22"] .report-cover{padding:26px 24px;}
  body[data-screen="22"] .report-cover .t{font-size:30px;}

  body[data-screen="07"] .page,
  body[data-screen="16"] .page,
  body[data-screen="19"] .page,
  body[data-screen="21"] .page{max-width:880px;}

  /* 공통 폼·목록 리듬 */
  .list .lrow{padding:15px 2px;}
  .kv{padding:10px 0;}
  .consent-row{padding:12px 0;}
  .k-default{padding:14px 12px; gap:11px;}
  .quick a{padding:16px 14px;}
  .legend span{font-size:10.5px;}
}

/* 배지 — 검수 모드에서만 */
body:not(.show-badges) .page-badges{display:none;}
body:not(.show-badges) .badge--none,
body:not(.show-badges) .badge--idea,
body:not(.show-badges) .badge--second{display:none;}

@media (min-width:900px){
  .drawer{align-items:stretch; justify-content:flex-end;}
  .drawer__panel{
    width:432px; height:100%; max-height:none;
    border-top:0; border-left:1px solid var(--line-2);
    animation:slidein .26s var(--ease) both;
  }
  @keyframes slidein{from{transform:translateX(20px);opacity:0;}to{transform:none;opacity:1;}}
  .drawer .rail__body{padding-bottom:24px;}
}

@media (prefers-reduced-motion:reduce){
  *{animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important;}
}

/* badge inside eyebrow */
.eyebrow .badge{font-size:9px; padding:1.5px 5px; transform:translateY(-1px); margin-right:2px;}

/* ============================================================
   31. 랜딩과 동일한 에디토리얼 셸 (2026-12-05)
   · 상단 헤더 + 넓은 크림 캔버스 + 하단 푸터
   · 카드 테두리 → 종이 질감 + 은은한 선 + 영수증 점선
   ============================================================ */

/* ── 31.1 셸 ─────────────────────────────────────────────── */
html,body{height:100%;}
body{
  display:flex;flex-direction:column;
  height:100dvh;overflow:hidden;
  background:var(--canvas);
}
.app-head{
  flex:none;position:relative;z-index:40;
  height:var(--head-h,76px);
  display:flex;align-items:center;gap:clamp(16px,3vw,40px);
  padding:0 clamp(20px,4vw,56px);
  background:rgba(251,249,248,.9);
  -webkit-backdrop-filter:blur(12px) saturate(120%);
  backdrop-filter:blur(12px) saturate(120%);
  color:var(--brand);
  border-bottom:1px solid transparent;
  transition:border-color .3s ease;
}
.app-head.is-scrolled{border-bottom-color:rgba(33,30,28,.08);}
.app-head .brand{width:92px;height:22px;flex:0 0 auto;}
.app-head .brand img{width:92px;height:22px;object-fit:contain;object-position:left center;}
.app-head__nav{
  margin-left:auto;display:flex;align-items:center;gap:clamp(16px,2.4vw,34px);
  font-family:var(--point);font-size:15px;letter-spacing:.01em;
}
.app-head__nav .head-nav__item{
  position:relative;padding:6px 0;
  font-family:var(--point);font-size:15px;letter-spacing:.01em;
  color:var(--brand);opacity:.62;
  transition:opacity .25s ease;
}
.app-head__nav .head-nav__item::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:1px;
  background:currentColor;transform:scaleX(0);transform-origin:left;
  transition:transform .4s var(--ease);
}
.app-head__nav .head-nav__item:hover{opacity:.9;}
.app-head__nav .head-nav__item:hover::after,
.app-head__nav .head-nav__item.is-on::after{transform:scaleX(1);}
.app-head__nav .head-nav__item.is-on{opacity:1;}
.app-head .head-cta{
  flex:0 0 auto;margin-left:clamp(14px,2vw,26px);
  display:inline-flex;align-items:center;
  padding:11px 22px 12px;
  border:1px solid currentColor;
  font-size:12px;font-weight:500;letter-spacing:.04em;
  color:var(--brand);
  transition:background-color .3s ease,color .3s ease;
}
.app-head .head-cta:hover{background:var(--brand);color:var(--canvas);}
.app-head .burger{display:none;color:var(--brand);}

.main{
  flex:1;min-height:0;height:auto;
  display:flex;flex-direction:column;
  background:var(--canvas);
}
.screen{flex:1;min-height:0;}

/* 검수용 작은 버튼 */
.proto-fab{display:none;}
.mobile-index{
  background:rgba(33,30,28,.18);opacity:.55;
  border:1px solid rgba(33,30,28,.12);
}

/* ── 31.2 푸터 (랜딩과 동일) ─────────────────────────────── */
.app-foot{
  width:100%;max-width:1060px;margin:clamp(30px,5vh,56px) auto 0;
  padding:clamp(22px,3vw,34px) 48px 0;
  border-top:1px solid rgba(33,30,28,.08);
}
.app-foot .foot{
  display:grid;grid-template-columns:1.9fr 1fr 1fr;
  gap:clamp(20px,4vw,64px);align-items:start;
  border-top:0;padding-top:0;max-width:none;
}
.app-foot .foot__logo{width:150px;height:auto;opacity:.95;}
.app-foot .foot__sub{
  margin-top:10px;font-family:var(--point);font-size:10.5px;
  letter-spacing:.14em;color:rgba(33,30,28,.45);
}
.app-foot .label{
  display:block;margin-bottom:8px;
  font-family:var(--point);font-size:11px;letter-spacing:.14em;
  color:rgba(199,70,52,.75);text-transform:lowercase;
}
.app-foot__col{display:grid;gap:8px;align-content:start;}
.app-foot__col button{
  width:fit-content;text-align:left;
  font-size:12.5px;letter-spacing:-.02em;color:rgba(33,30,28,.78);
  border-bottom:1px solid transparent;
  transition:border-color .3s ease,color .3s ease;
}
.app-foot__col button:hover{color:var(--brand);border-bottom-color:rgba(199,70,52,.5);}
.app-foot .foot__end{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  margin-top:clamp(20px,3vw,30px);padding:16px 0 20px;
  border-top:1px solid rgba(33,30,28,.08);
  font-family:var(--point);font-size:10.5px;letter-spacing:.1em;
  color:rgba(199,70,52,.55);max-width:none;
}
.app-foot .foot__legal{display:flex;align-items:center;gap:8px;}
.app-foot .foot__end button{border-bottom:1px solid rgba(199,70,52,.25);padding-bottom:1px;}

/* ── 31.3 카드·목록 — 영수증 무드 ────────────────────────── */
.card{
  background:var(--paper);
  border:1px solid rgba(33,30,28,.07);
  padding:18px;
}
.card--flat{border-color:rgba(33,30,28,.1);background:transparent;}
.card--wash{background:var(--paper-2);border-color:transparent;}
.chart-box,.report-cover,.big-metric-card,.detail,.act-mini,.stage-card,
.qcard,.music-card,.sleepchip,.kring-mini,.keyring-card,.k-default,
.ticket,.stat3,.note-box,.ai-card,.quote-card{border-color:rgba(33,30,28,.07);}
.list{border-top:1px dashed rgba(33,30,28,.16);}
.lrow{border-bottom:1px dashed rgba(33,30,28,.16);}
.kv{border-bottom:1px dashed rgba(33,30,28,.12);}
.consent-row,.act-row{border-bottom:1px dashed rgba(33,30,28,.12);}
.stat3{border:1px solid rgba(33,30,28,.07);}
.stat{border-right:1px dashed rgba(33,30,28,.1);}
.today-grid{background:rgba(33,30,28,.06);border-color:rgba(33,30,28,.07);}
.today-cell{background:var(--paper);}
.badge{border-color:rgba(33,30,28,.13);background:transparent;}
.chip{border-color:rgba(33,30,28,.1);}
.chips .chip{border-radius:0;}
.input,.textarea,.select{border-color:rgba(33,30,28,.12);background:var(--paper);}
.sect-head{margin-bottom:13px;}
.eyebrow{letter-spacing:.2em;color:rgba(199,70,52,.8);}
.shead__tx{gap:9px;}
.h1{letter-spacing:-.035em;line-height:1.3;}
.lead{color:rgba(33,30,28,.62);}
.mini-bar{height:3px;background:rgba(33,30,28,.07);}
.mini-bar i{border-radius:2px;}
.quick .qi{display:inline-flex;align-items:center;color:var(--brand);}
.quick .qi svg{width:20px;height:20px;}
.quick a{border-color:rgba(33,30,28,.07);background:var(--paper);}
.home-hi span{font-family:var(--sans);letter-spacing:-.01em;line-height:1.6;}
.stat__d{color:rgba(33,30,28,.4);letter-spacing:-.01em;}
.stat__v small{color:rgba(33,30,28,.35);}

/* 영수증 톱니 — 주요 요약 카드 */
.report-cover{background:var(--paper);}
.report-cover::after{background:repeating-linear-gradient(90deg,rgba(33,30,28,.18) 0 4px,transparent 4px 8px);left:0;right:0;bottom:-1px;}
body[data-screen="15"] .big-metric,
body[data-screen="15"] .metrics{border-bottom:1px dashed rgba(33,30,28,.14);}
body[data-screen="07"] .card > .h3 + *{margin-top:2px;}
.ticket::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:repeating-linear-gradient(90deg,rgba(199,70,52,.28) 0 5px,transparent 5px 10px);
}

/* ── 31.4 감정 캘린더 — 원형 배지 + 날짜 분리 ────────────── */
.cal-wrap{max-width:540px;}
.cal-grid{gap:8px 4px;}
.cal-cell{
  position:relative;aspect-ratio:auto;height:auto;min-width:0;
  background:transparent;border:0;border-radius:0;
  display:flex;flex-direction:column;align-items:center;gap:4px;
  padding:2px 0 3px;
}
.cal-cell.is-blank{background:transparent;}
.cal-cell .face{
  width:100%;max-width:40px;aspect-ratio:1;height:auto;
  border-radius:50%;display:grid;place-items:center;
  background:rgba(33,30,28,.05);
  border:1px solid transparent;
  color:rgba(33,30,28,.22);
  transition:transform .25s var(--ease),box-shadow .25s ease,background-color .25s ease;
}
.cal-cell.has .face{background:rgba(199,70,52,.075);border-color:rgba(199,70,52,.16);}
.cal-cell .face svg{width:62%;height:62%;}
.cal-cell .dn{
  position:static;font-family:var(--sans);font-size:11.5px;line-height:1.4;
  letter-spacing:-.01em;color:rgba(33,30,28,.65);
  padding:1px 6px;border-radius:99px;
}
.cal-cell:hover .face{transform:translateY(-2px);}
.cal-cell:hover .dn{color:var(--ink);}
.cal-cell.is-on{box-shadow:none;}
.cal-cell.is-on .face{box-shadow:0 0 0 2px var(--brand);background:#fff;}
.cal-cell.is-on .dn{background:var(--forest);color:#fff;font-weight:600;}
.cal-legend{margin-top:14px;}
.cal-panel{margin-top:20px;padding-top:16px;border-top:1px dashed rgba(33,30,28,.16);}

/* ── 31.5 정밀 감정 분석지 (22 · 23) ─────────────────────── */
.asheet{
  background:var(--paper);
  border:1px solid rgba(33,30,28,.08);
  padding:clamp(18px,2.4vw,26px) clamp(16px,2.4vw,28px) 0;
  position:relative;
}
.asheet::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(199,70,52,.045),transparent 22%);
}
.asheet__bar{
  display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;
  padding-bottom:11px;border-bottom:2px solid var(--ink);
}
.asheet__no{
  font-family:var(--display);font-size:12.5px;letter-spacing:.18em;
  color:var(--ink);
}
.asheet__range{font-size:10.5px;letter-spacing:.02em;color:var(--muted);}
.asheet__stamp{
  margin-left:auto;display:inline-flex;align-items:center;gap:6px;
  padding:3px 10px 4px;
  border:1px solid rgba(199,70,52,.5);
  box-shadow:0 0 0 2px #fff inset,0 0 0 3px rgba(199,70,52,.18) inset;
  font-family:var(--point);font-size:9.5px;letter-spacing:.1em;
  color:var(--brand);text-transform:uppercase;
  transform:rotate(-1.2deg);
}
.asheet__stamp b{font-weight:400;font-family:var(--sans);font-size:10px;letter-spacing:-.01em;}

.asheet__ai{
  display:flex;align-items:flex-start;gap:11px;
  padding:13px 0 12px;border-bottom:1px dashed rgba(33,30,28,.16);
}
.asheet__ai .kavatar{border-color:rgba(199,70,52,.2);}
.asheet__ai-tx{flex:1;min-width:0;}
.asheet__k{
  font-family:var(--point);font-size:9px;letter-spacing:.14em;
  color:rgba(199,70,52,.85);text-transform:lowercase;margin-bottom:3px;
}
.asheet__ai-tx p:last-child{font-size:12px;line-height:1.7;letter-spacing:-.01em;color:rgba(33,30,28,.78);}
.asheet__re{
  flex:none;padding:4px 8px;border:1px solid rgba(33,30,28,.12);
  font-size:9.5px;color:var(--muted);
}
.asheet__re:hover{border-color:var(--brand);color:var(--brand);}

.asheet__nums{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px dashed rgba(33,30,28,.16);}
.asheet__num{
  display:flex;flex-direction:column;gap:1px;
  padding:14px 16px 13px 0;
}
.asheet__num + .asheet__num{padding-left:18px;border-left:1px dashed rgba(33,30,28,.14);}
.asheet__num .k{font-size:10px;letter-spacing:-.01em;color:var(--muted);}
.asheet__num b{
  font-family:var(--display);font-weight:400;font-size:clamp(34px,4vw,44px);
  line-height:1.02;letter-spacing:.005em;color:var(--brand);
  font-variant-numeric:tabular-nums;
}
.asheet__num b small{font-size:.36em;color:rgba(33,30,28,.5);margin-left:2px;letter-spacing:0;}
.asheet__num em{font-size:9.5px;letter-spacing:-.01em;color:rgba(33,30,28,.45);font-style:normal;}

.asheet__flow{padding:13px 0 10px;border-bottom:1px dashed rgba(33,30,28,.16);}
.asheet__lbl{font-family:var(--point);font-size:9.5px;letter-spacing:.14em;color:rgba(33,30,28,.5);text-transform:lowercase;margin-bottom:10px;}
.flow7{
  display:grid;grid-template-columns:repeat(7,1fr);gap:8px;
  align-items:end;height:104px;
}
.flow7 li{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;height:100%;}
.fl__bar{display:block;width:100%;max-width:26px;border-radius:1px;opacity:.9;}
.fl__d{font-family:var(--display);font-size:10px;color:rgba(33,30,28,.55);}
.fl__s{font-size:8.5px;color:rgba(33,30,28,.38);letter-spacing:-.02em;}

.asheet__table{width:100%;border-collapse:collapse;margin:14px 0 0;}
.asheet__table th,.asheet__table td{
  text-align:left;padding:7px 8px 7px 0;
  border-bottom:1px dashed rgba(33,30,28,.14);
  font-weight:400;font-size:11px;color:rgba(33,30,28,.72);
}
.asheet__table thead th{
  font-family:var(--point);font-size:8.5px;letter-spacing:.14em;
  color:rgba(33,30,28,.42);text-transform:uppercase;
  border-bottom:1px solid rgba(33,30,28,.25);padding-bottom:6px;
}
.asheet__table tbody th{color:var(--ink);font-weight:500;width:30%;}
.asheet__val{font-family:var(--display);font-size:14px;color:var(--ink);letter-spacing:.02em;}
.asheet__diff{font-family:var(--display);font-size:12px;letter-spacing:.02em;}
.asheet__diff.is-up{color:#33553c;}
.asheet__diff.is-down{color:var(--brand);}
.asheet__tag{
  display:inline-block;padding:2px 7px 2.5px;
  font-size:9px;letter-spacing:.04em;white-space:nowrap;
  border:1px solid rgba(33,30,28,.14);color:var(--muted);
}
.asheet__tag.is-good{background:rgba(51,85,60,.08);border-color:rgba(51,85,60,.24);color:#33553c;}
.asheet__tag.is-ok{background:rgba(143,163,149,.14);border-color:rgba(143,163,149,.34);color:#4d6154;}
.asheet__tag.is-mid{background:rgba(199,70,52,.06);border-color:rgba(199,70,52,.22);color:var(--brand);}
.asheet__tag.is-warn{background:rgba(163,53,38,.08);border-color:rgba(163,53,38,.28);color:#a33526;}

.asheet__cells{display:grid;grid-template-columns:1fr 1fr;margin-top:14px;border-top:1px solid rgba(33,30,28,.08);}
.asheet__cell{
  display:flex;align-items:center;gap:9px;flex-wrap:wrap;
  padding:11px 12px 11px 0;border-bottom:1px dashed rgba(33,30,28,.12);
}
.asheet__cell:nth-child(2n){padding-left:14px;border-left:1px dashed rgba(33,30,28,.14);}
.asheet__cell .k{font-size:9.5px;color:var(--muted);width:100%;}
.asheet__cell b{font-family:var(--display);font-size:16px;font-weight:400;color:var(--ink);letter-spacing:.01em;}

.asheet__foot{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin-top:16px;padding:10px 0 14px;border-top:1px dashed rgba(33,30,28,.16);
  font-family:var(--point);font-size:8.5px;letter-spacing:.1em;color:rgba(33,30,28,.4);
}
.asheet__barcode{
  width:96px;height:20px;
  background:repeating-linear-gradient(90deg,
    rgba(33,30,28,.72) 0 1.5px,transparent 1.5px 4px,
    rgba(33,30,28,.72) 4px 5px,transparent 5px 8px,
    rgba(33,30,28,.72) 8px 11px,transparent 11px 13px);
}
body[data-screen="22"] .page > .asheet,
body[data-screen="23"] .page > .asheet{grid-column:1/-1;margin-bottom:2px;}

/* ── 31.6 반응형 ─────────────────────────────────────────── */
@media (max-width:899px){
  .app-head{padding:0 18px;gap:12px;}
  .app-head__nav{display:none;}
  .app-head .head-cta{margin-left:auto;padding:9px 15px 10px;font-size:11.5px;}
  .app-head .burger{display:block;margin-left:8px;}
  .app-foot{padding:22px 18px 0;margin-top:26px;}
  .app-foot .foot{grid-template-columns:1fr 1fr;gap:22px 18px;}
  .app-foot .foot__brand{grid-column:1/-1;}
  .app-foot .foot__end{flex-wrap:wrap;font-size:9.5px;letter-spacing:.06em;}
  .asheet{padding:16px 15px 0;}
  .asheet__num{padding:12px 10px 11px 0;}
  .asheet__num + .asheet__num{padding-left:12px;}
  .asheet__table thead th{font-size:8px;}
  .cal-cell .face{max-width:34px;}
  .cal-cell .dn{font-size:10.5px;padding:0 4px;}
}
@media (max-width:640px){
  .app-foot .foot{grid-template-columns:1fr;}
  .asheet__nums{grid-template-columns:1fr 1fr;}
  .asheet__cells{grid-template-columns:1fr 1fr;}
  .asheet__cell b{font-size:14px;}
}

/* ── 31.7 대화방 키링 전환 칩 ───────────────────────────── */
.k-switch{
  display:flex;align-items:center;gap:5px;flex-wrap:wrap;
  margin-top:10px;padding-top:9px;
  border-top:1px dashed rgba(33,30,28,.12);
}
.k-switch__chip{
  padding:4px 9px;border:1px solid rgba(33,30,28,.12);background:var(--paper);
  font-size:10.5px;letter-spacing:-.01em;color:var(--muted);
  transition:border-color .2s,color .2s,background-color .2s;
}
.k-switch__chip:hover{border-color:rgba(199,70,52,.4);color:var(--brand);}
.k-switch__chip.is-on{background:var(--brand);border-color:var(--brand);color:#fff;}
.k-switch__chip--more{margin-left:auto;border-style:dashed;font-family:var(--point);letter-spacing:.04em;}

/* 대화방 상단 마감 바 정렬 */
.chat-close{max-width:880px;margin:0 auto;}
@media (min-width:900px){
  .chat-close{padding:8px 32px 0;}
}
