:root {
  --bamboo-green: #8FBF7F;
  --stone-gray: #F0F0F0;
  --sand-beige: #E9E4D0;
  --deep-earth: #3B3A36;
  --zen-ink: #1E1E1E;
  --water-blue: #7CAFC4;
  --leaf-mint: #CDE8CA;
  --soft-pink: #F7D9E0;
  --muted-moss: #6C8F6A;
  --bamboo-green-light: #A9D7A1;
  --sand-beige-light: #F4EEDC;
  --leaf-mint-soft: rgba(205, 232, 202, 0.55);
  --sakura-pink-soft: rgba(247, 217, 224, 0.55);
  --zen-ink-soft: rgba(59, 58, 54, 0.18);
  --zen-ink-strong: rgba(59, 58, 54, 0.28);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.04);
  --transition-slow: 220ms ease-out;
  --panel-cream: #FBF7EF;
  --mint-pill: #9EDC92;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: 'Lato', 'Segoe UI', 'Noto Sans', sans-serif;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.8), rgba(240, 240, 240, 0.9)), #f5f8f7;
  color: var(--deep-earth);
  min-height: 100vh;
}

.page-background {
  position: fixed;
  inset: 0;
  background-image: url('assets/background.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  filter: grayscale(10%);
  z-index: -2;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 36px;
  background: transparent;
  border-radius: 20px;
  margin-bottom: 5px;
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  font-size: 1.2rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  color: var(--deep-earth);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  background: #ffffff;
  transition: background var(--transition-slow), box-shadow var(--transition-slow), transform var(--transition-slow);
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(205, 232, 202, 0.45);
  transform: translateY(-1px);
}

.nav-link[aria-current="page"] {
  box-shadow: inset 0 0 0 1px var(--bamboo-green);
  background: rgba(205, 232, 202, 0.3);
}

.logo {
  width: 260px;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  aspect-ratio: 13 / 4;
}

.brand {
  font-family: 'Lato', 'Segoe UI', sans-serif;
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
}

.tagline {
  margin: 4px 0 0;
  color: var(--muted-moss);
  font-size: 0.92rem;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-chip {
  background: #FFFFFF;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 500;
  min-width: 90px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.primary-button,
.secondary-button,
.icon-button {
  font-family: inherit;
  border: none;
  border-radius: 16px;
  padding: 10px 18px;
  min-height: 44px;
  cursor: pointer;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), background var(--transition-slow), color var(--transition-slow);
}

.primary-button {
  background: #c9edc3;
  color: var(--deep-earth);
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(169, 215, 161, 0.25);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: rgba(124, 175, 196, 0.25);
  color: var(--deep-earth);
  transform: translateY(-1px);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.9);
  color: var(--deep-earth);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: #ffffff;
}

.icon-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  background: #FFFFFF;
  color: var(--deep-earth);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.icon-button[aria-pressed="false"] {
  opacity: 0.45;
}

.icon-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.sudoku-cell:focus-visible {
  outline: 2px solid var(--water-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(124, 175, 196, 0.35);
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  margin: 5px 0 36px;
}

.board-panel,
.controls-panel {
  background: transparent;
  padding: 0;
  border-radius: 22px;
  box-shadow: none;
}

.board-panel {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  padding: 14px 10px;
  position: relative;
}

/* Board corner system
   - Outer card (.board-outer/.board-container): beige 28px radius, 22px padding, clips children; square sizing with 90vw max for responsiveness.
   - Inner board (.board-inner/.sudoku-frame): white 20px radius, overflow hidden, subtle inset frame; controls visible corners.
   - Grid: no radius/border; fills the inner board.
   - Cells: no radius; borders only inside clipped area. */
.board-container,
.board-outer {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 520px;
  height: 520px;
  max-width: 90vw;
  max-height: 90vw;
  margin: 0 auto;
  background: #f4eedc;
  border-radius: 28px;
  padding: 26px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

.board-inner,
.sudoku-frame {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  padding: 0;
}

.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 26px 22px;
  background: var(--panel-cream);
  border-radius: 28px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  align-items: center;
}

.controls-panel.is-hidden {
  display: none;
}

.controls-panel.is-collapsed .notes-toggle,
.controls-panel.is-collapsed .control-buttons,
.controls-panel.is-collapsed .number-pad,
.controls-panel.is-collapsed .shortcuts,
.controls-panel.is-collapsed .mobile-new {
  display: none;
}

.controls-panel.is-collapsed {
  padding-bottom: 12px;
}

.controls-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-title {
  font-weight: 700;
}

.main-layout.controls-hidden {
  grid-template-columns: 1fr;
}

.sudoku-grid {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: absolute;
  inset: -0.5px;
  width: calc(100% + 1px);
  height: calc(100% + 1px);
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 0;
  border-radius: 0;
  border: none;
  overflow: hidden;
  background: #ffffff;
  margin: 0;
  padding: 0;
}

.sudoku-cell,
.cell {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  margin: 0;
  padding: 0;
  position: relative;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--deep-earth);
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  cursor: pointer;
  transition: background var(--transition-slow), color var(--transition-slow), box-shadow var(--transition-slow);
}

.sudoku-cell[data-given="true"] {
  font-weight: 600;
  color: var(--deep-earth);
  background: rgba(255, 255, 255, 0.95);
  cursor: default;
}

.sudoku-cell.block-top {
  border-top: 3px solid rgba(0, 0, 0, 0.3) !important;
}

.sudoku-cell.block-bottom {
  border-bottom: 3px solid rgba(0, 0, 0, 0.3) !important;
}

.sudoku-cell.block-left {
  border-left: 3px solid rgba(0, 0, 0, 0.3) !important;
}

.sudoku-cell.block-right {
  border-right: 3px solid rgba(0, 0, 0, 0.3) !important;
}

.sudoku-cell[data-given="true"] .value {
  font-weight: 600;
}

.sudoku-cell:not([data-given="true"]) .value {
  font-weight: 500;
}

.sudoku-cell.selected {
  background: rgba(205, 232, 202, 0.35);
  box-shadow: inset 0 0 0 1px var(--bamboo-green), 0 0 10px rgba(143, 191, 127, 0.35);
}

.sudoku-cell.related {
  background: linear-gradient(180deg, rgba(143, 191, 127, 0.1), rgba(143, 191, 127, 0.06));
}

.sudoku-cell.same-number {
  background: rgba(143, 191, 127, 0.18);
}

.sudoku-cell.error {
  background: var(--sakura-pink-soft);
}

.sudoku-cell .value,
.sudoku-cell .notes {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sudoku-cell .notes {
  font-size: 0.65rem;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  opacity: 0.9;
  color: rgba(108, 143, 106, 0.75);
}

.sudoku-cell .notes span {
  width: 30%;
  text-align: center;
}

.notes-toggle {
  margin-bottom: 12px;
  align-self: center;
}

.notes-toggle button[aria-pressed="true"],
.secondary-button[aria-pressed="true"] {
  background: var(--leaf-mint-soft);
  box-shadow: inset 0 0 0 1px var(--bamboo-green);
}

.control-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.number-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.number-pad button {
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--mint-pill);
  color: var(--deep-earth);
  border-radius: 14px;
  border: none;
  min-height: 50px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  filter: brightness(1.0);
  transition: transform var(--transition-slow), background var(--transition-slow), filter var(--transition-slow), box-shadow var(--transition-slow);
}

#newPuzzleButton,
#newPuzzleButtonMobile {
  background: transparent;
  color: #2a6ecb;
  padding: 0;
  min-height: auto;
  box-shadow: none;
  border-radius: 0;
  text-decoration: underline;
}

#newPuzzleButton:hover,
#newPuzzleButton:focus-visible,
#newPuzzleButtonMobile:hover,
#newPuzzleButtonMobile:focus-visible {
  background: transparent;
  color: #1f5aac;
  transform: none;
  box-shadow: none;
}

.hint-button {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.hint-button:hover,
.hint-button:focus-visible {
  background: #e4f5e2;
}

.hint-button:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.mobile-only {
  display: none;
}
.desktop-only {
  display: inline-flex;
}

.fab-button {
  position: fixed;
  right: 14px;
  bottom: 18px;
  z-index: 9;
  border: none;
  border-radius: 18px;
  padding: 12px 16px;
  background: var(--mint-pill);
  color: var(--deep-earth);
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

@media (max-width: 780px) {
  body {
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.9), rgba(245, 248, 247, 0.95));
  }

  .page-shell {
    padding: 8px 6px 220px;
  }

  .site-header {
    padding: 6px 8px;
    gap: 10px;
    justify-content: center;
    margin-bottom: 2px;
    align-items: flex-start;
  }

  .logo {
    width: 160px;
    height: auto;
    object-position: center;
    margin: 0 auto;
  }

  .header-info {
    gap: 6px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    flex-direction: column;
    gap: 8px;
    display: none;
    z-index: 10;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    text-align: left;
  }

  .info-chip {
    padding: 8px 12px;
    min-width: 76px;
    font-size: 0.9rem;
  }

  .icon-button {
    min-height: 36px;
    width: 42px;
    height: 42px;
  }

  .main-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .board-panel {
    padding: 0;
  }

  .board-container,
  .board-outer {
    width: 94vw;
    height: 94vw;
    max-width: 520px;
    max-height: 520px;
    padding: 8px;
    border-radius: 20px;
  }

  .controls-panel {
    position: sticky;
    bottom: 0;
    width: 100%;
    max-width: none;
    padding: 5px 8px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    gap: 3px;
    z-index: 5;
  }

  .notes-toggle {
    width: 100%;
    margin-bottom: 0;
    display: none;
  }

  .control-buttons {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .control-buttons .secondary-button,
  .control-buttons .hint-button {
    width: 100%;
    justify-content: center;
    padding: 7px 9px;
    min-height: 30px;
    font-size: 0.85rem;
  }

  .number-pad {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .number-pad button {
    min-height: 28px;
    border-radius: 10px;
    font-size: 0.8rem;
    padding: 3px;
  }

  .mobile-new {
    margin-top: 2px;
    width: 100%;
    justify-content: center;
  }

  .mobile-only {
    display: inline-flex;
  }

  .desktop-only {
    display: none;
  }

  .learn-card {
    padding: 18px 14px;
  }

  .learn-grid {
    grid-template-columns: 1fr;
  }
}

.number-pad button:hover,
.number-pad button:focus-visible {
  background: rgba(124, 175, 196, 0.18);
  transform: translateY(-2px);
}

.number-pad button:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.number-pad button.pad-animating {
  animation: padRipple 0.32s ease-out;
}

.shortcuts {
  width: 100%;
}

.shortcuts .tertiary {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.shortcuts-panel {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(205, 232, 202, 0.35);
  border-radius: 12px;
  font-size: 0.95rem;
}

.shortcuts-panel.open {
  display: block;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  margin-top: 40px;
  color: rgba(108, 143, 106, 0.75);
  letter-spacing: 0.3px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  position: relative;
}

.site-footer a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.site-footer a:hover::after {
  transform: scaleX(1);
}

  .content-main {
    max-width: 900px;
    margin: 40px auto;
  }

  @media (max-width: 780px) {
    .content-main {
      margin: 16px auto 24px;
      padding: 0 6px;
    }

    .article-card {
      padding: 18px 16px;
    }

    .sounds-hero {
      padding: 20px 16px;
    }
  }

.article-card {
  background: var(--panel-cream);
  border-radius: 24px;
  padding: 28px 30px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.article-card h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-family: 'Lato', 'Segoe UI', sans-serif;
  letter-spacing: 0.03em;
}

.article-card h2 {
  margin-top: 22px;
  margin-bottom: 10px;
}

.article-card ul {
  padding-left: 20px;
  line-height: 1.6;
  margin: 0 0 10px;
}

.article-card p {
  line-height: 1.6;
  margin: 0 0 12px;
}

.faq-block h3 {
  margin: 12px 0 6px;
}

.faq-block p {
  margin: 0 0 10px;
}
.learn-links {
  margin: 24px 0 48px;
}

.learn-card {
  background: var(--panel-cream);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.learn-card h2 {
  margin: 0 0 8px;
  font-family: 'Lato', 'Segoe UI', sans-serif;
}

.learn-card p {
  margin: 0 0 14px;
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.learn-link {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  background: #ffffff;
  text-decoration: none;
  color: var(--deep-earth);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: background var(--transition-slow), transform var(--transition-slow), box-shadow var(--transition-slow);
}

.learn-link:hover,
.learn-link:focus-visible {
  background: rgba(205, 232, 202, 0.35);
  transform: translateY(-1px);
}

.learn-title {
  display: block;
  font-weight: 700;
}

.learn-desc {
  display: block;
  font-size: 0.95rem;
  color: rgba(59, 58, 54, 0.75);
}

.sounds-page {
  max-width: 1100px;
}

.sounds-hero {
  background: linear-gradient(135deg, rgba(205, 232, 202, 0.7), rgba(124, 175, 196, 0.55));
  border-radius: 24px;
  padding: 28px 26px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.sounds-hero h2 {
  margin: 6px 0 10px;
  font-family: 'Lato', 'Segoe UI', sans-serif;
  letter-spacing: 0.04em;
}

.sound-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sound-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.sound-cover img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.sound-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sound-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sound-title-row h3 {
  margin: 0;
  font-size: 1.35rem;
}

.sound-duration {
  background: rgba(205, 232, 202, 0.45);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sound-description {
  margin: 6px 0 0;
  line-height: 1.62;
}

.audio-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audio-actions audio {
  width: 100%;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
}

.playback-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timer-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(205, 232, 202, 0.28);
}

.timer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.timer-select-label {
  font-weight: 700;
}

.timer-select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  min-width: 150px;
  font-size: 1rem;
  background: #ffffff;
  flex: 1 1 180px;
}

.timer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.timer-readout {
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.sound-notes {
  margin-top: 32px;
  background: var(--panel-cream);
  padding: 22px 18px;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.sound-notes h3 {
  margin-top: 0;
}

.inline-link {
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  font-weight: 700;
}

.inline-link:hover,
.inline-link:focus-visible {
  background: none;
  transform: none;
  text-decoration: underline;
}

.puzzle-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
}

.puzzle-hero {
  background: var(--panel-cream);
  border-radius: 24px;
  padding: 26px 24px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.puzzle-hero h2 {
  margin: 8px 0;
  font-family: 'Lato', 'Segoe UI', sans-serif;
}

.puzzle-hero p {
  margin: 6px 0 10px;
  max-width: 760px;
  line-height: 1.5;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: rgba(59, 58, 54, 0.62);
  margin: 0;
  font-size: 0.9rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.techniques-listing {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.techniques-hero {
  background: var(--panel-cream);
  border-radius: 24px;
  padding: 26px 24px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.techniques-hero h1 {
  margin: 6px 0 10px;
}

.hero-lede {
  margin: 8px 0 10px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(205, 232, 202, 0.5);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.technique-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.technique-card {
  display: block;
  padding: 16px 16px 18px;
  border-radius: 16px;
  background: #ffffff;
  color: var(--deep-earth);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), background var(--transition-slow);
}

.technique-card:hover,
.technique-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.card-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: rgba(59, 58, 54, 0.65);
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.technique-card h2 {
  margin: 2px 0 8px;
}

.technique-card p {
  margin: 0 0 10px;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(59, 58, 54, 0.7);
}

.puzzle-card {
  display: flex;
  gap: 14px;
  background: #ffffff;
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.puzzle-thumb img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 6px 16px rgba(0, 0, 0, 0.08);
  background: #f9f8f4;
}

.puzzle-body h3 {
  margin: 4px 0 8px;
}

.puzzle-label {
  margin: 0;
  font-weight: 700;
  color: rgba(59, 58, 54, 0.7);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.puzzle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 12px;
  color: rgba(59, 58, 54, 0.75);
  font-size: 0.95rem;
}

.puzzle-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(205, 232, 202, 0.35);
  padding: 4px 8px;
  border-radius: 10px;
}

.puzzle-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 960px) {
  .puzzle-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .puzzle-thumb img {
    width: 100%;
    height: auto;
    max-width: 320px;
  }

  .sound-card {
    grid-template-columns: 1fr;
  }

  .sound-cover img {
    max-height: 220px;
  }
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 30, 30, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  padding: 20px;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--sand-beige-light);
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-soft);
}

.difficulty-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-info {
    width: 100%;
    justify-content: space-between;
  }

  .board-container {
    width: 90vw;
    height: 90vw;
  }

  .sudoku-cell {
    font-size: 1.3rem;
  }

  .audio-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .timer-options {
    flex-direction: column;
  }

  .playback-controls {
    width: 100%;
  }
}

/* Corner override guardrails (high specificity to prevent regressions) */
.board-container.board-outer .board-inner.sudoku-frame {
  padding: 0 !important;
  overflow: hidden !important;
  position: relative !important;
}

.board-container.board-outer .board-inner.sudoku-frame .sudoku-grid {
  position: absolute !important;
  inset: -0.5px !important;
  width: calc(100% + 1px) !important;
  height: calc(100% + 1px) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.board-container.board-outer .board-inner.sudoku-frame .sudoku-grid .sudoku-cell {
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: 1px solid rgba(30, 30, 30, 0.18) !important;
  box-sizing: border-box !important;
  outline: none !important;
}

.board-container.board-outer .board-inner.sudoku-frame .sudoku-grid .sudoku-cell.block-top {
  border-top: 2.5px solid rgba(0, 0, 0, 0.22) !important;
}

.board-container.board-outer .board-inner.sudoku-frame .sudoku-grid .sudoku-cell.block-bottom {
  border-bottom: 2.5px solid rgba(0, 0, 0, 0.22) !important;
}

.board-container.board-outer .board-inner.sudoku-frame .sudoku-grid .sudoku-cell.block-left {
  border-left: 2.5px solid rgba(0, 0, 0, 0.22) !important;
}

.board-container.board-outer .board-inner.sudoku-frame .sudoku-grid .sudoku-cell.block-right {
  border-right: 2.5px solid rgba(0, 0, 0, 0.22) !important;
}

.hint-cell {
  animation: hintPulse 1.2s ease-out;
}

@keyframes hintPulse {
  0% { background-color: #d8f1d8; }
  100% { background-color: white; }
}

/* Technique articles */
.technique-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 18px 0 10px;
}

.highlight-box {
  background: rgba(205, 232, 202, 0.4);
  border: 1px solid rgba(124, 175, 196, 0.4);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}


.step-list {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 10px 18px 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.step-list li {
  margin-bottom: 8px;
}

.pro-tip {
  background: rgba(247, 217, 224, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(247, 217, 224, 0.65);
  box-shadow: var(--shadow-soft);
  margin: 12px 0;
}

.cta-block {
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(233, 228, 208, 0.7);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.see-also {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.see-also a {
  background: #ffffff;
  border-radius: 12px;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--deep-earth);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.see-also a:hover,
.see-also a:focus-visible {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px var(--bamboo-green);
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 238, 220, 0.8);
  backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  border-radius: 20px;
}

.loading-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.loading-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(124, 175, 196, 0.25);
  border-top-color: var(--water-blue);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes padRipple {
  0% { box-shadow: 0 0 0 0 rgba(124, 175, 196, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(124, 175, 196, 0); }
}

.confetti-container {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 12;
}

.confetti-piece {
  position: absolute;
  top: 0;
  width: 8px;
  height: 12px;
  opacity: 0.9;
  animation: confettiFall 1.2s ease-out forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(-10px) rotate(0deg); }
  100% { transform: translateY(110vh) rotate(220deg); opacity: 0; }
}

.completion-haiku {
  margin: 6px 0 10px;
  color: rgba(59, 58, 54, 0.75);
}
