/* Hanpan — ink, paper and one vermilion seal */
:root {
  --bg: #ffffff; --soft: #f5f5f3; --ink: #121213; --muted: #6c6c71; --faint: #a9a9ae; --line: #e3e3df;
  --accent: #d63a1e; --accent-soft: rgba(214, 58, 30, .1); --pen: #1f4fbf;
  --miss-bg: #ececea; --miss-fg: #a2a2a7; --key: #eeeeeb;
  --shadow: 0 18px 50px rgba(0, 0, 0, .16);
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Apple SD Gothic Neo", Georgia, serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f0f10; --soft: #19191b; --ink: #f2f1ed; --muted: #9b9ba1; --faint: #5f5f65; --line: #2b2b2e;
  --accent: #ff5d40; --accent-soft: rgba(255, 93, 64, .14); --pen: #8eb0ff;
  --miss-bg: #232325; --miss-fg: #606066; --key: #28282b;
  --shadow: 0 18px 50px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
button { font-family: inherit; cursor: pointer; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 30px; min-height: 56px; padding: 0 clamp(16px, 3vw, 32px); background: var(--bg); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 900; font-size: 1.14rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.seal { width: 30px; height: 30px; display: grid; place-items: center; background: var(--accent); color: #fff; border-radius: 5px; font-family: var(--serif); font-weight: 900; font-size: 11.5px; line-height: 1.02; text-align: center; }
.nav { display: flex; gap: 24px; overflow-x: auto; flex: 1; align-self: stretch; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; display: flex; align-items: center; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.top-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.lang { font-size: .8rem; font-weight: 600; text-decoration: none; padding: 5px 9px; border-radius: 5px; border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.lang:hover { border-color: var(--ink); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 5px; border: 0; background: transparent; color: var(--ink); }
.icon-btn:hover { background: var(--soft); }
@media (max-width: 720px) {
  .top { position: static; flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 6px; }
  .nav { order: 3; flex-basis: 100%; height: 38px; gap: 20px; }
  .shell { padding-top: 12px; }
}

/* Shell with ad rails */
.shell { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); justify-content: center; gap: 28px; width: 100%; padding: 24px clamp(16px, 3vw, 32px) 56px; }
main { width: 100%; max-width: 680px; margin: 0 auto; min-width: 0; }
.rail { display: none; }
@media (min-width: 1100px) {
  .shell { grid-template-columns: 160px minmax(0, 680px) 160px; }
  .rail { display: block; }
  .rail .ad-rail { position: sticky; top: 80px; width: 160px; height: 600px; }
}
@media (min-width: 1480px) {
  .shell { grid-template-columns: 300px minmax(0, 680px) 300px; gap: 48px; }
  .rail .ad-rail { width: 300px; }
}
.ad { display: none; }
.ad.on { display: block; }
.ad-inline.on { margin: 44px 0 12px; min-height: 250px; }
.ad.demo { display: grid; place-items: center; border: 1px dashed var(--faint); color: var(--faint); font-size: .78rem; }
.ad-inline.demo { min-height: 250px; margin: 44px 0 12px; }

/* Footer */
.foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); padding: 22px clamp(16px, 3vw, 32px) 30px; color: var(--muted); font-size: .84rem; }
.foot p { margin: 0; }
.foot strong { font-family: var(--serif); font-weight: 900; color: var(--ink); margin-right: 8px; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Prose */
.prose { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.prose h2 { font-family: var(--serif); font-weight: 700; font-size: 1.32rem; letter-spacing: -.01em; margin: 0 0 14px; }
.prose h3 { font-size: 1rem; font-weight: 700; margin: 26px 0 6px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 12px; }
.prose li { margin: 7px 0; }
.prose li::marker { color: var(--faint); }
.prose details { border-bottom: 1px solid var(--line); }
.prose details:first-of-type { border-top: 1px solid var(--line); }
.prose summary { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 1.15rem; line-height: 1.3; }
.prose details[open] summary::after { content: "–"; }
.prose details p { margin: 0 0 16px; color: var(--muted); }
article.page { margin-top: 0; padding-top: 0; border-top: 0; }
.page h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(1.8rem, 4.4vw, 2.5rem); letter-spacing: -.02em; margin: 24px 0 10px; }
.page h2 { margin-top: 34px; }
.lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 12px; max-width: 36em; }
.legend { display: grid; gap: 6px; margin: 14px 0; padding: 0 !important; list-style: none; }
.legend li { position: relative; margin: 0; padding: 4px 0 4px 44px; min-height: 36px; }
.swatch { position: absolute; left: 0; top: 2px; width: 32px; height: 32px; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; border-radius: 4px; }
.swatch.hit { background: var(--ink); color: var(--bg); }
.swatch.near { border: 2px solid var(--accent); color: var(--accent); }
.swatch.miss { background: var(--miss-bg); color: var(--miss-fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 5px; border: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: .9rem; }
.chip:hover { border-color: var(--ink); }

/* Hub */
.hero { padding: 36px 0 30px; }
.meta { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 2px; margin: 0; font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.meta span + span { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); }
.meta.dateline { justify-content: flex-start; }
.hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(2rem, 5.4vw, 3rem); line-height: 1.18; letter-spacing: -.025em; margin: 12px 0 16px; word-break: keep-all; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; background: var(--bg); text-decoration: none; color: var(--ink); transition: background .15s; }
.card:hover { background: var(--soft); }
.card:first-child { grid-column: 1 / -1; }
.card-art { display: flex; gap: 4px; margin: 0 0 10px; }
.card-art b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 3px; font-family: var(--serif); font-size: .95rem; font-weight: 700; background: var(--miss-bg); color: var(--miss-fg); }
.card-art b.h { background: var(--ink); color: var(--bg); }
.card-art b.n { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.card h2 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.22rem; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.6; }
.card .tag { display: flex; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.card .tag i { font-style: normal; }
.card .tag i + i { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); }
.card-go { margin-top: auto; padding-top: 10px; font-size: .84rem; font-weight: 600; }
.card-go::after { content: " →"; transition: margin .15s; }
.card:hover .card-go::after { margin-left: 4px; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* Game frame */
.game { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.game-head { width: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.game-head h1 { font-family: var(--serif); font-weight: 900; font-size: 1.45rem; letter-spacing: -.015em; margin: 0; }
.game-head h1 span { font-family: var(--sans); font-weight: 500; font-size: .62em; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.game-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.tabs button { border: 0; background: transparent; padding: 6px 12px; font-weight: 600; font-size: .82rem; color: var(--muted); }
.tabs button + button { border-left: 1px solid var(--line); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.btn { border: 1px solid var(--ink); border-radius: 6px; padding: 10px 18px; font-weight: 600; font-size: .92rem; background: var(--ink); color: var(--bg); }
.btn:hover { opacity: .86; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { opacity: 1; border-color: var(--ink); }
.btn.sm { padding: 6px 12px; font-size: .82rem; }
.btn:disabled { opacity: .4; cursor: default; }
.stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.status:empty { display: none; }
.status { min-height: 1.5em; font-size: .88rem; color: var(--muted); text-align: center; margin: 0; }

/* Letter board */
.board { display: grid; gap: 6px; }
.row { display: grid; grid-template-columns: repeat(var(--n, 5), auto); gap: 6px; justify-content: center; }
.tile { width: clamp(34px, min(calc((100vw - 60px) / var(--n, 5)), calc((100dvh - 440px) / 6)), 58px); aspect-ratio: 1; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 4px; background: var(--bg); font-family: var(--serif); font-weight: 700; font-size: min(1.7rem, 6vw, 3.6dvh); text-transform: uppercase; }
.tile.filled { border-color: var(--ink); }
.tile.hit { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tile.near { border: 2px solid var(--accent); color: var(--accent); }
.tile.miss { background: var(--miss-bg); border-color: var(--miss-bg); color: var(--miss-fg); }
.tile.reveal, .part.reveal { animation: flip .5s ease both; }
.row.shake, .hg-row.shake { animation: shake .35s; }
@keyframes flip {
  0%, 49% { background: var(--bg); color: var(--ink); border-color: var(--ink); }
  0% { transform: rotateX(0); }
  49%, 50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}
@keyframes pop { 0% { transform: scale(.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .tile.reveal, .part.reveal, .row.shake, .hg-row.shake { animation: none !important; } }

/* On-screen keyboard */
.kb { display: grid; gap: 6px; width: 100%; max-width: 520px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.kb-row { display: flex; gap: 5px; justify-content: center; }
.key { flex: 1 1 0; min-width: 0; height: 52px; padding: 0; border: 0; border-radius: 5px; background: var(--key); font-weight: 600; font-size: 1rem; text-transform: uppercase; transition: background .2s, color .2s; }
.key.wide { flex: 1.7 1 0; font-size: .74rem; letter-spacing: .04em; }
.key.enter { height: 44px; }
@media (max-height: 780px) { .key { height: 46px; } .key.enter { height: 40px; } }
.key:active { opacity: .7; }
.key.hit { background: var(--ink); color: var(--bg); }
.key.near { background: var(--bg); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.key.miss { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--faint); }
.key.on { background: var(--ink); color: var(--bg); }

/* Hangul board */
.hg-board { display: grid; gap: 7px; --hs: clamp(32px, calc((100dvh - 480px) / 6 - 7px), 46px); }
.hg-row { display: flex; gap: 16px; justify-content: center; }
.syl { display: flex; gap: 4px; align-items: center; }
.syl-char { width: 46px; height: var(--hs); display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 4px; font-family: var(--serif); font-size: min(1.55rem, calc(var(--hs) * .6)); font-weight: 700; }
.syl-char.filled { border-color: var(--ink); }
.part { width: 32px; height: calc(var(--hs) - 6px); display: grid; place-items: center; border-radius: 3px; background: var(--soft); font-weight: 600; font-size: 1rem; }
.part.hit { background: var(--ink); color: var(--bg); }
.part.near { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.part.miss { background: var(--miss-bg); color: var(--miss-fg); }
.part-labels { display: flex; gap: 16px; justify-content: center; font-size: .66rem; color: var(--faint); letter-spacing: .04em; }
.part-labels span { display: flex; gap: 4px; padding-left: 50px; }
.part-labels i { width: 32px; text-align: center; font-style: normal; }
@media (max-width: 380px) { .part { width: 28px; } .syl-char { width: 42px; } .hg-row, .part-labels { gap: 10px; } .part-labels i { width: 28px; } .part-labels span { padding-left: 46px; } }
.answer-card { text-align: center; padding: 8px 0 4px; }
.answer-card .w { font-family: var(--serif); font-size: 2.3rem; font-weight: 900; letter-spacing: .1em; }
.answer-card .m { font-size: 1rem; }
.answer-card .c { color: var(--muted); font-size: .82rem; }

/* Dialog + toast */
dialog.modal { border: 1px solid var(--line); border-radius: 10px; padding: 26px 24px 22px; width: min(400px, calc(100vw - 32px)); background: var(--bg); color: var(--ink); box-shadow: var(--shadow); animation: pop .18s ease; }
dialog.modal::backdrop { background: rgba(10, 10, 11, .5); }
.modal h2 { margin: 0 0 6px; font-family: var(--serif); font-weight: 900; font-size: 1.35rem; letter-spacing: -.01em; }
.modal p { margin: 6px 0; }
.modal .x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 5px; background: none; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.modal .x:hover { background: var(--soft); }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin: 16px 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.stat-grid b { display: block; font-family: var(--serif); font-size: 1.55rem; font-weight: 700; line-height: 1.2; }
.stat-grid span { font-size: .7rem; color: var(--muted); letter-spacing: .02em; }
.dist { display: grid; gap: 4px; margin: 12px 0 0; font-size: .8rem; }
.dist div { display: flex; align-items: center; gap: 8px; }
.dist span { width: 14px; color: var(--muted); text-align: right; }
.dist i { display: block; min-width: 22px; padding: 1px 6px; border-radius: 2px; background: var(--miss-bg); color: var(--muted); font-style: normal; text-align: right; font-weight: 600; }
.dist i.cur { background: var(--ink); color: var(--bg); }
.next { margin: 14px 0 0; font-size: .86rem; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
#toasts { position: fixed; top: 120px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 6px; justify-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 6px; font-weight: 600; font-size: .86rem; box-shadow: var(--shadow); animation: pop .18s ease; }

/* Chosung quiz */
.quiz { width: 100%; max-width: 440px; border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px 22px; text-align: center; }
.quiz h2 { font-family: var(--serif); font-weight: 900; margin: 4px 0; }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 2px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; transition: transform .3s; }
.quiz-cat { display: inline-block; margin: 20px 0 2px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 4px; font-size: .8rem; font-weight: 500; color: var(--muted); }
.quiz-cho { display: flex; justify-content: center; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.quiz-cho b { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 4px; background: var(--ink); color: var(--bg); font-family: var(--serif); font-size: 1.8rem; font-weight: 700; }
.quiz-cho b.open { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.quiz-hint { min-height: 1.6em; color: var(--muted); font-size: .92rem; margin: 6px 0 14px; }
.quiz-form { display: flex; gap: 8px; }
.quiz-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; font-weight: 600; text-align: center; padding: 10px 12px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); }
.quiz-form input:focus { border-color: var(--ink); outline: 0; }
.quiz-form input.ok { border-color: var(--ink); background: var(--ink); color: var(--bg); opacity: 1; }
.quiz-form input.no { border-color: var(--accent); animation: shake .35s; }
.quiz-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.review { text-align: left; margin: 12px 0 4px; padding: 0; list-style: none; font-size: .9rem; max-height: 250px; overflow: auto; border-top: 1px solid var(--line); }
.review li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.review strong { font-family: var(--serif); margin-right: 6px; }
.review .ok { font-weight: 600; font-variant-numeric: tabular-nums; }
.review .no { color: var(--accent); font-weight: 600; }

/* Number baseball */
.nb-slots { display: flex; gap: 6px; justify-content: center; }
.nb-slots b { width: 52px; height: 60px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 4px; font-family: var(--serif); font-size: 1.8rem; font-weight: 700; }
.nb-slots b.filled { border-color: var(--ink); }
.nb-log { width: 100%; max-width: 380px; margin: 4px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.nb-log:empty { display: none; }
.nb-log li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.nb-log .n { color: var(--faint); font-size: .76rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.nb-log .g { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; letter-spacing: .32em; }
.nb-log .r { display: flex; gap: 4px; }
.pill { padding: 2px 8px; border-radius: 3px; font-weight: 700; font-size: .76rem; letter-spacing: .03em; background: var(--miss-bg); color: var(--miss-fg); }
.pill.s { background: var(--ink); color: var(--bg); }
.pill.b { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%; max-width: 380px; touch-action: manipulation; }
.pad .key { height: 50px; font-size: 1.1rem; }
.pad .key:disabled { opacity: .3; }

/* Sudoku */
.sd-wrap { width: 100%; max-width: 460px; }
.sd-grid { display: grid; grid-template-columns: repeat(9, 1fr); border: 2px solid var(--ink); background: var(--bg); aspect-ratio: 1; touch-action: manipulation; }
.sd-cell { position: relative; display: grid; place-items: center; padding: 0; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; font-size: clamp(1.05rem, 5vw, 1.5rem); font-weight: 500; color: var(--pen); aspect-ratio: 1; font-variant-numeric: tabular-nums; }
.sd-cell.given { color: var(--ink); font-family: var(--serif); font-weight: 700; }
.sd-cell.c3 { border-right: 1.5px solid var(--ink); }
.sd-cell.r3 { border-bottom: 1.5px solid var(--ink); }
.sd-cell.c9 { border-right: 0; }
.sd-cell.r9 { border-bottom: 0; }
.sd-cell.peer { background: var(--soft); }
.sd-cell.same { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.sd-cell.sel { background: color-mix(in srgb, var(--pen) 22%, transparent); }
.sd-cell.err { color: var(--accent); background: var(--accent-soft); }
.sd-notes { position: absolute; inset: 1px; display: grid; grid-template-columns: repeat(3, 1fr); font-family: var(--sans); font-size: clamp(.45rem, 2vw, .6rem); line-height: 1; color: var(--muted); font-weight: 500; }
.sd-notes i { display: grid; place-items: center; font-style: normal; }
.sd-bar { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sd-pad { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; margin-top: 12px; }
.sd-pad .key { height: 48px; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.sd-pad .key.done { opacity: .25; }
.sd-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.sd-tools .btn { padding: 9px 4px; font-size: .82rem; }
