* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans", sans-serif; color: #fff1dc; background: #112126; }
body { margin: 0; position: fixed; inset: 0; overflow: hidden; }
#game { position: absolute; left: 50%; top: 50%; margin-left: -180px; margin-top: -320px; width: 360px; height: 640px; overflow: hidden; transform-origin: center; background: #182c31; }
canvas, .screen { position: absolute; inset: 0; width: 100%; height: 100%; }
canvas { display: block; }
[hidden] { display: none !important; }
.screen { pointer-events: none; text-align: center; }
button { pointer-events: auto; touch-action: manipulation; cursor: pointer; border: none; font: inherit; font-weight: 800; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.eyebrow { color: #c5a77c; font-size: 11px; letter-spacing: 3px; margin-top: 47px; font-weight: 600; }
h1 { font-size: 31px; letter-spacing: .01em; margin: 15px 10px 10px; line-height: 1.3; }
.rule { font-size: 15px; color: #dfd1d7; margin: 0; }
.title-bottom { position: absolute; top: 477px; left: 30px; right: 30px; }
.chips { display: flex; justify-content: center; gap: 18px; margin-bottom: 22px; color: #c5a77c; font-size: 11px; letter-spacing: 2px; }
button:not(.cell):not(.secondary) { background: #e7c9a0; color: #30212e; height: 58px; border-radius: 15px; width: 100%; box-shadow: 0 5px 0 #9b754e; font-size: 19px; }
button:active { filter: brightness(1.12); }
.hud { position: absolute; top: 24px; left: 28px; right: 28px; display: flex; justify-content: space-between; text-align: left; }
.hud span { display: block; font-size: 11px; color: #cbb9c7; letter-spacing: 1px; }
.hud strong { font-size: 30px; font-variant-numeric: tabular-nums; }
.hud .clock { text-align: right; }
.timer { position: absolute; top: 85px; left: 28px; right: 28px; height: 3px; background: #514053; border-radius: 2px; }
.timer i { display: block; width: 100%; height: 100%; background: #e7c9a0; transform-origin: left; }
 .current-label { position: absolute; top: 106px; left: 28px; font-size: 11px; color: #cbb9c7; text-align: left; }
.current-label b { display: block; margin-top: 4px; font-size: 14px; }
.incoming { position: absolute; top: 116px; right: 28px; font-size: 12px; color: #cbb9c7; }
#combo { position: absolute; top: 147px; width: 100%; font-size: 12px; color: #e7c9a0; font-weight: 700; }
.cells { position: absolute; left: 36px; top: 170px; width: 288px; height: 324px; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(6, 1fr); }
.cell { background: transparent; border-radius: 12px; padding: 0; }
.cell:hover { background: #ffffff10; }
.cell:active { background: #ffffff25; }
#switch { position: absolute; left: 30px; top: 526px; width: 300px; display: flex; gap: 12px; justify-content: center; align-items: center; }
#swatch { display: block; width: 22px; height: 22px; border: 2px solid #182c31; }
.play-hint { position: absolute; top: 589px; left: 0; right: 0; color: #cbb9c7; font-size: 13px; margin: 0; }
.result { background: #182c31ef; padding: 0 30px; }
.result .eyebrow { margin-top: 65px; }
.result h2 { font-size: 30px; margin: 39px 0 26px; }
.result-label { color: #d1bdcf; font-size: 13px; }
#result-score { display: block; font-size: 70px; font-variant-numeric: tabular-nums; line-height: 1.35; color: #e7c9a0; }
.result-stats { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 15px; font-size: 13px; color: #d1bdcf; padding: 20px 16px 30px; }
.result-stats b { color: #fff1dc; }
.secondary { display: block; background: transparent; color: #cbb9c7; margin: 22px auto 0; padding: 10px 22px; font-size: 13px; }
