:root{--bg:#f5efe6;--ink:#222;--muted:#6b6258;--accent:#e0662a;--panel:#fffaf2;--line:#d9cfc2;--mark:#a63a0a;color:var(--ink);background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0}button{font:inherit;color:inherit;cursor:pointer}button,a,.board{touch-action:manipulation}button:disabled{opacity:.4;cursor:default}.home,.screen{max-width:480px;padding:max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));flex-direction:column;gap:10px;margin:0 auto;display:flex}.home{min-height:100dvh}.home-top{justify-content:space-between;align-items:center;display:flex}.streak{border:1px solid var(--line);background:var(--panel);min-width:44px;height:44px;color:var(--mark);border-radius:12px;align-items:center;gap:4px;padding:0 12px;font-size:18px;font-weight:700;display:inline-flex}.brand{text-align:center;margin:32px 0 auto}.brand h1{margin:0;font-family:Georgia,Times New Roman,serif;font-size:34px;line-height:1.1}.brand p{color:var(--muted);margin:8px 0 0;font-size:16px}.eyebrow{letter-spacing:.08em;text-transform:uppercase;color:var(--mark);font-size:11px;font-weight:700}.resume{border:2px solid var(--accent);background:var(--panel);color:var(--ink);border-radius:14px;grid-template-columns:1fr auto;gap:2px 8px;padding:12px 14px;text-decoration:none;display:grid}.resume .meta{color:var(--muted);text-align:right;font-size:13px}.resume b{grid-column:1/-1;font-size:17px}.resume .progress{grid-column:1/-1;align-items:center;gap:8px;font-size:13px;display:flex}.primary{background:var(--mark);color:#fff;text-align:center;border-radius:14px;min-height:52px;padding:14px 16px;font-size:18px;font-weight:700;text-decoration:none;display:block}.resume .progress .bar{flex:1}.bar{background:#f0d9c8;border-radius:3px;height:6px;display:block;overflow:hidden}.bar i{background:var(--mark);height:100%;display:block}.screen-head{align-items:center;gap:10px;display:flex}.screen-head .icon{color:var(--ink);justify-content:center;align-items:center;text-decoration:none;display:inline-flex}.screen-head .heading{flex-direction:column;flex:1;min-width:0;display:flex}.screen-head .eyebrow{color:var(--muted)}.screen-head h1{margin:0;font-family:Georgia,Times New Roman,serif;font-size:24px}.screen-head .count{color:#2f6b2b;white-space:nowrap;background:#dcebd6;border-radius:12px;padding:4px 10px;font-size:13px;font-weight:700}.tile{border:1px solid var(--line);background:var(--panel);min-height:44px;color:var(--ink);border-radius:14px;flex-direction:column;gap:4px;padding:14px;text-decoration:none;display:flex}.tile-title{font-family:Georgia,Times New Roman,serif;font-size:18px}.tile-meta{color:var(--muted);justify-content:space-between;font-size:13px;display:flex}.soon,.empty{text-align:center;color:var(--muted);font-size:14px}.filter{gap:8px;display:flex}.filter button{border:1px solid var(--line);background:var(--panel);border-radius:22px;min-height:44px;padding:0 14px}.filter button[aria-pressed=true]{color:#2f6b2b;background:#dcebd6;border-color:#2f6b2b;font-weight:700}.rows{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.row{border:1px solid var(--line);background:var(--panel);min-height:56px;color:var(--ink);border-radius:12px;align-items:center;gap:12px;padding:8px 12px;text-decoration:none;display:flex}.row .num{min-width:36px;color:var(--muted);text-align:center;font-variant-numeric:tabular-nums;background:#e9e1d5;border-radius:8px;padding:6px 0;font-weight:700}.row-text{flex-direction:column;min-width:0;display:flex}.row .status{letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-size:11px}.row.started .status{color:var(--mark)}.row.solved .status{color:#2f6b2b}.result .streak-line{margin:0;font-weight:700}.case{max-width:480px;padding:max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));flex-direction:column;gap:10px;margin:0 auto;display:flex}.top{align-items:center;gap:6px;display:flex}.top .title{text-align:center;flex-direction:column;flex:1;align-items:center;min-width:0;display:flex}.top .title b{white-space:nowrap;text-overflow:ellipsis;max-width:100%;font-size:14px;line-height:1.2;overflow:hidden}.top .sub{white-space:nowrap;align-items:center;gap:6px;max-width:100%;margin-top:2px;display:flex}.top .level{text-overflow:ellipsis;min-width:0;color:var(--muted);font-size:13px;overflow:hidden}.top .clock{color:#fff;font-variant-numeric:tabular-nums;background:#222;border-radius:12px;flex:none;padding:2px 10px;font-size:13px}.icon{border:1px solid var(--line);background:var(--panel);border-radius:12px;width:44px;height:44px;font-size:18px}.board{-webkit-user-select:none;user-select:none;border:3px solid #333;border-radius:4px;width:100%;height:auto;display:block}.board .cell{cursor:pointer}.board .wall{stroke:#333;stroke-width:3px;stroke-linecap:square;pointer-events:none}.board .obj{fill:#333;text-anchor:middle;pointer-events:none;font-size:9px}.board .notes{fill:#1a4fc4;pointer-events:none;font-size:11px;font-weight:700}.board .cross{stroke:#a81c1c;stroke-width:3.5px;stroke-linecap:round;fill:none;pointer-events:none}.board .cross.auto{stroke:#6f6f6f;stroke-width:1.5px}.board .mention{fill:none;stroke:var(--mark);stroke-width:1.5px;pointer-events:none}.board .token{fill:#fde7c7;stroke:#7a5a3a;stroke-width:1.5px}.board .token.victim{fill:#f4c7c7}.board .token.selected{stroke:var(--accent);stroke-width:3px}.board .token-text{text-anchor:middle;pointer-events:none;font-size:15px;font-weight:700}.board .token-text.long{font-size:11px}.board .tokens,.board .plate{pointer-events:none}.board .plate rect{fill:#ffffffd9}.board .plate text{text-anchor:middle;font-size:10px;font-weight:700}.board .plate.mentioned rect{fill:#fff;stroke:var(--mark);stroke-width:1.5px}.tools{grid-template-columns:repeat(4,1fr);gap:6px;display:grid}.tools button{border:1px solid var(--line);background:var(--panel);border-radius:12px;flex-direction:column;align-items:center;gap:2px;min-width:0;padding:8px 2px;font-size:11px;display:flex;position:relative}.tools button[aria-pressed=true]{color:#fff;background:#1d1a17}.tools .glyph{font-size:18px;line-height:1}.tools .badge{background:var(--accent);color:#fff;border-radius:10px;padding:1px 6px;font-size:11px;position:absolute;top:-6px;right:-4px}.tray{background:var(--panel);border:1px solid var(--line);border-radius:14px;justify-content:space-between;gap:6px;padding:8px;display:flex;overflow-x:auto}.tray button{background:0 0;border:none;flex-direction:column;flex:1 1 0;align-items:center;gap:3px;min-width:0;padding:0;display:flex}.tray .face{aspect-ratio:1;background:#fde7c7;border:3px solid #0000;border-radius:10px;justify-content:center;align-items:center;width:min(44px,100%);height:auto;font-size:17px;font-weight:700;display:flex;overflow:hidden}.tray .face.long{font-size:13px}.tray .victim .face{background:#f4c7c7}.tray .placed .face{opacity:.55}.tray button[aria-pressed=true] .face{border-color:var(--accent)}.tray .name{white-space:nowrap;text-overflow:ellipsis;max-width:100%;font-size:11px;overflow:hidden}.card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px 12px}.card p{margin:4px 0 0}.clues{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px 12px}.clues .card{background:0 0;border:none;border-radius:0;padding:0}.toggle-all{float:right;z-index:1;background:var(--panel);min-height:44px;color:var(--muted);border:none;border-radius:0 12px;margin:-10px -12px 0 8px;padding:0 12px;font-size:13px;text-decoration:underline;position:sticky;top:0}.clues .all-clues{clear:both;border:none;border-top:1px solid var(--line);background:0 0;border-radius:0;margin-top:8px;padding:4px 0 0}.action{justify-content:center;align-items:stretch;min-height:44px;display:flex}.action-hint{color:var(--muted);text-align:center;align-self:center;font-size:13px}.submit{background:var(--mark);color:#fff;border:none;border-radius:12px;flex:1;min-height:44px;padding:10px;font-size:16px;font-weight:700}.reopen{border:1px solid var(--line);background:var(--panel);border-radius:10px;flex:1;min-height:44px;padding:10px;font-weight:700}.all-clues{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:4px 12px;font-size:14px}.pause,.result,.fail{background:var(--panel);border:1px solid var(--line);border-radius:14px;flex-direction:column;gap:8px;padding:16px;display:flex}.pause button,.result button,.fail button{border:1px solid var(--line);background:#fff;border-radius:10px;min-height:44px;padding:10px}.pause .danger{color:#a81c1c;border-color:#a81c1c;font-weight:700}.pause:focus,.result:focus,.fail:focus{outline:none}.pause h2,.result h2,.fail h2{margin:0 0 4px}.pause{aspect-ratio:1;justify-content:center}.result{left:max(12px, env(safe-area-inset-left));right:max(12px, env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));max-width:456px;margin:0 auto;position:fixed;box-shadow:0 8px 30px #0003}.detector{margin:0;font-weight:700}.result .stats span{white-space:nowrap}.veil{padding:12px max(12px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));background:#0006;flex-direction:column;justify-content:flex-end;display:flex;position:fixed;inset:0}.fail{width:100%;max-width:456px;margin:0 auto;box-shadow:0 8px 30px #0003}.fail p{margin:0}@supports (container-type:size){.case{--clues-h:104px;height:100dvh;padding-bottom:max(12px, env(safe-area-inset-bottom))}.stage{flex:1000 1 0;justify-content:center;align-items:center;min-height:0;max-height:calc(min(480px,100vw) - 24px);display:flex;container-type:size}.stage>.board,.stage>.pause{flex:none;width:min(100cqw,100cqh);height:min(100cqw,100cqh)}.stage>.pause{aspect-ratio:auto;overflow-y:auto}.clues{flex:1 0 var(--clues-h);overscroll-behavior:contain;min-height:0;overflow-y:auto}.clues.open{flex:1000 1 0}}@media (width<=360px){.top{gap:4px}.top .icon{width:40px;height:40px}.top .sub{gap:4px}.top .level{font-size:12px}.top .clock{padding:2px 8px;font-size:12px}.tray{gap:4px}}@media (height<=760px){.case{--clues-h:88px;padding-top:max(6px, env(safe-area-inset-top));padding-bottom:max(8px, env(safe-area-inset-bottom));gap:6px}.tools button{padding:4px 2px}.tray{padding:6px}.tray .face{width:min(40px,100%)}.clues{padding:7px 10px;font-size:14px}.clues .toggle-all{margin:-7px -10px 0 6px}.pause{gap:6px;padding:12px}.pause h2{font-size:20px}}.toast{left:50%;bottom:calc(24px + env(safe-area-inset-bottom));color:#fff;background:#222;border-radius:10px;padding:8px 14px;font-size:14px;position:fixed;transform:translate(-50%)}.howto{overscroll-behavior:contain;z-index:10;background:var(--bg);position:fixed;inset:0;overflow-y:auto}.howto:focus{outline:none}.howto-body{max-width:480px;min-height:100%;padding:max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));flex-direction:column;gap:12px;margin:0 auto;display:flex}.howto-top{align-items:center;gap:8px;display:flex}.howto-head{flex-direction:column;flex:1;align-items:center;min-width:0;display:flex}.howto-head b{font-size:17px}.howto-count{color:var(--muted);font-variant-numeric:tabular-nums;font-size:13px}.howto .skip{min-height:44px;color:var(--mark);background:0 0;border:none;padding:0 8px;font-size:15px;font-weight:700}.howto h2{text-align:center;margin:4px 0 0;font-family:Georgia,Times New Roman,serif;font-size:26px;line-height:1.15}.howto-example{background:var(--panel);border:1px solid var(--line);border-radius:16px;flex-direction:column;gap:8px;padding:12px;display:flex}.howto-example .board{max-width:320px;margin:0 auto}.howto-card{min-height:64px;display:grid}.howto-card>*{grid-area:1/1}.howto-card .ghost{visibility:hidden;border:1px solid #0000;padding:10px 12px}.howto-card .ghost p{margin:4px 0 0}.howto-text{text-align:center;margin:0;font-size:16px;line-height:1.4}.howto .primary{width:100%;bottom:max(12px, env(safe-area-inset-bottom));box-shadow:0 -8px 16px var(--bg);border:none;margin-top:auto;position:sticky}.howto-main{flex-direction:column;gap:12px;display:flex}@supports (container-type:size){.howto{overflow:hidden}.howto-body{height:100%;min-height:0}.howto-main{overscroll-behavior:contain;flex:1 1 0;min-height:0;overflow-y:auto}.howto-main>*{flex-shrink:0}.howto .primary{box-shadow:none;flex:none;margin-top:0;position:static}.howto-main>.has-board{flex:1 0 auto}.howto-board{flex:1 1 0;justify-content:center;align-items:center;min-height:180px;display:flex;container-type:size}.howto-board>.board{flex:none;width:min(100cqw,100cqh,320px);height:min(100cqw,100cqh,320px);margin:0}}@media (height<=760px){.howto-body,.howto-main{gap:8px}.howto h2{margin-top:0;font-size:21px}.howto-example{gap:6px;padding:8px}.howto-text{font-size:15px;line-height:1.35}.howto .primary{min-height:48px;padding:12px 16px}}@media (height<=640px){.howto-body{padding-top:max(8px, env(safe-area-inset-top));padding-bottom:max(10px, env(safe-area-inset-bottom));gap:6px}.howto-main{gap:6px}.howto h2{font-size:20px;line-height:1.1}.howto-example{gap:4px;padding:6px}.howto-example .tray{padding:4px 6px}.howto-example .tray .name{font-size:10px}.howto-card{min-height:0;font-size:14px}.howto-card .card,.howto-card .ghost{padding:6px 10px}.howto-card .card p,.howto-card .ghost p{margin-top:2px}.howto-text{font-size:14px;line-height:1.3}.howto .primary{min-height:44px;padding:10px 16px}}@supports (container-type:size){@media (height<=640px){.howto-board{min-height:150px}}}.beside{border:3px solid #333;border-radius:4px;width:180px;max-width:60%;margin:8px auto;display:block}.beside .spot{fill:#efe6da;stroke:var(--line);stroke-width:1px}.beside .spot.yes{fill:#cfe8d3}.beside .spot.no{fill:#f1d6d0}.beside .spot-frame{fill:none;stroke:#2f6b2b;stroke-width:1px}.beside .spot-mark{text-anchor:middle;fill:#222;font-size:24px;font-weight:700}.beside .spot-obj{text-anchor:middle;fill:#222;font-size:11px;font-weight:700}.objects h3{margin:0 0 6px;font-size:14px}.objects .can h3:before{content:"● ";color:#2f6b2b}.objects .cannot h3:before{content:"● ";color:#a81c1c}.objects ul{flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none;display:flex}.objects li{border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px 10px;font-size:14px}.howto-tools{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.howto-tools li{border:1px solid var(--line);background:var(--panel);border-radius:14px;align-items:center;gap:12px;padding:10px 12px;display:flex}.howto-tools .glyph{border:1px solid var(--line);border-radius:12px;flex:none;justify-content:center;align-items:center;width:40px;height:40px;font-size:18px;display:flex}.howto-tools .tool-text{margin-top:2px;font-size:14px;display:block}.under{display:contents}.tray,.clues,.stage>.pause,.howto,.howto-main{scrollbar-width:none}.tray::-webkit-scrollbar{display:none}.clues::-webkit-scrollbar{display:none}.stage>.pause::-webkit-scrollbar{display:none}.howto::-webkit-scrollbar{display:none}.howto-main::-webkit-scrollbar{display:none}
