

:root {
  --ink:#26231d; --paper:#f3f1ec; --card:#fff;
  --deep:#8a4a12; --deep-dark:#26231d; --sun:#b4651f;
  --good:#1d6b45; --bad:#9c3522; --line:#dcd6c9; --muted:#6a6356;
}

* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }


[hidden] { display:none !important; }

html, body {
  margin:0; padding:0; background:var(--paper); color:var(--ink);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size:17px; line-height:1.45; min-height:100%;
}

.screen { display:none; }
.screen.on { display:block; }
.pad { padding:1rem 1rem calc(3rem + env(safe-area-inset-bottom)); max-width:40rem; margin:0 auto; }

h1 { font-size:1.6rem; margin:.2rem 0 .4rem; }
h2 { font-size:1.2rem; margin:0 0 .5rem; }
h3 { font-size:1.02rem; margin:1.2rem 0 .4rem; }
.lead { font-size:1.06rem; margin:0 0 1rem; }
.small { font-size:.9rem; }
.muted { color:var(--muted); }
.hint { color:var(--muted); font-size:.88rem; margin:.25rem 0 0; }

button { font:inherit; color:inherit; cursor:pointer; border-radius:10px;
         border:2px solid var(--line); background:#fff; min-height:44px; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline:4px solid var(--deep); outline-offset:2px;
}
button[disabled] { opacity:.55; cursor:default; }

.big { display:flex; align-items:center; gap:.7rem; width:100%; text-align:left;
       padding:.7rem .8rem; margin:0 0 .55rem; }
#btn-grown, #btn-next {
  background:var(--deep); color:#fff; border-color:var(--deep); font-weight:600;
  justify-content:center; display:block; width:100%; margin:.5rem 0;
}
.big .rn { flex:0 0 2rem; height:2rem; line-height:2rem; text-align:center; border-radius:50%;
           background:#e3e7f1; color:var(--deep); font-weight:700; }
.big .rt { display:block; }
.big .rt small { display:block; color:var(--muted); font-weight:400; }
.star { color:var(--sun); font-size:.85em; }
.plain, .link { background:none; border:none; color:var(--deep); font-weight:600; padding:.5rem 0; }

.bar { display:flex; justify-content:space-between; align-items:center;
       padding:.4rem 1rem; border-bottom:1px solid var(--line); }

ul.how { padding-left:1.1rem; }
ul.how li { margin:.5rem 0; }

.prompt { font-size:1.08rem; font-weight:600; margin:.4rem 0 .8rem; }
.tlabel { font-weight:600; margin:.8rem 0 .4rem; }
.note { background:#fff; border:2px solid var(--line); border-radius:10px; padding:.7rem;
        margin:.7rem 0; font-size:.96rem; }
.landing { background:#eaf0e8; border:2px solid #9fbf9f; border-radius:10px; padding:.8rem;
           margin:.8rem 0; font-weight:600; }

.choices { display:flex; flex-wrap:wrap; gap:.5rem; margin:.3rem 0 .8rem; }
.choice { flex:1 1 auto; min-width:6rem; padding:.6rem .7rem; font-weight:600; text-align:left; }
.choice.picked { background:var(--deep); color:#fff; border-color:var(--deep); }

.choice.picked::after { content:" \2713"; }
.choice.picked[disabled] { opacity:1; }


.said { background:#fff6e3; border:2px solid #e0c080; border-radius:10px; padding:.5rem .7rem;
        margin:.4rem 0 .8rem; font-weight:600; }

.verdict { min-height:1.5em; margin:.7rem 0 .3rem; font-size:1.06rem; font-weight:600; }
.verdict.good { color:var(--good); }
.verdict.bad { color:var(--bad); }
.verdict.soft { color:var(--muted); font-weight:500; }






.tray { display:flex; flex-wrap:wrap; gap:.4rem; margin:.5rem 0 .3rem; }
.part { font:inherit; font-size:.9rem; padding:.45rem .6rem; min-height:44px;
        border:2px solid var(--line); border-radius:9px; background:#fff; font-weight:600;
        display:flex; align-items:center; gap:.35rem; }

.part.picked { background:var(--deep); color:#fff; border-color:var(--deep-dark); border-width:3px; }
.part.picked::after { content:" \2713"; }
.part .ico { font-size:1.05rem; line-height:1; }


.weather { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; margin:.1rem 0 .4rem; }
.wxlabel { font-size:.85rem; color:var(--muted); font-weight:600; }
.wx { font:inherit; font-size:.9rem; font-weight:700; padding:.45rem .7rem; min-height:44px;
      border:2px solid var(--deep); border-radius:9px; background:#fdf6ee; color:var(--deep); }


.rooms { margin:.4rem 0 .5rem; }
.room { display:flex; align-items:baseline; gap:.45rem; background:#fff;
        border:2px solid var(--line); border-radius:9px; padding:.4rem .55rem;
        margin:0 0 .3rem; font-size:.92rem; }
.room .rmark { font-weight:800; font-size:1.05rem; line-height:1; color:var(--muted);
               flex:0 0 1rem; text-align:center; }
.room.done { border-color:#9fbf9f; background:#f2f7f1; }
.room.done .rmark { color:var(--good); }

.room.spooky { background:#f2eff4; }

.room.spooky.done { background:#eff4ee; }


.boardwrap { background:#fff; border:2px solid var(--line); border-radius:12px; padding:.3rem;
             margin:.5rem 0; }
#board { display:block; width:100%; height:auto; touch-action:manipulation; }


.dot { fill:var(--ink); }
.dot.live { fill:var(--deep); }


.slot { stroke:var(--line); stroke-width:3; stroke-linecap:round; }
.seg { stroke-linecap:round; }
.seg.wire { stroke:var(--ink); stroke-width:6; }
.seg.off { stroke:var(--muted); stroke-width:5; stroke-dasharray:7 6; }

.seg.blown { stroke:var(--bad); stroke-width:5; stroke-dasharray:3 7; }
.xmark { stroke:var(--bad); stroke-width:4; stroke-linecap:round; }

.lbl { font-size:11px; fill:var(--muted); text-anchor:middle; font-weight:600; }
.lbl.read { fill:var(--deep); font-size:13px; font-weight:800; }

.lbl.fan { font-size:18px; fill:var(--deep); font-weight:800; }


@keyframes fanspin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
.fanblades { fill:var(--deep); }
.fanblades.spinning { animation:fanspin 1s linear infinite; }

.fanhub { fill:var(--card); stroke:var(--ink); stroke-width:1.1; }


.fanarrow { display:none; }


@media (prefers-reduced-motion: reduce) {
  * { transition:none !important; animation:none !important; }
  .fanblades { display:none; }
  .fanarrow { display:inline; }
}
@media print {
  .fanblades { display:none; }
  .fanarrow { display:inline; }
}

.lbl.polar { font-size:14px; fill:var(--ink); font-weight:800; }


.probering { fill:none; stroke:var(--deep); stroke-width:2.5; }
.probeline { stroke:var(--deep); stroke-width:2; stroke-dasharray:5 4; fill:none; }

.leaderline { stroke:var(--deep); stroke-width:1; fill:none; opacity:.75; }
.lbl.probev { font-size:15px; fill:var(--deep); font-weight:800; }


.bulbglass { stroke:var(--ink); stroke-width:2.5; fill:#fff; }
.filament { stroke-width:2.5; stroke-linecap:round; }

.tray-hint { font-size:.85rem; color:var(--muted); }
.said { background:#fff6e3; border:2px solid #e0c080; border-radius:10px; padding:.5rem .7rem;
        margin:.4rem 0 .6rem; font-weight:600; }
.working { font-variant-numeric:tabular-nums; font-weight:700; color:var(--deep);
           min-height:1.4em; margin:.4rem 0; }
.landing { background:#efe9dd; border:2px solid #b7a98c; border-radius:10px; padding:.8rem;
           margin:.8rem 0; font-weight:600; }

.notice { position:fixed; left:.6rem; right:.6rem; bottom:calc(.6rem + env(safe-area-inset-bottom));
          background:var(--deep-dark); color:#fff; border-radius:10px; padding:.6rem .8rem;
          font-size:.95rem; z-index:40; pointer-events:none; }
.srcs { padding-left:1.1rem; }
.srcs li { margin:.4rem 0; }
.bang { background:#fff4e8; border:3px dashed var(--sun); border-radius:10px; padding:.7rem;
        margin:.6rem 0; font-weight:600; }


#btn-undo, #btn-clearboard { display:block; width:100%; text-align:left; }


.plabel { font-size:10px; fill:var(--muted); font-weight:700; }
