@font-face{font-family:Inter;src:url('/assets/InterVariable.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
:root{color-scheme:light;font-family:Inter,'Malgun Gothic',system-ui,sans-serif;color:#1d1d1f;background:#f5f5f7;font-synthesis:none;--ink:#1d1d1f;--muted:#5f6066;--blue:#0066cc;--line:#dedee3;--red:#ba392e}
*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer}button:disabled{cursor:default}button:focus-visible{outline:3px solid var(--blue);outline-offset:3px}h1,h2,p{margin:0}output,strong,b,dd{font-variant-numeric:tabular-nums}
.topbar{height:64px;max-width:1360px;padding:0 32px;margin:auto;display:flex;align-items:center;justify-content:space-between;font-size:13px;color:var(--muted)}.brand{font-size:15px;letter-spacing:-.03em;font-weight:600;color:var(--ink)}.brand-divider{color:#8a8a93;padding:0 10px;font-weight:400}.header-tools{display:flex;gap:8px}.header-tools button{min-height:44px;padding:8px 14px;border:1px solid #c7c7ce;border-radius:999px;background:transparent;color:var(--muted);font:inherit;font-size:12px}.header-tools button:hover{background:#fff}
main{max-width:1360px;margin:20px auto 48px;padding:0 32px}.heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:24px}.game-title{display:flex;align-items:center;gap:16px}.game-mark{width:64px;height:64px;flex:none}h1{font-size:32px;font-weight:700;line-height:1.2;letter-spacing:-.055em}.heading p{font-size:14px;line-height:1.6;color:var(--muted);margin-top:7px}.stage{display:grid;grid-template-columns:auto auto;align-items:baseline;gap:2px 8px;font-size:13px;color:var(--muted)}.stage strong{font-size:32px;color:var(--ink);line-height:1.1}.stage>span{grid-column:1/-1;text-align:right;font-size:13px;font-variant-numeric:tabular-nums}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:28px;align-items:start}.play{min-width:0;background:#fff;padding:24px;border-radius:24px}
.playbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start;padding-bottom:16px}.playbar>div{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.playbar span{font-size:13px;color:var(--muted)}.playbar output{font-size:36px;line-height:1.1;font-weight:600;letter-spacing:-.045em}.playbar .score-stat{align-items:center}.playbar .selection{align-items:flex-end}.playbar .selection output{color:var(--blue)}.playbar #time.urgent{color:#b4232f}
.board-caption{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;line-height:1.7;color:var(--muted);margin-bottom:12px}.board-caption>span{white-space:nowrap;color:var(--ink);font-weight:500}.map-shell{position:relative;min-width:0;display:flex;flex-direction:column}.map-viewport{overflow:auto;max-height:560px;background:transparent;border-radius:16px;overscroll-behavior:contain;scrollbar-gutter:stable}.board-wrap{position:relative;width:calc(var(--cols)*var(--cell) + 16px);height:calc(var(--rows)*var(--cell) + 16px);background:#eeeef1;border-radius:16px;padding:8px;overflow:visible;margin-inline:auto}#board{position:relative;display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));height:100%;touch-action:none;user-select:none;-webkit-user-select:none}#board button{appearance:none;position:relative;border:0;background:transparent;padding:3px;min-width:0;min-height:0;touch-action:none;color:var(--ink)}#board button>span{display:block;position:relative;z-index:2;width:100%;height:100%;background:transparent}#board button:focus-visible{outline:2px solid #0066cc;outline-offset:-2px;border-radius:8px}#board[aria-disabled=true] button{cursor:default}#board[aria-disabled=false] button:hover:not(.empty) .paper{stroke:#85251f;stroke-width:2}#board[data-invalid=true] button.selected .paper{stroke:#6f1c1a;stroke-width:3}.route{position:absolute;inset:8px;width:calc(100% - 16px);height:calc(100% - 16px);pointer-events:none;z-index:1;overflow:visible}.route polyline{fill:none;stroke:#0066cc;stroke-width:8;stroke-linecap:round;stroke-linejoin:round}.route[data-invalid=true] polyline{stroke:#b4232f}
.board-message{order:-1;margin-bottom:14px}.board-message[hidden],.stage-clear[hidden]{display:none}.board-dialog{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;background:#f5f5f7;border-radius:12px}.board-dialog strong{display:block;font-size:17px;letter-spacing:-.035em;line-height:1.5}.board-dialog span{display:block;margin-top:4px;font-size:13px;line-height:1.8;color:var(--muted)}.board-message button{flex:none;min-height:46px;padding:10px 24px;border:0;border-radius:999px;background:#0071e3;color:#fff;font-size:14px}.board-message button:hover{background:#0066cc}.board-message button[hidden]{display:none}#game[data-phase=ended] .board-message{position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;padding:20px;background:#ffffffb8;margin:0}#game[data-phase=ended] .board-dialog{flex-direction:column;background:#fff;border:1px solid #c7c7ce;padding:30px;text-align:center}#game[data-phase=ended] .board-dialog strong{font-size:36px}
.board-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:14px}.stage-progress{flex:1;max-width:240px;min-width:80px}.stage-progress label{display:block;font-size:11px;color:var(--muted);margin-bottom:7px}.stage-progress progress{display:block;width:100%;height:4px;appearance:none;border:0;border-radius:9px;overflow:hidden;background:#ececf0}.stage-progress progress::-webkit-progress-bar{background:#ececf0}.stage-progress progress::-webkit-progress-value{background:var(--red);border-radius:9px}.stage-progress progress::-moz-progress-bar{background:var(--red)}.map-tools{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.map-tools button{min-height:44px;min-width:44px;padding:8px 10px;border:0;border-radius:8px;color:var(--muted);background:transparent;font-size:12px}.map-tools button:hover{background:#f5f5f7}.map-tools button[aria-pressed=true]{background:#eaf3ff;color:#0066cc}.map-tools button:disabled{color:#8a8a93}.map-tools output{min-width:34px;text-align:center;font-size:11px;font-variant-numeric:tabular-nums}.map-help{font-size:11px;line-height:1.8;color:var(--muted);margin-top:6px}#game[data-pan=true] #board,#game[data-pan=true] #board button{touch-action:pan-x pan-y;cursor:grab}#status{min-height:44px;font-size:13px;line-height:1.7;margin-top:12px}.keyboard{font-size:11px;line-height:1.8;color:var(--muted);margin-top:4px}.chain-feedback{height:36px;margin:0;color:#75420e;font-size:12px;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}.chain-feedback[data-large=true]{font-weight:600;color:#963d0a}
#previous-record[hidden]{display:none}aside{min-width:0}h2{font-size:15px;font-weight:600;line-height:1.5}.stage-section{padding:20px;background:#fff;border-radius:20px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.section-heading>span{font-size:11px;color:var(--muted)}#stage-list{list-style:none;padding:0;margin:16px 0 0}#stage-list li{display:grid;grid-template-columns:30px 1fr auto;align-items:center;gap:10px;min-height:40px;padding:4px 8px;border-radius:8px;font-size:13px;font-variant-numeric:tabular-nums;color:var(--muted)}.stage-number{font-size:11px}.stage-points{text-align:right}#stage-list li[data-state=current]{background:#f5f5f7;color:var(--ink);font-weight:600}#stage-list li[data-state=current] .stage-number{color:var(--red)}#stage-list li[data-state=complete] .stage-number{font-size:0}#stage-list li[data-state=complete] .stage-number::after{content:'✓';font-size:13px;color:#0066cc}.stage-section p{margin-top:14px;font-size:13px;line-height:1.8;color:var(--muted)}.score-section{padding:22px 4px 0}.score-section h2{margin-bottom:8px}dl{margin:0}dl>div{display:flex;justify-content:space-between;align-items:baseline;gap:16px;font-size:13px;line-height:1.8;padding:5px 0}dt{color:var(--muted)}dd{margin:0;font-weight:500;white-space:nowrap}.best-row{border-top:1px solid var(--line);margin-top:10px;padding-top:12px}aside button{display:block;min-height:44px;border:1px solid #c7c7ce;color:var(--ink);border-radius:999px;background:transparent;width:100%;padding:10px 16px;margin-top:14px;font-size:13px}aside button:hover{background:#fff}aside button[hidden]{display:none}.bonus{font-size:13px;line-height:1.7;color:var(--blue);margin-top:14px}.rules{margin-top:22px;padding-inline:4px}.rules p,.rules li{font-size:13px;line-height:1.85;color:var(--muted)}.rules p{margin-top:10px}.rules ol{padding-left:20px;margin:10px 0 0}.rules li+li{margin-top:5px}.rules .small{font-size:11px;line-height:1.85;margin-top:10px}.combo-rules{margin-top:10px}.combo-rules>div{font-size:13px;padding:2px 0}.rule-details{border-top:1px solid var(--line);padding-top:6px}.rule-details summary{cursor:pointer;min-height:44px;font-size:13px;font-weight:500;line-height:1.8;padding:10px 0}
/* The broad number face stays legible; the paper body and curved wick carry the symbol. */
.cracker-art{display:block;width:100%;height:100%;overflow:visible}.cracker-art .wick{fill:none;stroke:#574638;stroke-width:2.5;stroke-linecap:round}.cracker-art .paper{fill:#d64c3e;stroke:#ad352f;stroke-width:1}.cracker-art .cap{fill:#a6322a}.cracker-art .band{fill:#e4b453}.cracker-art .label{fill:#fffdf7}.cracker-art .crease{fill:none;stroke:#f3927f;stroke-width:1.4;stroke-linecap:round}.digit{position:absolute;left:50%;top:54%;transform:translate(-50%,-50%);color:#201d1b;font-size:clamp(15px,calc(var(--cell)*.62),42px);font-weight:650;font-variant-numeric:tabular-nums;line-height:1;pointer-events:none}#board button.empty>.firecracker{visibility:hidden}#board button.selected .paper{stroke:#0066cc;stroke-width:3.5}#board button.selected .label{fill:#dceeff}#board button.selected .wick{stroke:#b65c00;stroke-width:3}.firework-layer{position:absolute;inset:8px;width:calc(100% - 16px);height:calc(100% - 16px);z-index:5;pointer-events:none;overflow:visible}.fuse-base,.burning-fuse{fill:none;stroke-linecap:round;stroke-linejoin:round}.fuse-base{stroke:#766144;stroke-width:5}.burning-fuse{stroke:#bf690b;stroke-width:7}.travelling-spark circle{fill:#ffc65b;stroke:#a85000;stroke-width:2}.travelling-spark path{fill:none;stroke:#c56a0b;stroke-width:3;stroke-linecap:round}.firework-burst path{fill:none;stroke-width:8;stroke-linecap:round}.spark-gold{stroke:#ba6c0a}.spark-red{stroke:#c33d32}.spark-ring{fill:none;stroke:#b96a12;stroke-width:3}.pop-cloud{fill:#fff2c4;stroke:#b4510a;stroke-width:4;stroke-linejoin:round}.pop-word{fill:#7c2f07;font-family:Inter,'Malgun Gothic',system-ui,sans-serif;font-size:42px;font-weight:700;paint-order:stroke;stroke:#fff6dd;stroke-width:1.5px}
.stage-clear{position:absolute;inset:0;z-index:7;display:flex;align-items:center;justify-content:center;padding:20px;background:#ffffffcc}.stage-clear>div{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:24px}.stage-clear svg{width:72px;height:72px}.stage-clear strong{font-size:30px;letter-spacing:-.045em}.stage-clear b{font-size:24px;font-weight:600;color:var(--blue)}.stage-clear span{font-size:13px;color:var(--muted)}
@media(max-width:1000px){.workspace{grid-template-columns:minmax(0,1fr) 240px;gap:20px}.play{padding:18px}.stage-section{padding:16px}.board-bottom{align-items:start;flex-direction:column;gap:8px}.stage-progress{max-width:none;width:100%}.board-dialog{flex-direction:column;align-items:start;gap:12px}.board-dialog button{width:100%}}
@media(max-width:760px){.topbar{height:56px;padding:0 16px}.brand{font-size:13px}.brand-divider{padding:0 6px}.header-tools button{padding:8px 10px;font-size:11px}main{padding:0 16px;margin-top:16px}.heading{margin-bottom:20px}.game-mark{width:52px;height:52px}.game-title{gap:10px}h1{font-size:30px}.heading p{font-size:12px}.stage strong{font-size:28px}.workspace{grid-template-columns:1fr;gap:24px}.play{padding:18px;border-radius:20px}.board-dialog{flex-direction:row;align-items:center;padding:16px}.board-dialog button{width:auto;padding:10px 20px}.board-bottom{flex-direction:row;align-items:center}.stage-progress{max-width:180px;width:auto}aside{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:24px}.score-section,.rules{margin:0;padding:0}.stage-section{grid-row:span 2}.rule-details{grid-column:1/-1;padding-top:6px}.playbar output{font-size:32px}.map-viewport{border-radius:12px}}
@media(max-width:480px){main{padding:0 16px}.topbar{padding:0 16px}.brand{font-size:12px}.heading{gap:12px}.game-mark{width:44px;height:44px}h1{font-size:28px}.stage{font-size:11px}.stage>span{font-size:12px}.play{padding:14px}.playbar{gap:8px;padding-bottom:4px}.playbar output{font-size:30px}.playbar span{font-size:11px}.board-caption{font-size:11px;gap:8px}.board-dialog{flex-direction:column;align-items:stretch;gap:10px}.board-dialog strong{font-size:16px}.board-dialog button{width:100%}.board-bottom{flex-direction:column;gap:6px;align-items:stretch}.stage-progress{max-width:none}.map-tools{justify-content:flex-end}.map-help{font-size:11px}.stage-clear strong{font-size:26px}aside{grid-template-columns:1fr;gap:22px}.stage-section{grid-row:auto;padding:18px}.score-section,.rules{padding-inline:4px}.rule-details{grid-column:auto}.keyboard{font-size:11px}}
@media(prefers-reduced-motion:no-preference){#board button>span{transition:background-color .08s,border-color .08s}.stage-clear>div{animation:clear-in .22s ease-out}@keyframes clear-in{from{transform:translateY(12px);opacity:0}to{transform:translateY(0);opacity:1}}}
