.fun-page .ribbon-help,
.sudoku-ui,
.sudoku-credit {
  max-width: min(42rem, calc(100vw - 1.7rem));
}
.sudoku-ui { width: min(560px, calc(100vw - 1.7rem)); }
.sudoku-levels, .sudoku-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 .7rem;
  max-width: 100%;
}
.sudoku-levels button, .sudoku-bar button, .sudoku-pad button {
  min-height: 44px;
  min-width: 44px;
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 2px solid #1a5c36;
  background: #fff;
  color: #1a5c36;
  font-weight: 700;
  font: inherit;
}
.sudoku-bar button { background: #1a5c36; color: #fff; }
.sudoku-levels button.is-on, .sudoku-bar button.is-on { background: #144a2b; color: #fff; }
.sudoku-timer-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  font-weight: 700;
  color: #1a5c36;
}
.sudoku-status { min-height: 1.4em; margin: 0 0 .6rem; font-weight: 700; color: #1a5c36; }
.sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-template-rows: repeat(9, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  box-sizing: border-box;
  border: 3px solid #1a2744;
  background: #fff;
  margin: 0 0 .8rem;
  touch-action: manipulation;
}
.sudoku-board br { display: none !important; }
.sudoku-board-cell {
  position: relative;
  display: block;
  max-width: none;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border-right: 1px solid #c5ced6;
  border-bottom: 1px solid #c5ced6;
}
.sudoku-board .candidates { display: none !important; }
.sudoku-board-cell:nth-of-type(3n) { border-right: 3px solid #1a2744; }
.sudoku-board-cell:nth-of-type(9n) { border-right: 0; }
.sudoku-board-cell:nth-of-type(n+19):nth-of-type(-n+27),
.sudoku-board-cell:nth-of-type(n+46):nth-of-type(-n+54),
.sudoku-board-cell:nth-of-type(n+73):nth-of-type(-n+81) {
  border-bottom: 3px solid #1a2744;
}
.sudoku-board-cell:nth-of-type(n+73):nth-of-type(-n+81) { border-bottom: 0; }
.sudoku-board-cell input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: clamp(1.2rem, 5vw, 1.9rem);
  font-weight: 700;
  color: #1a5c36;
  caret-color: transparent;
  border-radius: 0;
}
.sudoku-board-cell input:focus { outline: none; }
.sudoku-board-cell.is-on { box-shadow: inset 0 0 0 3px #1a5c36; z-index: 1; }
.sudoku-clue { color: #172033; font-weight: 800; }
.sudoku-hint { background: #e5f2ea; }
.sudoku-bad, .sudoku-board-cell .board-cell--error {
  background: #fde2e2;
  color: #9b1c1c;
}
.user-notes {
  position: absolute;
  inset: 1px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  pointer-events: none;
  z-index: 2;
}
.has-val .user-notes { visibility: hidden; }
.user-notes span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(.42rem, 1.45vw, .68rem);
  line-height: 1;
  color: #35557a;
  font-weight: 700;
}
.sudoku-pad {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: .35rem;
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
}
.sudoku-pad button {
  border-radius: 10px;
  font-size: 1.35rem;
  padding: 0;
  min-width: 0;
  width: 100%;
}
.sudoku-credit { max-width: 40rem; color: #3a4a58; font-size: .95rem; }
.sudoku-credit a { color: #1a5c36; }
.sudoku-sheet { display: none; }
.sudoku-sheet h1 { margin: 0 0 .4rem; font-size: 1.4rem; color: #000; }
.sudoku-sheet p { margin: 0 0 .6rem; color: #000; }
.sudoku-sheet table { border-collapse: collapse; }
.sudoku-sheet td {
  width: 28px;
  height: 28px;
  text-align: center;
  vertical-align: middle;
  font-size: 16px;
  border: 1px solid #666;
  color: #000;
}
.sudoku-sheet td.b-l { border-left: 3px solid #000; }
.sudoku-sheet td.b-t { border-top: 3px solid #000; }
.sudoku-sheet td.b-r { border-right: 3px solid #000; }
.sudoku-sheet td.b-b { border-bottom: 3px solid #000; }
.sudoku-report { white-space: pre-wrap; max-width: 50rem; }
@media (max-width: 640px) {
  .sudoku-pad { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sudoku-pad button { min-height: 48px; font-size: 1.4rem; }
}
@media print {
  .hp-banner, .hp-nav, .hp-footer, .sudoku-ui, .sudoku-credit, .ribbon-back, .ribbon-help, .sudoku-report { display: none !important; }
  .sudoku-sheet { display: block !important; }
  body.hp, .hp-shell, .hp-main { background: #fff !important; }
  @page { margin: .6in; }
}
