@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600;700&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap";:root{font-family:Noto Sans SC,Arial,sans-serif;color:#5f574f;background:#faf8ef;font-synthesis:none;text-rendering:optimizeLegibility;--page: #faf8ef;--text: #5f574f;--muted: #827970;--board: #bbada0;--cell: #cdc1b4;--button: #8f7a66;--green: #5a9b69;--red: #b85c52}*{box-sizing:border-box}html,body,#root{min-width:320px;min-height:100%;margin:0}a{color:var(--green)}body{min-height:100vh;background:var(--page)}button{font:inherit}button:focus-visible{outline:3px solid rgba(143,122,102,.35);outline-offset:2px}.app{min-height:100vh;padding:18px 16px 32px}.game-container{width:min(980px,100%);margin:0 auto}.game-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px}.title-block h1{margin:0;color:var(--text);font-size:clamp(1.9rem,4.4vw,2.8rem);font-weight:800;line-height:.95;letter-spacing:-.05em}.title-block p{margin:4px 0 0;color:var(--muted);font-size:.66rem;font-weight:700;letter-spacing:.04em}.score-group{display:flex;gap:6px}.score-group>div{min-width:72px;padding:5px 10px 6px;border-radius:3px;background:var(--board);color:#fff;text-align:center}.score-group span{display:block;color:#eee4da;font-size:.61rem;font-weight:700}.score-group strong{display:block;margin-top:1px;font:700 .92rem IBM Plex Mono,monospace}.game-intro{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-bottom:8px}.game-actions{display:flex;gap:6px}.game-actions button{height:30px;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 9px;border:0;border-radius:3px;background:var(--button);color:#f9f6f2;font-size:.66rem;font-weight:700;cursor:pointer}.game-actions button:last-child{width:30px;padding:0}.game-actions button:hover{background:#786654}.game-actions svg{width:13px}.seed-panel{margin:0 0 9px;color:var(--muted);font-size:.66rem}.seed-panel summary{width:fit-content;padding:3px 0;cursor:pointer;font-weight:700}.seed-panel summary code{margin-left:4px;color:var(--text);font:600 .64rem IBM Plex Mono,monospace}.seed-control{width:min(520px,100%);display:grid;grid-template-columns:minmax(120px,1fr) auto auto;gap:5px;align-items:center;margin-top:5px;padding:6px;border-radius:3px;background:#eee9df}.seed-control input{min-width:0;height:32px;padding:0 9px;border:1px solid #d5ccc1;border-radius:3px;background:#fffdf8;color:var(--text);font:600 .7rem IBM Plex Mono,monospace}.seed-control button{height:32px;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 10px;border:0;border-radius:3px;background:var(--button);color:#fff;font-size:.65rem;font-weight:700;cursor:pointer}.seed-control svg{width:14px}.status-line{min-height:28px;display:flex;align-items:center;margin-bottom:10px;padding:5px 9px;border-left:3px solid #a89d92;background:#f0ece4;color:#6f665e;font-size:.7rem;line-height:1.4}.status-line.good{border-color:var(--green);color:#4c7d57}.status-line.warn{border-color:#bd8c3e;color:#8d6b31}.status-line.bad{border-color:var(--red);color:#9b4942}.boards-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 12px}.problem-board{min-width:0}.problem-board>header{height:30px;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 1px}.problem-board>header>b{flex:none;color:var(--text);font:800 .72rem IBM Plex Mono,monospace;letter-spacing:-.02em;white-space:nowrap}.problem-board>header>div{min-width:0;display:flex;align-items:center;gap:6px}.problem-board>header span{color:var(--muted);font:700 .66rem IBM Plex Mono,monospace;white-space:nowrap}.problem-board>header button{flex:none;height:23px;padding:0 8px;border:0;border-radius:3px;background:var(--button);color:#fff;font-size:.6rem;font-weight:700;cursor:pointer}.problem-board>header button:disabled{opacity:.35;cursor:default}.problem-board.status-submitted>header span{color:#9a7538}.subtask-key{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;margin-bottom:5px}.subtask-key>span{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:3px 1px;border:1px solid #e1dacf;border-radius:3px;background:#f1ede5;overflow:hidden}.subtask-key b{color:var(--text);font:700 .6rem/1 IBM Plex Mono,monospace}.subtask-key i{color:var(--muted);font:600 .5rem/1 IBM Plex Mono,monospace;font-style:normal}.poly-board{width:100%;aspect-ratio:1;position:relative;overflow:hidden;padding:4px;border-radius:4px;background:var(--board);touch-action:none;-webkit-user-select:none;user-select:none;cursor:pointer}.board-cells{position:absolute;top:4px;right:4px;bottom:4px;left:4px;display:grid;grid-template-columns:repeat(6,1fr);grid-template-rows:repeat(6,1fr);gap:3px}.board-cells span{border-radius:3px;background:#eee4da59}.empty-board{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;color:#eee4da;font-size:.72rem}.board-result{position:absolute;top:0;right:0;bottom:0;left:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#eee4dae0;color:var(--text)}.board-result strong{font:800 clamp(1.1rem,3vw,1.9rem) "IBM Plex Mono",monospace}.board-result span{margin-top:2px;font-size:.62rem;font-weight:700}.status-submitted .board-result strong{color:#9a7538}.status-submitted .poly-board{background:#c7b9ac;cursor:default}.board-piece{position:absolute;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:0;padding:clamp(3px,.8vw,8px);overflow:hidden;border:0;border-radius:3px;background:var(--piece-color);color:var(--piece-ink);box-shadow:inset 0 3px #ffffff2e;cursor:default;transition:top .15s ease,left .15s ease,width .15s ease,height .15s ease,transform .15s ease,opacity .15s ease}.board-piece strong{max-width:100%;font:800 clamp(.72rem,1.9vw,1.4rem)/1 "IBM Plex Mono",monospace;letter-spacing:-.04em}.board-piece .piece-subtask{position:absolute;top:4px;left:5px;font:700 clamp(.38rem,.65vw,.56rem) "IBM Plex Mono",monospace;opacity:.72}.board-piece small{position:absolute;right:5px;bottom:3px;font:700 clamp(.35rem,.55vw,.5rem) "IBM Plex Mono",monospace;opacity:.7}.board-piece.area-1{padding:1px}.board-piece.area-1 strong{font-size:clamp(.5rem,1.15vw,.78rem)}.board-piece.area-1 .piece-subtask,.board-piece.area-1 small{display:none}.board-piece.o2-piece{box-shadow:inset 0 3px #7f8c9a}.board-piece.o2-piece strong{color:#fff;letter-spacing:-.08em}.board-piece.area-2 strong{font-size:clamp(.52rem,1.2vw,.85rem)}.board-piece.merge-ghost{z-index:6;opacity:0;transform:scale(.72);pointer-events:none}.board-piece.spawned{animation:piece-spawn .17s cubic-bezier(.2,.85,.3,1.2) both}.poly-board.animating{cursor:wait}@keyframes piece-spawn{0%{opacity:0;transform:scale(.35)}to{opacity:1;transform:scale(1)}}.direction-controls{width:min(320px,100%);display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:10px auto 0}.direction-controls button{height:36px;display:grid;place-items:center;border:0;border-radius:3px;background:var(--button);color:#fff;cursor:pointer}.direction-controls button:disabled{opacity:.35;cursor:default}.direction-controls svg{width:16px}.play-note{margin:7px 0 0;color:var(--muted);font-size:.66rem;text-align:center}.verdict-section{width:min(640px,100%);margin:18px auto 0}.verdict-section h2{margin:0 0 7px;color:var(--text);font-size:.78rem;text-align:center}.verdict-list{display:grid;gap:5px}.verdict-formula{grid-template-columns:repeat(4,1fr)}.verdict-list span{min-height:34px;display:flex;align-items:center;justify-content:space-between;padding:6px 10px;border-radius:3px;background:var(--verdict-color);color:var(--verdict-ink)}.verdict-list b{font:800 .68rem IBM Plex Mono,monospace}.verdict-list small{opacity:.78;font:600 .56rem IBM Plex Mono,monospace}.how-to-play{margin:12px 0 0;color:var(--muted);font-size:.68rem;line-height:1.55;text-align:center}.how-to-play b{color:var(--text)}.icon-button{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:3px;background:var(--button);color:#fff;cursor:pointer}.icon-button svg{width:15px}.modal-backdrop,.end-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:grid;place-items:center;padding:16px;background:#faf8efe0}.rules-modal,.end-card{width:min(650px,100%);max-height:calc(100vh - 32px);position:relative;overflow:auto;padding:28px;border-radius:4px;background:#f4f0e6;box-shadow:0 0 0 6px #bbada08c}.modal-close{position:absolute;top:12px;right:12px}.eyebrow{margin:0;color:var(--muted);font:600 .57rem IBM Plex Mono,monospace;letter-spacing:.1em}.rules-modal h2{margin:5px 0 17px;color:var(--text);font-size:1.35rem}.rules-list{display:flex;flex-direction:column;gap:8px;margin:0;padding-left:20px;font-size:.78rem;line-height:1.6}.direction-demo{display:flex;align-items:center;gap:6px;margin:16px 0 10px;padding:9px;background:#e7e0d5;font-size:.68rem}.direction-demo svg{width:15px}.direction-demo span{margin-left:5px}.verdict-chain{display:flex;gap:3px;margin:10px 0 0;overflow-x:auto}.verdict-rule-chain span{min-width:76px;display:inline-flex;align-items:center;justify-content:space-between;gap:4px;padding:8px 6px;border-radius:3px;font:700 .57rem IBM Plex Mono,monospace;white-space:nowrap}.verdict-rule-chain small{opacity:.62}.rules-footnote{margin:12px 0 0;color:var(--muted);font-size:.62rem}.end-card{max-width:420px;text-align:center;overflow:visible}.end-icon{width:52px;height:52px;display:grid;place-items:center;margin:0 auto 12px;border-radius:50%;background:#d5e4d8;color:var(--green)}.end-card.loss .end-icon{background:#ead3ce;color:var(--red)}.end-icon svg{width:25px}.end-card h2{margin:3px 0;color:var(--green);font:800 3.6rem/1 IBM Plex Mono,monospace}.end-card.loss h2{color:var(--red)}.end-card>p:not(.eyebrow){margin:7px 0;font-size:.72rem}.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;margin:18px 0 10px;border-radius:3px;overflow:hidden;background:#f4f0e6}.result-grid div{display:flex;flex-direction:column;gap:2px;padding:9px 3px;background:#ddd3c8}.result-grid span{font-size:.52rem}.result-grid b{font:600 .68rem IBM Plex Mono,monospace}.record-line{margin-bottom:16px!important;font:.6rem IBM Plex Mono,monospace}.primary-button{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 15px;border:0;border-radius:3px;background:var(--button);color:#fff;font-size:.68rem;font-weight:700;cursor:pointer}.primary-button svg{width:15px}.end-buttons{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.ghost-button{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 15px;border:1px solid #cdc2b4;border-radius:3px;background:transparent;color:#6d6156;font-size:.68rem;font-weight:700;cursor:pointer}.ghost-button svg{width:15px}.ghost-button:hover{background:#efe7dd}.end-hint{margin:8px 0 0;color:var(--muted);font-size:.6rem}@media(max-width:760px){.app{padding:14px 10px 26px}.game-header{gap:10px}.title-block h1{font-size:clamp(1.6rem,7vw,2.2rem)}.title-block p{font-size:.58rem}.score-group>div{min-width:64px;padding:5px 8px}.score-group strong{font-size:.82rem}.game-actions button{width:30px;padding:0}.game-actions button:not(:last-child)>span{display:none}.seed-control{grid-template-columns:minmax(80px,1fr) auto auto;padding:5px}.seed-control button{padding:0 7px}.seed-control button:last-child{width:32px;padding:0}.seed-control button:last-child>span{display:none}.boards-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 8px}.board-piece{padding:2px}.board-piece strong{font-size:clamp(.5rem,3vw,.88rem)}.board-piece.area-1 strong{font-size:clamp(.35rem,2vw,.52rem)}.board-piece .piece-subtask{top:2px;left:2px}.how-to-play{font-size:.64rem}}@media(max-width:430px){.app{padding-left:6px;padding-right:6px}.game-header,.game-intro,.seed-panel,.status-line,.how-to-play{margin-left:3px;margin-right:3px}.score-group>div{min-width:58px}.problem-board>header{height:26px;gap:4px}.problem-board>header>b{font-size:.6rem}.problem-board>header span{font-size:.55rem}.problem-board>header button{height:21px;padding:0 6px;font-size:.54rem}.subtask-key{gap:2px}.subtask-key>span{padding:2px 0}.subtask-key b{font-size:.53rem}.subtask-key i{font-size:.43rem}.verdict-formula{grid-template-columns:repeat(3,1fr)}.verdict-list span{min-height:30px;padding:5px 7px}.rules-modal,.end-card{padding:22px 14px}.result-grid{grid-template-columns:repeat(3,1fr)}.result-grid div{padding:7px 2px}.end-card h2{font-size:2.8rem}}@media(max-width:330px){.boards-grid{grid-template-columns:minmax(0,1fr)}.verdict-formula{grid-template-columns:repeat(2,1fr)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
