/* Sudoku */
.su-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 18px; align-items: start; max-width: 720px; margin: 0 auto; }
@media (max-width: 680px) { .su-wrap { grid-template-columns: 1fr; } }
.su-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  aspect-ratio: 1;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  border: 2px solid var(--fg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--c-bg);
}
.su-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line, rgba(127,127,127,.3));
  border-bottom: 1px solid var(--line, rgba(127,127,127,.3));
  background: transparent;
  color: var(--a5);
  font: 600 clamp(16px, 4.6vw, 26px)/1 var(--font-body);
  cursor: pointer;
  container-type: size;
  -webkit-tap-highlight-color: transparent;
}
.su-cell span { font-size: 62cqh; }
.su-cell.br { border-right: 2px solid var(--fg); }
.su-cell.bb { border-bottom: 2px solid var(--fg); }
.su-cell.given { color: var(--fg); }
.su-cell.peer { background: rgba(127, 127, 127, .1); }
.su-cell.same { background: rgba(108, 92, 231, .22); }
.su-cell.sel { background: rgba(108, 92, 231, .4); }
.su-cell.bad { color: var(--bad) !important; }
.su-cell.win { animation: su-win .6s ease both; }
@keyframes su-win { 50% { background: var(--a4); color: #05040c; } }
.su-cell:focus-visible { outline: 3px solid var(--a3); outline-offset: -3px; z-index: 1; }
.su-notes { display: grid !important; grid-template-columns: repeat(3, 1fr); width: 100%; height: 100%; padding: 2px; font-size: 26cqh !important; color: var(--dim); }
.su-notes i { font-style: normal; display: grid; place-items: center; }

.su-pad { display: grid; gap: 12px; }
.su-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (max-width: 680px) { .su-nums { grid-template-columns: repeat(9, 1fr); gap: 4px; } }
.su-num {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--fg);
  font: 700 22px/1 var(--font-body);
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
}
.su-num small { position: absolute; top: 3px; right: 5px; font-size: 10px; color: var(--dim); font-weight: 400; }
.su-num:hover:not(:disabled) { border-color: var(--a1); color: var(--a1); }
.su-num:disabled { opacity: .3; cursor: default; }
.su-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.su-acts .sf-btn.on { background: var(--a1); color: #fff; }
@media (max-width: 680px) { .su-acts { grid-template-columns: repeat(4, 1fr); } .su-num small { display: none; } }

/* retro */
[data-theme="retro"] .su-grid { border: 3px solid var(--a2); border-radius: 0; box-shadow: 6px 6px 0 #000, 0 0 30px rgba(53,242,224,.25); }
[data-theme="retro"] .su-cell { color: var(--a1); border-color: rgba(53, 242, 224, .15); font-family: var(--font-display); }
[data-theme="retro"] .su-cell span { font-size: 42cqh; }
[data-theme="retro"] .su-cell.given { color: var(--a2); text-shadow: 0 0 6px rgba(53,242,224,.6); }
[data-theme="retro"] .su-cell.br { border-right: 3px solid var(--a2); }
[data-theme="retro"] .su-cell.bb { border-bottom: 3px solid var(--a2); }
[data-theme="retro"] .su-cell.peer { background: rgba(155, 92, 255, .14); }
[data-theme="retro"] .su-cell.same { background: rgba(255, 210, 63, .2); }
[data-theme="retro"] .su-cell.sel { background: rgba(124, 255, 79, .3); }
[data-theme="retro"] .su-notes { font-family: var(--font-body); font-size: 30cqh !important; color: var(--a3); }
[data-theme="retro"] .su-num { border-radius: 0; font-family: var(--font-display); font-size: 14px; }
