@import url("/image-converter/styles.css?v=1");
/* Sudoku solver */
.sd-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.sd-boardcol, .sd-tools, .sd-right { min-width: 0; display: grid; gap: 12px; align-content: start; width: 100%; max-width: 560px; justify-self: center; }
@media (min-width: 900px) {
  .sd-layout { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 28px; row-gap: 16px; }
  .sd-boardcol { grid-row: 1 / span 2; }
  .sd-tools, .sd-right { justify-self: stretch; max-width: 520px; }
  .sd-tools { padding-top: 52px; }
}
.sd-load { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sd-load .btn.sm, .sd-under .btn.sm { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.sd-sample .sel { width: auto; min-height: 40px; font-family: inherit; }
.sd-paste, .sd-photo { margin: 0; display: grid; gap: 8px; }
.sd-paste textarea { resize: vertical; font-size: 14px; }
.sd-status { margin: 0; min-height: 22px; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--muted); }
.sd-status b { color: var(--text); font-weight: 650; }
.sd-status .ok { color: var(--accent); }
.sd-status .bad { color: var(--bad); }
.sd-status .warn { color: var(--warn); }
.sd-status button { background: none; border: 0; padding: 0 2px; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* board */
.sd-boardwrap { position: relative; width: 100%; aspect-ratio: 1; }
.sd-board { position: absolute; inset: 0; display: grid; border: 3px solid #c9ccd6; border-radius: 6px; background: #14151b; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.sd-board.n9 { grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(9, 1fr); }
.sd-board.n6 { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); }
.sd-row { display: contents; }
.sd-cell { position: relative; display: flex; align-items: center; justify-content: center; border: 0; border-right: 1px solid #343846; border-bottom: 1px solid #343846; background: transparent; color: var(--text); padding: 0; margin: 0; font: 600 min(6.4vw, 33px)/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; cursor: pointer; outline: none; min-width: 0; min-height: 0; }
.sd-cell.br { border-right: 2px solid #c9ccd6; }
.sd-cell.bb { border-bottom: 2px solid #c9ccd6; }
.sd-cell.lc { border-right: 0; }
.sd-cell.lr { border-bottom: 0; }
.sd-cell .v { pointer-events: none; }
.sd-cell.clue .v { color: #f2f3f7; font-weight: 750; }
.sd-cell.answer .v { color: #b99cff; font-weight: 600; }
.sd-cell.shown .v { color: #8b90a0; font-weight: 500; font-style: italic; }
.sd-cell.peer { background: rgba(255, 255, 255, .035); }
.sd-cell.same { background: rgba(149, 214, 0, .12); }
.sd-cell.sel { background: rgba(149, 214, 0, .26); }
.sd-board:focus-within .sd-cell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.sd-cell.clash .v { color: var(--bad); }
.sd-cell.clash { background: rgba(255, 107, 107, .14); }
.sd-cell.wrong { background: rgba(255, 107, 107, .22); }
.sd-cell.wrong .v { color: #ff8a8a; text-decoration: underline; text-decoration-thickness: 2px; }
.sd-cell.wrongnote { box-shadow: inset 0 0 0 2px var(--bad); }
.sd-cell.typo { box-shadow: inset 0 0 0 2px var(--warn); }
.sd-cell.differ { box-shadow: inset 0 0 0 2px var(--warn); }
.sd-cell.unsure { box-shadow: inset 0 0 0 2px var(--warn); }
.sd-cell.area { background: rgba(145, 71, 255, .16); }
.sd-cell.pat { background: rgba(145, 71, 255, .32); }
.sd-cell.target { background: rgba(149, 214, 0, .22); }
.sd-cell.elimcell { background: rgba(255, 107, 107, .12); }
.sd-notes { position: absolute; inset: 6%; display: grid; pointer-events: none; font: 500 min(2.35vw, 12.5px)/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #9aa0b4; }
.n9 .sd-notes { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.n6 .sd-notes { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
.sd-notes span { display: flex; align-items: center; justify-content: center; border-radius: 50%; visibility: hidden; }
.sd-notes span.on { visibility: visible; }
.sd-notes span.key { background: rgba(149, 214, 0, .85); color: #10130a; font-weight: 700; }
.sd-notes span.key2 { background: rgba(255, 180, 84, .9); color: #1a1205; font-weight: 700; }
.sd-notes span.elim { background: rgba(255, 107, 107, .9); color: #1a0505; font-weight: 700; text-decoration: line-through; }
.sd-notes span.place { background: var(--accent); color: #10130a; font-weight: 800; }
.sd-links { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); pointer-events: none; overflow: visible; }
.sd-links line { stroke: #ffb454; stroke-width: 5; stroke-linecap: round; opacity: .9; }
.sd-links line.weak { stroke-dasharray: 10 9; stroke: #c9a7ff; }
.sd-links circle { fill: none; stroke: #ffb454; stroke-width: 4; }

/* input */
.sd-modes { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.sd-modes button { background: transparent; border: 0; border-right: 1px solid var(--border); color: var(--muted); font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 44px; cursor: pointer; }
.sd-modes button:last-child { border-right: 0; }
.sd-modes button[aria-checked="true"] { background: rgba(149, 214, 0, .14); color: var(--accent); }
.sd-modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sd-pad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sd-pad.n6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sd-pad button { min-height: 50px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: 650 22px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; cursor: pointer; touch-action: manipulation; position: relative; }
.sd-pad button:hover, .sd-pad button:focus-visible { border-color: var(--accent-dim); outline: none; }
.sd-pad button.erase { font-size: 14px; color: var(--muted); }
.sd-pad button .left { position: absolute; right: 5px; bottom: 3px; font-size: 10px; color: var(--muted); font-weight: 500; }
.sd-pad button.done { opacity: .45; }
.sd-pad.note button:not(.erase) { font-size: 15px; color: #9aa0b4; }
.sd-under { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }

/* help */
.sd-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sd-actions .btn { min-height: 46px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; }
.sd-actions #hintBtn { grid-column: 1 / -1; }
.sd-actions .btn.armed { border-color: var(--warn); color: var(--warn); }
.sd-hint { margin: 0; display: grid; gap: 8px; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; border-color: #3a2e5c; }
.sd-hint p { margin: 0; }
.sd-tech { color: var(--accent); font-weight: 700; }
.sd-tipbtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 0 2px; }
.sd-tip { font-size: 13px; color: var(--muted); }
.sd-move { font-weight: 650; }
.sd-notation { font: 12px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--muted); overflow-wrap: anywhere; }
.sd-more { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.sd-more summary { cursor: pointer; font-weight: 650; min-height: 28px; }
.sd-more[open] summary { margin-bottom: 10px; }
.sd-small { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.sd-steps { margin: 8px 0 0; padding-left: 0; list-style: none; max-height: 420px; overflow: auto; display: grid; gap: 2px; counter-reset: st; }
.sd-steps li button { width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--text); font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding: 6px 8px; cursor: pointer; overflow-wrap: anywhere; }
.sd-steps li button:hover, .sd-steps li button:focus-visible { border-color: var(--border); outline: none; }
.sd-steps li button[aria-current="step"] { border-color: var(--accent); background: rgba(149, 214, 0, .08); }
.sd-steps .k { color: var(--muted); display: inline-block; min-width: 2.4em; }
.sd-steps .t { color: var(--accent); font-weight: 650; }
.sd-steps li.end { color: var(--muted); font-size: 13px; padding: 6px 8px; }
.sd-stepnav { margin-bottom: 4px; }
.sd-used { margin: 0; padding-left: 18px; font-size: 13px; }
.sd-used li { margin: 2px 0; }
.sd-used .lv { color: var(--muted); }
.sd-techs { display: grid; gap: 4px 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-top: 10px; }
.sd-techs h3 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sd-techs .check { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 32px; }

/* photo */
.sd-photo-stage { position: relative; width: 100%; display: flex; justify-content: center; background: #0b0b0f; border-radius: 8px; overflow: hidden; }
.sd-photo-canvas { display: block; max-width: 100%; max-height: 46vh; touch-action: none; cursor: grab; }
.sd-photo-say { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--muted); }
.sd-photo-say b { color: var(--warn); }
body.dragging .sd-boardwrap { outline: 2px dashed var(--accent); outline-offset: 4px; }
#sdLeft.confirm .sd-modes button[data-mode="note"] { display: none; }
#sdLeft.confirm .sd-modes { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 520px) {
  .sd-board { border-width: 2px; }
  .sd-pad button { min-height: 48px; }
}
@media print {
  body { background: #fff !important; }
  .site, .contact, .sd-right, .sd-load, .sd-modes, .sd-pad, .sd-under, .head .intro { display: none !important; }
  .sd-board { background: #fff; border-color: #000; }
  .sd-cell { color: #000; border-color: #999; }
  .sd-cell.br, .sd-cell.bb { border-color: #000; }
  .sd-cell .v, .sd-cell.clue .v, .sd-cell.answer .v { color: #000; }
}
.wrap [hidden] { display: none !important; }
.sd-viewbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sd-viewbar .btn.sm { min-height: 40px; font-size: 13px; }
.sd-viewsay { font: 600 14px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--accent); flex: 1 0 100%; }
.sd-input { display: grid; gap: 10px; }
#sdLeft.confirm #actions, #sdLeft.viewing #actions, #sdLeft.viewing .sd-input, #sdLeft.confirm .sd-right { display: none; }
#sdLeft.confirm .sd-under #cellBtn, #sdLeft.confirm .sd-under #solveBtn, #sdLeft.confirm .sd-under .check, #sdLeft.confirm .sd-under .sd-sample { display: none; }

/* Killer Sudoku cage helper */
.kl-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
@media (max-width: 760px) { .kl-layout { grid-template-columns: minmax(0, 1fr); } }
.kl-ask { display: grid; gap: 8px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.kl-ask .lbl { margin: 6px 0 0; font-family: inherit; }
.kl-sizes, .kl-toggles { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.kl-sizes button, .kl-toggles button { min-height: 44px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: 650 17px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; cursor: pointer; padding: 0; }
.kl-sizes button[aria-checked="true"], .kl-toggles button[aria-pressed="true"] { border-color: var(--accent); background: rgba(149, 214, 0, .16); color: var(--accent); }
.kl-toggles.out button[aria-pressed="true"] { border-color: var(--bad); background: rgba(255, 107, 107, .14); color: var(--bad); text-decoration: line-through; }
.kl-sizes button:focus-visible, .kl-toggles button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.kl-sum { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 6px; }
.kl-sum .in { font: 650 22px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-align: center; }
.kl-sum .btn { font-size: 22px; padding: 0; min-height: 48px; }
.kl-digits { display: grid; gap: 6px; }
.kl-digits .btn.sm { justify-self: start; margin-top: 6px; min-height: 36px; }
.kl-out { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.kl-out h2 { font-size: 18px; }
.kl-combos { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kl-combos li { font: 650 18px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; padding: 9px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); }
.kl-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.kl-facts dt { color: var(--muted); }
.kl-facts dd { margin: 0; font: 650 15px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; }
.kl-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 4px; }
.kl-table button { display: grid; gap: 2px; justify-items: center; padding: 6px 2px; min-height: 48px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: 13px/1.1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; cursor: pointer; }
.kl-table button b { font-size: 16px; }
.kl-table button span { color: var(--muted); font-size: 11px; }
.kl-table button.one { border-color: var(--accent-dim); }
.kl-table button.one span { color: var(--accent); }
.kl-table button.on { background: rgba(149, 214, 0, .16); border-color: var(--accent); }
