:root {
  color-scheme: light;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #263e34;
  background: #f5f4ee;
  font-synthesis: none;
  --ink: #263e34;
  --muted: #777e70;
  --line: #dddfd2;
  --accent: #d5edb0;
  --board-width: clamp(220px, calc((100svh - 350px) / 2), 320px);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { opacity: .35; cursor: default; }
a { color: inherit; }
button:focus-visible, a:focus-visible, .play-area:focus-visible { outline: 3px solid #458e67; outline-offset: 5px; }
button { transition: background .15s, transform .15s; }
button:active:not(:disabled) { transform: translateY(1px); }
[hidden] { display: none !important; }
h1, h2, p, dl, dd { margin: 0; }
.site-header { max-width: 1224px; margin: 0 auto; height: 88px; padding: 0 48px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { display: flex; gap: 10px; align-items: center; text-decoration: none; font-size: 24px; font-weight: 850; letter-spacing: -1.2px; }
.brand-mark { width: 26px; height: 26px; margin-right: 2px; }
.wordmark-dot { color: #90a66e; margin-left: -9px; }
.header-note { font-size: 12px; color: var(--muted); letter-spacing: .2px; }
.help-button { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 10px 0 10px 10px; font-size: 12px; }
.help-button:hover { color: #5a8252; }
.help-icon { border: 1px solid #8b9580; width: 19px; height: 19px; border-radius: 50%; display: inline-flex; justify-content: center; align-items: center; font-size: 11px; }
.intro { text-align: center; padding: 29px 16px 30px; }
.eyebrow { font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.6px; font-weight: 500; }
.tiny-star { color: #78965d; font-size: 15px; vertical-align: -1px; margin-right: 5px; }
h1 { font-size: clamp(40px, 4.8vw, 60px); font-weight: 500; letter-spacing: -2.8px; line-height: 1.15; margin-top: 9px; }
h1 em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.intro-copy { font-size: 12px; color: var(--muted); margin-top: 9px; letter-spacing: .2px; }
.game-layout { display: grid; grid-template-columns: 177px var(--board-width) 148px; gap: 30px; justify-content: center; align-items: start; margin: 0 auto; padding: 0 20px; }
.left-rail, .right-rail { padding-top: 34px; }
.section-label { font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; letter-spacing: 1.4px; }
.score-value { font-size: 34px; font-weight: 500; letter-spacing: -1.3px; margin: 12px 0 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.best-row { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: space-between; font-size: 10px; }
.best-row > span { color: var(--muted); }
.best-row > span > span { margin-right: 3px; font-size: 13px; }
.best-row strong { font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; }
.stats-card { margin-top: 31px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.stat-row p { font-size: 23px; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.level-progress { margin-top: -2px; }
.level-progress > span { font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.progress-track { height: 4px; background: #e3e5d9; margin-top: 10px; overflow: hidden; border-radius: 4px; }
.progress-track > div { width: 0; height: 100%; background: #77936a; border-radius: inherit; transition: width .25s; }
.hold-card { border: 1px solid var(--line); border-radius: 6px; padding: 15px; margin-top: 29px; background: #eeeee5; }
.section-heading { display: flex; align-items: center; justify-content: space-between; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; padding: 0 5px; border: 1px solid #d6d9cc; border-radius: 4px; background: #f9f9f3; color: #58664f; box-shadow: 0 1px 0 #d6d9cc; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.hold-preview { position: relative; height: 75px; }
.hold-preview canvas { width: 100%; height: 75px; display: block; }
.hold-preview.is-used canvas { opacity: .35; }
.hold-placeholder { position: absolute; inset: 0; display: grid; place-content: center; color: #bcc2ae; font-size: 26px; font-weight: 200; }
.hold-note { text-align: center; font-size: 10px; line-height: 1.5; color: var(--muted); }
.session-stats { display: flex; justify-content: space-between; gap: 8px; margin-top: 20px; font: 8px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.session-stats strong { display: block; margin-top: 6px; font-weight: 400; font-size: 11px; color: var(--ink); }
.clear-message { margin-top: 23px; padding-left: 10px; border-left: 2px solid #92ad72; }
.clear-message strong { display: block; font-size: 16px; letter-spacing: -.3px; }
.clear-message span { display: block; margin-top: 5px; font: 9px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.play-column { min-width: 0; }
.board-heading { height: 34px; display: flex; align-items: start; justify-content: space-between; }
.mode-label { display: flex; gap: 7px; align-items: center; font: 9px/21px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.2px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #809b66; }
.status-dot.is-playing { background: #529664; box-shadow: 0 0 0 3px #52966418; }
.status-dot.is-over { background: #c87367; }
.pause-button { display: flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; font-size: 10px; height: 21px; }
.pause-button svg { width: 12px; height: 12px; }
.pause-button kbd { margin-left: 3px; height: 18px; min-width: 18px; font-size: 8px; }
.play-area { position: relative; width: 100%; border: 5px solid #294b3f; border-radius: 5px; overflow: hidden; box-shadow: 0 12px 32px #203c2c12, 0 2px 5px #203c2c12; background: #152e29; outline: none; }
#board { display: block; width: 100%; height: auto; aspect-ratio: 1 / 2; }
.board-overlay { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; text-align: center; color: #f5f4eb; background: #102c26d9; backdrop-filter: blur(2px); }
.overlay-content { width: 100%; padding: 20px; }
.overlay-symbol { position: relative; width: 62px; height: 41px; margin: 0 auto 33px; transform: rotate(-9deg); }
.overlay-symbol span { background: #d5edb0; position: absolute; width: 19px; height: 19px; border-radius: 2px; box-shadow: inset 0 2px 0 #ffffff20; }
.overlay-symbol span:nth-child(1) { left: 21px; top: 0; }
.overlay-symbol span:nth-child(2) { left: 0; top: 21px; }
.overlay-symbol span:nth-child(3) { left: 21px; top: 21px; }
.overlay-symbol span:nth-child(4) { left: 42px; top: 21px; }
.overlay-eyebrow { font: 7px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.6px; color: #b4c5aa; }
.overlay-content h2 { font-size: clamp(25px, 3vw, 34px); font-weight: 450; letter-spacing: -1.1px; line-height: 1.13; margin: 13px 0; }
.overlay-content > p:not(.overlay-eyebrow) { font-size: 11px; color: #b1c2b5; line-height: 1.7; }
.primary-button { width: 100%; border: 0; background: var(--accent); color: #233d2d; padding: 15px 19px; border-radius: 4px; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.primary-button span { font-size: 18px; font-weight: 400; }
.primary-button:hover { background: #e0f3c5; }
.overlay-content .primary-button { max-width: 192px; margin: 27px auto 0; }
.overlay-hint { display: flex; justify-content: center; align-items: center; gap: 5px; color: #a1b4a5; font-size: 9px; margin-top: 16px; }
.overlay-hint kbd { background: transparent; color: #bfd1c1; border-color: #587565; box-shadow: none; height: 17px; font-size: 8px; }
.board-footer { display: flex; justify-content: space-between; padding: 13px 1px 0; font: 7px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.1px; color: var(--muted); }
.board-dimensions { color: #9ca28f; }
.queue-count { font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; color: #9ba28e; }
.next-list { list-style: none; padding: 0; margin: 13px 0 0; border-top: 1px solid var(--line); }
.next-list li { height: 63px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.next-list li > span { font: 8px ui-monospace, SFMono-Regular, Menlo, monospace; color: #a2a893; }
.next-canvas { width: calc(100% - 23px); height: 58px; display: block; }
.controls-card { margin-top: 26px; }
.shortcut-list { margin-top: 15px; font-size: 10px; }
.shortcut-list > div { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.shortcut-list dt { color: #6c7966; }
.shortcut-list dd { display: flex; gap: 4px; }
.wide-key { min-width: 47px; }
.controls-note { margin-top: 24px; font: italic 16px/1.4 Georgia, "Times New Roman", serif; color: #909a7f; }
.touch-controls { display: none; }
.game-caption { text-align: center; font-size: 10px; letter-spacing: .25px; color: #8a917e; margin: 26px 16px 31px; }
.game-caption span { font-size: 15px; margin-right: 6px; vertical-align: -1px; }
.site-footer { display: flex; gap: 20px; justify-content: space-between; max-width: 1224px; margin: 0 auto; padding: 19px 48px 24px; border-top: 1px solid var(--line); font: 7px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.2px; color: #949b86; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript-message { text-align: center; margin: 20px; }
dialog { background: #f5f4ee; border: 1px solid var(--line); border-radius: 12px; width: min(470px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 28px; color: var(--ink); box-shadow: 0 25px 100px #0a241c30; }
dialog::backdrop { background: #10291dd0; backdrop-filter: blur(4px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; }
.close-button { border: 0; background: transparent; font-size: 26px; width: 32px; height: 32px; line-height: 1; }
dialog h2 { font-size: 29px; font-weight: 500; letter-spacing: -1px; margin: 13px 0; }
dialog > p, .help-tip p { font-size: 12px; line-height: 1.75; color: #6f7966; }
.help-controls { padding: 17px 0; margin: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.help-controls > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 9px 0; font-size: 11px; }
.help-controls dd { flex-shrink: 0; }
.help-tip { margin-bottom: 22px; }
.help-tip strong { display: block; font-size: 12px; margin-bottom: 7px; }
.help-tip p + p { margin-top: 8px; }
@media (min-width: 760px) and (max-height: 850px) {
  .site-header { height: 68px; }
  .intro { padding-top: 19px; padding-bottom: 21px; }
  h1 { font-size: 43px; }
  .intro-copy { margin-top: 6px; }
  .game-caption { margin-top: 20px; margin-bottom: 22px; }
  .stats-card { margin-top: 23px; }
  .hold-card { margin-top: 22px; }
  .next-list li { height: 56px; }
  .next-canvas { height: 50px; }
  .controls-note { margin-top: 15px; }
}
@media (max-width: 759px) {
  :root { --board-width: min(48vw, max(160px, calc((100svh - 400px) / 2)), 300px); }
  .site-header { height: 67px; padding: 0 24px; margin: 0 12px; }
  .header-note { display: none; }
  .wordmark { font-size: 21px; }
  .brand-mark { width: 23px; height: 23px; }
  .intro { padding: 24px 16px 26px; }
  .intro .eyebrow { font-size: 8px; letter-spacing: 1px; }
  h1 { font-size: 47px; letter-spacing: -2px; }
  .game-layout { grid-template-columns: 86px var(--board-width) 80px; gap: 13px; padding: 0 12px; }
  .section-label { font-size: 8px; letter-spacing: .9px; }
  .score-value { font-size: 24px; margin-top: 10px; letter-spacing: -1px; }
  .best-row { font-size: 9px; flex-direction: column; align-items: flex-start; padding-top: 9px; }
  .best-row > span > span { display: none; }
  .best-row strong { font-size: 10px; }
  .stats-card { margin-top: 23px; }
  .stat-row { margin-bottom: 16px; }
  .stat-row p { font-size: 19px; }
  .level-progress > span { font-size: 8px; line-height: 1.5; display: block; }
  .hold-card { padding: 10px 7px; margin-top: 21px; }
  .hold-preview, .hold-preview canvas { height: 51px; }
  .hold-note { font-size: 8px; line-height: 1.5; }
  .session-stats { font-size: 7px; gap: 4px; flex-wrap: wrap; }
  .session-stats strong { font-size: 9px; }
  .next-list li { height: 58px; gap: 5px; }
  .next-list li > span { font-size: 7px; }
  .next-canvas { width: calc(100% - 17px); height: 55px; }
  .next-list { margin-top: 15px; }
  .queue-count { font-size: 8px; }
  .controls-card { display: none; }
  .pause-button > span, .pause-button kbd { display: none; }
  .pause-button { width: 22px; justify-content: center; }
  .pause-button svg { width: 15px; height: 15px; }
  .mode-label { font-size: 8px; letter-spacing: .8px; }
  .board-footer { font-size: 6px; letter-spacing: .5px; }
  .board-dimensions { display: none; }
  .play-area { border-width: 4px; }
  .overlay-content { padding: 12px; }
  .overlay-symbol { margin-bottom: 24px; }
  .overlay-eyebrow { font-size: 6px; letter-spacing: 1px; }
  .overlay-content h2 { font-size: 27px; }
  .overlay-content > p:not(.overlay-eyebrow) { font-size: 10px; }
  .overlay-content .primary-button { margin-top: 22px; padding: 12px 14px; font-size: 11px; }
  .overlay-hint { margin-top: 12px; font-size: 8px; }
  .touch-controls { display: block; max-width: 380px; margin: 24px auto 0; padding: 0 16px; }
  .touch-row { display: flex; gap: 7px; margin-top: 7px; }
  .touch-row button { flex: 1; min-height: 49px; border-radius: 5px; border: 1px solid #d6d9cc; background: #eeeee5; font-size: 24px; touch-action: none; user-select: none; -webkit-user-select: none; }
  .touch-row button:active { background: #d5edb0; }
  .touch-row button span { display: block; line-height: 1; }
  .touch-row button small { display: block; font: 7px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .7px; margin-top: 5px; }
  .touch-row .touch-drop { background: #d5edb0; border-color: #c8dca8; }
  .game-caption { margin: 21px 16px 25px; }
  .site-footer { font-size: 6px; letter-spacing: .8px; margin: 0 24px; padding: 17px 0; }
  .site-footer span:last-child { display: none; }
  .clear-message { margin-top: 16px; padding-left: 6px; }
  .clear-message strong { font-size: 12px; }
  .clear-message span { font-size: 8px; }
}
@media (max-width: 440px) {
  :root { --board-width: min(calc(100vw - 151px), max(150px, calc((100svh - 400px) / 2))); }
  .site-header { margin: 0 16px; padding: 0; }
  .help-button { font-size: 10px; }
  .intro { padding-top: 21px; padding-bottom: 21px; }
  h1 { font-size: 41px; }
  .intro-copy { font-size: 10px; }
  .game-layout { grid-template-columns: 64px var(--board-width) 52px; gap: 8px; padding: 0 9px; }
  .section-label { font-size: 7px; letter-spacing: .5px; }
  .left-rail, .right-rail { padding-top: 29px; }
  .board-heading { height: 29px; }
  .score-value { font-size: 20px; letter-spacing: -1.1px; margin-bottom: 12px; }
  .best-row { font-size: 8px; line-height: 1.4; }
  .stat-row { flex-wrap: wrap; gap: 3px; margin-bottom: 14px; }
  .stat-row p { font-size: 18px; }
  .stats-card { margin-top: 20px; }
  .level-progress > span { font-size: 7px; }
  .hold-card { margin-top: 18px; padding: 8px 5px; }
  .section-heading > kbd { min-width: 15px; height: 16px; padding: 0 3px; font-size: 8px; }
  .hold-preview, .hold-preview canvas { height: 44px; }
  .hold-note { font-size: 7px; }
  .hold-note br { display: none; }
  .session-stats { display: none; }
  .queue-count, .next-list li > span { display: none; }
  .next-list { margin-top: 12px; }
  .next-list li { height: 54px; }
  .next-canvas { width: 100%; height: 50px; }
  .overlay-symbol { transform: scale(.8) rotate(-9deg); margin-bottom: 17px; }
  .overlay-content h2 { font-size: 25px; margin: 10px 0; }
  .overlay-eyebrow { letter-spacing: .7px; font-size: 5px; }
  .overlay-content .primary-button { margin-top: 20px; }
  .overlay-hint { display: none; }
  .board-footer { font-size: 5px; }
  .clear-message { display: none; }
}
@media (max-width: 350px) {
  .overlay-content h2 { font-size: 21px; }
  .overlay-symbol { margin-bottom: 8px; }
  .overlay-content > p:not(.overlay-eyebrow) { font-size: 9px; }
  .overlay-content .primary-button { margin-top: 15px; padding: 10px; }
  .overlay-eyebrow { display: none; }
}
@media (pointer: coarse) and (min-width: 760px) {
  .touch-controls { display: block; width: 360px; margin: 24px auto; }
  .touch-row { display: flex; gap: 8px; margin-top: 8px; }
  .touch-row button { flex: 1; border: 1px solid var(--line); border-radius: 4px; background: #eeeee5; min-height: 45px; font-size: 23px; touch-action: none; }
  .touch-row button small { display: block; font-size: 8px; margin-top: 3px; }
  .touch-drop { background: var(--accent) !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
