@charset "utf-8";
:root {
  --cell-size: min(9.5vw, 9.5vh, 74px);
  /* was 0.80 → now 0.75 (= 5 % smaller) */
  --font-main-size: clamp(22px, calc(var(--cell-size)*0.75), 46px);
  --font-note-size: clamp(8px, calc(var(--cell-size)*0.35), 22px);
  --footer-gap: 120px;
}
html, body {
  height: 100%;
  margin: 0;
}
body {
  position: relative;
  padding: 0;
  font-family: "Open Sans", arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fcfbf8;
}
a:link {
  text-decoration: none;
  color: #e23b0d;
}
a:visited {
  text-decoration: none;
  color: #e23b0d;
}
a:hover {
  text-decoration: underline;
  cursor: pointer;
  color: #e23b0d;
}
a:active {
  text-decoration: none;
  color: #e23b0d;
}
a img {
  border: 0;
}
img {
  display: block;
}
h1, h2 {
  padding: 0;
  border: 0;
  margin: 0;
}
p {
  padding: 0;
  border: 0;
  margin: 0;
}
ul, li {
  margin: 0;
  padding: 0;
  list-style: none;
}
hr {
  margin: 0;
  padding: 0;
}
/* ======================
   WRAPPER
   ====================== */
.wrapper {
  width: calc(100% - 20px);
  max-width: 975px;
  margin: 0 auto;
  box-sizing: border-box;
}
/* ======================
   PAGE HEADER
   ====================== */
.header-logo {
  padding-top: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}
.header-logo, .header-status {
  white-space: nowrap;
}
.header-logo {
  font-family: 'Source Serif Pro', serif;
  font-weight: 600;
  font-size: 40px;
  margin: 0;
}
.header-logo-text {
  color: #2e2b25 !important;
}
.header-logo-text:hover {
  text-decoration: none;
  color: #2e2b25 !important;
}
.header-status {
  font-family: 'Source Serif Pro', serif;
  font-weight: 600;
  font-size: 26px;
  margin: 0;
}
/* ======================
   separators
   ====================== */
.separator {
  width: 100%;
  border: none;
  margin: 0;
  box-sizing: border-box;
}
.separator-top {
  border-top: 2px solid #000;
  margin: 7px 0 19px;
}
.separator-bottom {
  border-bottom: 2px solid #000;
  margin: 19px 0 29px;
}
/* ======================
   CONTROLS PANEL
   ====================== */
.controls {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.controls-left, .controls-center, .controls-right {
  display: flex;
  align-items: center;
  gap: 15px;
}
.controls-center {
  margin: 0 auto;
  gap: 1px;
}
.controls-right {
  position: relative;
}
.controls label, .controls span {
  font-size: 18px;
  line-height: 1.2;
}
.symbole-pause {
  width: 17px;
  height: 17px;
  margin-left: 2px;
  color: #333;
  pointer-events: none;
}
#timer {
  padding-left: 13px;
  font-weight: 700;
  font-size: 18px;
}
.controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  padding: 4px 8px;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
  color: #333;
}
.switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 18px;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: relative;
  width: 50px;
  height: 25px;
  background: #333;
  border-radius: 12.5px;
  transition: background .2s;
  margin-right: 8px;
}
.switch .slider::before {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform .2s;
}
.switch input:checked + .slider::before {
  transform: translateX(25px);
}
.switch input:checked + .slider {
  background: #4cb150;
}
/* ======================
   NEW GEAR BUTTON + DROPDOWN
   ====================== */
.gear {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.symbole-gear {
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.settings-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 260px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  border-radius: .75rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .2);
  z-index: 1000;
}
.settings-dropdown[hidden] {
  display: none;
}
.settings-dropdown label:not(.switch) {
  display: flex;
  flex-direction: column;
  font-size: 16px;
  gap: 4px;
}
.settings-dropdown label.switch {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* ======================
   BOARD LAYOUT
   ====================== */
.main {
  display: flex;
  gap: 27px;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
#board-container, .side-panel {
  flex: 0 0 auto;
}
#board-container {
  position: relative;
}
#board-container, .side-panel {
  touch-action: manipulation;
}
/* ======================
   PAUSE OVERLAY
   ====================== */
.puzzle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.print-link {
  margin-top: 20px;
  font-size: 18px;
  text-align: center;
}
.print-link a {
  text-decoration: none;
  color: black;
}
.print-link a:hover {
  text-decoration: underline;
}
.puzzle-wrap.paused .print-link a {
  pointer-events: none;
  opacity: .5;
  cursor: default;
}
.puzzle-wrap.win .print-link a {
  pointer-events: none;
  opacity: .5;
  cursor: default;
}
#pause-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}
#pause-overlay button {
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  transition: transform .3s ease;
}
#pause-overlay button:hover {
  transform: scale(1.1);
}
.symbole-resume {
  display: block;
  width: 130px;
  height: 130px;
  pointer-events: none;
}
/* ======================
   WIN MODAL
   ====================== */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn .3s ease-out;
}
.modal-content {
  background: #fff;
  padding: 35px 40px 45px 40px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
}
.modal-content h2 {
  margin-top: 0;
  font-size: 28px;
}
.modal-content p {
  margin: 12px 0 24px;
  font-size: 20px;
}
.modal-content button {
  padding: 12px 24px;
  font-size: 20px;
  border: none;
  border-radius: 6px;
  background: #4cb150;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .3s;
}
.modal-content button:hover {
  background: #369639;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* ======================
   SUDOKU GRID
   ====================== */
table {
  border-collapse: collapse;
  table-layout: fixed;
}
td, textarea {
  box-sizing: border-box;
  width: var(--cell-size);
  height: var(--cell-size);
}
td {
  border: 1px solid #999;
  background: #fff;
  position: relative;
  z-index: 0;
}
td:nth-child(3), td:nth-child(6) {
  border-right: 3px solid #000;
}
tr:nth-child(3) td, tr:nth-child(6) td {
  border-bottom: 3px solid #000;
}
td:first-child {
  border-left: 3px solid #000;
}
tr:first-child td {
  border-top: 3px solid #000;
}
td:last-child {
  border-right: 3px solid #000;
}
tr:last-child td {
  border-bottom: 3px solid #000;
}
textarea {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: var(--font-main-size);
  line-height: var(--cell-size);
  text-align: center;
  font-weight: 700;
  caret-color: transparent !important;
  transition: background-color .2s, color .2s;
  position: relative;
  z-index: 1;
}
textarea.clue {
  background: #eee;
  color: black;
}
textarea.wrong {
  color: #cc3333 !important;
}
/* highlights */
td.same-row, td.same-col, td.same-box {
  background: #fbefd9;
}
td.same-row:not(.selected) textarea.clue:not(.same-value), td.same-col:not(.selected) textarea.clue:not(.same-value), td.same-box:not(.selected) textarea.clue:not(.same-value) {
  background: transparent !important;
  color: black !important;
}
textarea.same-value {
  background: #fcd998 !important;
  color: black !important;
  z-index: 5;
}
td.selected textarea {
  background: #feb633 !important;
  color: black !important;
}
td.selected textarea.wrong, textarea.same-value.wrong {
  color: red !important;
}
#sudoku-board textarea {
  cursor: default;
  font-family: "Libre Franklin", sans-serif;
  font-size: var(--font-main-size);
  font-weight: 700;
  color: #333;
}
/* ======================
   NUMPAD & SIDE PANEL
   ====================== */
.side-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
.numpad {
  display: grid;
  grid-template-columns: repeat(3, var(--cell-size));
  gap: 12px;
}
.numpad button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Libre Franklin", sans-serif;
  position: relative;
  width: var(--cell-size);
  height: var(--cell-size);
  font-size: var(--font-main-size);
  font-weight: 700;
  color: #333;
  border: 1px solid #aaa9a8 !important;
  border-radius: 4px;
  background: #eee;
  cursor: pointer;
  transition: background .2s;
}
.symbole-undo, .symbole-clear, .symbole-pencil {
  display: inline-block;
}
.symbole-undo {
  width: 1.1em;
  height: 1.1em;
}
.symbole-clear {
  width: 0.84em;
  height: 0.84em;
}
.symbole-pencil {
  width: 0.83em;
  height: 0.83em;
}
.numpad button:hover {
  background: #ddd;
}
.numpad .clear {
  grid-column: 1;
  grid-row: 4;
}
.numpad .undo {
  grid-column: 2;
  grid-row: 4;
}
.numpad .pencil {
  grid-column: 3;
  grid-row: 4;
}
body.notes-on .numpad .pencil {
  background: #000;
  color: #fff !important;
}
body.notes-on .numpad .pencil img {
  filter: brightness(0) invert(1);
}
.numpad button.used:not(.clear):not(.undo) {
  color: lightgray;
}
body.notes-on .numpad button:not(.clear):not(.undo) {
  color: transparent;
}
body.notes-on .numpad button:not(.clear):not(.undo)::after {
  content: attr(data-num);
  position: absolute;
  font-size: var(--font-note-size);
  color: #333;
}
body.notes-on .numpad button[data-num="1"]::after {
  top: 4px;
  left: 4px;
}
body.notes-on .numpad button[data-num="2"]::after {
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}
body.notes-on .numpad button[data-num="3"]::after {
  top: 4px;
  right: 4px;
}
body.notes-on .numpad button[data-num="4"]::after {
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
}
body.notes-on .numpad button[data-num="5"]::after {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
body.notes-on .numpad button[data-num="6"]::after {
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
}
body.notes-on .numpad button[data-num="7"]::after {
  bottom: 4px;
  left: 4px;
}
body.notes-on .numpad button[data-num="8"]::after {
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}
body.notes-on .numpad button[data-num="9"]::after {
  bottom: 4px;
  right: 4px;
}
.auto-candidate-toggle {
  margin-top: 10px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cell-container {
  position: relative;
  width: var(--cell-size);
  height: var(--cell-size);
}
.notes-grid {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  pointer-events: none;
  z-index: 15;
}
.notes-grid span {
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Libre Franklin", sans-serif;
  font-size: var(--font-note-size);
  color: #333;
  visibility: hidden;
}
/*ARTICLE*/
.article-wrapper {
  padding-left: 10px;
  padding-right: 10px;
  background-color: #f1e8d9;
  font-family: 'Source Serif Pro', serif;
  margin-top: 30px;
  padding-bottom: 50px;
  width: 100%;
  box-sizing: border-box;
  border-top: 3px solid #cfcecc;
  color: #2e2b25;
}
.article-content {
  max-width: 800px;
  margin: 0 auto;
}
.article-h1 {
  font-size: 52px;
  font-weight: 700;
  text-align: center;
  margin-top: 28px;
  padding-bottom: 5px;
}
.article-baseline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  font-style: italic;
  font-size: 23px;
  margin-bottom: 25px;
}
.article-baseline::before, .article-baseline::after {
  content: "";
  flex: 1;
  height: 2px;
  background-color: #2e2b25;
  max-width: 80px;
}
h2.article-h2 {
  font-size: 25px;
  padding-bottom: 16px;
  font-weight: 700;
}
.article-h2-padding {
  padding-top: 16px;
}
.article-text {
  font-size: 20px;
  padding-bottom: 16px;
  line-height: 30px;
  text-align: justify;
  color: #000;
}
.article-list {
  color: #000;
  font-size: 20px;
  position: relative;
  padding-left: 18px;
  text-align: justify;
  line-height: 30px;
  list-style-type: none;
  padding-bottom: 16px;
}
.article-list::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(10px);
  width: 6px;
  height: 6px;
  background-color: #000;
  border-radius: 50%;
}
.article-img {
  width: 100%;
  margin: 0 auto;
  padding-bottom: 16px;
}
.sub-wrapper {
  background-color: #f1e8d9;
  font-family: 'Source Serif Pro', serif;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 50px;
  width: 100%;
  box-sizing: border-box;
  border-top: 3px solid #cfcecc;
  color: #2e2b25;
}
.sub-article-logo {
  display: inline-block;
  line-height: 1;
  font-size: 57px;
  font-weight: 700;
  margin-top: 12px;
  padding-bottom: 5px;
  text-decoration: none;
  color: #2e2b25 !important;
  cursor: pointer;
}
.sub-article-logo:hover, .sub-article-logo:visited, .sub-article-logo:active, .sub-article-logo:focus {
  color: #2e2b25 !important;
  text-decoration: none;
}
.sub-article-separator {
  border: none;
  border-top: 2px solid #2e2b25;
}
.sub-date-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  font-style: italic;
  font-size: 20px;
  padding-top: 6px;
  padding-bottom: 6px;
  gap: 4px;
}
.sub-article-h1 {
  font-size: 34px;
  padding-top: 12px;
  padding-bottom: 8px;
  font-weight: 700;
}
/* ===== MINIGAMES OVERVIEW ===== */
.jeux-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 20px;
  justify-content: center;
}
/* Only change the flex values */
.jeux-miniature {
  flex: 0 1 390px;
  padding-top: 8px;
}
/* Make sure the thumbnail itself scales */
.jeux-miniature img {
  width: 100%;
  height: auto;
}
.jeux-miniature > a > img {
  transition: filter 0.3s ease;
}
.jeux-miniature > a:hover > img {
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.2));
}
.jeux-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 14px 0 8px;
}
.jeux-titre {
  font-size: 25px;
  font-weight: 600;
  margin: 0;
}
.jeux-titre a, .jeux-titre a:visited {
  color: #2e2b25;
  text-decoration: none;
  position: relative;
  display: inline-block;
}
.jeux-titre a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #2e2b25;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.jeux-titre a:hover::after {
  opacity: 1;
}
.jeux-evaluer {
  position: relative;
  top: 2px;
}
.jeux-text {
  font-size: 20px;
  line-height: 28px;
  margin: 0;
  color: #000;
}
/* ===== miniGAMES  ===== */
.jeu-wrapper {
  display: block;
  width: 100%;
  margin-top: 24px;
}
.jeu-frame-responsive {
  display: none;
}
.jeu-frame {
  text-align: center;
  line-height: 0;
}
.jeu-info-wrapper {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding-bottom: 10px;
  background-color: #ecdfcd;
}
.jeu-info-heading {
  padding-left: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-weight: 600;
  font-size: 32px;
  color: #fff;
  background-color: #bfa98e;
}
.jeu-info-content {
  font-size: 20px;
  line-height: 28px;
  padding-top: 18px;
  padding-left: 24px;
  padding-right: 24px;
}
.jeu-info-titre {
  font-size: 25px;
  font-weight: 600;
  margin-bottom: 8px;
}
.jeu-info-text {
  padding-bottom: 14px;
}
.evaluations_symboles {
  display: inline-block;
  padding-top: 8px;
}
.evaluations_parties {
  height: 35px;
  font-size: 18px;
  display: inline-block;
  margin-left: 0;
  vertical-align: middle;
}
.evaluations_radio {
  padding-top: 2px;
  padding-bottom: 16px;
  margin-left: -3px;
}
input[type='radio'] {
  width: 18px;
  height: 18px;
  vertical-align: top;
}
.evaluations_button {
  font-family: 'Source Serif Pro', serif;
  font-weight: 600;
  padding-top: 16px;
  padding-bottom: 14px;
  text-align: center;
  font-size: 24px;
  cursor: pointer;
  background-color: #a69277;
  color: #fff;
  outline: none;
  border: 0;
  box-sizing: border-box;
  min-width: 200px;
  transition: .2s ease-in-out;
  -webkit-transition: .2s ease-in-out;
  -webkit-appearance: none;
}
.evaluations_button:hover {
  background: #8d795c;
  transition: .2s ease-in-out;
  -webkit-transition: .2s ease-in-out;
}
.evaluations_prompt {
  padding-top: 12px;
  color: #fb270b;
  font-weight: 600;
}
/*GAME SIZES*/
.microsoft-sudoku {
  width: 800px;
  height: 600px;
}
.arkadium {
  width: 800px;
  height: 600px;
}
.jeu-sudoku {
  width: 800px;
  height: 480px;
}
/* KAKURO GAME WITH EDITS*/
.kakuro {
  width: 800px;
  height: 600px;
}
.kakuro-frame {
  width: 800px;
  height: 600px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}
.kakuro-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 42px;
  background: #f7f7f7;
  z-index: 10;
}
/* END KAKURO GAME */
/* KILLER GAME WITH EDITS */
.sudoku-killer {
  width: 800px;
  height: 497px;
  background: #fff;
}
.sudoku-killer-frame {
  width: 800px;
  height: 497px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}
.sudoku-killer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: #fff;
  z-index: 10;
}
.sudoku-killer-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  padding: 6px 16px;
  font-family: "Open Sans", arial, sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: #0070f6;
  background: #f3f6fa;
  border: 1px solid #d7dce3;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s ease;
}
.sudoku-killer-button:hover {
  background: #e8ebef;
}
.sudoku-killer-button:active {
  background: #dbe1e8;
}
/* END KILLER GAME*/
.calcudoku {
  width: 800px;
  height: 480px;
}
.sudoku-16x16 {
  width: 550px;
  height: 720px;
}
.futoshiki {
  width: 480px;
  height: 640px;
}
.sudoku-en-ligne {
  width: 454px;
  height: 640px;
}
.wordoku {
  width: 454px;
  height: 640px;
}
.sudoku-du-jour {
  width: 427px;
  height: 640px;
}
@media(max-width:840px) { /*GAME SIZES*/
  /*GAME SIZES*/
  .microsoft-sudoku {
    width: 736px;
    height: 552px;
  }
  .arkadium {
    width: 736px;
    height: 552px;
  }
  .jeu-sudoku {
    width: 736px;
    height: 442px;
  }
  .kakuro {
    width: 736px;
    height: 552px;
  }
  .kakuro-frame {
    width: 736px;
    height: 552px;
  }
  .sudoku-killer {
    width: 736px;
    height: 457px;
  }
  .sudoku-killer-frame {
    width: 736px;
    height: 457px;
  }
  .calcudoku {
    width: 736px;
    height: 442px;
  }
}
@media (max-width: 767px) {
  /*GAME SIZES*/
  .microsoft-sudoku {
    width: 598px;
    height: 449px;
  }
  .arkadium {
    width: 598px;
    height: 449px;
  }
  .jeu-sudoku {
    width: 598px;
    height: 359px;
  }
  .kakuro {
    width: 598px;
    height: 449px;
  }
  .kakuro-frame {
    width: 598px;
    height: 449px;
  }
  .sudoku-killer {
    width: 598px;
    height: 372px;
  }
  .sudoku-killer-frame {
    width: 598px;
    height: 372px;
  }
  .calcudoku {
    width: 598px;
    height: 359px;
  }
}
@media (max-width:640px) {
  .jeu-frame {
    display: none;
  }
  .jeu-frame-responsive {
    padding-top: 1px;
    width: 468px;
    display: block;
    margin: 0px auto;
  }
  .jeu-frame-responsive img {
    width: 100%;
  }
}
@media (max-width:525px) {
  .jeu-frame-responsive {
    width: 381px;
  }
}
@media (max-width:500px) {
  .jeu-frame-responsive {
    width: 320px;
  }
}
/* NAVIGATION */
.main-nav-wrapper {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  z-index: 100;
  user-select: none;
}
.hamburger {
  font-size: 30px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  margin-right: 4px;
  margin-top: 3px;
  user-select: none;
}
.main-nav-dropdown {
  position: absolute;
  top: 55px;
  right: 10px;
  background-color: #7e6d53;
  display: flex;
  flex-direction: column;
  z-index: 101;
  padding: 25px 40px 22px 28px;
  border-radius: 6px;
  gap: 11px;
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.main-nav-dropdown.visible {
  opacity: 1;
  pointer-events: auto;
}
.game-link {
  color: #f9f9f4;
  font-family: 'Source Serif Pro', serif;
  font-weight: 500;
  font-size: 24px;
  text-decoration: none;
}
.game-link, .game-link:visited, .game-link:focus, .game-link:active {
  color: #f9f9f4 !important;
  text-decoration: none;
}
.game-link:hover {
  color: #f9f9f4 !important;
  text-decoration: underline;
}
/* SUDOKU SOLVER CSS */
.solver-output-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  font: 600 20px "Open Sans", arial, sans-serif;
  padding-bottom: 3px;
  gap: 4px;
}
.player-message-separator {
  width: 100%;
  border: none;
  margin: 0;
  box-sizing: border-box;
}
.player-message-separator-top {
  border-top: 2px solid #000;
  margin: 7px 0;
}
.player-message-separator-bottom {
  border-bottom: 2px solid #000;
  margin: 7px 0 27px;
}
@media(max-width:991px) {
  .player-message-separator-top {
    margin: 5px 0 0;
    border-top: 2px solid #c7c7c7;
  }
  .player-message-separator-bottom {
    margin: 0 0 20px;
    border-bottom: 2px solid #c7c7c7;
  }
}
#player-message {
  font: 600 20px/1 "Open Sans", arial, sans-serif;
  text-align: left;
}
#player-message.error {
  color: #cc3334
}
#player-message.multi {
  color: #ec7c07
}
#player-message.success {
  color: #0f9015
}
#solver-board textarea {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
#solver-board td.selected textarea {
  background: #feb633 !important;
  color: #000;
}
#solver-board textarea.auto {
  color: #1976d3 !important;
}
#solver-board textarea.conflict {
  background: #ffb7b8 !important;
  color: #000;
}
.numpad button.disabled {
  opacity: .45;
  cursor: not-allowed;
}
.symbole-reset {
  display: inline-block;
  width: 1.6em;
  height: 1.6em;
}
.numpad .side-toggle {
  grid-column: 1 / -1;
  width: calc(3 * var(--cell-size) + 24px);
}
@media (max-width: 960px) {
  .numpad .side-toggle {
    grid-column: 1 / 7;
    width: 100%;
    margin-bottom: 8px;
  }
}
/* shell */
.footer {
  background: #a29176;
  color: #ffffff;
  text-align: center;
  width: 100%;
  font-family: 'Source Serif Pro', serif;
}
/* flex wrapper */
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--footer-gap); /* keeps real gap for large screens */
  padding: 40px 20px;
}
/* single column */
.footer-column {
  flex: 0 0 auto; /* natural width */
  position: relative; /* anchor separator */
}
/* vertical separator centred in the gap */
.footer-column:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0.11em; /* leave 11 % breathing room, like sample */
  right: calc(-1px - var(--footer-gap)/2); /* half gap minus half line width */
  width: 2px;
  background: rgba(253, 253, 252, 0.6);
}
/* headings */
.footer-column-title {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 15px;
}
/* links */
.footer-links li {
  font-size: 22px;
  line-height: 1.45;
  margin: 0 0 12px;
}
.footer a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-bottom .25s;
}
.footer a:hover {
  border-bottom: 2px solid #ffffff;
}
/* bottom bar */
.footer-bottom-bar {
  background: #8a7b61;
  padding: 22px 10px;
  font-size: 22px;
}
/* ----------  RESPONSIVE  ---------- */
@media(max-width:1000px) {
  .footer-content {
    gap: 30px;
  } /* tighter gap */
  .footer-column {
    flex: 1 1 100%; /* stack full-width */
  }
  .footer-column:not(:last-child)::after {
    display: none;
  } /* hide separator */
}
@media (max-width: 1800px) {
  .foot-nav-item {
    padding-bottom: 16px;
    padding-top: 16px;
    display: block;
  }
}
@media (max-width:1080px) {
  .header-status {
    padding-right: 40px;
    padding-left: 40px;
  }
}
/* laptops / small desktop screens: shrink the board a bit */
@media (max-height: 899px) and (min-width: 992px) { /* 992 px = your desktop breakpoint */ :root {
    /* 64 px cap is enough to fit 9x9 cells + gaps + print-link
           into 768 px-tall viewports */
    --cell-size: min(9.5vw, 9.5vh, 64px);
  }
}
/* ----------- laptops & small desktop monitors ----------- */
@media (min-width: 992px) { /* desktop layout only */ :root {
    /* cells are 8 % of the viewport height,                       *
       * but never smaller than 40 px and never larger than 74 px    */
    --cell-size: clamp(40px, 8vh, 74px);
  }
}
/* ≥992px: show inline controls, hide gear */
@media (min-width:992px) {
  .controls-left {
    display: flex;
  }
  .controls-right > label.switch {
    display: flex;
  }
  .gear {
    display: none !important;
  }
}
/* grid → flex numpad (≤960px) MUST BE ABOVE 991PX TO KEEP THE 2x5 ROW PANEL BUTTONS */
@media (max-width:960px) {
  .numpad {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .numpad button {
    flex: 0 0 var(--cell-size);
  }
}
/* under 991px: hide inline controls, show gear, stack board + side-panel */
@media (max-width:991px) {
  #timer {
    padding-left: 0;
  }
  .gear {
    transform: translateX(10px);
  }
  .separator-top {
    margin: 5px 0 0px 0;
    border-top: 2px solid #c7c7c7;
  }
  .separator-bottom {
    margin: 0px 0 20px 0;
    border-bottom: 2px solid #c7c7c7;
  }
  .controls-center {
    margin: 0;
  }
  .controls-right {
    margin-left: auto;
  }
  .controls-left {
    display: none;
  }
  .controls-right > label.switch {
    display: none;
  }
  .gear {
    display: inline-flex;
  }
  .main {
    flex-wrap: wrap;
    justify-content: center;
  }
  .side-panel {
    flex-basis: 100%;
  }
  .numpad {
    display: grid;
    grid-template-columns: repeat(6, var(--cell-size));
    grid-template-rows: repeat(2, var(--cell-size));
    gap: 8px;
  }
  .numpad .clear {
    grid-column: 4;
    grid-row: 2;
  }
  .numpad .undo {
    grid-column: 5;
    grid-row: 2;
  }
  .numpad .pencil {
    grid-column: 6;
    grid-row: 2;
  }
  .print-link {
    display: none;
  }
}
@media (max-width:800px) {
  .header-logo {
    justify-content: center;
  }
  .header-logo, .header-status {
    flex: 1 1 100%;
    text-align: center;
  }
  .controls {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
  }
  .controls-left {
    flex: 0 0 auto;
    justify-content: center;
    gap: 12px;
  }
  .controls-right {
    flex: 0 0 auto;
    justify-content: center;
    margin-left: auto;
    gap: 12px;
  }
  .controls button {
    font-size: 18px;
    padding: 4px 6px;
  }
}
/* extra tiny phone tweak (≤480px) */
@media (max-width:640px) {
  .article-h1 {
    font-size: 40px;
  }
  .sub-article-logo {
    font-size: 40px;
    font-weight: 700;
  }
  .sub-article-h1 {
    font-size: 32px;
  }
  .numpad {
    grid-template-columns: repeat(6, calc(var(--cell-size) + 12px));
    gap: 8px;
  }
  .numpad button {
    width: calc(var(--cell-size) + 12px);
    height: var(--cell-size);
  }
}
/* extra tiny phone tweak (≤500x) */
@media (max-width:500px) {
  .header-logo {
    padding-top: 15px;
    font-size: 30px;
    justify-content: flex-start; /* align content to the left in flexbox */
    text-align: left; /* ensures text aligns left */
  }
  .header-status {
    font-size: 20px;
    justify-content: flex-start;
    text-align: left;
    padding-right: 0px;
    padding-left: 0px;
  }
  .article-h1 {
    font-size: 30px;
  }
  .article-baseline {
    font-size: 20px;
  }
  h2.article-h2 {
    font-size: 23px;
  }
  .sub-article-logo {
    padding-top: 4px;
    font-size: 30px;
    font-weight: 700;
  }
  .sub-article-h1 {
    font-size: 28px;
  }
}
/* print styles – single page, puzzle scaled to 75 % */
@media print {
  /* cut the parts that caused blank pages */
  nav, footer, .side-panel, .article-wrapper {
    display: none !important;
  }
  /* hide everything else */
  body * {
    visibility: hidden !important;
  }
  /* show logo + puzzle (and their children) */
  .header-logo, .header-logo *, #board-container, #board-container * {
    visibility: visible !important;
  }
  /* don’t print pencil notes */
  .notes-grid {
    display: none !important;
  }
  .header-logo {
    position: static;
    margin: 0 auto 0.8em;
    width: 100%;
    text-align: center;
  }
  #board-container {
    position: static;
    margin: 0 auto;
    page-break-inside: avoid;
    break-inside: avoid;
    /* ➤ scale puzzle down to 93 % */
    zoom: 93%; /* Chrome / Edge / Safari */
    transform: scale(0.93); /* Firefox fallback       */
    transform-origin: top center;
  }
}