* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Work Sans", sans-serif;
  color: #1d1b18;
  background: #faf6ee;
  overflow-x: hidden;
}

body {
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
}

.dojo {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #faf6ee;
}
.dojo:fullscreen,
.dojo:-webkit-full-screen {
  background: #faf6ee;
}
.dojo::backdrop {
  background: #faf6ee;
}

.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 48px) 0;
  pointer-events: none;
}
.topbar .brand {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  letter-spacing: 0.02em;
  color: #1d1b18;
}
.topbar .brand span {
  color: #a89f8f;
  font-family: "Work Sans", sans-serif;
  font-weight: 500;
  font-size: 0.6em;
  display: block;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 2px;
}
.topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 26px);
}
.topbar .stats {
  display: flex;
  gap: clamp(16px, 3vw, 34px);
  text-align: right;
}
.topbar .stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.topbar .stats .stat .stat-label {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a89f8f;
}
.topbar .stats .stat .stat-value {
  font-family: "Shippori Mincho B1", serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-variant-numeric: tabular-nums;
  color: #1d1b18;
  transition: transform 0.25s ease;
}
.topbar .stats .stat .stat-value.bump {
  transform: scale(1.18);
}
.topbar .sound-toggle {
  pointer-events: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(36px, 6vw, 42px);
  height: clamp(36px, 6vw, 42px);
  border-radius: 50%;
  border: 1px solid rgba(29, 27, 24, 0.14);
  background: rgba(240, 233, 216, 0.6);
  color: #6b6459;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.topbar .sound-toggle .icon {
  display: block;
  width: 18px;
  height: 18px;
}
.topbar .sound-toggle .icon-off {
  display: none;
}
.topbar .sound-toggle:hover {
  color: #1d1b18;
  border-color: rgba(29, 27, 24, 0.28);
}
.topbar .sound-toggle:focus-visible {
  outline: 3px solid #b8933e;
  outline-offset: 2px;
}
.topbar .sound-toggle.is-muted .icon-on {
  display: none;
}
.topbar .sound-toggle.is-muted .icon-off {
  display: block;
}
.topbar .sound-toggle.is-muted {
  color: #c9584b;
  border-color: rgba(178, 58, 46, 0.3);
}
.topbar .sound-toggle.is-unavailable {
  opacity: 0.35;
  cursor: not-allowed;
}

.field {
  position: relative;
  flex: 1;
  display: flex;
  overflow: hidden;
}

.zone {
  position: relative;
  flex: 1;
  height: 100%;
  border: none;
  background: none;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.zone:focus-visible {
  outline: 3px solid #b8933e;
  outline-offset: -6px;
}
.zone .zone-fill {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.zone:hover .zone-fill, .zone:active .zone-fill {
  opacity: 1;
}
.zone .zone-label {
  position: absolute;
  bottom: clamp(22px, 5vh, 46px);
  font-family: "Shippori Mincho B1", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: #a89f8f;
  user-select: none;
}
.zone .zone-label small {
  display: block;
  font-family: "Work Sans", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.42em;
  margin-top: 6px;
  color: #a89f8f;
}

.zone--hira .zone-fill {
  background: radial-gradient(circle at 30% 70%, rgba(34, 64, 108, 0.26), transparent 68%);
}
.zone--hira .zone-label {
  left: clamp(22px, 6vw, 64px);
  text-align: left;
}
.zone--hira::before {
  content: "";
  position: absolute;
  pointer-events: none;
  left: -8%;
  bottom: -12%;
  width: 46vw;
  height: 46vw;
  max-width: 480px;
  max-height: 480px;
  border-radius: 62% 38% 55% 45%/55% 45% 55% 45%;
  background: linear-gradient(135deg, rgba(34, 64, 108, 0.08), rgba(34, 64, 108, 0.02));
  filter: blur(1px);
}

.zone--kata .zone-fill {
  background: radial-gradient(circle at 70% 70%, rgba(178, 58, 46, 0.26), transparent 68%);
}
.zone--kata .zone-label {
  right: clamp(22px, 6vw, 64px);
  text-align: right;
}
.zone--kata::before {
  content: "";
  position: absolute;
  pointer-events: none;
  right: -6%;
  bottom: -10%;
  width: 40vw;
  height: 40vw;
  max-width: 420px;
  max-height: 420px;
  clip-path: polygon(20% 0%, 100% 10%, 85% 60%, 100% 100%, 30% 90%, 0% 55%);
  background: linear-gradient(135deg, rgba(178, 58, 46, 0.09), rgba(178, 58, 46, 0.02));
}

.brush-divider {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: clamp(60px, 8vw, 120px);
  z-index: 20;
  pointer-events: none;
}
.brush-divider svg {
  height: 100%;
  width: 100%;
}
.brush-divider path {
  stroke: #1d1b18;
  stroke-width: 2.5;
  fill: none;
  opacity: 0.16;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw-stroke 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards 0.2s;
}

@keyframes draw-stroke {
  to {
    stroke-dashoffset: 0;
  }
}
.kana-stage {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.kana-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(150px, 26vw, 230px);
  height: clamp(150px, 26vw, 230px);
  border-radius: 50%;
  background: #faf6ee;
  box-shadow: 0 0 0 1px rgba(29, 27, 24, 0.06), 0 18px 50px -12px rgba(29, 27, 24, 0.28);
}
.kana-card .kana-glyph {
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: clamp(4.4rem, 10.5vw, 7.6rem);
  line-height: 1;
  color: #1d1b18;
  user-select: none;
  transition: transform 0.18s ease, color 0.18s ease;
}
.kana-card.is-correct {
  animation: stamp-correct 0.42s ease;
}
.kana-card.is-correct .kana-glyph {
  color: #b8933e;
}
.kana-card.is-wrong {
  animation: shake-wrong 0.42s ease;
}
.kana-card.is-wrong .kana-glyph {
  color: #c97870;
}

@keyframes stamp-correct {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes shake-wrong {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(9px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(4px);
  }
}
.pronounce-btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(29, 27, 24, 0.14);
  background: rgba(250, 246, 238, 0.9);
  color: #6b6459;
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.pronounce-btn .icon {
  display: block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.pronounce-btn:hover {
  color: #1d1b18;
  border-color: rgba(29, 27, 24, 0.3);
}
.pronounce-btn:active {
  transform: scale(0.96);
}
.pronounce-btn:focus-visible {
  outline: 3px solid #b8933e;
  outline-offset: 2px;
}
.pronounce-btn.is-unavailable {
  opacity: 0.35;
  cursor: not-allowed;
}
.pronounce-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  color: #a89f8f;
  border-color: rgba(29, 27, 24, 0.08);
  background: rgba(240, 233, 216, 0.55);
}

.feedback {
  position: absolute;
  top: calc(46% + clamp(150px, 21vw, 200px));
  left: 50%;
  transform: translate(-50%, 6px);
  z-index: 25;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(250, 246, 238, 0);
  box-shadow: 0 10px 30px -18px rgba(29, 27, 24, 0);
  text-align: center;
  letter-spacing: 0.03em;
  color: #6b6459;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease, background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.feedback.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.feedback strong {
  color: #1d1b18;
  font-weight: 700;
}

.hint {
  position: relative;
  z-index: 30;
  text-align: center;
  padding: 0 20px 18px;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  letter-spacing: 0.04em;
  color: #a89f8f;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .brush-divider path {
    animation: none;
    opacity: 0.16;
    stroke-dashoffset: 0;
  }
  .kana-card.is-correct,
  .kana-card.is-wrong,
  .stat-value.bump {
    animation: none !important;
  }
}
@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
  }
  .zone-label {
    bottom: clamp(16px, 4vh, 28px);
    font-size: clamp(1rem, 5.5vw, 1.3rem);
  }
  .zone-label small {
    font-size: 0.46em;
  }
  .zone--hira .zone-label {
    left: 16px;
  }
  .zone--kata .zone-label {
    right: 16px;
  }
  .kana-card {
    width: clamp(130px, 34vw, 180px);
    height: clamp(130px, 34vw, 180px);
  }
  .kana-card .kana-glyph {
    font-size: clamp(3.2rem, 16vw, 4.6rem);
  }
}
.feedback.feedback--correct {
  border-color: rgba(79, 127, 96, 0.18);
  background: #eaf1ec;
  box-shadow: 0 10px 30px -18px rgba(79, 127, 96, 0.35);
}
.feedback.feedback--wrong {
  border-color: rgba(178, 58, 46, 0.15);
  background: #f5e9e7;
  box-shadow: 0 10px 30px -18px rgba(178, 58, 46, 0.3);
}

/* Options, romanisation et mise en page plein écran */
.topbar .settings-wrap { position: relative; pointer-events: auto; }
.topbar .settings-toggle { pointer-events: auto; flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: clamp(36px, 6vw, 42px); height: clamp(36px, 6vw, 42px); border-radius: 50%; border: 1px solid rgba(29, 27, 24, 0.14); background: rgba(240, 233, 216, 0.6); color: #6b6459; cursor: pointer; transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.topbar .settings-toggle > svg { display: block; width: 19px; height: 19px; transition: transform 0.25s ease; }
.topbar .settings-toggle:hover, .topbar .settings-toggle.is-open { color: #1d1b18; border-color: rgba(29, 27, 24, 0.3); }
.topbar .settings-toggle:focus-visible { outline: 3px solid #b8933e; outline-offset: 2px; }
.topbar .settings-toggle.is-open > svg { transform: rotate(35deg); }
.topbar .settings-panel { position: absolute; top: calc(100% + 10px); right: 0; width: min(260px, calc(100vw - 28px)); padding: 16px; border: 1px solid rgba(29, 27, 24, 0.12); border-radius: 14px; background: rgba(250, 246, 238, 0.98); box-shadow: 0 14px 38px -14px rgba(29, 27, 24, 0.3); color: #6b6459; }
.topbar .settings-panel[hidden] { display: none; }
.topbar .settings-panel strong { display: block; margin-bottom: 10px; color: #1d1b18; font-size: 0.82rem; letter-spacing: 0.05em; }
.topbar .settings-panel label { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 0.82rem; cursor: pointer; }
.topbar .settings-panel label span { margin-left: auto; font-family: "Noto Sans JP", sans-serif; color: #a89f8f; }
.topbar .settings-panel .option-example { font-size: 1.25rem; line-height: 1; }
.topbar .settings-panel .option-example--mark { font-size: 1.8rem; line-height: 0.7; }
.topbar .settings-panel input { width: 17px; height: 17px; accent-color: #22406c; }
.topbar .settings-panel hr { margin: 9px 0; border: 0; border-top: 1px solid rgba(29, 27, 24, 0.1); }
.kana-card { flex-direction: column; }
.kana-card .kana-glyph.is-combination { font-size: clamp(3.5rem, 8vw, 6rem); }
.kana-card .kana-romaji { margin-top: 8px; font-family: "Work Sans", sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: 0.16em; color: #a89f8f; }
.hint { position: absolute; top: clamp(76px, 10vh, 94px); left: 50%; transform: translateX(-50%); width: 100%; margin: 0; padding: 0 20px; }
@media (max-width: 640px) {
  .kana-card .kana-glyph.is-combination { font-size: clamp(2.7rem, 12vw, 3.8rem); }
  .hint { top: 72px; font-size: clamp(0.7rem, 3vw, 0.85rem); }
}
@media (max-width: 480px) {
  .topbar { padding-top: 14px; }
  .topbar .brand span { display: none; }
  .topbar .topbar-right { gap: 8px; }
  .topbar .stats { gap: 9px; }
  .topbar .stats .stat-label { font-size: 0.52rem; }
  .topbar .sound-toggle, .topbar .settings-toggle { width: 34px; height: 34px; }
  .hint { top: 62px; }
}
@media (max-height: 560px) {
  .hint { top: 58px; font-size: 0.72rem; }
  .kana-stage { top: 48%; gap: 8px; }
  .kana-card { width: 122px; height: 122px; }
  .kana-card .kana-glyph { font-size: 3.3rem; }
  .kana-card .kana-glyph.is-combination { font-size: 2.7rem; }
  .zone .zone-label { bottom: 12px; }
}

/* Améliorations d'interface */
.topbar .fullscreen-toggle { pointer-events: auto; flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: clamp(36px, 6vw, 42px); height: clamp(36px, 6vw, 42px); border-radius: 50%; border: 1px solid rgba(29, 27, 24, 0.14); background: rgba(240, 233, 216, 0.6); color: #6b6459; cursor: pointer; transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.topbar .fullscreen-toggle svg { display: block; width: 18px; height: 18px; }
.topbar .fullscreen-toggle:hover { color: #1d1b18; border-color: rgba(29, 27, 24, 0.28); }
.topbar .fullscreen-toggle:focus-visible { outline: 3px solid #b8933e; outline-offset: 2px; }
.topbar .fullscreen-toggle .fullscreen-exit { display: none; }
.topbar .fullscreen-toggle.is-active .fullscreen-enter { display: none; }
.topbar .fullscreen-toggle.is-active .fullscreen-exit { display: block; }
.zone .zone-label { font-size: clamp(1.35rem, 3vw, 2rem); }
.hint strong { position: relative; z-index: 1; }
.hint::before { content: ""; position: absolute; z-index: -1; top: -7px; bottom: -7px; left: 50%; width: min(570px, calc(100% - 24px)); transform: translateX(-50%); border-radius: 999px; background: rgba(250, 246, 238, 0.94); }
.orientation-tip { display: none; }
@media (max-width: 480px) {
  .topbar .fullscreen-toggle { width: 34px; height: 34px; }
}
/* Indice de scroll — invitation discrète, jamais un obstacle au jeu */
.scroll-cue {
  position: absolute;
  z-index: 25;
  left: 50%;
  bottom: clamp(14px, 3vh, 26px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(29, 27, 24, 0.11);
  background: #faf6ee;
  box-shadow: 0 5px 16px -10px rgba(29, 27, 24, 0.45);
  color: #a89f8f;
  opacity: 0.75;
  animation: cue-bob 2.6s ease-in-out infinite;
  transition: color 0.18s ease, opacity 0.18s ease;
}
.scroll-cue svg { width: 20px; height: 20px; }
.scroll-cue:hover, .scroll-cue:focus-visible { color: #1d1b18; opacity: 1; }
.scroll-cue:focus-visible { outline: 3px solid #b8933e; outline-offset: 2px; }
@keyframes cue-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue { animation: none; }
}
@media (max-width: 800px) and (orientation: portrait) {
  .scroll-cue { display: none; }
}

/* Contenu éditorial sous le jeu — lu uniquement si on scrolle volontairement */
.learn {
  position: relative;
  background: #faf6ee;
  padding: clamp(56px, 9vh, 96px) clamp(20px, 5vw, 48px) clamp(64px, 10vh, 110px);
}
.learn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 40px));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(29, 27, 24, 0.14), transparent);
}
.learn-inner {
  max-width: 880px;
  margin: 0 auto;
}
.learn-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #a89f8f;
}
.learn-title {
  margin: 0 0 18px;
  font-family: "Shippori Mincho B1", serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.3;
  color: #1d1b18;
  max-width: 20ch;
}
.learn-lead {
  margin: 0 0 clamp(36px, 6vh, 56px);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.7;
  color: #6b6459;
  max-width: 62ch;
}
.learn-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.learn-article h3,
.learn-faq h3 {
  margin: 0 0 14px;
  font-family: "Shippori Mincho B1", serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1d1b18;
}
.learn-article p {
  margin: 0 0 14px;
  font-size: 0.96rem;
  line-height: 1.75;
  color: #6b6459;
}
.learn-article p:last-child { margin-bottom: 0; }

.learn-compare {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.compare-card {
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(29, 27, 24, 0.08);
}
.compare-card h4 {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 8px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #1d1b18;
}
.compare-card h4 span {
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a89f8f;
}
.compare-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #6b6459;
}
.compare-card--hira {
  background: rgba(34, 64, 108, 0.05);
  border-color: rgba(34, 64, 108, 0.14);
}
.compare-card--hira h4 { color: #22406c; }
.compare-card--kata {
  background: rgba(178, 58, 46, 0.05);
  border-color: rgba(178, 58, 46, 0.14);
}
.compare-card--kata h4 { color: #b23a2e; }

.learn-faq {
  margin-top: clamp(44px, 7vh, 64px);
}
.learn-faq details {
  border-top: 1px solid rgba(29, 27, 24, 0.1);
  padding: 16px 0;
}
.learn-faq details:last-child { border-bottom: 1px solid rgba(29, 27, 24, 0.1); }
.learn-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 0.96rem;
  color: #1d1b18;
}
.learn-faq summary::-webkit-details-marker { display: none; }
.learn-faq summary::after {
  content: "+";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(29, 27, 24, 0.16);
  font-size: 1rem;
  font-weight: 400;
  color: #6b6459;
  transition: transform 0.2s ease, background 0.2s ease;
}
.learn-faq details[open] summary::after {
  content: "–";
  transform: rotate(180deg);
  background: rgba(184, 147, 62, 0.14);
  border-color: rgba(184, 147, 62, 0.4);
}
.learn-faq summary:focus-visible {
  outline: 3px solid #b8933e;
  outline-offset: 3px;
  border-radius: 6px;
}
.learn-faq p {
  margin: 12px 0 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #6b6459;
  max-width: 66ch;
}
.inline-kana-mark {
  display: inline-block;
  width: 0.42em;
  margin-left: 0.18em;
  margin-right: 0;
  overflow: visible;
  text-indent: -0.28em;
  white-space: nowrap;
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 0;
  vertical-align: -0.18em;
  color: #1d1b18;
}
.learn-footer {
  margin: clamp(44px, 7vh, 64px) 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(29, 27, 24, 0.1);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #a89f8f;
  text-align: center;
}

/* Navigation entre les jeux */
.next-game-card {
  display: grid;
  gap: 5px;
  width: min(100%, 620px);
  margin: -20px 0 clamp(42px, 7vh, 62px);
  padding: 18px 22px;
  border: 1px solid rgba(34, 64, 108, 0.16);
  border-radius: 18px;
  background: rgba(34, 64, 108, 0.055);
  color: #1d1b18;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.next-game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 64, 108, 0.3);
  background: rgba(34, 64, 108, 0.08);
}
.next-game-card:focus-visible {
  outline: 3px solid #b8933e;
  outline-offset: 3px;
}
.next-game-card span {
  color: #22406c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.next-game-card strong {
  font-family: "Shippori Mincho B1", serif;
  font-size: 1.08rem;
}
.next-game-card small {
  color: #6b6459;
  font-size: 0.86rem;
}

/* Jeu de prononciation */
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}
.back-game {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(29, 27, 24, 0.14);
  border-radius: 50%;
  background: rgba(240, 233, 216, 0.6);
  color: #6b6459;
  font-size: 1.1rem;
  text-decoration: none;
}
.back-game:hover { color: #1d1b18; border-color: rgba(29, 27, 24, 0.28); }
.back-game:focus-visible { outline: 3px solid #b8933e; outline-offset: 2px; }
.pronunciation-field {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 78%, rgba(34, 64, 108, 0.13), transparent 38%),
    radial-gradient(circle at 88% 72%, rgba(178, 58, 46, 0.1), transparent 36%),
    #faf6ee;
}
.pronunciation-field::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: -34%;
  width: min(82vw, 900px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border: 1px solid rgba(29, 27, 24, 0.045);
  border-radius: 50%;
  pointer-events: none;
}
.quiz-instruction {
  position: absolute;
  z-index: 3;
  top: clamp(26px, 5vh, 54px);
  left: 50%;
  width: calc(100% - 32px);
  margin: 0;
  transform: translateX(-50%);
  color: #a89f8f;
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  letter-spacing: 0.04em;
  text-align: center;
}
.pronunciation-stage {
  position: absolute;
  z-index: 3;
  top: 38%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translate(-50%, -50%);
}
.pronunciation-stage .kana-card {
  width: clamp(140px, 22vw, 210px);
  height: clamp(140px, 22vw, 210px);
}
.pronunciation-feedback {
  z-index: 5;
  top: auto;
  bottom: clamp(130px, 21vh, 178px);
}
.answer-grid {
  position: absolute;
  z-index: 4;
  bottom: clamp(22px, 4.5vh, 46px);
  left: 50%;
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 160px));
  gap: clamp(8px, 1.4vw, 14px);
  width: min(560px, calc(100% - 32px));
  transform: translateX(-50%);
}
.answer-btn {
  position: relative;
  min-height: 52px;
  padding: 11px 26px;
  border: 1px solid rgba(29, 27, 24, 0.13);
  border-radius: 14px;
  background: rgba(250, 246, 238, 0.96);
  box-shadow: 0 8px 22px -18px rgba(29, 27, 24, 0.5);
  color: #1d1b18;
  cursor: pointer;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  transition: transform 0.15s ease, border-color 0.18s ease, background 0.18s ease;
}
.answer-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(34, 64, 108, 0.35);
  background: #f4efe4;
}
.answer-btn:active:not(:disabled) { transform: scale(0.97); }
.answer-btn:focus-visible { outline: 3px solid #b8933e; outline-offset: 2px; }
.answer-btn small {
  position: absolute;
  top: 7px;
  right: 9px;
  color: #b9b0a1;
  font-size: 0.58rem;
  font-weight: 600;
}
.answer-btn.is-correct {
  border-color: rgba(79, 127, 96, 0.28);
  background: #eaf1ec;
  color: #365b43;
}
.answer-btn.is-wrong {
  border-color: rgba(178, 58, 46, 0.22);
  background: #f5e9e7;
  color: #9d4e47;
}
.answer-btn:disabled { cursor: default; }
.pronunciation-learn .learn-title { max-width: 22ch; }
.next-game-card--secondary { margin: clamp(42px, 7vh, 62px) 0 0; }

@media (max-width: 640px) {
  .pronunciation-game .topbar { padding-inline: 14px; }
  .pronunciation-game .brand-group { gap: 8px; }
  .pronunciation-game .back-game { width: 32px; height: 32px; }
  .pronunciation-stage { top: 36%; }
  .answer-grid {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    bottom: 18px;
  }
  .answer-btn { min-height: 46px; padding-block: 9px; }
  .pronunciation-feedback { bottom: 178px; }
}
@media (max-width: 480px) {
  .pronunciation-game .brand { font-size: 1rem; }
  .pronunciation-game .brand span { display: block; font-size: 0.48em; }
  .pronunciation-game .topbar-right { gap: 7px; }
  .pronunciation-game .stats { gap: 8px; }
  .quiz-instruction { top: 18px; }
}
@media (max-height: 620px) and (orientation: landscape) {
  .quiz-instruction { top: 12px; }
  .pronunciation-stage { top: 37%; }
  .pronunciation-stage .kana-card { width: 120px; height: 120px; }
  .pronunciation-stage .kana-glyph { font-size: 3.5rem; }
  .pronunciation-stage .pronounce-btn { padding-block: 6px; }
  .answer-grid {
    grid-template-columns: repeat(6, minmax(72px, 1fr));
    width: min(860px, calc(100% - 30px));
    bottom: 12px;
  }
  .answer-btn { min-height: 42px; padding: 8px 18px; }
  .pronunciation-feedback { bottom: 68px; }
}

/* Identité et navigation communes */
.site-brand {
  display: flex;
  flex-direction: column;
  color: #1d1b18;
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(0.98rem, 1.8vw, 1.22rem);
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}
.site-brand span {
  margin-top: 4px;
  color: #a89f8f;
  font-family: "Work Sans", sans-serif;
  font-size: 0.48em;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-brand--large { font-size: clamp(1.15rem, 2.4vw, 1.55rem); }
.games-menu { position: relative; z-index: 60; pointer-events: auto; }
.games-menu > button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid rgba(29, 27, 24, 0.13);
  border-radius: 999px;
  background: rgba(250, 246, 238, 0.9);
  color: #6b6459;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.games-menu > button:hover,
.games-menu > button[aria-expanded="true"] { color: #1d1b18; border-color: rgba(29, 27, 24, 0.28); }
.games-menu > button:focus-visible { outline: 3px solid #b8933e; outline-offset: 2px; }
.games-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(310px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid rgba(29, 27, 24, 0.12);
  border-radius: 16px;
  background: #faf6ee;
  box-shadow: 0 18px 48px -20px rgba(29, 27, 24, 0.4);
}
.games-menu-panel[hidden] { display: none; }
.games-menu-panel a {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border-radius: 11px;
  color: #1d1b18;
  text-decoration: none;
}
.games-menu-panel a:hover { background: rgba(29, 27, 24, 0.045); }
.games-menu-panel a.is-current { background: rgba(34, 64, 108, 0.07); }
.games-menu-panel a > b {
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 1.25rem;
  text-align: center;
}
.games-menu-panel a > span { display: flex; flex-direction: column; font-size: 0.86rem; font-weight: 700; }
.games-menu-panel small { margin-top: 2px; color: #8d8578; font-size: 0.72rem; font-weight: 500; }
.game-topbar .brand-group { gap: clamp(10px, 2vw, 20px); }

/* Accueil des mini-jeux */
.hub-page,
.index-page { background: #faf6ee; }
.hub-header,
.reference-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 48px);
}
.hub-main,
.reference-main {
  max-width: 1024px;
  margin: 0 auto;
  padding: clamp(42px, 7vw, 82px) clamp(20px, 5vw, 48px) clamp(70px, 10vw, 120px);
}
.hub-hero { max-width: 730px; }
.hub-hero h1,
.reference-intro h1 {
  margin: 0 0 18px;
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(2rem, 5.2vw, 3.65rem);
  line-height: 1.13;
  letter-spacing: -0.025em;
}
.hub-hero > p:last-child,
.reference-intro > p:last-child {
  max-width: 63ch;
  margin: 0;
  color: #6b6459;
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.75;
}
.hub-games { margin-top: clamp(52px, 8vw, 86px); }
.hub-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.hub-section-heading h2,
.hub-reference h2,
.reference-copy h2 {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
}
.hub-section-heading span { color: #a89f8f; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(29, 27, 24, 0.1);
  border-radius: 22px;
  background: #f6f0e4;
  color: #1d1b18;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px -30px rgba(29, 27, 24, 0.6); }
.hub-card:focus-visible { outline: 3px solid #b8933e; outline-offset: 3px; }
.hub-card-kana {
  min-height: 96px;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: clamp(3rem, 6vw, 4.7rem);
  font-weight: 700;
}
.hub-card-tag { margin-bottom: 8px; color: #8d8578; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.hub-card strong { font-family: "Shippori Mincho B1", serif; font-size: 1.3rem; }
.hub-card p { margin: 9px 0 20px; color: #6b6459; font-size: 0.88rem; line-height: 1.6; }
.hub-card small { margin-top: auto; color: #1d1b18; font-weight: 700; }
.hub-card--hira { background: rgba(34, 64, 108, 0.07); }
.hub-card--kata { background: rgba(178, 58, 46, 0.065); }
.hub-reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(29, 27, 24, 0.09);
  border-radius: 22px;
}
.hub-reference p:not(.learn-eyebrow) { margin: 8px 0 0; max-width: 55ch; color: #6b6459; line-height: 1.65; }
.hub-reference > a {
  flex-shrink: 0;
  padding: 12px 18px;
  border-radius: 999px;
  background: #1d1b18;
  color: #faf6ee;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

/* Tableaux et index */
.kana-reference { margin-top: clamp(52px, 8vh, 76px); }
.kana-reference h3 { margin: 0 0 10px; font-family: "Shippori Mincho B1", serif; font-size: 1.25rem; }
.kana-reference > p:not(.learn-eyebrow) { margin: 0 0 22px; color: #6b6459; line-height: 1.7; }
.full-kana-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.full-kana-grid > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(34, 64, 108, 0.11);
  border-radius: 12px;
  background: rgba(34, 64, 108, 0.045);
}
.full-kana-grid--kata > span { border-color: rgba(178, 58, 46, 0.11); background: rgba(178, 58, 46, 0.04); }
.full-kana-grid b { font-family: "Yu Gothic", "Noto Sans JP", sans-serif; font-size: 1.5rem; }
.full-kana-grid small { color: #8d8578; font-size: 0.72rem; font-weight: 700; }
.full-kana-grid .is-empty { border-color: transparent; background: transparent; }
.reference-header { border-bottom: 1px solid rgba(29, 27, 24, 0.07); }
.reference-header .games-menu-panel { left: auto; right: 0; }
.reference-main { padding-top: clamp(48px, 7vw, 78px); }
.reference-intro { max-width: 760px; }
.reference-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 18px; }
.reference-legend span { padding: 7px 11px; border-radius: 999px; background: #f0e9dc; color: #6b6459; font-size: 0.75rem; }
.reference-legend .legend-hira { background: rgba(34, 64, 108, 0.08); color: #22406c; }
.reference-legend .legend-kata { background: rgba(178, 58, 46, 0.07); color: #9f3d34; }
.paired-kana-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.paired-kana-grid article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 86px;
  overflow: hidden;
  border: 1px solid rgba(29, 27, 24, 0.09);
  border-radius: 14px;
  background: #faf6ee;
  text-align: center;
}
.paired-kana-grid b { padding-top: 11px; font-family: "Yu Gothic", "Noto Sans JP", sans-serif; font-size: 1.65rem; }
.paired-kana-grid b:first-child { color: #22406c; }
.paired-kana-grid b:nth-child(2) { color: #9f3d34; }
.paired-kana-grid small { grid-column: 1 / -1; padding: 7px; background: #f3ecdf; color: #6b6459; font-weight: 700; }
.reference-copy { max-width: 720px; margin-top: clamp(44px, 7vw, 70px); }
.reference-copy p { color: #6b6459; line-height: 1.75; }

/* Pied de page commun */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 40px;
  padding: 34px clamp(20px, 5vw, 54px);
  border-top: 1px solid rgba(29, 27, 24, 0.09);
  background: #f5efe4;
}
.site-footer > div { display: flex; flex-direction: column; gap: 4px; }
.site-footer > div strong { font-family: "Shippori Mincho B1", serif; }
.site-footer > div span,
.site-footer small { color: #8d8578; font-size: 0.76rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; }
.site-footer nav a { color: #6b6459; font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.site-footer nav a:hover { color: #1d1b18; }
.site-footer > small { grid-column: 1 / -1; }

@media (max-width: 780px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card { min-height: 220px; }
  .hub-card-kana { min-height: 72px; }
  .paired-kana-grid { grid-template-columns: repeat(3, 1fr); }
  .hub-reference { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .game-topbar .site-brand span { display: none; }
  .game-topbar .games-menu > button { padding-inline: 10px; }
  .game-topbar .games-menu > button > span { display: none; }
  .full-kana-grid { grid-template-columns: repeat(3, 1fr); }
  .full-kana-grid .is-empty { display: none; }
  .paired-kana-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
  .site-footer > small { grid-column: auto; }
}

/* Ajustements v22 : menu simplifié et accueil centré sur les jeux */
.hub-header { max-width: 1024px; }
.games-menu > button {
  position: relative;
  gap: 10px;
  min-height: 40px;
  padding: 8px 38px 8px 16px;
  border-color: rgba(29, 27, 24, 0.16);
  background: #f7f1e6;
  box-shadow: 0 5px 16px -14px rgba(29, 27, 24, 0.65);
  color: #1d1b18;
  font-size: 0.86rem;
}
.games-menu > button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-68%) rotate(45deg);
  transition: transform 0.18s ease;
}
.games-menu > button[aria-expanded="true"]::after {
  transform: translateY(-25%) rotate(225deg);
}
.games-menu-panel { width: min(286px, calc(100vw - 28px)); padding: 9px; }
.games-menu-panel a {
  display: block;
  padding: 11px 13px;
}
.games-menu-panel a > span { font-size: 0.88rem; }
.games-menu-panel small { font-size: 0.73rem; }

.hub-game-screen {
  display: flex;
  min-height: calc(100svh - 92px);
  border-bottom: 1px solid rgba(29, 27, 24, 0.08);
}
.hub-game-screen .hub-main {
  width: 100%;
  margin: auto;
  padding-top: clamp(32px, 5vh, 56px);
  padding-bottom: clamp(42px, 7vh, 72px);
}
.hub-section-heading--primary { margin-bottom: clamp(24px, 4vh, 38px); }
.hub-section-heading--primary h1 {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.15;
}
.hub-grid { gap: clamp(12px, 2vw, 18px); }
.hub-card {
  display: grid;
  grid-template-rows: 108px 1fr;
  min-height: 250px;
  padding: 22px;
  border-radius: 18px;
  background: #f7f1e6;
}
.hub-card-kana {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-height: 0;
  font-style: normal;
  line-height: 1;
}
.hub-card-kana i { font-style: normal; }
.hub-card-kana i:first-child { color: #22406c; }
.hub-card-kana i:last-child { color: #9f3d34; }
.hub-card-copy { display: flex; flex-direction: column; align-self: end; }
.hub-card-copy small {
  margin: 0 0 7px;
  color: #8d8578;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hub-card-copy strong {
  font-family: "Shippori Mincho B1", serif;
  font-size: 1.25rem;
}
.hub-card-copy b {
  margin-top: 5px;
  color: #6b6459;
  font-size: 0.78rem;
  font-weight: 500;
}
.hub-card-arrow {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: #a89f8f;
  font-size: 1.1rem;
  transition: transform 0.18s ease, color 0.18s ease;
}
.hub-card:hover .hub-card-arrow { transform: translateX(4px); color: #1d1b18; }
.hub-card--hira { background: rgba(34, 64, 108, 0.065); }
.hub-card--kata { background: rgba(178, 58, 46, 0.055); }
.hub-index-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 15px;
  align-items: center;
  margin-top: 14px;
  padding: 15px 18px;
  border: 1px solid rgba(29, 27, 24, 0.1);
  border-radius: 15px;
  color: #1d1b18;
  text-decoration: none;
}
.hub-index-link > span {
  grid-row: 1 / 3;
  font-family: "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 1.35rem;
}
.hub-index-link b { font-size: 0.87rem; }
.hub-index-link small { color: #8d8578; font-size: 0.72rem; }
.hub-index-link i { grid-column: 3; grid-row: 1 / 3; color: #a89f8f; font-style: normal; }
.hub-index-link:hover { border-color: rgba(29, 27, 24, 0.24); background: rgba(29, 27, 24, 0.025); }
.hub-seo { padding: clamp(70px, 10vw, 120px) clamp(20px, 5vw, 48px); }
.hub-seo-inner { max-width: 928px; margin: 0 auto; }
.hub-seo .hub-hero { max-width: 720px; }
.hub-seo .hub-hero h2 {
  margin: 0 0 18px;
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  line-height: 1.25;
}
.hub-seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 68px);
  margin-top: clamp(48px, 7vw, 76px);
}
.hub-seo-grid h3,
.hub-steps h3 { margin: 0 0 13px; font-family: "Shippori Mincho B1", serif; font-size: 1.12rem; }
.hub-seo-grid p { margin: 0 0 13px; color: #6b6459; font-size: 0.94rem; line-height: 1.75; }
.hub-steps { margin-top: clamp(48px, 7vw, 76px); }
.hub-steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: step; }
.hub-steps li { counter-increment: step; padding: 20px; border: 1px solid rgba(29, 27, 24, 0.09); border-radius: 15px; }
.hub-steps li::before { content: "0" counter(step); display: block; margin-bottom: 16px; color: #b8933e; font-size: 0.72rem; font-weight: 700; }
.hub-steps b { display: block; margin-bottom: 7px; font-size: 0.9rem; }
.hub-steps span { color: #6b6459; font-size: 0.82rem; line-height: 1.6; }
.hub-faq { margin-top: clamp(48px, 7vw, 76px); }

.reference-legend span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  font-size: 0.84rem;
  line-height: 1;
}

@media (max-width: 780px) {
  .hub-game-screen { min-height: calc(100svh - 82px); }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card {
    grid-template-columns: 82px 1fr;
    grid-template-rows: 1fr;
    align-items: center;
    min-height: 112px;
    padding: 16px 20px;
  }
  .hub-card-kana { align-items: center; font-size: 2.8rem; }
  .hub-card-copy { align-self: center; }
  .hub-card-arrow { bottom: auto; top: 50%; transform: translateY(-50%); }
  .hub-card:hover .hub-card-arrow { transform: translate(4px, -50%); }
  .hub-seo-grid { grid-template-columns: 1fr; }
  .hub-steps ol { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .game-topbar .games-menu > button { padding: 7px 34px 7px 12px; }
  .hub-section-heading--primary { align-items: flex-end; }
  .hub-section-heading--primary > span { max-width: 75px; text-align: right; }
  .hub-index-link small { display: none; }
  .hub-index-link b { align-self: center; }
}

/* Ajustements de lisibilité v23 */
.learn-eyebrow { font-size: 0.8rem; }
.games-menu > button { font-size: 0.94rem; }
.games-menu-panel a > span { font-size: 0.96rem; }
.games-menu-panel small { margin-top: 3px; font-size: 0.84rem; line-height: 1.35; }

.hub-section-heading--primary { justify-content: flex-start; }
.hub-card {
  grid-template-rows: 78px auto;
  justify-items: center;
  min-height: 222px;
  padding: 22px 20px 20px;
  text-align: center;
}
.hub-card-kana {
  align-items: center;
  justify-content: center;
  font-size: clamp(2.7rem, 4.4vw, 3.65rem);
}
.hub-card-copy {
  align-self: start;
  align-items: center;
}
.hub-card-copy small {
  margin-bottom: 5px;
  font-size: 0.78rem;
  letter-spacing: 0.11em;
}
.hub-card-copy strong { font-size: 1.35rem; }
.hub-card-copy b {
  margin-top: 4px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.hub-card-arrow { display: none; }
.hub-index-link b { font-size: 0.94rem; }
.hub-index-link small { font-size: 0.84rem; }
.hub-seo-grid p { font-size: 1rem; }
.hub-steps b { font-size: 0.98rem; }
.hub-steps span { font-size: 0.91rem; }
.full-kana-grid small { font-size: 0.84rem; }
.site-footer > div span,
.site-footer small { font-size: 0.85rem; }
.site-footer nav a { font-size: 0.88rem; }
.topbar .stats .stat .stat-label { font-size: 0.72rem; }
.compare-card h4 span { font-size: 0.78rem; }
.compare-card p { font-size: 0.95rem; }
.answer-btn small { font-size: 0.7rem; }
.kana-table thead th { font-size: 0.78rem; }

@media (max-width: 780px) {
  .hub-card {
    grid-template-columns: 74px 1fr;
    justify-items: stretch;
    min-height: 110px;
    text-align: left;
  }
  .hub-card-kana { justify-content: flex-start; font-size: 2.65rem; }
  .hub-card-copy { align-items: flex-start; align-self: center; }
}
@media (max-width: 480px) {
  .topbar .stats .stat-label { font-size: 0.65rem; }
}

/* Jeu Kanji → signification */
.kanji-game .topbar { padding-bottom: 14px; }
.kanji-filter-wrap {
  position: relative;
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px clamp(18px, 4vw, 48px) 12px;
  border-bottom: 1px solid rgba(29, 27, 24, 0.07);
}
.kanji-filter-wrap > p {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  color: #6b6459;
  font-size: 0.88rem;
  font-weight: 700;
}
.kanji-theme-filters {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding: 0;
}
.theme-expand { display: none; }
.theme-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(29, 27, 24, 0.13);
  border-radius: 999px;
  background: #faf6ee;
  color: #6b6459;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.theme-chip small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  min-height: 23px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(29, 27, 24, 0.06);
  color: #8d8578;
  font-size: 0.75rem;
}
.theme-chip:hover { border-color: rgba(29, 27, 24, 0.28); color: #1d1b18; }
.theme-chip.is-active {
  border-color: rgba(34, 64, 108, 0.28);
  background: #e8edf3;
  color: #22406c;
}
.theme-chip.is-active small { background: rgba(34, 64, 108, 0.1); color: #22406c; }
.theme-chip:focus-visible { outline: 3px solid #b8933e; outline-offset: 2px; }
.kanji-field {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 78%, rgba(34, 64, 108, 0.11), transparent 37%),
    radial-gradient(circle at 86% 72%, rgba(184, 147, 62, 0.1), transparent 35%),
    #faf6ee;
}
.kanji-field .quiz-instruction { top: clamp(26px, 4vh, 40px); }
.kanji-stage {
  position: absolute;
  z-index: 3;
  top: 31%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.kanji-card {
  width: clamp(135px, 20vw, 195px);
  height: clamp(135px, 20vw, 195px);
}
.kanji-card .kana-glyph { font-size: clamp(4.5rem, 9vw, 7rem); }
.kanji-feedback {
  top: 50%;
  font-size: clamp(1.08rem, 2vw, 1.25rem);
}
.kanji-details {
  position: absolute;
  z-index: 4;
  top: auto;
  bottom: clamp(18px, 3.5vh, 34px);
  left: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 18px;
  width: min(540px, calc(100% - 28px));
  padding: 12px 16px;
  border: 1px solid rgba(29, 27, 24, 0.1);
  border-radius: 14px;
  background: rgba(250, 246, 238, 0.97);
  box-shadow: 0 12px 34px -25px rgba(29, 27, 24, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.kanji-details.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.kanji-details div { display: flex; flex-direction: column; gap: 3px; }
.kanji-details div > span { color: #8d8578; font-size: 0.9rem; font-weight: 700; }
.kanji-details div > strong { font-family: "Noto Sans JP", sans-serif; font-size: 1.12rem; }
.kanji-details div > em {
  color: #6b6459;
  font-family: "Work Sans", sans-serif;
  font-size: 0.96rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.kanji-details p { grid-column: 1 / -1; margin: 4px 0 0; color: #6b6459; font-size: 0.95rem; line-height: 1.45; }
.kanji-details > small { grid-column: 1 / -1; color: #8d8578; font-size: 0.86rem; }
.kanji-next-btn {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: 132px;
  min-height: 42px;
  margin-top: 4px;
  padding: 9px 18px;
  border: 1px solid rgba(34, 64, 108, 0.2);
  border-radius: 999px;
  background: #dfe8f1;
  color: #22406c;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.kanji-next-btn:hover { border-color: rgba(34, 64, 108, 0.34); background: #d3e0eb; }
.kanji-next-btn:focus-visible { outline: 3px solid #b8933e; outline-offset: 2px; }
.kanji-answer-grid {
  position: absolute;
  z-index: 4;
  bottom: clamp(88px, 12vh, 118px);
  left: 50%;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 180px));
  gap: 10px;
  width: min(590px, calc(100% - 30px));
  transform: translateX(-50%);
  transition: opacity 0.18s ease;
}
.kanji-answer-grid.has-result { opacity: 0; pointer-events: none; }
.kanji-answer-btn {
  position: relative;
  min-height: 52px;
  padding: 10px 28px 10px 14px;
  border: 1px solid rgba(29, 27, 24, 0.13);
  border-radius: 13px;
  background: rgba(250, 246, 238, 0.97);
  color: #1d1b18;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.18s ease, background 0.18s ease;
}
.kanji-answer-btn small {
  position: absolute;
  top: 7px;
  right: 9px;
  color: #aaa193;
  font-size: 0.7rem;
}
.kanji-answer-btn:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(34, 64, 108, 0.34); }
.kanji-answer-btn:focus-visible { outline: 3px solid #b8933e; outline-offset: 2px; }
.kanji-answer-btn.is-correct { border-color: rgba(79, 127, 96, 0.28); background: #eaf1ec; color: #365b43; }
.kanji-answer-btn.is-wrong { border-color: rgba(178, 58, 46, 0.22); background: #f5e9e7; color: #9d4e47; }
.kanji-answer-btn:disabled { cursor: default; }
.kanji-reading-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 23px;
  border: 1px solid rgba(184, 147, 62, 0.18);
  border-radius: 18px;
  background: rgba(184, 147, 62, 0.07);
}
.kanji-reading-note > strong { font-family: "Noto Sans JP", sans-serif; font-size: 1.35rem; }
.kanji-reading-note > span { font-size: 0.94rem; }
.kanji-reading-note > span b { display: inline-block; min-width: 84px; }
.kanji-reading-note p { margin: 5px 0 0; color: #6b6459; font-size: 0.9rem; line-height: 1.6; }
.kanji-explanation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: clamp(46px, 7vh, 66px);
}
.kanji-explanation article { padding: 22px; border: 1px solid rgba(29, 27, 24, 0.09); border-radius: 16px; }
.kanji-explanation h3 { margin: 0 0 10px; font-family: "Shippori Mincho B1", serif; font-size: 1.05rem; }
.kanji-explanation p { margin: 0; color: #6b6459; font-size: 0.95rem; line-height: 1.7; }
.kanji-attribution { margin: 42px 0 0; color: #8d8578; font-size: 0.82rem; line-height: 1.6; }
.hub-grid { grid-template-columns: repeat(4, 1fr); }
.hub-card--kanji { background: rgba(184, 147, 62, 0.075); }

@media (max-width: 780px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto;
    width: 100%;
    min-height: 108px;
  }
  .hub-card-kana {
    justify-content: flex-start;
    min-width: 0;
  }
  .hub-card-copy {
    min-width: 0;
    align-items: flex-start;
    text-align: left;
  }
  .hub-card-copy strong,
  .hub-card-copy b {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 640px) {
  .kanji-filter-wrap { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 7px; padding-block: 7px 9px; }
  .kanji-filter-wrap > p { display: none; }
  .kanji-theme-filters { order: 2; flex-basis: 100%; width: 100%; }
  .kanji-theme-filters:not(.is-expanded) { display: none; }
  .kanji-theme-filters.is-expanded {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kanji-theme-filters.is-expanded .theme-chip {
    justify-content: center;
    width: 100%;
    padding-inline: 9px;
    white-space: normal;
    text-align: center;
  }
  .theme-expand {
    order: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid rgba(29, 27, 24, 0.14);
    border-radius: 999px;
    background: #f7f1e6;
    color: #1d1b18;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
  }
  .theme-chip { min-height: 36px; font-size: 0.82rem; }
  .kanji-stage { top: 27%; }
  .kanji-card { width: 125px; height: 125px; }
  .kanji-card .kana-glyph { font-size: 4.2rem; }
  .kanji-feedback { top: 43%; }
  .kanji-details { top: auto; bottom: 14px; }
  .kanji-field .quiz-instruction { top: 22px; }
  .kanji-answer-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); bottom: 46px; gap: 8px; }
  .kanji-answer-btn { min-height: 46px; font-size: 0.88rem; }
  .kanji-explanation { grid-template-columns: 1fr; }
}
@media (max-width: 980px) and (min-width: 781px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-height: 650px) and (orientation: landscape) {
  .kanji-filter-wrap { padding-block: 5px 7px; }
  .theme-chip { min-height: 32px; padding-block: 5px; }
  .kanji-stage { top: 31%; left: 20%; }
  .kanji-feedback { top: 14%; left: 63%; }
  .kanji-details { top: 20%; bottom: auto; left: 63%; width: min(470px, 64%); }
  .kanji-field .quiz-instruction { top: 12px; }
  .kanji-answer-grid { grid-template-columns: repeat(6, minmax(90px, 1fr)); width: calc(100% - 30px); bottom: 28px; }
  .kanji-answer-btn { min-height: 44px; padding-block: 7px; }
}

.learn strong {
  color: #1d1b18;
  font-weight: 600;
}
.learn em {
  font-style: normal;
  color: #1d1b18;
}
.learn-examples,
.learn-method {
  margin-top: clamp(44px, 7vh, 68px);
}
.learn-examples {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(29, 27, 24, 0.08);
  border-radius: 22px;
  background: #f6f0e4;
}
.learn-examples h3,
.learn-method h3 {
  margin: 0 0 12px;
  font-family: "Shippori Mincho B1", serif;
  font-size: 1.12rem;
  line-height: 1.4;
  color: #1d1b18;
}
.learn-examples p:not(.learn-eyebrow) {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.7;
  color: #6b6459;
}
.kana-table-wrap {
  overflow-x: auto;
}
.kana-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  background: rgba(250, 246, 238, 0.82);
  border-radius: 14px;
  overflow: hidden;
}
.kana-table th,
.kana-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(29, 27, 24, 0.08);
}
.kana-table thead th {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #6b6459;
}
.kana-table tbody th {
  font-size: 0.82rem;
  color: #6b6459;
}
.kana-table tbody td {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.3rem;
  color: #1d1b18;
}
.kana-table tr:last-child th,
.kana-table tr:last-child td {
  border-bottom: 0;
}
.learn-method {
  max-width: 760px;
}
.learn-method ol {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: dojo-step;
}
.learn-method li {
  position: relative;
  counter-increment: dojo-step;
  margin: 0;
  padding: 0 0 20px 46px;
  font-size: 0.96rem;
  line-height: 1.7;
  color: #6b6459;
}
.learn-method li:last-child {
  padding-bottom: 0;
}
.learn-method li::before {
  content: counter(dojo-step);
  position: absolute;
  top: 1px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: rgba(34, 64, 108, 0.09);
  color: #22406c;
  font-weight: 700;
  font-size: 0.78rem;
}

@media (max-width: 760px) {
  .learn-grid { grid-template-columns: 1fr; }
  .learn-examples { grid-template-columns: 1fr; }
  .learn-title { max-width: none; }
}

@media (max-width: 800px) and (orientation: portrait) {
  .orientation-tip { position: fixed; z-index: 50; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; display: flex; align-items: center; gap: 9px; padding: 10px 38px 10px 12px; border: 1px solid rgba(29, 27, 24, 0.12); border-radius: 14px; background: rgba(250, 246, 238, 0.97); box-shadow: 0 12px 35px -14px rgba(29, 27, 24, 0.4); color: #6b6459; font-size: 0.75rem; }
  .orientation-tip.is-dismissed { display: none; }
  .orientation-tip .rotate-icon { font-size: 1.35rem; color: #22406c; }
  .orientation-tip button { flex-shrink: 0; padding: 6px 9px; border: 0; border-radius: 999px; background: #22406c; color: white; font-size: 0.7rem; cursor: pointer; }
  .orientation-tip .tip-close { position: absolute; right: 5px; padding: 4px 8px; background: transparent; color: #a89f8f; font-size: 1.2rem; }
}

/* Ajustements v32 : accueil mobile, en-têtes et consignes */
.quiz-instruction {
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.hub-index-link {
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto;
  min-height: 108px;
  padding: 20px 24px;
  border-color: rgba(29, 27, 24, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(110deg, rgba(34, 64, 108, 0.07), rgba(178, 58, 46, 0.045)),
    #faf6ee;
  box-shadow: 0 12px 30px -28px rgba(29, 27, 24, 0.65);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.hub-index-link:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 27, 24, 0.23);
  box-shadow: 0 18px 38px -28px rgba(29, 27, 24, 0.7);
}
.hub-index-link .hub-index-kana {
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-items: center;
  justify-content: center;
  gap: 1px 7px;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.05;
}
.hub-index-kana i {
  grid-column: auto;
  grid-row: auto;
  font-style: normal;
}
.hub-index-kana i:nth-child(1) { color: #22406c; }
.hub-index-kana i:nth-child(2) { color: #9f3d34; }
.hub-index-kana i:nth-child(3) { color: #4f7f60; }
.hub-index-kana i:nth-child(4) { color: #b8933e; }
.hub-index-link .hub-card-copy {
  min-width: 0;
  align-self: center;
  align-items: flex-start;
  text-align: left;
}
.hub-index-link .hub-card-copy small {
  display: block;
  margin: 0 0 5px;
  color: #8d8578;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}
.hub-index-link .hub-card-copy strong {
  font-family: "Shippori Mincho B1", serif;
  font-size: 1.35rem;
  line-height: 1.2;
}
.hub-index-link .hub-card-copy b {
  margin-top: 4px;
  color: #6b6459;
  font-family: "Work Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

@media (max-width: 780px) {
  .hub-card,
  .hub-index-link {
    grid-template-columns: 108px minmax(0, 1fr);
  }
  .hub-card--bingo {
    column-gap: 18px;
  }
  .hub-card .hub-card-kana {
    justify-content: center;
  }
  .hub-card--duel .hub-card-kana {
    gap: 0;
    font-size: 2.45rem;
  }
}

@media (max-width: 640px) {
  .game-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 126px;
    align-items: start;
    column-gap: 10px;
    padding: 14px 14px 9px;
  }
  .game-topbar .brand-group {
    min-width: 0;
    gap: 8px;
  }
  .game-topbar .topbar-right {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 126px;
    gap: 7px;
  }
  .game-topbar .topbar-right > button,
  .game-topbar .topbar-right > .settings-wrap {
    order: 1;
  }
  .game-topbar .topbar-right > .stats {
    order: 2;
    flex: 0 0 100%;
    justify-content: center;
    gap: 18px;
    margin-top: 2px;
  }
  .game-topbar .stats .stat-label {
    font-size: 0.62rem;
  }
  .hub-index-link {
    min-height: 128px;
    padding: 18px 20px;
  }
  .hub-index-link .hub-index-kana {
    font-size: 1.55rem;
  }
}

@media (max-width: 390px) {
  .hub-card,
  .hub-index-link {
    grid-template-columns: 98px minmax(0, 1fr);
  }
  .hub-card--duel .hub-card-kana {
    font-size: 2.25rem;
  }
  .game-topbar {
    grid-template-columns: minmax(0, 1fr) 118px;
    padding-inline: 11px;
  }
  .game-topbar .topbar-right {
    width: 118px;
  }
  .game-topbar .topbar-right > .stats {
    gap: 14px;
  }
}

/* ===== Kana Bingo — v34 ===== */
.bingo-page,
.bingo-game {
  background: #faf6ee;
}

.bingo-game {
  min-height: 100svh;
  height: auto;
}

.bingo-game:fullscreen,
.bingo-game:-webkit-full-screen {
  overflow: auto;
  background: #faf6ee;
}

.bingo-field {
  min-height: calc(100svh - 84px);
  padding: clamp(28px, 4vw, 52px) clamp(16px, 3vw, 46px) clamp(38px, 5vw, 66px);
  border-top: 1px solid rgba(34, 30, 25, 0.08);
  border-bottom: 1px solid rgba(34, 30, 25, 0.1);
  background:
    radial-gradient(circle at 15% 55%, rgba(45, 82, 132, 0.08), transparent 29%),
    radial-gradient(circle at 86% 54%, rgba(176, 67, 59, 0.07), transparent 30%),
    #faf6ee;
}

.bingo-intro {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.bingo-intro h1 {
  margin: 4px 0 8px;
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
}

.bingo-intro > p:last-child {
  margin: 0;
  color: #726b62;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.55;
}

.bingo-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 24px;
}

.bingo-controls > p {
  margin: 0;
  color: #777067;
  font-size: 0.98rem;
}

.bingo-switch {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(47, 42, 35, 0.13);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.78);
  box-shadow: 0 8px 24px rgba(55, 48, 38, 0.06);
}

.bingo-switch button,
#bingo-replay {
  border: 0;
  border-radius: 999px;
  font: 700 0.95rem/1 "Work Sans", sans-serif;
  cursor: pointer;
}

.bingo-switch button {
  padding: 11px 18px;
  color: #746e65;
  background: transparent;
}

.bingo-switch button.active {
  color: #fffdf8;
  background: #345f91;
  box-shadow: 0 4px 12px rgba(52, 95, 145, 0.2);
}

.bingo-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.bingo-grid-wrap {
  position: relative;
}

.bingo-grid {
  --bingo-cell: clamp(47px, 13vw, 64px);
  display: grid;
  grid-template-columns: repeat(5, var(--bingo-cell));
  gap: 6px;
}

.bingo-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(43, 38, 31, 0.14);
  border-radius: 12px;
  color: #221f1b;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 4px 14px rgba(54, 46, 35, 0.04);
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.bingo-cell:hover,
.bingo-cell.is-dragover {
  border-color: rgba(52, 95, 145, 0.5);
  background: #f3f6f8;
  transform: translateY(-1px);
}

.bingo-cell.is-correct {
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px;
  border-color: rgba(73, 119, 94, 0.42);
  color: #365d47;
  background: #e5efe7;
  box-shadow: inset 0 0 0 1px rgba(73, 119, 94, 0.08);
}

.bingo-cell.is-correct .bingo-kana {
  font-size: 0.72em;
  line-height: 1;
}

.bingo-cell .bingo-answer {
  display: block;
  margin-top: 1px;
  font: 700 0.62rem/1 "Work Sans", sans-serif;
  letter-spacing: 0.03em;
}

.bingo-cell.is-correct .bingo-answer {
  font-size: clamp(0.76rem, 1.4vw, 0.92rem);
  line-height: 1;
}

.bingo-pool-wrap {
  width: min(100%, 960px);
  text-align: center;
}

.bingo-pool-wrap h2 {
  margin: 0 0 13px;
  color: #6f685f;
  font: 700 0.9rem/1.3 "Work Sans", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bingo-pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.bingo-tile {
  min-width: 52px;
  padding: 10px 12px;
  border: 1px solid rgba(43, 38, 31, 0.16);
  border-radius: 10px;
  color: #302c27;
  background: #fffdf8;
  box-shadow: 0 3px 10px rgba(54, 46, 35, 0.05);
  font: 700 0.9rem/1 "Work Sans", sans-serif;
  cursor: grab;
  touch-action: none;
}

.bingo-tile:hover,
.bingo-tile.is-selected {
  border-color: #345f91;
  color: #294e79;
  background: #e9f0f7;
}

.bingo-tile.is-dragging {
  z-index: 20;
  cursor: grabbing;
  box-shadow: 0 12px 28px rgba(39, 50, 61, 0.2);
}

.bingo-tile.is-drag-source {
  border-color: rgba(52, 95, 145, 0.38);
  background: #f1f5f8;
}

.bingo-drag-ghost {
  z-index: 100;
  pointer-events: none;
}

.bingo-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 28px;
  border-radius: 18px;
  text-align: center;
  background: rgba(250, 246, 238, 0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.bingo-overlay.show {
  opacity: 1;
  visibility: visible;
}

.bingo-overlay h2 {
  margin: 12px 0 5px;
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.bingo-overlay p {
  margin: 0 0 18px;
  color: #6e675f;
}

.bingo-medal {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: #8b6726;
  background: #f0e3bd;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
}

#bingo-replay {
  padding: 13px 23px;
  color: #fffdf8;
  background: #345f91;
}

.bingo-grid-wrap.shake {
  animation: bingo-shake 280ms ease;
}

@keyframes bingo-shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.bingo-benefits {
  margin-top: clamp(42px, 7vw, 80px);
}

.hub-card--bingo {
  background: #eef3ef;
}

.hub-card-kana--examples {
  display: grid !important;
  grid-template-columns: repeat(2, auto);
  place-content: center;
  gap: 12px !important;
  font-size: 1rem !important;
}

.hub-card-kana--examples > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hub-card-kana--examples i {
  min-width: 1.35em;
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 2rem;
  font-style: normal;
  line-height: 1;
}

.hub-card-kana--examples b {
  color: #746e65;
  font: 700 0.82rem/1 "Work Sans", sans-serif;
  text-transform: uppercase;
}

.hub-card-kana--examples > span:first-child i { color: #2f5c91; }
.hub-card-kana--examples > span:last-child i { color: #ac4b43; }

@media (min-width: 900px) {
  .bingo-grid {
    --bingo-cell: clamp(48px, 4.55vw, 64px);
    grid-template-columns: repeat(10, var(--bingo-cell));
    grid-template-rows: repeat(5, var(--bingo-cell));
  }

  .bingo-cell {
    grid-column: var(--bingo-column);
    grid-row: var(--bingo-row);
  }

  .bingo-pool-wrap {
    width: min(100%, 960px);
  }
}

@media (min-width: 1101px) {
  .hub-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 781px) and (max-width: 1100px) {
  .hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .bingo-field {
    min-height: calc(100svh - 120px);
    padding: 24px 10px 42px;
  }

  .bingo-intro {
    padding-inline: 8px;
    margin-bottom: 18px;
  }

  .bingo-controls {
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 20px;
  }

  .bingo-grid {
    --bingo-cell: 40px;
    width: 100%;
    grid-template-columns: repeat(8, var(--bingo-cell));
    column-gap: 4px;
    row-gap: 4px;
    justify-content: center;
  }

  .bingo-grid-wrap {
    width: 100%;
  }

  .bingo-cell {
    border-radius: 8px;
    font-size: 1.08rem;
  }

  .bingo-cell.is-correct {
    gap: 1px;
  }

  .bingo-cell.is-correct .bingo-kana {
    font-size: 0.7rem;
  }

  .bingo-cell.is-correct .bingo-answer {
    font-size: 0.66rem;
  }

  .bingo-pool-wrap {
    padding-inline: 4px;
  }

  .bingo-tile {
    min-width: 48px;
    padding: 10px 9px;
  }
}
