:root{--bg:#16181b;--surface:#202328;--surface-2:#2a2e34;--line:#3a3f47;--text:#e9e7e2;--muted:#9a9890;--healthy-bg:#d9d6cf;--healthy-text:#1d1f22;--infected:#d8423a;--infected-bg:#4a1c1a;--slime:#8bd13d;--slime-bg:#26361b;--slime-sub:#c4e69b;--slime-glow:#8bd13d73;--range-a:#f2c14e;--range-b:#5fb4e8;--focus:#fff;--accent-text:#f2c14e;--error-text:#ff8a80;--bad-text:#ffb3ad;--good-bg:#2c3a2f;--good-text:#9fd3a8;--info-bg:#3b3420;--info-text:#f6dd9b;--healthy-sub:#4a4c50;--infected-sub:#e9b8b4;--shadow:0 -6px 18px #0006;--panel-height:214px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}:root[data-theme=light]{--bg:#f3f1ec;--surface:#fff;--surface-2:#e9e6df;--line:#cfcac0;--text:#1d1f22;--muted:#6a675f;--healthy-bg:#d6d2c8;--healthy-text:#1d1f22;--infected:#c7362e;--infected-bg:#f7d9d6;--slime:#5f9e1f;--slime-bg:#e3f1cf;--slime-sub:#3f6a13;--slime-glow:#5f9e1f66;--range-a:#e0a400;--range-b:#2b8fd0;--focus:#000;--accent-text:#8a6100;--error-text:#b3261e;--bad-text:#a1231b;--good-bg:#dcefdf;--good-text:#1f6b33;--info-bg:#f7edc9;--info-text:#6b5310;--healthy-sub:#55575c;--infected-sub:#8a2a24;--shadow:0 -6px 18px #0000001f;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}*{box-sizing:border-box}html,body{background:var(--bg);color:var(--text);margin:0;font-family:system-ui,Microsoft JhengHei,PingFang TC,Noto Sans TC,sans-serif;font-size:15px;line-height:1.45}button{font:inherit;color:inherit;background:var(--surface-2);border:1px solid var(--line);cursor:pointer;border-radius:8px;min-height:40px;padding:8px 12px}button:hover:not(:disabled){border-color:var(--muted)}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--focus);outline-offset:2px}button.ghost{background:0 0}button.primary{background:var(--text);color:var(--bg);border-color:var(--text);font-weight:600}.muted{color:var(--muted)}.small{font-size:13px}.error{color:var(--error-text)}.app{max-width:1100px;padding:8px 12px calc(var(--panel-height) + 24px);margin:0 auto}.top-row{align-items:center;gap:10px;display:flex}.top-row h1{letter-spacing:.1em;margin:0;font-size:18px}.code{color:var(--muted);font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;overflow:hidden}.menu{background:var(--surface);border:1px solid var(--line);border-radius:10px;gap:10px;margin-top:8px;padding:10px;display:grid}.chapters{grid-template-columns:repeat(4,1fr);gap:6px;display:grid}.chapters .chip{border-radius:10px;flex-direction:column;align-items:center;padding:6px 4px;display:flex}.chapters small{color:var(--muted);font-size:11px}.menu-actions{grid-template-columns:1fr 1fr;gap:6px;display:grid}.seed-form{flex-wrap:wrap;align-items:flex-end;gap:6px;display:flex}.seed-form label{color:var(--muted);flex:1;gap:2px;font-size:13px;display:grid}.seed-form input{font:inherit;color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:8px;min-width:0;min-height:40px;padding:8px 10px}.seed-form .error{flex-basis:100%;margin:0;font-size:13px}.chip{border-radius:999px;min-height:34px;padding:4px 12px;font-size:13px}.chip.on{background:var(--text);color:var(--bg);border-color:var(--text)}.chapters .chip.on small{color:var(--surface-2)}.rules{color:var(--muted);margin-top:6px;font-size:13px}.rules summary{cursor:pointer;padding:4px 0}.rules ul{margin:4px 0 0;padding-left:20px}.new-roles{color:var(--accent-text)}.roles-title{color:var(--text);margin:8px 0 0}.role-list{list-style:none;padding-left:0!important}.role-list b{color:var(--text)}.new-tag{background:var(--range-a);color:#1d1f22;border-radius:4px;margin-left:4px;padding:0 4px;font-size:11px;font-style:normal}.status-box{color:var(--muted);text-align:center;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;margin:40px auto;display:flex}.status-box.error{color:var(--error-text)}.spinner{border:2px solid var(--line);border-top-color:var(--text);border-radius:50%;width:18px;height:18px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.stats{color:var(--muted);flex-wrap:wrap;align-items:center;gap:4px 10px;margin:8px 0;font-size:13px;display:flex}.stats b{color:var(--text);font-variant-numeric:tabular-nums;font-size:15px}.stats .bad b{color:var(--infected)}.hint-button{min-height:34px;margin-left:auto;padding:4px 14px}.daily-tag{color:var(--accent-text);font-size:11px;display:block}.board{grid-template-columns:repeat(4,1fr);gap:6px;display:grid}.cell{border:1px solid var(--line);background:var(--surface);text-align:center;border-radius:10px;flex-direction:column;justify-content:flex-end;align-items:center;gap:1px;min-height:92px;padding:18px 2px 6px;display:flex;position:relative;overflow:hidden}.cell-coord{color:var(--muted);font-size:11px;position:absolute;top:3px;left:6px}.cell-badges{gap:2px;display:flex;position:absolute;top:3px;right:4px}.cell-badge{border-radius:4px;padding:2px 4px;font-size:11px;line-height:1}.cell-badge.mark{border:1px dashed var(--muted);color:var(--text)}.cell-badge.hint{background:var(--range-a);color:#1d1f22}.cell-coord .cell-badge{margin-left:3px;padding:1px 3px;font-size:10px}.cell.revealed .cell-badge.fever{color:#1d1f22;background:#f08a24}.cell.revealed .cell-badge.no-fever{color:inherit;background:0 0;border:1px solid #8a877f}.cell-icon{font-size:24px;line-height:1.1}.cell-name{white-space:nowrap;font-size:14px;font-weight:600}.cell-says{color:var(--muted);word-break:keep-all;min-height:1.4em;font-size:12px;line-height:1.2}.cell-day{vertical-align:1px;border:1px solid;border-radius:3px;margin-right:3px;padding:0 3px;font-size:10px;line-height:1.3;display:inline-block}.log-day{color:var(--muted)}.cell.revealed.healthy{background:var(--healthy-bg);color:var(--healthy-text);border-color:var(--healthy-bg)}.cell.revealed.healthy .cell-coord,.cell.revealed.healthy .cell-says{color:var(--healthy-sub)}.cell.revealed.healthy .cell-badge{color:var(--healthy-text);background:#b9b5ac}.cell.revealed.infected{background:var(--slime-bg);border:2px solid var(--slime);box-shadow:0 0 8px var(--slime-glow);padding:17px 1px 5px}.cell.revealed.infected .cell-badge{background:var(--infected);color:#fff}.cell.revealed.infected .cell-says{color:var(--slime-sub)}.cell.revealed.infected .cell-badge.immune{color:#1d1f22;background:#8fc1e3}.cell.hidden.maybe-healthy,.cell.hidden.maybe-infected{border-style:dashed;border-color:var(--muted)}.cell.in-a{box-shadow:inset 0 0 0 3px var(--range-a)}.cell.in-b{box-shadow:inset 0 0 0 3px var(--range-b)}.cell.in-a.in-b{box-shadow:inset 0 0 0 3px var(--range-a), inset 0 0 0 6px var(--range-b)}.cell.hinted{animation:1.2s ease-in-out infinite pulse}@keyframes pulse{50%{box-shadow:0 0 0 3px var(--range-a)}}.cell.selected{outline:3px solid var(--focus);outline-offset:1px}.panel{z-index:10;height:var(--panel-height);padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line);box-shadow:var(--shadow);position:fixed;bottom:0;left:0;right:0;overflow-y:auto}.panel.finished{height:auto;min-height:50dvh;max-height:85dvh}.panel.idle{height:auto;max-height:var(--panel-height)}.panel h2{margin:0 0 6px;font-size:17px}.panel h2 small{color:var(--muted);margin-left:8px;font-size:13px;font-weight:400}.panel p{margin:0 0 4px}.message{border-radius:6px;padding:4px 8px;font-size:13px;margin-bottom:6px!important}.message.good{background:var(--good-bg)}.message.bad{background:var(--infected-bg);color:var(--bad-text)}.message.info{background:var(--info-bg);color:var(--info-text)}.judge{grid-template-columns:1fr 1fr;gap:8px;display:grid}.judge button{min-height:44px;font-weight:600}.judge .healthy{background:var(--healthy-bg);color:var(--healthy-text);border-color:var(--healthy-bg)}.judge .infected{background:var(--infected);color:#fff;border-color:var(--infected)}.notes{flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px;display:flex}.tools{align-items:center;gap:8px;margin-top:8px;display:flex}.chip.tool{border-color:var(--range-b);flex-shrink:0}.chip.tool:disabled{border-color:var(--line);opacity:.5}.verdict{border-radius:4px;padding:1px 8px;font-size:13px;font-weight:600;display:inline-block}.verdict.healthy{background:var(--healthy-bg);color:var(--healthy-text)}.verdict.infected{background:var(--infected);color:#fff}.quote{font-size:16px}.solved{text-align:center}.solved h2{font-size:20px}.stars{letter-spacing:.15em;color:var(--accent-text);font-size:26px}.lost h2{color:var(--bad-text)}.end-actions{justify-content:center;gap:8px;margin-top:6px;display:flex}.log{margin-top:16px}.log h3{margin:0;font-size:15px}.log ol{gap:4px;margin:6px 0 0;padding:0;list-style:none;display:grid}.log li{gap:4px;display:flex}.log li button{text-align:left;background:var(--surface);width:100%;min-height:36px;padding:6px 10px;font-size:14px}.log li button.on{border-color:var(--range-a)}.log b{margin-left:4px}.dot{vertical-align:middle;border-radius:50%;width:9px;height:9px;display:inline-block}.dot.healthy{background:var(--healthy-bg)}.dot.infected{background:var(--infected)}@media (width>=900px){.app{padding-bottom:24px}.play{grid-template-columns:minmax(0,480px) minmax(0,1fr);align-items:start;gap:24px;display:grid}.cell{min-height:104px}.panel,.panel.finished{height:auto;max-height:none;min-height:var(--panel-height);border:1px solid var(--line);box-shadow:none;border-radius:10px;margin-top:8px;position:static}}.feedback-link{color:inherit;opacity:.8;text-align:center;margin-top:10px;font-size:.85rem;display:block}.modal-backdrop{z-index:50;background:#0009;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.modal{background:var(--surface);border:1px solid var(--line);border-radius:12px;flex-direction:column;width:100%;max-width:480px;max-height:calc(100dvh - 32px);padding:14px 16px;display:flex}.modal h2{margin:0 0 8px;font-size:1.15rem}.modal-body{overscroll-behavior:contain;flex:auto;min-height:0;overflow-y:auto}.modal-body h3{color:var(--accent-text);margin:12px 0 4px;font-size:.95rem}.modal-body h3:first-child{margin-top:0}.modal-body ul{margin:0;padding-left:1.2em}.modal-body li{margin:2px 0}.modal-close{width:100%;margin-top:10px}.log li button.used-toggle{width:auto;color:var(--muted);flex:none;padding:4px 8px;font-size:12px}.log li button.used-toggle.on{color:var(--text);background:var(--surface-2)}.log li.used button:not(.used-toggle),.cell-says.used{opacity:.4}.outcome-grid{letter-spacing:2px;margin:8px auto 4px;font-family:inherit;font-size:16px;line-height:1.15}.share{display:contents}.end-actions{flex-wrap:wrap}.share p,.share textarea{flex-basis:100%;order:1;margin:0}.share .good{color:var(--good-text)}.share textarea{width:100%;font:inherit;color:var(--text);background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:8px;font-size:13px}.menu-section{border-bottom:1px solid var(--line);gap:6px;padding-bottom:10px;display:grid}.menu-section h2{margin:0;font-size:14px}.menu-section p{margin:0}button.wide{width:100%}.level-grid{grid-template-columns:repeat(8,1fr);gap:4px;display:grid}.level-chip{border-radius:8px;min-height:30px;padding:2px 0}.chip.cleared:not(.on){border-color:var(--muted);color:var(--muted)}.day-grid{flex-wrap:wrap;gap:4px;display:flex}.chapters .chip:disabled{opacity:.45}.storage-warning{background:var(--infected-bg);color:var(--bad-text);border-radius:6px;margin:6px 0 0;padding:6px 8px;font-size:13px}.story-text{white-space:pre-line;margin:0;font-size:15px;line-height:1.7}.chapter-title{letter-spacing:.15em;color:var(--accent-text);margin:0 0 8px;font-size:13px}.log-entry{border-top:1px solid var(--line);padding-top:10px}.log-entry h3{margin:0 0 6px;font-size:15px}.log-entry .story-text+.story-text{color:var(--muted);margin-top:6px}.story-text.outro{border-top:1px solid var(--line);text-align:left;margin-top:10px;padding-top:8px}.reward{color:var(--accent-text);font-size:13px}.character{border-top:1px solid var(--line);margin-top:12px;padding-top:10px}.character h3{color:var(--text);align-items:center;gap:8px;margin:0 0 4px;font-size:16px;display:flex}.character h3 small{color:var(--muted);font-size:12px;font-weight:400}.character.locked h3{color:var(--muted)}.portrait{background:var(--surface-2);border:1px solid var(--line);border-radius:50%;place-items:center;width:36px;height:36px;font-size:20px;display:inline-grid}.story-days{gap:6px;margin:6px 0 0;padding-left:0;list-style:none;display:grid}.story-days li b{color:var(--accent-text);font-size:12px}.story-days li p{margin:2px 0 0;font-size:14px}.story-days li.locked b{color:var(--muted)}.music-toggle,.theme-toggle{min-width:40px;padding:4px 8px;font-size:16px}.cell.hint-reason{outline:2px dashed var(--range-a);outline-offset:-5px}.log li.hint-reason button:not(.used-toggle){border:2px dashed var(--range-a)}.tutorial{background:var(--info-bg);color:var(--info-text);border-radius:8px;align-items:flex-start;gap:8px;margin-bottom:8px;padding:8px 10px;font-size:14px;display:flex}.tutorial p{flex:1;margin:0}.tutorial button{white-space:nowrap;flex:none}.backup-field{color:var(--muted);gap:4px;margin:10px 0 6px;font-size:13px;display:grid}.backup-field textarea{color:var(--text);background:var(--bg);border:1px solid var(--line);word-break:break-all;resize:vertical;border-radius:8px;padding:8px 10px;font:12px/1.4 ui-monospace,monospace}.backup-note{margin:8px 0 0;font-size:13px}.backup-note.ok{color:var(--good-text,inherit)}.backup-note.error{color:var(--bad-text)}.finished-time{font-size:18px;font-weight:700}.difficulty-row{align-items:center;gap:6px;margin-top:8px;display:flex}.difficulty-tag{background:var(--good-bg);color:var(--good-text);border-radius:999px;margin-left:6px;padding:1px 6px;font-size:12px}.difficulty-choice{text-align:left;gap:4px;width:100%;margin-bottom:10px;padding:12px 14px;display:grid}.difficulty-choice b{font-size:17px}.difficulty-choice span{color:var(--muted);font-size:14px}.music-toggle[aria-pressed=false]{opacity:.55;text-decoration:line-through}.music-toggle.error{color:var(--bad-text)}.music-volume label{gap:4px;display:grid}.music-volume input[type=range]{width:100%;min-height:32px;accent-color:var(--accent-text)}.rule-headline{color:var(--accent-text);margin:0 0 8px;font-size:17px;font-weight:700}.modal-body h3{margin:12px 0 4px;font-size:14px}.rule-changes{margin:0;padding-left:20px}.rule-changes li{margin-bottom:6px}.rule-example{background:var(--info-bg);color:var(--info-text);border-radius:8px;margin:8px 0;padding:8px 10px;font-size:14px}.rule-role{border:1px solid var(--line);border-radius:8px;margin-bottom:8px;padding:8px 10px}.rule-role p{margin:0 0 2px}.rule-card-button{margin:4px 0}.rules.fresh{border-left:3px solid var(--range-a);background:var(--info-bg);border-radius:6px;padding:4px 8px}.rules.fresh summary{color:var(--info-text)}.cell-new{background:var(--range-a);color:#1d1f22;border-radius:4px;padding:0 4px;font-size:10px;font-weight:700;line-height:1.5;position:absolute;top:3px;left:26px}.title-line{color:var(--accent-text);margin:0 0 8px;font-size:13px}.title-list{margin:8px 0;padding:0;list-style:none}.title-list li{border-bottom:1px solid var(--line);color:var(--muted);justify-content:space-between;align-items:baseline;gap:8px;padding:8px 4px;display:flex}.title-list li.got{color:var(--text)}.title-list li.got b{color:var(--accent-text)}.title-list small{white-space:nowrap}
