/* 스도쿠 대결 — lib/mini.css 위에 이 게임에만 필요한 것. 선은 쓰지 않고 틈과 옅은 바탕으로 칸을 나눠요 */
.app[data-game="sudoku"] .mini-body { inset: 52px 12px 14px; gap: 0; }
.app[data-game="sudoku"] .live { top: 18px; font: 700 17px/1 var(--font-sans); letter-spacing: 0.04em; color: var(--p1); }
.app[data-game="sudoku"] .stage--mini .num { font-size: 15px; color: rgb(var(--stage-ink)); }
.sd { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 7px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.sd__b { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 2px; min-width: 0; min-height: 0; }
.sd__c { position: relative; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 7px; background: rgba(var(--stage-ink), 0.06); color: var(--sprout-strong); font: 600 var(--fs, 20px)/1 var(--font-sans); font-variant-numeric: tabular-nums; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 120ms; }
.sd__c.is-given { color: rgb(var(--stage-ink)); font-weight: 700; }
.sd__c.is-peer { background: rgba(var(--stage-ink), 0.115); }
.sd__c.is-same { background: rgba(var(--stage-ink), 0.2); }
/* 굳은 줄: 초록 바탕. 더는 못 고쳐요 */
.sd__c.is-lock { background: rgba(91, 209, 110, 0.24); color: rgb(var(--stage-ink)); cursor: default; }
.sd__c.is-lock.is-peer { background: rgba(91, 209, 110, 0.34); }
.sd__c.is-lock.is-same { background: rgba(91, 209, 110, 0.5); }
.sd__c.is-bad { background: var(--stamp-soft); color: var(--stamp-strong); }
.sd__c.is-sel { background: rgb(var(--stage-ink)); color: var(--stage); }
.sd__c.is-sel.is-bad { background: var(--stamp); color: var(--on-stamp); }
.sd__c:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.sd__c.is-pop { animation: sd-pop 420ms var(--ease-pop, ease-out) both; }
.sd__c.is-shake { animation: sd-shake 320ms ease-out; }
@keyframes sd-pop { 0% { transform: scale(1); } 40% { transform: scale(1.16); background: var(--sprout); } 100% { transform: scale(1); } }
@keyframes sd-shake { 20% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }
/* 숫자판 */
.sd-pad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; width: 100%; }
.sd-key { position: relative; height: 54px; padding: 0; border: 0; border-radius: var(--radius-md, 14px); background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 0 var(--line); color: var(--ink); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sd-key b { font: 600 24px/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.sd-key i { position: absolute; top: 6px; right: 8px; font: 500 10px/1 var(--font-mono); font-style: normal; color: var(--ink-muted); }
.sd-key:active { transform: translateY(2px); box-shadow: inset 0 0 0 1.5px var(--line); }
.sd-key.is-done { opacity: 0.32; }
.sd-key--del b { font-size: 14px; }
.sd-key:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 소개 그림: 한 줄이 굳는 모습 */
.sd-demo { display: grid; grid-template-columns: repeat(3, 46px); gap: 4px; }
.sd-demo i { display: grid; place-items: center; height: 46px; border-radius: 10px; background: rgba(var(--stage-ink), 0.07); font: 700 22px/1 var(--font-sans); font-style: normal; color: rgb(var(--stage-ink)); }
.sd-demo i.is-lock { background: rgba(91, 209, 110, 0.3); }
.sd-demo i.is-sel { background: rgb(var(--stage-ink)); }
@media (max-height: 700px) { .sd-key { height: 46px; } .sd-key b { font-size: 21px; } }
@media (min-width: 960px) and (min-height: 620px) {
  .app[data-game="sudoku"] .mini-body { inset: 60px 32px 20px; }
  .app[data-game="sudoku"] .foot-body { max-width: 620px; }
  .sd-pad { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .sd { gap: 9px; } .sd__b { gap: 3px; } .sd__c { border-radius: 9px; }
}
@media (prefers-reduced-motion: reduce) { .sd__c.is-pop, .sd__c.is-shake { animation: none; } }
