/* Heat Plan. Direction C "Soft and friendly": tokens and components follow the approved concept. */
@font-face{font-family:Nunito;font-style:normal;font-weight:400 900;font-display:swap;src:url(../assets/fonts/Nunito-latin.woff2) format("woff2")}

*,*::before,*::after{box-sizing:border-box}
:root{
  --bg:oklch(0.972 0.016 315);--surf:#fff;--lilac:oklch(0.9 0.045 305);--lilac2:oklch(0.945 0.028 305);
  --pink:oklch(0.89 0.06 5);--ink:oklch(0.27 0.05 310);--mut:oklch(0.47 0.05 310);--acc:oklch(0.47 0.15 330);--line:oklch(0.9 0.02 310);
  --p1:oklch(0.92 0.045 355);--p2:oklch(0.8 0.09 350);--p3:var(--acc);
  --pg:var(--bg);--shadow:0 1px 2px oklch(0.4 0.05 310 / .08);
  --ease:cubic-bezier(.23,1,.32,1);
}
html{-webkit-text-size-adjust:100%;height:100%}
body{margin:0;height:100%;background:var(--pg);color:var(--ink);font:500 16px/1.5 Nunito,ui-rounded,ui-sans-serif,system-ui,-apple-system,sans-serif;-webkit-font-smoothing:antialiased}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer;-webkit-tap-highlight-color:transparent}
p,h1,h2,h3,h4,ul,ol,dl,dd,figure{margin:0}
ul,ol{padding:0;list-style:none}
a{color:inherit}
:focus-visible{outline:3px solid oklch(0.55 0.17 300);outline-offset:2px}
.ic{width:20px;height:20px;fill:currentColor;flex:none}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
[hidden]{display:none!important}

/* ---------- shell ---------- */
.app{max-width:430px;margin:0 auto;height:100dvh;display:flex;flex-direction:column;background:var(--bg);position:relative;overflow:hidden}
@media (min-width:520px){
  :root{--pg:oklch(0.925 0.03 315)}
  .app{box-shadow:0 0 0 1px var(--line),0 24px 64px oklch(0.3 0.06 310 / .14)}
}
.bar{height:56px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 10px 0 20px}
.id{display:flex;align-items:center;gap:10px;min-width:0}
.brand{display:inline-flex;align-items:center;height:22px;padding:0 7px;border-radius:6px;border:1px dashed currentColor;font-size:11px;font-weight:700;letter-spacing:.02em;color:var(--acc);white-space:nowrap}
.bar h1{font-size:20px;font-weight:800;letter-spacing:-0.01em}
.icbtn{width:44px;height:44px;flex:none;border:0;background:none;border-radius:50%;display:grid;place-items:center;color:var(--ink)}
.icbtn .ic{width:22px;height:22px}
.icbtn:hover{background:var(--lilac2)}
.icbtn:disabled{opacity:.35;cursor:default}
.icbtn:disabled:hover{background:none}
.main{flex:1;min-height:0;display:flex;flex-direction:column}
.scroll{flex:1;min-height:0;overflow-y:auto;padding:2px 16px 20px;overscroll-behavior:contain;display:flex;flex-direction:column}
.scroll>*{flex:none}
.dock{flex:none;padding:10px 16px 12px;background:var(--bg);box-shadow:0 -14px 14px -6px var(--bg)}
.tabs{flex:none;display:grid;grid-template-columns:repeat(3,1fr);padding:8px 12px calc(10px + env(safe-area-inset-bottom));background:var(--surf);box-shadow:0 -1px 0 var(--line)}
.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-decoration:none;font-size:12px;font-weight:800;color:var(--mut);border-radius:14px;min-height:52px}
.tab .ic{width:24px;height:24px}
.tab[aria-current=page]{color:var(--acc)}
.tab[aria-current=page] .ic{background:var(--lilac2);border-radius:999px;width:52px;padding:2px 14px;box-sizing:border-box}

/* ---------- shared pieces ---------- */
.card{background:var(--surf);border-radius:20px;padding:16px;box-shadow:var(--shadow)}
.q{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.q h2{font-size:18px;font-weight:800}
.word{font-size:15px;font-weight:800;color:var(--acc);text-align:right}
.lbl{font-size:15px;font-weight:800;margin:14px 0 8px}
.lbl-out{margin:16px 4px 8px}
.lbl.first{margin-top:4px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-height:44px;border-radius:999px;border:1.5px solid var(--line);background:var(--surf);padding:0 16px;font-size:15px;font-weight:800;color:var(--ink);transition:background .15s,border-color .15s}
.chip:hover{border-color:var(--lilac)}
.chip[aria-pressed=true]{background:var(--lilac);border-color:var(--lilac)}
.chips.ink .chip[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:#fff}
.primary{margin-top:16px;min-height:56px;border:0;border-radius:999px;background:var(--acc);color:#fff;font-size:17px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;transition:filter .15s,transform .1s}
.primary:hover{filter:brightness(1.08)}
.primary:active{transform:scale(.985)}
.primary.ink{background:var(--ink)}
.dock .primary{margin-top:0}
.ghost{flex:1;min-height:44px;border-radius:999px;border:0;background:var(--lilac2);font-size:15px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:8px;color:var(--ink);padding:0 14px}
.ghost:hover{background:var(--lilac)}
.ghost .ic{width:18px;height:18px}
.quiet,.link{background:none;border:0;min-height:44px;padding:0 12px;font-size:15px;font-weight:800;color:var(--acc);text-decoration:underline;text-underline-offset:3px;display:flex;align-items:center;justify-content:center;gap:8px;align-self:center}
.quiet.danger{color:var(--ink);margin-top:6px}
.link{font-size:14px;margin-top:2px}
.safe{display:flex;gap:8px;align-items:flex-start;margin-top:12px;font-size:13px;line-height:1.4;font-weight:800}
.dock .safe{margin-top:10px}
.safe .ic{width:18px;height:18px;color:var(--acc)}
.rec>.safe,.msg>.safe{margin-top:12px}
.help{display:flex;gap:6px;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:var(--mut);margin-top:8px;text-align:center}
.help.left{justify-content:flex-start;text-align:left;margin:0 0 10px}
.help .ic{width:15px;height:15px}
.help.warn{color:var(--ink)}
.note{font-size:13px;font-weight:700;color:var(--mut);margin:8px 4px 0}
.draft{font-size:12px;line-height:1.3;font-weight:700;color:var(--mut);margin-top:8px}

/* ---------- heat: idle ---------- */
.strip{display:flex;justify-content:space-between;padding:4px 2px 12px}
.sd{position:relative;width:44px;min-height:44px;border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0 7px;border-radius:999px;font-variant-numeric:tabular-nums}
.sd small{font-size:12px;color:var(--mut);font-weight:800}
.sd b{font-size:17px;font-weight:700}
.sd i{width:8px;height:8px;border-radius:50%;margin-top:3px;background:var(--lilac)}
.sd i.none{background:transparent;box-shadow:inset 0 0 0 1.5px var(--line)}
.sd i.p1{background:var(--p1)}.sd i.p2{background:var(--p2)}.sd i.p3{background:var(--p3)}
.sd.today{background:var(--surf);box-shadow:0 0 0 2px var(--acc)}
.sd.future b{color:var(--mut)}
.sd:disabled{cursor:default}
.nums{display:flex;flex-wrap:wrap;gap:8px 6px;margin-top:12px}
.num{width:46px;height:46px;flex:none;border-radius:15px;border:0;background:var(--lilac2);font-size:17px;font-weight:800;font-variant-numeric:tabular-nums;transition:background .15s,color .15s,transform .1s}
.num:hover{background:var(--lilac)}
.num:active{transform:scale(.94)}
.num[aria-pressed=true]{background:var(--acc);color:#fff}
.levels{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.lv{min-height:72px;border-radius:18px;border:1.5px solid transparent;background:var(--surf);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:15px;font-weight:800;box-shadow:var(--shadow)}
.lv:hover{border-color:var(--lilac)}
.fl{display:flex;color:var(--mut)}.fl .ic{width:16px;height:16px;margin:0 -1px}
.lv[aria-pressed=true]{background:var(--pink);border-color:oklch(0.8 0.08 5)}
.lv[aria-pressed=true] .fl{color:var(--acc)}

/* ---------- heat: running and finished ---------- */
.run{align-items:center;text-align:center}
.tags{display:flex;gap:8px;margin-top:6px;flex-wrap:wrap;justify-content:center}
.tag{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;background:var(--pink);font-size:13px;font-weight:800;color:var(--ink)}
.tag .ic{width:16px;height:16px;color:var(--acc)}
.tag-q{background:var(--lilac2)}
.num-big{font-size:96px;line-height:1;font-weight:800;color:var(--acc);letter-spacing:-0.02em;font-variant-numeric:tabular-nums;margin-top:22px}
.left{font-size:15px;font-weight:800;color:var(--mut);margin-top:6px}
.belt{width:260px;max-width:100%;height:26px;border-radius:999px;background:var(--lilac);margin-top:18px;padding:4px;box-shadow:inset 0 0 0 1.5px oklch(0.84 0.05 305)}
.belt span{display:block;height:100%;min-width:0;border-radius:999px;background:var(--acc);width:0;transition:width 1s linear}
.off{font-size:13px;font-weight:800;margin-top:10px;color:var(--ink)}
.off-note{color:var(--mut);max-width:30ch;margin-top:4px}
.stop{display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:16px;font-size:13px;font-weight:800}
.stopbtn{width:64px;height:64px;border-radius:50%;border:0;background:var(--ink);color:#fff;display:grid;place-items:center}
.stopbtn .ic{width:24px;height:24px}
.stopbtn:hover{filter:brightness(1.2)}
.notify{flex:none;width:auto;margin-top:12px;padding:0 18px}
.notify:disabled{opacity:1;color:var(--mut)}
.guide{text-align:left;margin-top:16px;width:100%;padding:14px 16px}
.guide h4{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:800}
.guide h4 .ic{color:var(--acc);width:18px;height:18px}
.guide li{font-size:14px;line-height:1.4;font-weight:600;padding:6px 0 0 16px;position:relative}
.guide li::before{content:"";position:absolute;left:3px;top:13px;width:5px;height:5px;border-radius:50%;background:var(--acc)}
.guide .link{align-self:flex-start;margin:4px 0 -8px -12px}
.done{justify-content:center;padding-bottom:40px}
.done-mark .ic{width:72px;height:72px;color:var(--acc)}
.done-title{font-size:26px;line-height:1.2;font-weight:800;margin-top:12px;text-wrap:balance}
.done-sub{font-size:15px;font-weight:700;color:var(--mut);margin-top:6px}
.done .primary{margin-top:24px}

/* ---------- record ---------- */
@media (max-width:370px){.stat{padding:12px;gap:8px}.stat b{font-size:34px}.pdf{font-size:14px}}
.stats{display:grid;grid-template-columns:1.25fr 1fr;gap:10px;margin-top:4px}
.stat{background:var(--surf);border-radius:20px;padding:14px 16px;display:flex;align-items:center;gap:10px;box-shadow:var(--shadow)}
.stat b{font-size:40px;line-height:1;font-weight:800}
.stat span{font-size:13px;line-height:1.3;font-weight:800;color:var(--mut)}
.stat-main{background:var(--pink)}
.stat-main b{color:var(--acc)}
.stat-main span{color:var(--ink)}
.cal{margin-top:10px;padding:10px 12px 14px}
.mh{display:flex;align-items:center;justify-content:space-between;font-size:17px;font-weight:800;margin:0 -6px 4px}
.cm-grid{display:grid;grid-template-columns:repeat(7,1fr);justify-items:center}
.wd{color:var(--mut);font-weight:800;font-size:13px;height:28px;display:grid;place-items:center}
.cm{position:relative;width:44px;height:44px;border:0;background:none;padding:0;display:grid;place-items:center;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}
.cm-in{width:38px;height:38px;border-radius:50%;display:grid;place-items:center}
.cm.out{color:var(--mut);font-weight:500}.cm.future{color:var(--mut)}
.cm:disabled{cursor:default}
.cm-in.p1{background:var(--p1)}.cm-in.p2{background:var(--p2)}.cm-in.p3{background:var(--p3);color:#fff}
.cm-in.today{box-shadow:0 0 0 2px var(--surf),0 0 0 4px var(--ink)}
.cm:not(:disabled):hover .cm-in:not([class*=" p"]){background:var(--lilac2)}
.miss,.lg-m{background:var(--ink)}
.miss{position:absolute;left:50%;bottom:0;width:5px;height:5px;margin-left:-2.5px;border-radius:50%}
.cm-drop{position:absolute;right:3px;top:2px;width:13px;height:13px;color:var(--acc)}
.legend{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;font-weight:700;color:var(--mut);margin-top:10px}
.legend span{display:inline-flex;align-items:center;gap:5px}
.lg{display:inline-block;width:10px;height:10px;border-radius:50%}
.lg.p1{background:var(--p1)}.lg.p2{background:var(--p2)}.lg.p3{background:var(--p3)}
.lg-m{display:inline-block;width:5px;height:5px;border-radius:50%}
.lg-d{width:12px;height:12px;color:var(--acc)}
.toggles{display:grid;gap:8px;margin-top:12px}
.chiptoggle{min-height:48px;border-radius:999px;border:1.5px solid var(--line);background:var(--surf);display:flex;align-items:center;gap:10px;padding:0 8px 0 16px;font-size:15px;font-weight:800;color:var(--ink);width:100%;text-align:left}
.chiptoggle>.ic{width:20px;height:20px;color:var(--mut)}
.ck{margin-left:auto;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--line);display:grid;place-items:center;flex:none}
.ck .ic{width:16px;height:16px;opacity:0;color:#fff}
.chiptoggle[aria-checked=true]{background:var(--lilac2);border-color:var(--lilac)}
.chiptoggle[aria-checked=true] .ck{background:var(--acc);border-color:var(--acc)}
.chiptoggle[aria-checked=true] .ck .ic{opacity:1}
.pdf{font-size:15px;gap:8px}
.data{margin-top:16px;padding:14px 16px 6px}
.data h3{font-size:16px;font-weight:800;margin-bottom:2px}
.pair{display:flex;gap:8px}
.data .help{margin-bottom:8px}

/* ---------- message ---------- */
.fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.field{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:800;min-width:0}
.field input{height:48px;border-radius:14px;border:1.5px solid var(--line);background:var(--surf);padding:0 14px;font-weight:600;font-size:16px;width:100%;min-width:0}
.field input::placeholder{color:var(--mut);opacity:1}
.mcard{margin-top:16px}
.text{font-size:16px;line-height:1.5;font-weight:600;min-height:110px;white-space:pre-wrap;outline:none;border-radius:8px}
.text:focus-visible{outline:3px solid oklch(0.55 0.17 300);outline-offset:4px}
.mact{display:flex;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}

.msg .chip{padding:0 12px;font-size:14px}
.more{margin-top:12px}
.more>summary{list-style:none;min-height:44px;display:flex;align-items:center;gap:10px;padding:0 4px;font-size:15px;font-weight:800;color:var(--acc);cursor:pointer;border-radius:12px}
.more>summary::-webkit-details-marker{display:none}
.more>summary .ic{width:18px;height:18px}
.more>summary .chev{margin-left:auto;transition:transform .2s var(--ease)}
.more[open]>summary .chev{transform:rotate(90deg)}
.more .fields{margin-top:6px}

/* ---------- sheets ---------- */
.sheet{margin:auto auto 0;width:100%;max-width:430px;max-height:90dvh;border:0;border-radius:24px 24px 0 0;padding:0;background:var(--bg);color:var(--ink);font:inherit;overflow:hidden}
.sheet[open]{display:flex;flex-direction:column;animation:up .26s var(--ease)}
.sheet::backdrop{background:oklch(0.27 0.05 310 / .5)}
@keyframes up{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
.sheet-grab{width:40px;height:4px;border-radius:2px;background:var(--line);margin:8px auto 0;flex:none}
.sheet-head{display:flex;align-items:center;justify-content:space-between;padding:4px 8px 0 20px;flex:none}
.sheet-head h2{font-size:20px;font-weight:800}
.sheet-body{overflow-y:auto;padding:8px 16px calc(16px + env(safe-area-inset-bottom));display:flex;flex-direction:column}
.sheet-body>*{flex:none}
.sheet-lead{font-size:15px;font-weight:700;margin:2px 4px 10px}
.sheet-actions{display:grid;gap:8px}
.sheet-actions .primary{margin-top:8px}
.sheet-actions .ghost{flex:none}
.guide-list{counter-reset:g;display:grid;gap:8px;margin:4px 0 4px}
.guide-list li{counter-increment:g;position:relative;background:var(--surf);border-radius:16px;padding:10px 14px 10px 46px;font-size:15px;line-height:1.4;font-weight:600;box-shadow:var(--shadow)}
.guide-list li::before{content:counter(g);position:absolute;left:12px;top:9px;width:24px;height:24px;border-radius:50%;background:var(--lilac2);color:var(--acc);font-size:13px;font-weight:800;display:grid;place-items:center}
.entries{display:grid;gap:8px;margin-bottom:12px}
.entry{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--surf);border-radius:16px;padding:6px 6px 6px 14px;box-shadow:var(--shadow)}
.entry div{display:flex;flex-direction:column;font-size:14px;font-weight:600;line-height:1.35}
.entry b{font-size:16px;font-weight:800}
.empty{font-size:15px;font-weight:700;color:var(--mut);margin:4px 4px 14px}
.sheet-body .chiptoggle{margin-top:8px}

/* ---------- summary: screen and print ---------- */
body.summary-mode .app{display:none}
#summary-root{max-width:760px;margin:0 auto;padding:0 16px 32px;min-height:100vh;background:var(--bg)}
.sum-bar{display:flex;align-items:center;gap:6px;height:56px;margin:0 -8px}
.sum-bar h1{font-size:20px;font-weight:800}
.sum-opts{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 14px}
.paper{background:#fff;color:#241a2c;border-radius:20px;padding:20px 18px;box-shadow:var(--shadow)}
.paper h2{font-size:24px;font-weight:800}
.sum-range{font-size:15px;font-weight:700;color:var(--mut);margin-top:2px}
.sum-facts{margin-top:14px;display:grid}
.srow{display:grid;grid-template-columns:minmax(0,9.5em) 1fr;gap:12px;padding:9px 0;border-top:1px solid var(--line);font-size:15px}
.srow dt{font-weight:800;color:var(--mut)}
.srow dd{font-weight:700}
.mm-row{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin-top:16px}
.mm{min-width:0}
.mm h4{font-size:14px;font-weight:800;margin-bottom:4px}
.mm-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;justify-items:center}
.mm-grid .wd{font-size:11px;height:18px}
.mm-c{position:relative;aspect-ratio:1;max-width:44px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.mm-c.off{color:var(--mut);font-weight:500}
.mm-c.p1{background:var(--p1)}.mm-c.p2{background:var(--p2)}.mm-c.p3{background:var(--p3);color:#fff}
.mm-c.mis::after{content:"";position:absolute;bottom:1px;left:50%;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:#241a2c}
.mm-drop{position:absolute;right:-3px;top:-3px;width:11px;height:11px;color:var(--acc)}
.mm-key{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;font-weight:700;color:var(--mut);margin-top:12px}
.mm-key span{display:inline-flex;align-items:center;gap:5px}
.paper h3{font-size:16px;font-weight:800;margin-top:18px}
.paper textarea{width:100%;margin-top:6px;border:1.5px solid var(--line);border-radius:14px;padding:10px 12px;font-size:16px;font-weight:600;background:#fff;resize:vertical;min-height:110px}
.notes-print{display:none}
.sum-foot{font-size:13px;font-weight:700;color:var(--mut);margin-top:16px;border-top:1px solid var(--line);padding-top:10px}
.sum-act{margin-top:4px}
@media (min-width:700px){.mm-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media print{
  @page{margin:14mm}
  html,body,#summary-root{background:#fff!important;height:auto}
  .noprint,.app,.sheet{display:none!important}
  #summary-root{padding:0;max-width:none;min-height:0}
  .paper{box-shadow:none;border-radius:0;padding:0}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .paper textarea{display:none}
  .notes-print{display:block;white-space:pre-wrap;font-size:13px;line-height:1.5;border:1px solid #ccc;border-radius:8px;padding:8px 10px;min-height:90px;margin-top:6px}
  .mm-row{grid-template-columns:repeat(3,minmax(0,1fr))}
  .srow{font-size:13px;padding:6px 0}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
}
