/* Shared foundations load before route/game overrides. Keep imports first. */
@import url("/design-system/tokens.css?v=owner-eight-20261121");
@import url("/design-system/cards.css?v=1");
@import url("/design-system/buttons.css?v=153-20261031");
@import url("/design-system/modals.css?v=1");
@import url("/design-system/numeric-controls.css?v=1");

@font-face {
  font-family: Fraunces;
  src: url("/fonts/fraunces-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url("/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url("/fonts/fraunces-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("/fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; max-width: 100%; }
body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background-color: var(--ivory);
  background-image:
    radial-gradient(ellipse 70% 42% at 100% -8%, rgba(14, 60, 68, 0.09), transparent 58%),
    radial-gradient(ellipse 46% 36% at -6% 108%, rgba(196, 161, 90, 0.12), transparent 52%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}
a { color: inherit; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--navy);
  color: var(--ivory);
  padding: 8px 12px;
  z-index: 80;
  border-radius: 10px;
}
.skip:focus { top: 12px; }

.top, main, .foot { position: relative; z-index: 1; }
.top {
  position: sticky;
  top: 10px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(1120px, calc(100% - 28px));
  margin: 12px auto 0;
  padding: 6px 10px 6px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.95), 0 8px 20px rgba(16, 28, 40, 0.05);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  overflow: hidden;
  text-decoration: none;
  color: var(--navy);
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wordmark em {
  font-style: italic;
  font-weight: 500;
  color: var(--teal);
}
.mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--petrol-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.mark span {
  flex: 1;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ivory);
  background: var(--petrol);
}
.mark span + span { background: var(--navy); color: var(--epo-bg); }
.mark.sm { width: 28px; height: 28px; font-size: 0.78rem; border-radius: 8px; }

.nav {
  display: flex;
  gap: 2px;
  min-width: 0;
}
.nav a {
  text-decoration: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
}
.nav a[aria-current="page"] {
  color: var(--petrol-deep);
  background: rgba(14, 60, 68, 0.08);
}
.tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.account-hook { display: grid; place-items: center; color: inherit; text-decoration: none; }
.account-hook .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.login-hook {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--petrol-deep);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.sound-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sound-glyph {
  width: 14px;
  height: 14px;
  border-radius: 2px 8px 8px 2px;
  border: 2px solid var(--petrol);
  border-left-width: 5px;
  position: relative;
}
.sound-toggle.is-muted .sound-glyph::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 5px;
  width: 18px;
  height: 2px;
  background: var(--coral);
  transform: rotate(-32deg);
}
.epo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  text-decoration: none;
  background: var(--epo-bg);
  color: var(--epo-ink);
  border: 1px solid #e2cd96;
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 250, 236, 0.8);
}
.epo-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brass-deep);
  color: #fbf6ea;
  font-family: var(--serif);
  font-weight: 600;
}
.epo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 2px 9px 2px 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e6 0%, #f4e2b4 100%);
  border: 1px solid #b8892d;
  box-shadow: inset 0 1px 0 rgba(255, 252, 240, 0.95), 0 1px 0 rgba(92, 62, 12, 0.12);
  color: #6a4a10;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
}
.epo-coin {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #f5ce68 0%, #e1aa35 68%, #b47916 100%);
  box-shadow: inset 0 0 0 1px #946012, inset 0 0 0 2px #ffe49a, inset 0 0 0 3px #bb801b;
}
.epo-coin-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.epo-coin-e {
  font-family: "Noto Serif", "DejaVu Serif", Palatino, "Times New Roman", serif;
  font-weight: 800;
  fill: currentColor;
  color: #704308;
  text-shadow: 0 1px 0 #ffe9aa;
}
.epo-badge .epo-n { font-size: 0.92rem; }
.epo-badge-lg {
  min-height: 44px;
  gap: 8px;
  padding: 3px 14px 3px 3px;
  font-size: 1.35rem;
}
.epo-badge-lg .epo-coin { width: 36px; height: 36px; flex-basis: 36px; }
.top .epo-badge { margin-left: auto; flex: none; }
.epo-grants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}
.epo-grant { display: inline-flex; align-items: center; gap: 6px; }
.epo-sink-note { margin-top: 0; }
.langs { position: relative; }
.langs summary {
  list-style: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--petrol-deep);
}
.langs summary::-webkit-details-marker { display: none; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 168px;
  padding: 6px;
  box-shadow: var(--shadow);
  display: grid;
  z-index: 50;
}
.lang-menu a {
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
}
.lang-menu a[aria-current="true"] { background: rgba(14, 60, 68, 0.08); color: var(--petrol-deep); }
.nav-toggle {
  display: none;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 999px;
  padding: 0 12px;
  font-weight: 700;
  color: var(--petrol-deep);
  cursor: pointer;
}

main { width: min(1120px, calc(100% - 32px)); margin: 22px auto 48px; }
main#main { flex: 1 0 auto; }

.kicker {
  margin: 0 0 8px;
  color: var(--brass-deep);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--navy);
}
h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.35rem);
  line-height: 0.98;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
h2 { font-size: clamp(1.45rem, 2vw, 1.85rem); margin: 0 0 8px; line-height: 1.08; }
h3 { font-size: 1.2rem; margin: 0 0 4px; line-height: 1.15; }
.lede, .section-lede { color: var(--muted); max-width: 62ch; margin-top: 0; }
.meta { color: var(--muted); font-size: 0.92rem; }
.page-head { margin: 6px 0 20px; max-width: 18em; }
.catalog-head { max-width: none; }
.catalog-head h1 {
  font-size: clamp(1.45rem, 4.6vw, 3.05rem);
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1.05;
}
.page-head.compact { max-width: 22em; margin-bottom: 16px; }
.page-head.compact h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
.page-head .btn { margin-top: 8px; }
/* The public 404 is a full-width site block, not a narrow unframed heading. */
.not-found-card.site-block.panel {
  width: min(100%, 840px);
  margin: 24px auto 32px;
  padding: clamp(24px, 4vw, 40px);
}
.not-found-card .not-found-head.page-head {
  max-width: none;
  margin: 0;
}
.not-found-card .not-found-head .lede {
  max-width: 62ch;
}

.play-head { margin-bottom: 14px; max-width: none; }
.play-shell { width: min(100%, 720px); margin-inline: auto; display: flex; flex-direction: column; gap: 8px; }
.play-shell > .play-shell-head { text-align: center; margin-bottom: 0; }
.play-shell > .play-shell-head .play-title { display: block; text-align: center; max-width: 100%; }
.play-shell > .play-shell-head .play-title h1 {
  display: inline;
  width: auto;
  max-width: none;
  margin: 0;
}
.play-shell > .play-shell-head .play-title .rules-pop {
  display: inline-flex;
  vertical-align: middle;
  margin-inline-start: 8px;
}
.play-shell > .play-shell-head .play-title .rules-help {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.15rem;
}
.play-shell > .play-shell-head .play-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}
.play-shell > .play-shell-head .play-title-main {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  min-width: 0;
  max-width: calc(100% - 52px);
}
.play-shell > .play-shell-head .play-title-main h1 {
  display: inline;
  margin: 0;
  min-width: 0;
}
.play-shell > .play-shell-head .play-title-main .difficulty-badge {
  margin: 0;
  flex: 0 0 auto;
  vertical-align: middle;
  white-space: nowrap;
}
.play-shell > .play-shell-head .play-title-row > .rules-pop {
  flex: 0 0 44px;
  margin-inline-start: 0;
}
.play-shell > .play-shell-head h1 { margin-bottom: 0; }
.play-shell > .play-shell-stage,
.play-shell > .lb-board,
.play-shell > .comments-card { width: 100%; max-width: 720px; margin-inline: auto; }
.play-shell .lb-board,
.play-shell .comments-card,
.play-shell .mot,
.play-shell .mm-summary { width: 100%; max-width: 720px; }
.play-head h1 { font-size: clamp(2rem, 3.4vw, 3rem); }
.play-head.is-live { margin-bottom: 8px; }
.play-head.is-live h1 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin-bottom: 0; }

.dash {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
  gap: 14px;
  align-items: start;
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(168px, 280px);
  gap: 16px;
  padding: 18px;
  align-items: stretch;
}
.feature-copy { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.feature h2 { font-size: clamp(2rem, 3vw, 2.7rem); margin: 0; }
.feature-copy > p { margin: 0; }
.side-stack { display: grid; gap: 14px; min-width: 0; }
.panel { padding: 16px 16px 18px; }
.panel h2 { font-size: 1.45rem; }
.panel h3 { margin-top: 12px; }
.panel .text-link { display: inline-flex; margin-top: 6px; min-height: 44px; align-items: center; }

.glyph-plate {
  margin: 0;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--petrol);
  box-shadow: inset 0 0 0 1px rgba(196, 161, 90, 0.35), 0 10px 18px rgba(10, 44, 50, 0.16);
}
.glyph-plate svg { width: 100%; height: 100%; min-height: 180px; }

.actions, .play-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.feature .actions { margin-top: 8px; }
.text-link { font-weight: 700; color: var(--teal); text-decoration: none; }
.locked { margin-top: auto; color: var(--muted); font-size: 0.92rem; }

.countdown {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 8px 0 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ivory);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.8);
}
.countdown span, .countdown em {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-style: normal;
}
.countdown strong {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--petrol-deep);
}

.flag {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.flag.is-live { color: var(--coral-text); }
.game-mark { display: flex; gap: 4px; margin: 0 0 4px; }
.game-mark span {
  min-width: 28px;
  height: 32px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--navy);
  color: var(--epo-bg);
  font-family: var(--serif);
  font-size: 0.95rem;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.band { margin-top: 22px; }
.band-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.band-head h2 { margin: 0; }
.game-nav {
  display: flex;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 2px 2px 8px;
  margin: 0 0 14px;
}
.game-nav a {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--petrol-deep);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.game-nav a[aria-current="page"] {
  background: var(--petrol);
  color: var(--ivory);
  border-color: var(--petrol-deep);
}
.catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.game-card {
  padding: 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 176px;
  min-width: 0;
  transition: transform 160ms ease, border-color 160ms ease;
}
.game-card h3, .game-card .catalog-tile-title h2 { overflow-wrap: break-word; }
.game-card .text-link {
  margin-top: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.game-card p { color: var(--muted); margin: 0; }
.game-card.is-playable {
  background: linear-gradient(165deg, #17616a 0%, var(--petrol) 42%, var(--petrol-deep) 100%);
  color: var(--ivory);
  border-color: var(--petrol-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 26px rgba(10, 44, 50, 0.18);
}
.game-card.is-playable h3,
.game-card.is-playable .catalog-tile-title h2,
.game-card.is-playable .text-link { color: var(--ivory); }
.game-card.is-playable p { color: rgba(247, 243, 235, 0.78); }
.game-card.is-playable .flag.is-live { color: var(--brass); }
.game-card.is-playable .game-mark span { background: rgba(16, 28, 40, 0.35); color: var(--epo-bg); }
.game-card.is-playable:hover { transform: translateY(-2px); border-color: var(--brass); }
.game-card.is-unwired { border-style: dashed; }
.game-card.is-unwired:hover { border-color: var(--brass-deep); transform: translateY(-2px); }
.catalog-tile { min-height: 0; padding: 12px; gap: 8px; }
.catalog-tile-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.catalog-tile-title h2, .catalog-tile-title h3 { margin: 0; padding: 0; border: 0; font-size: 1.05rem; line-height: 1.15; } /* #154 P2-13: tile title is an h2 under the page h1 */
.catalog-tile-icon { flex: 0 0 auto; display: inline-flex; }
.catalog-tile-icon .game-logo { width: 36px; height: 36px; }
.catalog-count { margin: 0; font-size: 0.92rem; }
.catalog-tile a.catalog-open {
  align-self: stretch;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 44px;
  min-height: 44px;
  margin-top: 2px;
  padding: 8px 12px;
  color: var(--ivory);
  background: #0a2c32;
  border: 2px solid var(--ivory);
  text-decoration: none;
  white-space: normal;
  line-height: 1.2;
}
.catalog-tile a.catalog-open:link,
.catalog-tile a.catalog-open:visited,
.catalog-tile a.catalog-open:hover,
.catalog-tile a.catalog-open:active,
.catalog-tile a.catalog-open:focus,
.catalog-tile a.catalog-open:focus-visible {
  color: var(--ivory);
  text-decoration: none;
}
.catalog-tile a.catalog-open:hover { background: #145e62; border-color: #fff; }
.catalog-tile a.catalog-open:active { background: #082228; border-color: var(--ivory); }
.catalog-tile a.catalog-open:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}
.home-games { margin-top: 14px; }
.game-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: var(--section-head-gap);
}
.game-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "mark flag" "mark name";
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  min-height: 64px;
  min-width: 0;
  padding: 8px 10px;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.game-chip .game-mark { grid-area: mark; margin: 0; align-self: center; }
.game-chip .game-mark span { min-width: 0; height: 28px; padding: 0 5px; font-size: 0.85rem; }
.game-chip .flag { grid-area: flag; }
.game-chip strong {
  grid-area: name;
  min-width: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.game-chip.is-playable {
  background: linear-gradient(165deg, #17616a 0%, var(--petrol) 42%, var(--petrol-deep) 100%);
  color: var(--ivory);
  border-color: var(--petrol-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 18px rgba(10, 44, 50, 0.16);
}
.game-chip.is-playable strong { color: var(--ivory); }
.game-chip.is-playable .flag.is-live { color: var(--brass); }
.game-chip.is-playable .game-mark span { background: rgba(16, 28, 40, 0.35); color: var(--epo-bg); }
.game-chip.is-playable:hover { border-color: var(--brass); }
.game-chip.is-unwired { border-style: dashed; }
.home-later {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.later { margin-top: 16px; }

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.stats {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.stats li {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.8);
}
.stats span, .meters span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.stats strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ivory);
  flex: none;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 0.85rem; }
.avatar.lg { width: 76px; height: 76px; border-radius: 22px; font-size: 1.8rem; }
.a-0 { background: var(--petrol); }
.a-1 { background: var(--coral-deep); }
.a-2 { background: #1d4e6e; }
.a-3 { background: var(--brass-deep); }
.a-4 { background: #244038; }

.podium {
  list-style: none;
  padding: 0;
  margin: 8px 0 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.podium.is-short { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.podium li {
  min-width: 0;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.podium .place-1 {
  min-height: 148px;
  background: linear-gradient(180deg, #17616a, var(--petrol-deep));
  color: var(--ivory);
  border-color: var(--petrol-deep);
}
.podium .place-1 em { color: rgba(247, 243, 235, 0.8); }
.podium .place { font-family: var(--serif); font-size: 1.15rem; color: var(--brass-deep); }
.podium .place-1 .place { color: var(--brass); }
.podium strong, .feed strong, .lb-cards strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.podium .is-you { outline: 2px solid var(--coral); outline-offset: 1px; }

.feed, .track, .lb-cards { list-style: none; padding: 0; margin: 8px 0 0; }
.feed, .track { display: grid; gap: 8px; }
.lb-cards { display: none; gap: 8px; }
.feed li, .lb-cards li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  min-width: 0;
}
.feed span, .lb-cards span { color: var(--muted); font-size: 0.86rem; }
.feed b, .lb-cards b { font-family: var(--serif); font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--navy); }
.feed em, .lb-cards em { font-style: normal; color: var(--teal); font-size: 0.78rem; }
.lb-cards .place {
  width: 28px;
  text-align: center;
  font-family: var(--serif);
  color: var(--brass-deep);
  font-size: 1.05rem;
}
.lb-cards .is-you { background: rgba(14, 60, 68, 0.08); }
.position-bar {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid #e2cd96;
  background: var(--epo-bg);
  color: var(--epo-ink);
  font-weight: 700;
}
.track li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.track h3 { font-size: 1.02rem; }
.track p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.track em {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.track .is-done em { color: var(--teal); }
.medal-mark,
.success-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ivory);
  border: 1px solid var(--line-strong);
  font-family: var(--serif);
  color: var(--brass-deep);
}
.track .is-done .medal-mark,
.track .is-done .success-mark {
  background: var(--petrol);
  color: var(--epo-bg);
  border-color: var(--petrol);
}

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tabs a {
  text-decoration: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}
.tabs a[aria-current="page"] {
  background: var(--petrol);
  color: var(--ivory);
  border-color: var(--petrol);
}
.table-wrap { overflow-x: auto; max-width: 100%; border-radius: 16px; border: 1px solid var(--line); }
.board-table { width: 100%; border-collapse: collapse; background: var(--card); min-width: 640px; }
.board-table th, .board-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.board-table th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  background: var(--ivory);
}
.board-table tr.is-you { background: rgba(244, 230, 196, 0.55); }
.board-table em { font-style: normal; color: var(--brass-deep); font-size: 0.8rem; margin-left: 6px; }
.empty-block {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.55);
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.play-main, .play-side { min-width: 0; }
.meters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.meters.meters-trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.meters.meters-trio p { text-align: center; padding: 8px 4px; }
.meters.meters-trio span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.meters.meters-trio #timer,
.meters.meters-trio #score,
.meters.meters-trio #words-count {
  font-size: clamp(0.95rem, 4.6vw, 1.35rem);
  letter-spacing: 0;
}
@media (max-width: 300px) {
  .meters.meters-trio { grid-template-columns: 1fr; }
}
.meters p {
  margin: 0;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.85);
  min-width: 0;
}
.meters strong, #timer, #score, #words-count {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.meters .current strong {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.meters .is-urgent strong { color: var(--coral); }
.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(16, 28, 40, 0.08);
  overflow: hidden;
  margin: 2px 0 8px;
}
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--brass)); border-radius: inherit; }
.feedback {
  min-height: 44px;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 700;
}
.feedback.is-ok { background: rgba(29, 122, 77, 0.1); border-color: var(--success); color: var(--success); }
.feedback.is-bad { background: rgba(225, 91, 50, 0.1); border-color: var(--coral); color: var(--error); }
.feedback.is-dup { background: var(--epo-bg); border-color: #e2cd96; color: var(--epo-ink); }
.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 460px);
  margin: 8px auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.cell {
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 18px;
  border: 1px solid #d9cdb8;
  background: linear-gradient(180deg, #fffdf9, #f1e8d8);
  color: var(--petrol-deep);
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5.4vw, 2.65rem);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: none;
  -webkit-touch-callout: none;
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(20, 32, 40, 0.05);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.cell:hover { border-color: var(--teal); }
.cell.is-on {
  background: var(--petrol);
  color: var(--ivory);
  border-color: var(--petrol-deep);
}
.cell.is-last {
  background: linear-gradient(180deg, #f07248, var(--coral-deep));
  border-color: var(--coral-deep);
  color: white;
}
.trace { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.trace polyline {
  fill: none;
  stroke: rgba(244, 230, 196, 0.95);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hint { color: var(--muted); margin: 4px 0 10px; }
.type-form, .name-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.type-form label, .name-form label { display: grid; gap: 4px; font-size: 0.92rem; color: var(--muted); flex: 1; min-width: 0; }
input[type="text"], input:not([type]) {
  min-height: 46px;
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  padding: 0 12px;
}
.name-form { padding: 14px; margin: 8px 0 12px; }
.note {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(14, 60, 68, 0.08);
  border: 1px solid rgba(14, 60, 68, 0.12);
}
.note.is-bad { background: rgba(225, 91, 50, 0.1); border-color: rgba(225, 91, 50, 0.25); }
.found-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 42px; }
.found-list .empty { margin: 0; color: var(--muted); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 700;
  letter-spacing: 0.03em;
}
.chip.is-new { background: rgba(20, 94, 98, 0.1); border-color: var(--teal); }
.def-btn {
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--ivory);
  color: var(--petrol);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-weight: 700;
  touch-action: manipulation;
}
.def-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.def-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 28, 40, 0.42);
}
.def-pop {
  position: fixed;
  z-index: 70;
  max-width: min(280px, calc(100vw - 24px));
  max-height: min(46vh, 280px);
  overflow: auto;
  padding: 8px 12px 12px;
  background: var(--navy);
  color: var(--ivory);
  border-radius: 16px;
  border: 1px solid rgba(196, 161, 90, 0.4);
  box-shadow: 0 18px 40px rgba(16, 28, 40, 0.28);
}
.def-pop.is-sheet {
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: auto;
  max-width: none;
  border-radius: 18px 18px 14px 14px;
}
.def-pop-bar { display: flex; justify-content: flex-end; margin: 0 0 4px; }
.def-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
  padding: 0 10px;
}
.def-pop .def-text { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.def-pop .def-meta { margin: 6px 0 0; color: var(--brass); font-size: 0.75rem; }
.play-side {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.rules { margin-top: 12px; }
.rules summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.rules ol, .rules-list { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.rules li + li, .rules-list li + li { margin-top: 6px; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.start-panel { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.start-panel h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.game-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  gap: 18px;
  padding: 18px;
  align-items: center;
}
.sheet-copy { min-width: 0; }
.results { padding: 22px 22px 18px; max-width: 760px; }
.result-score { font-family: var(--serif); font-size: 1.5rem; margin: 0; color: var(--navy); }
.result-score span { font-size: clamp(3rem, 6vw, 4rem); display: block; line-height: 0.9; color: var(--petrol); }
.epo-gain { color: var(--epo-ink); font-weight: 700; }
.best-mark {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--epo-bg);
  color: var(--epo-ink);
  border: 1px solid #e2cd96;
  font-weight: 700;
}
.results-label { font-size: 1rem; margin: 16px 0 8px; }
.medals, .recent { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.medals li, .recent a {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  text-decoration: none;
}
.recent { flex-direction: column; }
.recent a { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.recent strong { font-family: var(--serif); font-size: 1.45rem; color: var(--petrol); }
.identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 18px;
}
.identity h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); margin-bottom: 4px; }
.epo-lg { padding: 8px 14px 8px 6px; }
.social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.social-card { padding: 16px; }
.social-card h2 { font-size: 1.35rem; }
.social-card .btn { margin-top: 10px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plans article {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  min-width: 0;
}
.plans ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.plans .is-premium {
  background: linear-gradient(165deg, #24343c, var(--navy));
  color: var(--ivory);
  border-color: var(--navy);
}
.plans .is-premium h2 { color: var(--epo-bg); }
.plans .is-premium .locked { color: var(--brass); }
.prose { color: var(--muted); margin: 0; }
.prose + .prose { margin-top: 12px; }
.prose-panel { padding: 18px 20px; }
.diag {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.foot {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.foot-brand { display: flex; gap: 10px; align-items: center; }
.foot-brand p, .foot-note { margin: 0; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.foot-links a, .meta a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.foot-note { font-size: 0.85rem; }

@media (max-width: 1080px) {
  .game-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav {
    display: none;
    position: absolute;
    left: 8px;
    right: 8px;
    top: calc(100% + 8px);
    z-index: 45;
    flex-direction: column;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { min-height: 44px; }
  .top { border-radius: 22px; }
}
@media (max-width: 900px) {
  .dash, .duo, .play-layout, .plans, .social-grid, .game-sheet, .feature {
    grid-template-columns: 1fr;
  }
  .glyph-plate { order: -1; }
  .glyph-plate svg { min-height: 0; height: auto; aspect-ratio: 320 / 200; }
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-later { grid-template-columns: 1fr; }
  .podium .place-1 { min-height: 0; }
}
@media (max-width: 860px) {
  .board-table { display: none; }
  .lb-cards { display: grid; }
  .table-wrap { border: 0; overflow: visible; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-head h1 { font-size: clamp(1.35rem, 6.4vw, 2rem); }
  .game-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand { gap: 8px; }
  .mark { width: 32px; height: 32px; }
  .wordmark { font-size: 1.05rem; }
  .tools { gap: 4px; }
  .sound-toggle { width: 44px; height: 44px; }
  .langs summary { min-width: 44px; min-height: 44px; }
  .epo { min-height: 44px; gap: 4px; padding: 2px 8px 2px 3px; }
  .epo-mark { width: 28px; height: 28px; font-size: 0.85rem; }
  .nav-toggle { min-height: 44px; min-width: 44px; padding: 0 12px; font-size: 0.88rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .meters { grid-template-columns: 1fr 1fr; }
  .meters .current { grid-column: 1 / -1; }
  .identity { grid-template-columns: auto minmax(0, 1fr); }
  .identity .epo-lg { grid-column: 1 / -1; justify-self: start; }
  .epo-word { font-size: 0.68rem; letter-spacing: 0.02em; }
  .top, main { width: calc(100% - 20px); }
  .foot { width: 100%; max-width: none; margin: 0; }
  .top { gap: 8px; padding: 6px 8px 6px 10px; top: 8px; }
  .page-head, .page-head.compact { max-width: none; }
  h1, .page-head.compact h1 { font-size: 2.15rem; }
  .play-head.is-live { margin-bottom: 4px; }
  .play-head.is-live h1 { font-size: 1.45rem; line-height: 1.05; margin-bottom: 0; }
  .play-head.is-live .kicker { margin-bottom: 0; }
  .board { gap: 11px; width: min(100%, 352px); }
  .cell {
    border-radius: 20px;
    min-height: 0;
    font-size: clamp(2.05rem, 7.6vw, 2.5rem);
    font-weight: 700;
  }
  .countdown strong { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .board.is-bad { animation: nudge 280ms ease; }
  .board.is-good .cell.is-on, .board.is-good .cell.is-last { transform: translateY(-1px); }
  .chip.is-new { animation: pop 280ms ease; }
}
@keyframes nudge {
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}
@keyframes pop {
  from { transform: scale(0.92); }
  to { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .board, .chip.is-new, .game-card, .game-chip, .mm-tile, .mm-row, .mm-summary, .ana-tile, .ana-feedback, .ana-rack, .ana-slot { animation: none; transition: none; }
}

@property --mm-cols {
  syntax: "<integer>";
  inherits: true;
  initial-value: 5;
}
.mot { width: min(100%, 520px); max-width: 100%; margin: 0 auto; min-width: 0; }
.mm-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.mm-progress p { margin: 0; color: var(--muted); }
.mm-progress strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.mm-pips { display: flex; gap: 6px; }
.mm-pips span {
  width: 14px;
  height: 14px;
  border-radius: 99px;
  border: 2px solid var(--line-strong);
  background: transparent;
}
.mm-pips span.is-used {
  border-color: var(--petrol);
  background:
    radial-gradient(circle at 50% 50%, var(--paper) 0 2px, transparent 2.5px),
    var(--petrol);
}
.mm-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(4px, 1.5vw, 8px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto 14px;
}
.mm-row {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  --mm-cols: 5;
  grid-template-columns: repeat(var(--mm-cols), minmax(0, 1fr));
  gap: clamp(3px, 1.1vw, 6px);
  flex-wrap: nowrap;
}
.mm-row[data-length="5"] { --mm-cols: 5; }
.mm-row[data-length="6"] { --mm-cols: 6; }
.mm-row[data-length="7"] { --mm-cols: 7; }
.mm-row[data-length="8"] { --mm-cols: 8; }
.mm-row[data-length="9"] { --mm-cols: 9; gap: clamp(2px, 0.8vw, 4px); }
.mm-row[data-length="10"] { --mm-cols: 10; gap: clamp(2px, 0.7vw, 4px); }
.mm-tile {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
  border-radius: clamp(8px, 2vw, 14px);
  border: 2px solid var(--line-strong);
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.9), 0 1px 0 rgba(16, 28, 40, 0.04);
  container-type: size;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.mm-letter {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(0.75rem, 46cqmin, 1.85rem);
  line-height: 1;
}
.mm-icon {
  position: absolute;
  right: 4px;
  bottom: 3px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
}
.mm-svg { width: 14px; height: 14px; }
.mm-row.is-current,
.mm-row[data-current="1"] { touch-action: manipulation; }
.mm-row.is-current .mm-tile,
.mm-row[data-current="1"] .mm-tile { border-color: var(--teal); cursor: pointer; }
.mm-tile[data-mark="exact"] {
  border-color: var(--success);
  background-color: var(--success);
  color: var(--paper);
  background-image: none;
}
.mm-tile[data-mark="present"] {
  border-color: var(--coral-deep);
  background-color: var(--coral);
  color: var(--coral-ink);
  background-image: none;
}
.mm-tile[data-mark="absent"] {
  border-color: var(--line-strong);
  background-color: var(--card);
  color: var(--ink);
  background-image: none;
}
.mm-row.is-invalid {
  outline: 2px dashed var(--line-strong);
  outline-offset: 3px;
  border-radius: 16px;
}
.mm-row.is-invalid .mm-tile,
.mm-row.is-invalid .mm-tile[data-mark="exact"],
.mm-row.is-invalid .mm-tile[data-mark="present"],
.mm-row.is-invalid .mm-tile[data-mark="absent"] {
  border-color: var(--line-strong);
  background-color: var(--card);
  background-image: none;
  color: var(--muted);
}
.mm-row.is-invalid .mm-letter {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.mm-row.is-unknown {
  opacity: 0.72;
}
.mm-row.is-unknown .mm-icon {
  color: var(--muted);
  opacity: 0.9;
}
.mm-actions { display: flex; justify-content: center; min-height: 0; }
.mm-actions .btn[hidden] { display: none; }
.mm-guess {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.mm-guess[hidden] { display: none; }
.mm-guess input {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2px solid var(--teal);
  background: var(--card);
  color: var(--ink);
  font: 600 16px/1 var(--sans);
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  touch-action: manipulation;
}
.mm-guess input:focus {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-color: var(--teal);
}
.mm-summary { margin-top: 8px; }
.mm-summary[data-outcome="won"] .mm-answer::before,
.mm-summary[data-outcome="lost"] .mm-answer::before {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 8px;
  border-radius: 99px;
  font-size: 0.9rem;
  vertical-align: middle;
}
.mm-summary[data-outcome="won"] .mm-answer::before { content: "✓"; background: var(--success); color: var(--paper); }
.mm-summary[data-outcome="lost"] .mm-answer::before { content: "×"; background: var(--error); color: var(--paper); }
.mot, .lb-board, .mm-summary { max-width: 100%; min-width: 0; }
.mm-answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  margin: 8px 0;
}
.mm-answer-word { min-width: 0; overflow-wrap: anywhere; }
.mot[data-phase="validating"] .mm-guess input,
.mot[data-phase="loading"] .mm-guess input { opacity: 0.55; }

@media (prefers-reduced-motion: no-preference) {
  .mm-tile.is-pop { animation: mm-pop 120ms ease; }
  .mm-tile.is-revealing { animation: mm-flip 560ms ease both; animation-delay: 0ms; }
  .mm-row.is-shake { animation: nudge 320ms ease; }
}
@keyframes mm-pop {
  from { transform: scale(0.86); }
  to { transform: scale(1); }
}
@keyframes mm-flip {
  0% { transform: rotateX(0); }
  45% { transform: rotateX(88deg); }
  100% { transform: rotateX(0); }
}
@media (max-width: 640px) {
  .mm-board { width: 100%; gap: clamp(4px, 1.5vw, 6px); }
  .mm-row { width: 100%; gap: clamp(3px, 1.1vw, 4px); }
  .mm-guess input { height: 44px; min-height: 44px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-tile.is-pop, .mm-tile.is-revealing, .mm-row.is-shake { animation: none; transform: none; }
}

/* Column tracks come from data-cols. Inline custom properties are dropped by style-src 'self'. */
.search-app { display: flex; flex-direction: column; gap: 12px; }
.search-board-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
.board.board-search {
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 3px;
  width: min(100%, 34rem);
  max-width: 100%;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid #cbb892;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.72), transparent 32%),
    #f4ead8;
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.95), 0 10px 22px rgba(16, 28, 40, 0.05);
  /* Scroll stays available outside the board. A gesture that starts here selects. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
/* A short desktop window must still show the lower rows of an 8×8 board. */
@media (min-width: 1000px) and (max-height: 860px) {
  .board.board-search { width: min(100%, 34rem, calc(100dvh - 27rem)); }
}
.search-row {
  display: grid;
  gap: 3px;
  min-width: 0;
  width: 100%;
}
.board.board-search[data-cols="2"] .search-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board.board-search[data-cols="2"] .cell { font-size: clamp(0.62rem, calc(88vw / 2 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 2 * 0.56), 1.55rem); }
.board.board-search[data-cols="3"] .search-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.board.board-search[data-cols="3"] .cell { font-size: clamp(0.62rem, calc(88vw / 3 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 3 * 0.56), 1.55rem); }
.board.board-search[data-cols="4"] .search-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.board.board-search[data-cols="4"] .cell { font-size: clamp(0.62rem, calc(88vw / 4 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 4 * 0.56), 1.55rem); }
.board.board-search[data-cols="5"] .search-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.board.board-search[data-cols="5"] .cell { font-size: clamp(0.62rem, calc(88vw / 5 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 5 * 0.56), 1.55rem); }
.board.board-search[data-cols="6"] .search-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.board.board-search[data-cols="6"] .cell { font-size: clamp(0.62rem, calc(88vw / 6 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 6 * 0.56), 1.55rem); }
.board.board-search[data-cols="7"] .search-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.board.board-search[data-cols="7"] .cell { font-size: clamp(0.62rem, calc(88vw / 7 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 7 * 0.56), 1.55rem); }
.board.board-search[data-cols="8"] .search-row { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.board.board-search[data-cols="8"] .cell { font-size: clamp(0.62rem, calc(88vw / 8 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 8 * 0.56), 1.55rem); }
.board.board-search[data-cols="9"] .search-row { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.board.board-search[data-cols="9"] .cell { font-size: clamp(0.62rem, calc(88vw / 9 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 9 * 0.56), 1.55rem); }
.board.board-search[data-cols="10"] .search-row { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.board.board-search[data-cols="10"] .cell { font-size: clamp(0.62rem, calc(88vw / 10 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 10 * 0.56), 1.55rem); }
.board.board-search[data-cols="11"] .search-row { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.board.board-search[data-cols="11"] .cell { font-size: clamp(0.62rem, calc(88vw / 11 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 11 * 0.56), 1.55rem); }
.board.board-search[data-cols="12"] .search-row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.board.board-search[data-cols="12"] .cell { font-size: clamp(0.62rem, calc(88vw / 12 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 12 * 0.56), 1.55rem); }
.board.board-search[data-cols="13"] .search-row { grid-template-columns: repeat(13, minmax(0, 1fr)); }
.board.board-search[data-cols="13"] .cell { font-size: clamp(0.62rem, calc(88vw / 13 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 13 * 0.56), 1.55rem); }
.board.board-search[data-cols="14"] .search-row { grid-template-columns: repeat(14, minmax(0, 1fr)); }
.board.board-search[data-cols="14"] .cell { font-size: clamp(0.62rem, calc(88vw / 14 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 14 * 0.56), 1.55rem); }
.board.board-search[data-cols="15"] .search-row { grid-template-columns: repeat(15, minmax(0, 1fr)); }
.board.board-search[data-cols="15"] .cell { font-size: clamp(0.62rem, calc(88vw / 15 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 15 * 0.56), 1.55rem); }
.board.board-search[data-cols="16"] .search-row { grid-template-columns: repeat(16, minmax(0, 1fr)); }
.board.board-search[data-cols="16"] .cell { font-size: clamp(0.62rem, calc(88vw / 16 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 16 * 0.56), 1.55rem); }
.board.board-search[data-cols="17"] .search-row { grid-template-columns: repeat(17, minmax(0, 1fr)); }
.board.board-search[data-cols="17"] .cell { font-size: clamp(0.62rem, calc(88vw / 17 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 17 * 0.56), 1.55rem); }
.board.board-search[data-cols="18"] .search-row { grid-template-columns: repeat(18, minmax(0, 1fr)); }
.board.board-search[data-cols="18"] .cell { font-size: clamp(0.62rem, calc(88vw / 18 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 18 * 0.56), 1.55rem); }
.board.board-search[data-cols="19"] .search-row { grid-template-columns: repeat(19, minmax(0, 1fr)); }
.board.board-search[data-cols="19"] .cell { font-size: clamp(0.62rem, calc(88vw / 19 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 19 * 0.56), 1.55rem); }
.board.board-search[data-cols="20"] .search-row { grid-template-columns: repeat(20, minmax(0, 1fr)); }
.board.board-search[data-cols="20"] .cell { font-size: clamp(0.62rem, calc(88vw / 20 * 0.48), 1.55rem); font-size: clamp(0.62rem, calc(100cqi / 20 * 0.56), 1.55rem); }
.board.board-search .cell {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 7px;
  border: 1px solid #d4c4ab;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 48%),
    #fbf7f0;
  box-shadow: inset 0 -1px 0 rgba(20, 32, 40, 0.08), inset 0 1px 0 #fff;
  color: var(--petrol-deep);
  font-family: var(--serif);
  font-weight: 650;
  font-size: clamp(0.62rem, 2.4vw, 1.35rem);
  line-height: 1;
  letter-spacing: 0;
  touch-action: none;
  -webkit-touch-callout: none;
  /* The shared .cell fade holds a gradient for 120ms, so a drag looks unchanged. */
  transition: none;
  z-index: 2;
}
.board.board-search .cell:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}
.board.board-search .cell.is-found {
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.4), transparent 55%),
    var(--epo-bg);
  color: var(--petrol-deep);
  border: 1px solid var(--brass-deep);
  box-shadow: inset 0 0 0 1px var(--brass);
}
.board.board-search .cell.is-on {
  z-index: 3;
  background-color: var(--petrol);
  background-image: none;
  color: #fffdf8;
  border-color: var(--brass);
  box-shadow: inset 0 0 0 3px var(--brass);
}
.board.board-search .cell.is-last {
  z-index: 3;
  background-color: var(--coral);
  background-image: none;
  color: #fff;
  border-color: #fff8f4;
  box-shadow: 0 0 0 3px var(--coral-deep);
}
.cell-flag {
  position: absolute;
  right: 1px;
  top: 0;
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
  color: var(--petrol);
}
.found-trace polyline.is-found {
  stroke: var(--brass-deep, #8a6a2f);
  stroke-width: 2.4;
  stroke-dasharray: 0;
}
.found-trace polyline.is-missed {
  stroke: var(--petrol);
  stroke-width: 1.6;
  stroke-dasharray: 2.2 1.4;
}
.board.board-search .live-trace { z-index: 1; }
.board.board-search .live-trace polyline {
  stroke: var(--coral-deep);
  stroke-width: 6;
  stroke-linecap: round;
}
.search-app[data-phase="selecting"] .meters .current {
  background: var(--petrol);
  border-color: var(--petrol-deep);
  color: var(--ivory);
}
.search-app[data-phase="selecting"] .meters .current span { color: var(--brass); }
.search-app[data-phase="selecting"] #search-current {
  color: #fffdf8;
  font-size: 1.7rem;
  letter-spacing: 0.14em;
}
.search-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; }
.search-word {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 12px;
  background: var(--ivory);
  border: 1px solid var(--line);
  font-weight: 700;
  letter-spacing: 0.04em;
  max-width: 100%;
}
.search-spell { min-width: 0; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 2px; }
.search-tick {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--petrol);
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1;
}
.search-word.is-found .search-tick { background: var(--petrol); color: var(--ivory); }
.search-word.is-found .search-spell { text-decoration: line-through; color: var(--petrol-deep); }
.search-word.is-missed .search-tick { border-style: dashed; }
.search-len { color: var(--muted); font-weight: 650; font-size: 0.85rem; }
.search-keys { color: var(--muted); margin: 6px 0; font-size: 0.92rem; }
.search-celebrate {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--brass);
  box-shadow: var(--shadow);
}
.search-celebrate[hidden] { display: none !important; }
.search-celebrate h2 { margin: 0 0 8px; }
.search-confetti { display: flex; gap: 8px; height: 14px; margin: 0 0 12px; }
.search-confetti span {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--brass);
}
.search-confetti span:nth-child(2) { background: var(--coral); border-radius: 50%; }
.search-confetti span:nth-child(3) { background: var(--teal); }
.search-confetti span:nth-child(4) { background: var(--petrol); border-radius: 50%; }
.search-confetti span:nth-child(5) { background: var(--brass); transform: rotate(12deg); }
.search-app[data-phase="validating"] .board-search { cursor: progress; }
.search-app[data-phase="error"] #search-retry { display: inline-flex; }
#search-retry[hidden] { display: none; }
.bar > span[data-pct="0"] { width: 0%; }
.bar > span[data-pct="1"] { width: 1%; }
.bar > span[data-pct="2"] { width: 2%; }
.bar > span[data-pct="3"] { width: 3%; }
.bar > span[data-pct="4"] { width: 4%; }
.bar > span[data-pct="5"] { width: 5%; }
.bar > span[data-pct="6"] { width: 6%; }
.bar > span[data-pct="7"] { width: 7%; }
.bar > span[data-pct="8"] { width: 8%; }
.bar > span[data-pct="9"] { width: 9%; }
.bar > span[data-pct="10"] { width: 10%; }
.bar > span[data-pct="11"] { width: 11%; }
.bar > span[data-pct="12"] { width: 12%; }
.bar > span[data-pct="13"] { width: 13%; }
.bar > span[data-pct="14"] { width: 14%; }
.bar > span[data-pct="15"] { width: 15%; }
.bar > span[data-pct="16"] { width: 16%; }
.bar > span[data-pct="17"] { width: 17%; }
.bar > span[data-pct="18"] { width: 18%; }
.bar > span[data-pct="19"] { width: 19%; }
.bar > span[data-pct="20"] { width: 20%; }
.bar > span[data-pct="21"] { width: 21%; }
.bar > span[data-pct="22"] { width: 22%; }
.bar > span[data-pct="23"] { width: 23%; }
.bar > span[data-pct="24"] { width: 24%; }
.bar > span[data-pct="25"] { width: 25%; }
.bar > span[data-pct="26"] { width: 26%; }
.bar > span[data-pct="27"] { width: 27%; }
.bar > span[data-pct="28"] { width: 28%; }
.bar > span[data-pct="29"] { width: 29%; }
.bar > span[data-pct="30"] { width: 30%; }
.bar > span[data-pct="31"] { width: 31%; }
.bar > span[data-pct="32"] { width: 32%; }
.bar > span[data-pct="33"] { width: 33%; }
.bar > span[data-pct="34"] { width: 34%; }
.bar > span[data-pct="35"] { width: 35%; }
.bar > span[data-pct="36"] { width: 36%; }
.bar > span[data-pct="37"] { width: 37%; }
.bar > span[data-pct="38"] { width: 38%; }
.bar > span[data-pct="39"] { width: 39%; }
.bar > span[data-pct="40"] { width: 40%; }
.bar > span[data-pct="41"] { width: 41%; }
.bar > span[data-pct="42"] { width: 42%; }
.bar > span[data-pct="43"] { width: 43%; }
.bar > span[data-pct="44"] { width: 44%; }
.bar > span[data-pct="45"] { width: 45%; }
.bar > span[data-pct="46"] { width: 46%; }
.bar > span[data-pct="47"] { width: 47%; }
.bar > span[data-pct="48"] { width: 48%; }
.bar > span[data-pct="49"] { width: 49%; }
.bar > span[data-pct="50"] { width: 50%; }
.bar > span[data-pct="51"] { width: 51%; }
.bar > span[data-pct="52"] { width: 52%; }
.bar > span[data-pct="53"] { width: 53%; }
.bar > span[data-pct="54"] { width: 54%; }
.bar > span[data-pct="55"] { width: 55%; }
.bar > span[data-pct="56"] { width: 56%; }
.bar > span[data-pct="57"] { width: 57%; }
.bar > span[data-pct="58"] { width: 58%; }
.bar > span[data-pct="59"] { width: 59%; }
.bar > span[data-pct="60"] { width: 60%; }
.bar > span[data-pct="61"] { width: 61%; }
.bar > span[data-pct="62"] { width: 62%; }
.bar > span[data-pct="63"] { width: 63%; }
.bar > span[data-pct="64"] { width: 64%; }
.bar > span[data-pct="65"] { width: 65%; }
.bar > span[data-pct="66"] { width: 66%; }
.bar > span[data-pct="67"] { width: 67%; }
.bar > span[data-pct="68"] { width: 68%; }
.bar > span[data-pct="69"] { width: 69%; }
.bar > span[data-pct="70"] { width: 70%; }
.bar > span[data-pct="71"] { width: 71%; }
.bar > span[data-pct="72"] { width: 72%; }
.bar > span[data-pct="73"] { width: 73%; }
.bar > span[data-pct="74"] { width: 74%; }
.bar > span[data-pct="75"] { width: 75%; }
.bar > span[data-pct="76"] { width: 76%; }
.bar > span[data-pct="77"] { width: 77%; }
.bar > span[data-pct="78"] { width: 78%; }
.bar > span[data-pct="79"] { width: 79%; }
.bar > span[data-pct="80"] { width: 80%; }
.bar > span[data-pct="81"] { width: 81%; }
.bar > span[data-pct="82"] { width: 82%; }
.bar > span[data-pct="83"] { width: 83%; }
.bar > span[data-pct="84"] { width: 84%; }
.bar > span[data-pct="85"] { width: 85%; }
.bar > span[data-pct="86"] { width: 86%; }
.bar > span[data-pct="87"] { width: 87%; }
.bar > span[data-pct="88"] { width: 88%; }
.bar > span[data-pct="89"] { width: 89%; }
.bar > span[data-pct="90"] { width: 90%; }
.bar > span[data-pct="91"] { width: 91%; }
.bar > span[data-pct="92"] { width: 92%; }
.bar > span[data-pct="93"] { width: 93%; }
.bar > span[data-pct="94"] { width: 94%; }
.bar > span[data-pct="95"] { width: 95%; }
.bar > span[data-pct="96"] { width: 96%; }
.bar > span[data-pct="97"] { width: 97%; }
.bar > span[data-pct="98"] { width: 98%; }
.bar > span[data-pct="99"] { width: 99%; }
.bar > span[data-pct="100"] { width: 100%; }

@media (max-width: 900px) {
  .search-page.is-live { margin-bottom: 4px; }
  .search-page.is-live h1 { font-size: 1.45rem; line-height: 1.05; margin-bottom: 0; }
  .search-app { gap: 8px; }
  .search-app .play-layout { gap: 8px; }
  .search-app .feedback { min-height: 0; margin: 0; padding: 6px 10px; }
  .search-app .meters { gap: 6px; }
  .search-app .meters p { padding: 6px 8px; }
  .search-app .meters strong,
  .search-app #search-timer,
  .search-app #search-score { font-size: 1.15rem; }
  .search-app .meters .current strong { font-size: 1.02rem; letter-spacing: 0.06em; }
  .search-app .bar { margin: 0; }
  .search-app .search-keys { margin: 2px 0 0; font-size: 0.82rem; }
  .search-app .play-side h2 { font-size: 1.15rem; margin-bottom: 2px; }
  .search-app .search-list { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
  .search-app .search-word {
    width: auto;
    min-height: 36px;
    padding: 2px 8px;
    gap: 6px;
    grid-template-columns: 1.05rem auto auto;
    letter-spacing: 0.02em;
  }
  .search-app .rules { margin-top: 4px; }
  .search-app .rules summary { min-height: 36px; }
  .board.board-search { gap: 2px; padding: 4px; border-radius: 12px; }
  .search-row { gap: 2px; }
  .board.board-search .cell { border-radius: 5px; }
  .board.board-search .cell-flag { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .search-app[data-phase="accepted"] .search-word.is-found .search-tick { animation: pop 280ms ease; }
  .search-app[data-phase="complete"] .search-celebrate { animation: pop 420ms ease; }
  .search-app[data-phase="complete"] .search-confetti span,
  .finish-band.is-won .win-confetti span,
  .pyr-celebrate.is-on .win-confetti span { animation: pop 500ms ease; }
  .search-app[data-phase="rejected"] .board-search { animation: nudge 280ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  .search-app .search-celebrate,
  .search-app .search-confetti span,
  .search-app .board-search,
  .search-word.is-found .search-tick { animation: none; transition: none; }
}

.ana {
  display: grid;
  gap: 12px;
  width: min(100%, 440px);
  margin: 0 auto;
  min-width: 0;
}
.ana-hud {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(4.4rem, 0.7fr) minmax(4.4rem, 0.7fr);
  gap: 6px;
  align-items: stretch;
}
.ana-round, .ana-streak, .ana-score, .ana-found-count {
  margin: 0;
  min-width: 0;
  border-radius: 16px;
  padding: 8px 10px;
}
.ana-found-count {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.9);
  color: var(--ink);
}
.ana-found-count span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ana-found-count strong {
  display: block;
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.2rem, 5vw, 1.55rem);
  line-height: 1;
  margin-top: 3px;
  color: var(--navy);
}
.ana-hud.is-words-only {
  grid-template-columns: minmax(0, 1.4fr) minmax(4.4rem, 0.9fr);
}
.ana-hud.is-words-only.has-clock {
  grid-template-columns: minmax(4.8rem, 0.75fr) minmax(0, 1.25fr) minmax(4.4rem, 0.75fr);
}
.ana-hud .ana-clock,
.ana-hud .play-clock.ana-clock {
  margin: 0;
  min-width: 0;
  border-radius: 16px;
  padding: 8px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.9);
  text-align: center;
}
.ana-hud .ana-clock span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ana-hud .ana-clock strong {
  display: block;
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.2rem, 5vw, 1.55rem);
  line-height: 1;
  margin-top: 3px;
  color: var(--navy);
}
.ana-hud .ana-clock.is-urgent strong { color: var(--coral); }
@media (max-width: 390px) {
  .ana-hud.is-words-only.has-clock {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 4px;
  }
  .ana-hud .ana-clock { padding-inline: 6px; }
}
.ana-round {
  background: linear-gradient(165deg, #17616a 0%, var(--petrol) 55%, var(--petrol-deep) 100%);
  color: var(--ivory);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 16px rgba(10, 44, 50, 0.12);
}
.ana-round span, .ana-streak span, .ana-score span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ana-round span { color: var(--brass); }
.ana-streak span, .ana-score span { color: var(--muted); }
.ana-round strong, .ana-streak strong, .ana-score strong {
  display: block;
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-top: 3px;
}
.ana-round strong { font-size: clamp(1.35rem, 6vw, 1.9rem); color: var(--ivory); }
.ana-streak strong, .ana-score strong { font-size: clamp(1.2rem, 5vw, 1.55rem); color: var(--navy); }
.ana-streak, .ana-score {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.9);
}
.ana-streak.is-hot {
  background: var(--epo-bg);
  border-color: var(--brass);
}
.ana-streak.is-hot strong { color: var(--brass-deep); }
.ana-streak.is-break { border-color: var(--error); }
.ana-streak.is-break strong { color: var(--error); }
.ana-pips {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  height: 8px;
}
.ana-pips span {
  border-radius: 99px;
  background: rgba(16, 28, 40, 0.1);
}
.ana-pips span.is-done { background: linear-gradient(90deg, var(--teal), var(--brass)); }
.ana-field { display: grid; gap: 6px; min-width: 0; }
.ana-answer-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ana-rack, .ana-slots {
  container-type: inline-size;
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 4px;
}
.ana-rack[data-count="0"] { display: none; }
.ana-rack[data-count="1"] { grid-template-columns: repeat(1, minmax(0, 4.75rem)); --ana-n: 1; justify-content: center; }
.ana-rack[data-count="2"], .ana-slots[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); --ana-n: 2; }
.ana-rack[data-count="3"], .ana-slots[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); --ana-n: 3; }
.ana-rack[data-count="4"], .ana-slots[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); --ana-n: 4; }
.ana-rack[data-count="5"], .ana-slots[data-count="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); --ana-n: 5; }
.ana-rack[data-count="6"], .ana-slots[data-count="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); --ana-n: 6; }
.ana-rack[data-count="7"], .ana-slots[data-count="7"] { grid-template-columns: repeat(7, minmax(0, 1fr)); --ana-n: 7; }
.ana-rack[data-count="8"], .ana-slots[data-count="8"] { grid-template-columns: repeat(8, minmax(0, 1fr)); --ana-n: 8; }
.ana-rack[data-count="9"], .ana-slots[data-count="9"] { grid-template-columns: repeat(9, minmax(0, 1fr)); --ana-n: 9; }
.ana-rack[data-count="10"], .ana-slots[data-count="10"] { grid-template-columns: repeat(10, minmax(0, 1fr)); --ana-n: 10; }
.ana-rack[data-count="11"], .ana-slots[data-count="11"] { grid-template-columns: repeat(11, minmax(0, 1fr)); --ana-n: 11; }
.ana-rack[data-count="12"], .ana-slots[data-count="12"] { grid-template-columns: repeat(12, minmax(0, 1fr)); --ana-n: 12; }
.ana-rack[data-count="9"], .ana-rack[data-count="10"], .ana-rack[data-count="11"], .ana-rack[data-count="12"],
.ana-slots[data-count="9"], .ana-slots[data-count="10"], .ana-slots[data-count="11"], .ana-slots[data-count="12"] { gap: 2px; }
.ana-rack {
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.55), rgba(227, 216, 200, 0.45));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.8);
  touch-action: manipulation;
}
.ana-rack[data-count="9"], .ana-rack[data-count="10"], .ana-rack[data-count="11"], .ana-rack[data-count="12"] { padding: 4px; }
.ana-tile, .ana-slot {
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  aspect-ratio: 1;
  font-size: clamp(0.8rem, 4.2vw, 1.75rem);
}
@supports (width: 1cqi) {
  .ana-tile, .ana-slot { font-size: clamp(0.7rem, calc(56cqi / var(--ana-n, 7)), 1.8rem); }
}
.ana-tile {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: clamp(6px, 1.6vw, 14px);
  background: linear-gradient(180deg, #fffdf8 0%, #f3eee4 100%);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), inset 0 -2px 0 rgba(20, 32, 40, 0.08), 0 1px 0 rgba(20, 32, 40, 0.12);
  cursor: pointer;
  touch-action: manipulation;
}
.ana-letter { font: inherit; line-height: 1; }
.ana-tile:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.ana-tile.is-on {
  border-color: var(--petrol-deep);
  background: linear-gradient(180deg, #17616a 0%, var(--petrol) 100%);
  color: var(--ivory);
}
.ana-tile:disabled { cursor: default; }
.ana-slot {
  display: grid;
  place-items: center;
  border-radius: clamp(6px, 1.6vw, 12px);
  border: 1.5px dashed var(--line-strong);
  background: rgba(255, 253, 248, 0.45);
  color: var(--petrol-deep);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1;
}
.ana-slot.is-on {
  border-style: solid;
  border-color: var(--petrol);
  background: var(--card);
  box-shadow: inset 0 -3px 0 var(--brass);
}
.ana-slot.is-caret::after {
  content: "";
  width: 2px;
  height: 52%;
  border-radius: 1px;
  background: var(--coral);
}
button.ana-slot {
  appearance: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}
button.ana-slot:disabled { cursor: default; }
button.ana-slot:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
#ana-answer {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  caret-color: var(--coral);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}
#ana-answer:focus {
  outline: 2px solid var(--teal);
  outline-offset: 0;
  border-color: var(--teal);
}
#ana-answer:disabled { opacity: 1; }
.ana-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: var(--paper);
  font-weight: 700;
}
.ana-mark {
  width: 1.4rem;
  text-align: center;
  font-size: 1.15rem;
  flex: none;
}
.ana-feedback[data-tone="accepted"],
.ana-feedback[data-tone="complete"] {
  background: #e5f4ec;
  border-color: #b7dcc6;
  border-left-color: var(--success);
}
.ana-feedback[data-tone="rejected"],
.ana-feedback[data-tone="invalid"],
.ana-feedback[data-tone="missing"] {
  background: #f8e8e4;
  border-color: #efcfc6;
  border-left-color: var(--error);
  color: var(--error);
}
/* An accepted word repeated is informational, not an invalid dictionary word. */
.ana-feedback[data-tone="duplicate"] {
  background: #f4e6c4;
  border-color: #e2cd96;
  border-left-color: var(--brass-deep);
  color: var(--epo-ink);
}
.ana-feedback[data-tone="error"],
.ana-feedback[data-tone="ended"],
.ana-feedback[data-tone="stale"] {
  background: #f4e6c4;
  border-color: #e2cd96;
  border-left-color: var(--brass-deep);
}
.ana-actions { display: grid; gap: 8px; }
.ana-actions .btn-primary { width: 100%; min-height: 48px; }
.ana-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ana-tools[data-solo-clear-only] { grid-template-columns: 1fr; max-width: 100%; }
.ana-tools .btn { width: 100%; min-height: 44px; padding-inline: 10px; }
.ana-actions:has([data-solo-clear-only]) { gap: 10px; }
.ana-actions [hidden],
.ana-tools[hidden],
.ana-reveal[hidden] { display: none !important; }
.ana-side { margin-top: 2px; }
.ana-side h2 { font-size: 1.05rem; }
.ana-reveal {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.ana-reveal li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.ana-reveal-mark { color: var(--success); font-weight: 700; }
.ana-reveal li.is-missed .ana-reveal-mark { color: var(--muted); }
.ana-reveal li.is-missed { opacity: 0.92; }
.ana-results { display: grid; gap: clamp(12px, 2vw, 16px); }
.ana-results .finish-band { margin-top: 4px; }
.ana-solution-slot { margin-top: 10px; width: 100%; }
.ana-replay-note { margin: 8px 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .ana-tile { transition: transform 120ms ease, border-color 120ms ease, background 120ms ease; }
  .ana-tile:active { transform: translateY(1px) scale(0.98); }
  .ana[data-phase="rejected"] .ana-rack { animation: nudge 280ms ease; }
  .ana[data-phase="accepted"] .ana-slot.is-on { transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  .ana-tile:active { transform: none; }
}

.chain {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 520px);
  margin: 0 auto;
  min-width: 0;
}
.chain-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.chain-card, .chain-chip {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 6px 4px 8px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 252, 247, 0.92), 0 1px 0 rgba(20, 32, 40, 0.04);
}
.chain-card.is-current, .chain-step.is-current .chain-chip {
  border-color: var(--petrol);
  box-shadow: inset 0 -3px 0 var(--petrol), inset 0 1px 0 rgba(255, 252, 247, 0.92);
}
.chain-card.is-target, .chain-step.is-target .chain-chip {
  background: var(--epo-bg);
  border-color: #e2cd96;
}
.chain-card.is-start { border-color: var(--line-strong); }
.chain-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
}
.chain-rule {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.chain-letters {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
}
.chain-letter {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: 2.35rem;
  aspect-ratio: 5 / 6;
  height: auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid #d9cdb8;
  background: linear-gradient(180deg, #fffdf9, #f1e8d8);
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(20, 32, 40, 0.05);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(0.78rem, 3.6vw, 1.3rem);
  color: var(--petrol-deep);
}
.chain-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 2px;
  min-width: 0;
}
.chain-step {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}
.chain-join {
  width: 0.9rem;
  flex: 0 0 auto;
  text-align: center;
  color: var(--petrol);
  font-weight: 700;
  line-height: 1;
}
.chain-join::before { content: "→"; }
.chain-chip { margin: 0; padding: 4px; }
.chain-chip .chain-letter {
  flex: 0 0 auto;
  width: 1.35rem;
  max-width: none;
  height: 1.65rem;
  aspect-ratio: auto;
  font-size: 0.92rem;
}
.chain-form { display: grid; gap: 8px; min-width: 0; }
.chain-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}
.chain-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  padding: 0 12px;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 #fff;
}
.chain-propose {
  min-height: 52px;
  min-width: 7.2rem;
  padding-inline: 16px;
  font-size: 1.05rem;
  font-weight: 700;
}
.chain-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}
.chain-tools form { margin: 0; min-width: 0; }
.chain-tools .btn { width: 100%; min-height: 42px; padding: 8px 10px; }
.chain-retry { display: none; width: 100%; }
.chain[data-state="error"] .chain-retry,
.chain[data-state="retry"] .chain-retry { display: inline-flex; }
.chain[data-state="validating"] .chain-compose { outline: 2px solid rgba(14, 60, 68, 0.25); outline-offset: 2px; }
.chain[data-state="rejected"] .feedback::before,
.chain[data-state="error"] .feedback::before { content: "× "; }
.chain[data-state="accepted"] .feedback::before,
.chain[data-state="complete"] .feedback::before { content: "✓ "; }
.chain .feedback:empty { display: none; }
.chain-results .chain-history { margin-bottom: 8px; }

@media (max-width: 389px) {
  .chain-propose { min-width: 6.4rem; padding-inline: 10px; }
  .chain-chip .chain-letter { width: 1.2rem; height: 1.5rem; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .chain-step.is-enter .chain-chip { animation: chain-in 280ms ease; }
  .chain[data-state="rejected"] .chain-compose { animation: nudge 280ms ease; }
  .chain-letter { transition: transform 120ms ease, background 120ms ease, border-color 120ms ease; }
}
@keyframes chain-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .chain-step.is-enter .chain-chip,
  .chain[data-state="rejected"] .chain-compose { animation: none; }
  .chain-letter { transition: none; }
}

.play-head.is-live:has(+ .pyr) { margin-bottom: 4px; }
.play-head.is-live:has(+ .pyr) h1 { font-size: 1.45rem; }
.pyr {
  --pyr-gap: 2px;
  display: grid;
  gap: 8px;
  width: min(100%, 440px);
  margin: 0 auto;
  min-width: 0;
  overflow-anchor: none;
}
.pyr-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pyr-meters p {
  margin: 0;
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.pyr-meters strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}
.pyr .feedback {
  box-sizing: border-box;
  height: 1.45em;
  min-height: 1.45em;
  max-height: 1.45em;
  margin: 0;
  padding: 0 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.45em;
  font-size: 0.88rem;
}
.pyr .bar { margin: 0; }
.pyr-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
  width: 100%;
  overflow-anchor: none;
}
#pyr-rows {
  scroll-margin-top: var(--play-scroll-offset, 72px);
}
.pyr-row {
  position: relative;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 1px;
}
.pyr-row > .pyr-def {
  position: absolute;
  inset-inline-start: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
}
.pyr-row.is-locked { opacity: 0.5; }
.pyr-row.is-current,
.pyr-row.is-solved { opacity: 1; }
.pyr-slots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 28px;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}
.pyr-row.is-current .pyr-slots {
  padding: 2px;
  border-radius: 9px;
  background: var(--card);
  border: 1.5px solid var(--petrol);
  box-shadow: 0 0 0 2px rgba(20, 94, 98, 0.12);
}
.pyr-row.is-solved .pyr-slots {
  padding: 2px;
  border-radius: 9px;
  background: rgba(29, 122, 77, 0.08);
  border: 1.5px solid var(--teal);
}
.pyr-row.is-locked .pyr-slots {
  padding: 2px;
  border-radius: 9px;
  border: 1px dashed rgba(140, 100, 36, 0.5);
}
.pyr-row-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 0;
  max-width: 100%;
}
.pyr-row-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}
.pyr-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  min-height: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pyr-status-icon {
  width: 0.85rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1;
}
.pyr-state { letter-spacing: 0.02em; }
.pyr-row.is-solved .pyr-status-icon,
.pyr-row.is-solved .pyr-status-text,
.pyr-row.is-solved .pyr-row-title { color: var(--success); }
.pyr-row.is-current .pyr-status-icon,
.pyr-row.is-current .pyr-status-text,
.pyr-row.is-current .pyr-row-title { color: var(--petrol-deep); }
.pyr-row.is-locked .pyr-status-icon,
.pyr-row.is-locked .pyr-status-text,
.pyr-row.is-locked .pyr-row-title { color: var(--brass-deep); }
.pyr-tile {
  position: relative;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #d9cdb8;
  background: linear-gradient(180deg, #fffdf9, #f1e8d8);
  color: var(--petrol-deep);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  line-height: 1;
}
button.pyr-tile {
  cursor: pointer;
  touch-action: manipulation;
}
button.pyr-tile:active { transform: translateY(1px); }
.pyr-glyph {
  font-family: var(--serif);
  font-size: 1em;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.pyr-tile.is-empty {
  background: rgba(255, 253, 248, 0.45);
  border-style: dashed;
  box-shadow: none;
}
.pyr-tile.is-placed {
  background: var(--petrol);
  color: var(--ivory);
  border-color: var(--petrol-deep);
}
.pyr-tile.is-solved {
  background: #e8f4ee;
  border-color: var(--teal);
  color: var(--petrol-deep);
}
.pyr-tile.is-locked {
  background: rgba(16, 28, 40, 0.04);
  color: transparent;
  border-style: dashed;
  border-color: rgba(140, 100, 36, 0.35);
  box-shadow: none;
}
.pyr-bank .pyr-tile.is-gap {
  display: flex;
  pointer-events: none;
  border-style: dashed;
  background: rgba(255, 253, 248, 0.45);
  box-shadow: none;
  color: transparent;
}
.pyr-play {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  justify-items: center;
}
.pyr-answer {
  display: grid;
  gap: 2px;
  width: 100%;
  justify-items: center;
}
.pyr-answer-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass-deep);
}
.pyr-well {
  position: relative;
  width: max-content;
  max-width: 100%;
}
.pyr-well:focus-within {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 12px;
}
.pyr-answer-slots,
.pyr-bank {
  display: grid;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  gap: 3px;
  min-width: 0;
}
.pyr-answer-slots[data-count="1"], .pyr-bank[data-count="1"] { grid-template-columns: repeat(1, 42px); }
.pyr-answer-slots[data-count="2"], .pyr-bank[data-count="2"] { grid-template-columns: repeat(2, 42px); }
.pyr-answer-slots[data-count="3"], .pyr-bank[data-count="3"] { grid-template-columns: repeat(3, 42px); }
.pyr-answer-slots[data-count="4"], .pyr-bank[data-count="4"] { grid-template-columns: repeat(4, 42px); }
.pyr-answer-slots[data-count="5"], .pyr-bank[data-count="5"] { grid-template-columns: repeat(5, 42px); }
.pyr-answer-slots[data-count="6"], .pyr-bank[data-count="6"] { grid-template-columns: repeat(6, 42px); }
.pyr-answer-slots[data-count="7"], .pyr-bank[data-count="7"] { grid-template-columns: repeat(7, 42px); gap: 4px; }
.pyr-answer-slots[data-count="8"], .pyr-bank[data-count="8"] { grid-template-columns: repeat(8, 40px); gap: 3px; }
.pyr-answer-slots[data-count="9"], .pyr-bank[data-count="9"] { grid-template-columns: repeat(9, 1.7rem); gap: 2px; }
.pyr-answer-slots[data-count="10"], .pyr-bank[data-count="10"] { grid-template-columns: repeat(10, 1.6rem); gap: 2px; }
.pyr-answer-slots[data-count="11"], .pyr-bank[data-count="11"] { grid-template-columns: repeat(11, 1.45rem); gap: 2px; }
.pyr-answer-slots[data-count="12"], .pyr-bank[data-count="12"] { grid-template-columns: repeat(12, 1.35rem); gap: 2px; }
.pyr-answer-slots[data-count="13"], .pyr-bank[data-count="13"] { grid-template-columns: repeat(13, 1.25rem); gap: 2px; }
.pyr-answer-slots[data-count="14"], .pyr-bank[data-count="14"] { grid-template-columns: repeat(14, 1.15rem); gap: 2px; }
.pyr-answer-slots[data-count="15"], .pyr-bank[data-count="15"] { grid-template-columns: repeat(15, 1.1rem); gap: 2px; }
.pyr-answer-slots[data-count="16"], .pyr-bank[data-count="16"] { grid-template-columns: repeat(16, 1rem); gap: 2px; }
.pyr-slot,
.pyr-bank .pyr-tile {
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.pyr-slot {
  display: grid;
  place-items: center;
  border: 1.5px dashed var(--line-strong);
  background: rgba(255, 253, 248, 0.55);
  color: var(--petrol-deep);
}
.pyr-slot.is-filled {
  border-style: solid;
  border-color: var(--petrol);
  background: var(--card);
  box-shadow: inset 0 -2px 0 var(--brass);
  cursor: pointer;
  touch-action: manipulation;
}
button.pyr-slot { font: inherit; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.pyr-bank .pyr-glyph { font-size: 1em; }
#pyr-word {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  pointer-events: none;
}
#pyr-word:focus { outline: none; }
.pyr-actions {
  position: static;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  background: none;
}
.pyr-actions .btn, .pyr-actions form { margin: 0; }
.pyr-validate { width: 100%; }
.pyr-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pyr-tools .btn {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.92rem;
}
.pyr-tools #pyr-clear { grid-column: 1; grid-row: 1; align-self: start; z-index: 1; }
/* Native shared confirmation spans the row; opening it never stretches Effacer. */
.pyr-tools > .abandon-confirm {
  grid-column: 1 / -1; grid-row: 1; min-width: 0; margin-top: 0;
  display: block;
}
.pyr-tools > .abandon-confirm > .abandon-summary {
  width: calc((100% - 8px) / 2); margin-left: calc((100% + 8px) / 2); min-height: 40px;
}
.pyr-tools > .abandon-confirm > .abandon-form { width: 100%; min-width: 0; margin-top: 8px; }
.pyr-tools > .abandon-confirm:not([open]) > .abandon-form { display: none; }
.pyr-tools #pyr-retry { grid-column: 1 / -1; grid-row: 2; }
.pyr-actions form .btn { width: 100%; }
.pyr [hidden] { display: none !important; }
.pyr-outcome {
  display: inline-block;
  min-width: 1.1em;
  font-weight: 700;
}
.pyr-celebrate {
  margin-top: 8px;
  padding: 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--brass);
  text-align: center;
}
.pyr-celebrate[hidden] { display: none; }
.pyr-chain {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.pyr-chain li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ivory);
  border: 1px solid var(--line);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pyr-results .pyr-rows { margin-bottom: 8px; }
.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;
}
.pyr-burst {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .pyr-tile { transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease; }
  .pyr-row { transition: opacity 180ms ease; }
  .pyr-row.is-unlock .pyr-tile { animation: pyr-deal 420ms ease both; }
  .pyr-row.is-reveal { animation: pyr-rise 480ms ease; }
  .pyr-row.is-shake { animation: nudge 280ms ease; }
  .pyr-celebrate.is-on { animation: pyr-rise 520ms ease; }
}
@keyframes pyr-deal {
  from { transform: translateY(10px); opacity: 0.35; }
  to { transform: none; opacity: 1; }
}
@keyframes pyr-rise {
  from { transform: translateY(6px); }
  to { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pyr-row, .pyr-tile, .pyr-celebrate { animation: none; transition: none; }
}


/* Eposigma green/orange product surfaces; palette lives in design-system/tokens.css. */

body {
  background:
    radial-gradient(circle at 8% 5%, rgba(16, 131, 90, 0.08), transparent 28rem),
    radial-gradient(circle at 92% 14%, rgba(201, 137, 81, 0.12), transparent 25rem),
    linear-gradient(135deg, rgba(13, 87, 63, 0.035) 25%, transparent 25%) 0 0 / 44px 44px,
    linear-gradient(315deg, rgba(240, 122, 47, 0.03) 25%, transparent 25%) 0 0 / 44px 44px,
    var(--ivory);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  /* The existing SVG alpha varies from 9–12%; this yields 8.6–11.4% letters.
     Keep its geometry and tint it with mostly greens and small warm passages. */
  opacity: 0.95;
  background: linear-gradient(135deg,
    #09583d 0% 24%, #99712f 30% 35%, #257450 41% 65%,
    #b2684c 72% 77%, #09583d 84% 100%) 18px 8px / 420px 320px repeat;
  mask: url("/brand/letters-motif.svg") 18px 8px / 420px 320px repeat;
  mask-mode: alpha;
}

.mark,
.mark.sm {
  display: grid;
  grid-template-rows: 1fr 1fr;
  place-items: stretch;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(5, 48, 35, 0.28);
  border-radius: 11px;
  background: #052e22;
  color: #fffaf1;
  box-shadow: 0 7px 18px rgba(7, 59, 45, 0.2);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
}
.mark.sm {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
}
.mark span.mark-epos,
.mark span.mark-igma {
  display: grid;
  place-items: center;
  flex: none;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 8px;
  background: #127a52;
  color: #fffaf1;
}
.mark span.mark-igma { background: #052e22; color: #f4e6c4; }
.mark.sm span.mark-epos,
.mark.sm span.mark-igma { font-size: 7px; letter-spacing: 0.02em; }
.wordmark .wm-epos { font-style: normal; font-weight: 650; color: var(--navy); }
.wordmark .wm-igma { font-style: italic; font-weight: 560; color: #127a52; }

.game-card-form,
.game-chip-form,
.inline-play-form {
  margin: 0;
}

.game-card-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

button.game-card,
button.game-chip {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.game-card {
  appearance: none;
}

.game-archive-link {
  align-self: flex-start;
  padding-left: 3px;
  color: var(--petrol);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.game-archive-link:hover {
  text-decoration: underline;
}

.inline-play {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.05rem;
  background: var(--cta-2);
  color: #fff;
  box-shadow: 0 8px 20px rgba(171, 54, 10, 0.2);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.inline-play:hover {
  background: var(--cta-hover);
}

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.home-dashboard-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.home-achievements {
  min-width: 0;
}

.activity-panel {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 108px);
  overflow: auto;
  overscroll-behavior: contain;
}

.activity-panel .feed {
  margin-bottom: 0;
}

.archive-panel {
  margin-top: 18px;
}

.grid-archive {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid rgba(13, 87, 63, 0.14);
}

.grid-archive form {
  flex: 0 0 auto;
  margin: 0;
}

input,
textarea,
[contenteditable="true"] {
  scroll-margin-top: 96px;
}

@media (max-width: 900px) {
  .home-dashboard {
    grid-template-columns: 1fr;
  }
  .activity-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 540px) {
  .grid-archive li {
    align-items: flex-start;
  }
  body::before {
    opacity: 0.68;
    background-size: 360px 274px;
  }
}

.top {
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
}
.page-head.home-intro { max-width: 46rem; }
.page-head.home-intro .lede { max-width: 46rem; }
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
  align-items: start;
}
.home-grids { display: grid; gap: 8px; }
.home-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 6px 8px 6px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.home-grid-copy { min-width: 0; }
.home-grid-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.15;
  color: var(--navy);
}
.home-grid-copy > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.home-grid .note { grid-column: 1 / -1; margin: 0; }
.home-grid form { margin: 0; }
.home-grid .btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  white-space: nowrap;
}
.game-logo { width: 36px; height: 36px; flex: none; color: #0d573f; }
.game-card.is-playable .game-logo,
.game-chip.is-playable .game-logo { color: #fffaf1; }
.feed-line { display: flex; gap: 8px; align-items: center; min-width: 0; }
.feed-line .game-logo { width: 28px; height: 28px; }
.feed-line > div { min-width: 0; }
.rules-pop { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; vertical-align: middle; }
.rules-help {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--ivory);
  color: var(--petrol-deep);
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.rules-help:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.rules-source[hidden] { display: none; }
.rules-pop.game-help .rules-help,
.rules-pop.game-nav-help .rules-help {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
}
.foot-credit { margin: 0; color: var(--navy); font-weight: 650; }

@media (max-width: 1080px) {
  .top { border-radius: 0; }
}
@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top {
    width: 100%;
    top: 0;
    border-radius: 0;
    gap: 8px;
    padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
  }
  .mark { width: 36px; height: 36px; min-width: 36px; }
}
html { scroll-padding-top: 88px; }
.board, .mm-board, .board-search, .pyr-rows, .chain-board, .ana-rack { scroll-margin-top: 88px; }

.game-chip-wrap { position: relative; min-width: 0; }
.game-chip { padding-right: 42px; }
.game-help {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--ivory);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}

.play-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.play-tools form { margin: 0; }
.play-hint { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.pyr-well:focus-within { outline: 3px solid var(--teal); outline-offset: 3px; }
.play-aid, .play-tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--ivory);
  color: var(--navy);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.play-lb { margin-top: 10px; }
.play-lb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.play-lb h2 { margin: 0; font-size: 0.95rem; }
.play-lb-head a { color: var(--petrol); font-size: 0.88rem; }
.play-lb-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.play-lb-list li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  font-variant-numeric: tabular-nums;
}
.play-lb-list .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-lb-list .is-you .name { font-weight: 700; }
.play-lb-empty { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }

.result-line { margin: 2px 0 10px; color: var(--ink); }
.results { padding: 14px 16px 12px; }
.result-score span { font-size: clamp(2.2rem, 7vw, 3.2rem); }

.mm-tile .mm-guess {
  position: absolute;
  inset: 0;
  width: auto;
  margin: 0;
  display: block;
}
.mm-tile .mm-guess,
.mm-tile .mm-guess input {
  pointer-events: none;
}
.mm-tile .mm-guess input {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  min-height: 0;
  max-height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  letter-spacing: 0;
  text-align: center;
  box-shadow: none;
}
.mm-tile.is-caret { box-shadow: inset 0 0 0 3px var(--teal); }
/* Live Mot status follows the keyboard/actions so errors cannot move the keys.
   It collapses when empty; win/lose copy lives only in #mot-summary. */
#mot-feedback {
  display: none;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 4px auto 0;
  padding: 4px 10px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1.2;
  width: min(100%, 340px);
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.88rem;
}
#mot-feedback:not(:empty):not([data-kind="won"]):not([data-kind="lost"]):not([data-kind="revealing"]) {
  display: flex;
}
#mot-feedback:empty,
#mot-feedback[data-kind="won"],
#mot-feedback[data-kind="lost"],
#mot-feedback[data-kind="revealing"] {
  display: none !important;
  margin: 0;
  padding: 0;
  border: 0;
  height: 0;
  min-height: 0;
}
#mot-feedback[data-kind="unknown"],
#mot-feedback[data-kind="invalid"],
#mot-feedback[data-kind="length"],
#mot-feedback[data-kind="error"] {
  background: #f4f1ea;
  border-color: var(--line-strong);
  color: var(--ink);
}
#mot-feedback[data-kind="miss"] {
  background: rgba(240, 122, 47, 0.14);
  border-color: var(--coral);
  color: #8a3b12;
}
#mot-feedback[data-kind="duplicate"] {
  background: var(--epo-bg);
  border-color: #e2cd96;
  color: var(--epo-ink);
}
.mm-progress { justify-content: center; margin-bottom: 6px; }
.mm-panel .mm-keyboard-options { display: none !important; }

.ana-feedback[data-tone="ready"],
.ana-feedback[data-tone="selecting"] { display: none; }
.ana-hud { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.ana-hud p { margin: 0; }
.ana-found { margin-top: 8px; }
.ana-found .empty { margin: 0; color: var(--muted); }

.search-app .bar { display: none; }
.search-list-title { margin: 8px 0 0; font-size: 0.95rem; }
.search-word { width: auto; min-height: 36px; padding: 2px 8px; }
.search-diff {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 6px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.board.board-search { touch-action: none; overscroll-behavior: contain; }
/* Trouve-mots solo: the shared .cell fade trails a drag. Paint the tile at once.
   touch-action stays on this grid only, so the rest of the page still scrolls. */
#board.board:not(.board-search) { overscroll-behavior: contain; }
#board.board:not(.board-search) .cell { transition: none; }

.pyr .feedback.is-idle,
.pyr .feedback:empty {
  visibility: hidden;
}
.pyr .bar[hidden] { display: none; }
.pyr-meters { display: flex; gap: 16px; }
.pyr-meters p { margin: 0; padding: 0; background: none; border: 0; }
.pyr-meters strong { font-size: 1.15rem; }

.chain-tools { grid-template-columns: minmax(0, 12rem); }

.abandon-confirm {
  margin-top: 10px;
  max-width: 100%;
}
.abandon-confirm > summary.abandon-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 44px;
  justify-self: start;
  cursor: pointer;
  list-style: none;
}
.abandon-confirm > summary::-webkit-details-marker { display: none; }
.abandon-form {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  max-width: 100%;
}
.abandon-copy { margin: 0 0 10px; }
.abandon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.abandon-actions .btn { min-height: 44px; flex: 1 1 8rem; }
.pyr.is-complete .abandon-confirm,
.pyr[data-phase="complete"] .abandon-confirm,
.chain[data-state="complete"] .abandon-confirm,
#ana[data-phase="complete"] ~ .abandon-confirm { display: none; }
.puzzle-status.is-abandoned,
.puzzle-status.is-abandoned .puzzle-status-svg,
.puzzle-status.is-expired,
.puzzle-status.is-expired .puzzle-status-svg { color: var(--muted); }
.game-icon-slot.is-abandoned .game-icon-overlay,
.game-icon-slot.is-expired .game-icon-overlay { color: #6d675c; }
.puzzle-card-done.is-abandoned,
.puzzle-card-done.is-expired { color: var(--muted); }

@media (max-width: 430px) {
  .play-head.is-live h1 { font-size: 1.35rem; }
  /* header stays full-bleed */
  main { padding-top: 4px; }
}


/* Digigma-style chrome alignment */
.top {
  justify-content: space-between;
  gap: 10px;
}

.top .brand {
  flex: 0 1 auto;
}

.top .nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 44px;
  margin-left: 8px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.94rem;
}

.top .nav {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: max(10px, env(safe-area-inset-right));
  left: auto;
  z-index: 60;
  width: min(22rem, calc(100vw - 20px));
  max-height: calc(100dvh - 76px);
  overflow-y: auto;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.top .nav.is-open {
  display: flex;
}

.top .nav > a {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  padding: 9px 8px;
  border-radius: 8px;
}

.top .nav > a + a {
  border-top: 1px solid rgba(154, 136, 105, 0.22);
}

.nav-account {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.nav-account-title {
  padding: 0 8px 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-account-links {
  display: grid;
  gap: 2px;
  padding-left: 8px;
}

.nav-account a {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.nav-account a:hover,
.nav-account a[aria-current="page"] {
  background: rgba(14, 60, 68, 0.07);
  color: var(--petrol-deep);
}

.nav-account-signin {
  width: fit-content;
  min-width: 8.5rem;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: #fffdf8;
  font-weight: 700;
}

.nav-account-secondary {
  width: fit-content;
  color: var(--muted) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.foot {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 0 4px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.foot-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.foot-credit {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.foot-credit:hover {
  color: var(--teal);
}

.nightcall-mark {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 20px;
}

@media (min-width: 1081px) {
  .top .nav-toggle {
    display: inline-flex;
  }
  .top .nav {
    display: none;
  }
  .top .nav.is-open {
    display: flex;
  }
}

@media (max-width: 640px) {
  .top .wordmark {
    display: inline-block;
    font-size: 1.02rem;
  }
  .top .nav-toggle {
    min-width: 68px;
    padding-inline: 12px;
  }
}


/* Eposigma home/auth polish 2026-10-05 */
.home-intro .countdown {
  width: min(100%, 22rem);
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(255, 253, 248, 0.88);
}

.home-intro .countdown strong {
  font-size: 1.35rem;
}

.home-catalogue {
  margin-top: var(--section-rhythm);
}

.home-recent {
  min-width: 0;
}

.activity-panel {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
}

.activity-panel .feed {
  gap: 4px;
  margin-top: var(--section-head-gap);
}

.activity-panel .feed li {
  gap: 7px;
  min-height: 48px;
  padding: 5px 7px;
  border-radius: 10px;
  background: rgba(247, 243, 235, 0.78);
  box-shadow: none;
}

.activity-panel .feed > li > .avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 0.68rem;
}

.activity-panel .feed-line {
  gap: 6px;
}

.activity-panel .feed-line .game-logo {
  width: 20px;
  height: 20px;
}

.activity-panel .feed strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.15;
}

.activity-panel .feed span {
  display: block;
  font-size: 0.7rem;
  line-height: 1.25;
  white-space: normal;
}

.activity-panel .feed b {
  font-size: 1rem;
}

.tutorial-list {
  display: grid;
  gap: 8px;
  width: min(760px, 100%);
}

.tutorial-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.9);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.tutorial-card strong,
.tutorial-card span {
  display: block;
}

.tutorial-card strong {
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1rem;
}

.tutorial-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.tutorial-card em {
  color: var(--teal);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .home-catalogue .game-strip {
    gap: 6px;
  }
  .home-catalogue .game-chip {
    min-height: 58px;
    padding: 7px 8px;
    border-radius: 12px;
  }
  .home-catalogue .game-chip strong {
    font-size: 0.88rem;
  }
  .home-catalogue .game-chip .flag {
    font-size: 0.58rem;
  }
  .tutorial-card {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .tutorial-card em {
    grid-column: 2;
  }
}


/* 2026-10-05 compact current game + Digigma-like activity rows */
.home-current {
  grid-template-columns: minmax(0, 1fr);
  width: min(760px, 100%);
  margin: 16px 0 4px;
  padding: 16px 18px;
}

.home-current .feature-copy {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
}

.home-current .game-logo {
  grid-row: 1 / span 3;
  width: 40px;
  height: 40px;
  color: var(--petrol);
}

.home-current .flag,
.home-current h2,
.home-current .feature-copy > p:not(.countdown):not(.note),
.home-current .countdown,
.home-current .actions {
  grid-column: 2;
}

.home-current h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.home-current .countdown {
  width: min(100%, 22rem);
  margin: 6px 0 2px;
  padding: 8px 10px;
  border-radius: 10px;
}

.home-current .countdown strong {
  font-size: 1.15rem;
}

.feed {
  gap: 4px;
}

.feed .feed-item {
  grid-template-columns: 28px 22px minmax(0, 1fr);
  grid-template-areas:
    "mark avatar sentence"
    "tail tail tail";
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 5px 8px;
  border: 0;
  border-left: 3px solid color-mix(in srgb, var(--teal) 72%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--teal) 5%, var(--card));
  box-shadow: none;
}
.feed .feed-item > .feed-avatar { grid-area: avatar; }
.feed .feed-item > .feed-mark { grid-area: mark; }
.feed .feed-item > .feed-sentence { grid-area: sentence; }
.feed .feed-item > .feed-tail { grid-area: tail; }

.feed .feed-item .feed-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.feed-avatar img,
.feed-avatar svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--petrol);
}

.feed-mark .game-logo,
.feed-mark .feed-welcome {
  width: 26px;
  height: 26px;
  display: block;
}

.feed-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.feed-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  line-height: 1.1;
}

.feed-copy > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.2;
}

.feed-tail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 2px 8px;
  min-width: 0;
  white-space: normal;
}

.feed-tail b {
  font-family: var(--serif);
  font-size: 0.92rem;
  line-height: 1;
  color: var(--navy);
  white-space: nowrap;
}

.feed-score {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 6px;
}

.feed-score-words {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
  font-weight: 400;
  font-family: var(--font-sans, system-ui, sans-serif);
  white-space: nowrap;
}

.feed-tail time {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

.feed-sentence {
  margin: 0;
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
}

.feed .feed-sentence .feed-user,
.feed .feed-sentence .feed-grid,
.activity-panel .feed .feed-sentence strong.feed-user {
  display: inline;
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  font-size: inherit;
  line-height: inherit;
}

.feed-sentence .feed-user {
  color: var(--navy);
  font-weight: 700;
}

.feed-sentence a.feed-user,
.feed-sentence a.feed-grid {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.feed-sentence strong.feed-user {
  text-decoration: none;
}

.activity-panel .feed .feed-item {
  min-height: 42px;
  padding: 5px 8px;
}

@media (max-width: 640px) {
  .home-current {
    width: 100%;
    padding: 14px;
  }
  .home-current .feature-copy {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 10px;
  }
  .home-current .game-logo {
    width: 34px;
    height: 34px;
  }
  .feed-copy > span {
    font-size: 0.68rem;
  }
  .feed-tail time {
    font-size: 0.6rem;
  }
}


/* 2026-10-05 home current-game parity pass */
.home-daily {
  margin: var(--section-rhythm) 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.home-daily-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: var(--section-head-gap);
}

.home-daily-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.65rem);
}

.home-daily-head .countdown {
  width: auto;
  margin: 0;
  padding: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-daily-head .countdown span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.home-daily-head .countdown strong {
  color: var(--petrol-deep);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
}

.home-daily-head .countdown em {
  display: none;
}

.home-current-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 12px;
  background: var(--card);
}

.home-current-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--petrol);
}

.home-current-icon .game-logo {
  width: 36px;
  height: 36px;
}

.home-current-copy {
  min-width: 0;
}

.home-current-copy h3 {
  margin: 0;
  font-size: 1.2rem;
}

.home-current-copy > p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.home-current-copy .home-current-note {
  margin-top: 5px;
  color: var(--brass-deep);
  font-size: 0.75rem;
  font-weight: 650;
}

.home-current-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-current-actions .btn {
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 10px;
  box-shadow: none;
  white-space: nowrap;
}

.home-current-help,
.game-help {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.home-current-help:hover,
.game-help:hover {
  color: var(--petrol-deep);
  border-color: var(--brass);
}

.game-chip-wrap {
  position: relative;
}

.home-catalogue .game-chip {
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas: "mark name";
  column-gap: 9px;
  row-gap: 0;
  min-height: 62px;
  padding: 9px 34px 9px 10px;
}

.home-catalogue .game-chip .game-logo {
  grid-area: mark;
  width: 30px;
  height: 30px;
}

.home-catalogue .game-chip strong {
  grid-area: name;
  align-self: center;
  font-size: 0.98rem;
}

.home-catalogue .game-chip .flag {
  display: none;
}

.home-catalogue .game-help {
  top: 8px;
  right: 8px;
  z-index: 3;
}

@media (max-width: 640px) {
  .home-daily {
    padding: 12px;
  }

  .home-daily-head {
    align-items: flex-start;
  }

  .home-daily-head .countdown {
    flex: 1 1 100%;
  }

  .home-current-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .home-current-icon {
    width: 38px;
    height: 38px;
  }

  .home-current-icon .game-logo {
    width: 32px;
    height: 32px;
  }

  .home-current-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .home-current-actions .btn {
    min-width: 0;
    width: auto;
    max-width: 100%;
  }

  .home-catalogue .game-chip {
    min-height: 56px;
    padding: 8px 32px 8px 9px;
  }

  .home-catalogue .game-chip .game-logo {
    width: 27px;
    height: 27px;
  }

  .home-catalogue .game-chip strong {
    font-size: 0.92rem;
  }

  .home-catalogue .game-help {
    top: 7px;
    right: 7px;
  }
}


/* 2026-10-05 Digigma footer parity — full-bleed bar (no empty band below). */
.foot {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  background: var(--paper-2);
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.foot > * {
  width: min(1120px, 100%);
  max-width: 1120px;
  box-sizing: border-box;
}

.foot-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
}

.foot-brand .mark.sm {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
}

.foot-brand .wordmark {
  font-size: 1.05rem;
}

.foot-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  max-width: 100%;
}

.foot-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.foot-links a:hover {
  color: var(--brass-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-sep {
  color: var(--muted);
  user-select: none;
  flex: 0 0 auto;
}

.foot-copy {
  margin: 0;
  width: min(1120px, 100%);
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.foot-credit {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
}

.foot-credit:hover {
  color: var(--muted);
  text-decoration: underline;
}

.foot-credit img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: 0 0 18px;
}

@media (max-width: 420px) {
  .foot {
    width: 100%;
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
  }
  .foot-links {
    gap: 2px 6px;
  }
  .foot-links a,
  .foot-sep {
    font-size: 0.72rem;
  }
}


/* 2026-10-05 free-grid + game browser parity */
.home-daily-head {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.home-daily-head .countdown {
  order: 0;
  width: auto;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-daily-head .countdown span {
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.home-daily-head .countdown strong {
  font-size: 1.15rem;
}

.home-daily-head h2 {
  order: 1;
  margin-top: 3px;
}

.home-current-actions form {
  margin: 0;
}

.game-grid-browser {
  margin-top: 14px;
}

.game-grid-browser .grid-archive {
  margin-top: 12px;
}

.game-grid-list li > div strong {
  font-size: 1.05rem;
}

.game-grid-list .btn {
  white-space: nowrap;
}

.game-rules {
  margin-top: 14px;
}

@media (max-width: 640px) {
  .home-daily-head .countdown {
    flex: 0 0 auto;
  }

  .home-daily-head .countdown strong {
    font-size: 1.05rem;
  }

  .game-grid-list li {
    align-items: center;
  }

  .game-grid-list form {
    width: auto;
  }

  .game-grid-list .btn {
    min-height: 44px;
    padding: 7px 10px;
    font-size: 0.83rem;
  }
}

.home-layout {
  margin-top: var(--section-rhythm);
}

.home-status-panel {
  margin: 22px 0 8px;
}

.home-status-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.home-status-card {
  min-width: 0;
  padding: 14px 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.home-status-card h3,
.home-status-card p {
  margin: 0;
}

.home-status-card h3 {
  font-family: var(--serif);
  color: var(--navy);
}

.home-status-card p {
  margin-top: 6px;
  color: var(--ink);
  font-size: 0.92rem;
}

.home-status-actions {
  margin-top: 14px;
}

.home-grid {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.home-grid-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.home-grid .btn-play-wide,
.grid-archive .btn-play-wide {
  min-width: 7.25rem;
  padding-inline: 18px;
  font-size: 1.02rem;
  font-weight: 750;
}

.rules-pop-inline .rules-help {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 4px 0 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--difficulty-tint, #f3e8d4);
  color: var(--difficulty-ink, #6b4a24);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.3;
}
.difficulty-badge[data-difficulty="easy"] {
  --difficulty-tint: #dff2df;
  --difficulty-ink: #246b3d;
}
.difficulty-badge[data-difficulty="medium"] {
  --difficulty-tint: #dceafa;
  --difficulty-ink: #245a91;
}
.difficulty-badge[data-difficulty="hard"] {
  --difficulty-tint: #ffead6;
  --difficulty-ink: #9a4b08;
}
.difficulty-badge[data-difficulty="expert"] {
  --difficulty-tint: #eadcf4;
  --difficulty-ink: #66317d;
}

.puzzle-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
}

.puzzle-status-icon,
.puzzle-status-svg {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.puzzle-status-svg { display: block; }

.puzzle-status.is-unplayed { color: var(--muted); font-weight: 550; }
.puzzle-status.is-started,
.puzzle-status.is-started .puzzle-status-svg { color: #C88708; }
.puzzle-status.is-played,
.puzzle-status.is-played .puzzle-status-svg { color: #2F6B45; }
.puzzle-status.is-played_assisted,
.puzzle-status.is-played_assisted .puzzle-status-svg { color: #A85000; }

.grid-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 12px 0;
}

.grid-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.grid-filters select {
  min-height: 40px;
  max-width: 100%;
}

.grid-archive-item[hidden] { display: none !important; }

.nav-account-toggle {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.nav-account-panel {
  display: grid;
  gap: 2px;
  padding-left: 8px;
}

.nav-account-panel[hidden] { display: none; }

.information-page {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 0 clamp(10px, 3vw, 16px) 8px;
}
.information-page-block.site-block.panel {
  margin-top: 0;
}
.information-page-block h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.information-page-block .site-block-body {
  padding-top: 4px;
}
.information-page-block .legal-copy :is(h2, h3) {
  margin: 1.35em 0 0.45em;
  font-size: 1.06rem;
  line-height: 1.25;
  color: var(--navy);
}
.information-page-block .legal-copy :is(h2, h3):first-child {
  margin-top: 0;
}
.information-page-block .legal-copy p {
  margin: 0.65em 0 0;
}
.information-page-block .legal-copy p:first-child {
  margin-top: 0;
}
.information-page-block .support-form-inner {
  max-width: min(100%, 520px);
}
.information-page-block .support-form-inner .name-form {
  margin-top: 0.75rem;
}

.legal-copy .legal-id { line-height: 1.5; }
.legal-copy .publisher-name,
.legal-copy .publisher-card img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .home-status-grid { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: auto minmax(0, 1fr); }
  .home-grid form,
  .grid-archive form { grid-column: 1 / -1; }
  .home-grid .btn-play-wide,
  .grid-archive .btn-play-wide { width: 100%; min-width: 0; }
}

html[data-hide-timer="1"] .play-clock {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Copied/adapted from Digigma achv-toast.css at 32f15dd. */
/* Achievement popup styles shared with the game presentation. Scoped to the toast stack. */
#achvToastStack.achv-toast-stack {
  position: fixed;
  z-index: 40;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(78vh, 520px);
  overflow: hidden;
  pointer-events: none;
}

#achvToastStack.achv-toast-stack .achv-toast,
#achvToastStack.achv-toast-stack .achv-card {
  pointer-events: none;
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: none;
  transform: translateY(10px) scale(0.98);
}

#achvToastStack .achv-toast,
#achvToastStack .achv-card {
  position: fixed;
  z-index: 40;
  left: auto;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(360px, calc(100vw - 24px));
  min-width: 0;
  max-width: min(380px, calc(100vw - 24px));
  padding: 16px 40px 16px 16px;
  background: color-mix(in srgb, var(--petrol, #0e3c44) 92%, #1a1022);
  border: 1px solid color-mix(in srgb, var(--gold, #d6ae58) 45%, var(--petrol, #0e3c44));
  border-radius: 16px;
  box-shadow: 0 14px 36px color-mix(in srgb, #2B2419 28%, transparent);
  color: #F7F0E2;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

#achvToastStack .achv-card.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#achvToastStack .achv-card.is-out {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

#achvToastStack .achv-card.is-reduced,
#achvToastStack .achv-card.is-reduced.is-in,
#achvToastStack.achv-toast-stack.is-reduced .achv-card {
  transition: none;
  transform: none;
  opacity: 1;
}

#achvToastStack .achv-card .achv-seal {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold, #d6ae58) 16%, var(--paper-bright, #FFF9E8));
  font-weight: 750;
}

#achvToastStack .achv-card .achv-seal-svg {
  width: 26px;
  height: 26px;
}


#achvToastStack .achv-toast[hidden],
#achvToastStack .achv-toast.is-hidden {
  display: none !important;
}

#achvToastStack.achv-toast-stack .achv-toast,
#achvToastStack.achv-toast-stack .achv-card,
#achvToastStack.achv-toast-stack .achv-toast {
  background: color-mix(in srgb, var(--petrol, #0e3c44) 92%, #1a1022);
  border: 1px solid color-mix(in srgb, var(--gold, #d6ae58) 45%, var(--petrol, #0e3c44));
  color: #F7F0E2;
}

#achvToastStack.achv-toast-stack .achv-card-copy,
#achvToastStack.achv-toast-stack .achv-card-copy *,
#achvToastStack.achv-toast-stack .achv-toast strong,
#achvToastStack.achv-toast-stack .achv-toast p,
#achvToastStack.achv-toast-stack .achv-toast span,
#achvToastStack.achv-toast-stack .achv-toast a,
#achvToastStack.achv-toast-stack .achv-toast-kicker,
#achvToastStack.achv-toast-stack .achv-toast-desc,
#achvToastStack.achv-toast-stack .achv-toast-xp,
#achvToastStack.achv-toast-stack .achv-toast-dig,
#achvToastStack.achv-toast-stack .achv-toast-dismiss {
  color: #F7F0E2;
}

#achvToastStack .achv-toast-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F4D675 !important;
}

#achvToastStack .achv-toast strong {
  display: block;
  color: #FFFDF8 !important;
}

#achvToastStack .achv-toast-xp {
  margin: 6px 0 0;
  color: #F4D675 !important;
}

#achvToastStack .achv-toast-desc {
  margin: 4px 0 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #F3E6D4 !important;
}

#achvToastStack .achv-toast-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

#achvToastStack .achv-card-copy { text-align: left; min-width: 0; }

#achvToastStack .achv-toast-dismiss { min-width:44px; min-height:44px; top:0; right:0; }

/* The card never intercepts play/result controls. Only its 44px close target does. */
#achvToastStack .achv-toast-dismiss { pointer-events: auto; }
#achvToastStack.achv-toast-stack .achv-seal { color: var(--petrol, #0e3c44) !important; font-size: 28px; }
#achvToastStack .achv-toast { margin: 0; }

.lb-board {
  width: 100%;
  margin: 16px 0 0;
  min-width: 0;
}
.lb-board-card {
  overflow: hidden;
  background: color-mix(in srgb, var(--card) 88%, var(--petrol) 12%);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.lb-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}
.lb-board-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}
.lb-more {
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.lb-board .lb-empty {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
}
.lb-board .times-table-wrap { width: 100%; overflow: hidden; }
.lb-board .times-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: transparent;
}
.lb-board .times-table th,
.lb-board .times-table td {
  padding: 10px 8px;
  border: 0;
  vertical-align: middle;
  text-align: left;
}
.lb-board .times-table thead th {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  background: color-mix(in srgb, var(--ivory) 70%, transparent);
  border-bottom: 1px solid var(--line);
}
.lb-board .times-table th:first-child,
.lb-board .times-table td:first-child { width: 2.6rem; padding-left: 14px; }
.lb-board .times-table th:last-child,
.lb-board .times-table td:last-child {
  width: 38%;
  text-align: right;
  padding-right: 14px;
}
.lb-board .times-table tbody tr { border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.lb-board .times-table tbody tr:last-child { border-bottom: 0; }
.lb-board .times-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--ivory) 45%, transparent); }
.lb-board .times-table tr[data-medal="gold"] { background: color-mix(in srgb, var(--brass) 18%, var(--card)); }
.lb-board .times-table tr[data-medal="silver"] { background: color-mix(in srgb, var(--muted) 10%, var(--card)); }
.lb-board .times-table tr[data-medal="bronze"] { background: color-mix(in srgb, var(--coral) 10%, var(--card)); }
.lb-board .lb-rank { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-board tr[data-medal="gold"] .lb-rank { color: var(--brass-deep); }
.lb-board tr[data-medal="silver"] .lb-rank { color: var(--navy); }
.lb-board tr[data-medal="bronze"] .lb-rank { color: var(--coral-text); }
.lb-board .lb-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lb-board .lb-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
}
.lb-board .lb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-board .lb-pseudo {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-weight: 700;
}
.lb-board .lb-you {
  flex: 0 0 auto;
  font-style: normal;
  color: var(--brass-deep);
  font-size: 0.75rem;
  font-weight: 700;
}
.lb-board .lb-score {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.lb-board .lb-meta {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}
.lb-board .times-table tr.is-you td {
  background: color-mix(in srgb, var(--petrol) 10%, var(--card));
  box-shadow: inset 3px 0 0 var(--petrol);
}
.result-premium { display: grid; gap: 10px; margin: 14px 0; min-width: 0; }
.result-premium form { margin: 0; }
.all-words {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  min-width: 0;
}
.all-words summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
}
.all-words-panel {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
  min-width: 0;
}
.answer-grid-stage {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}
.answer-grid {
  display: grid;
  gap: 6px;
  width: min(100%, 240px);
  position: relative;
}
.answer-grid span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--ivory);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-weight: 700;
  color: var(--navy);
  box-sizing: border-box;
}
.answer-grid span.is-path {
  background: color-mix(in srgb, var(--petrol) 18%, var(--ivory));
  border-color: color-mix(in srgb, var(--petrol) 55%, var(--line));
}
.answer-grid span.is-path-end {
  background: linear-gradient(180deg, #f07248, var(--coral-deep));
  border-color: var(--coral-deep);
  color: white;
}
.answer-grid-trace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.answer-grid-trace polyline {
  fill: none;
  stroke: var(--coral-deep);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.all-words-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.all-words-list li { min-width: 0; }
.all-words-list li.is-found .chip {
  background: color-mix(in srgb, var(--success) 14%, var(--card));
  border-color: color-mix(in srgb, var(--success) 45%, var(--line));
}
.premium-gate {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
@media (max-width: 420px) {
  .lb-board .times-table th,
  .lb-board .times-table td { padding-inline: 6px; }
  .lb-board-head { padding-inline: 12px; }
  .lb-more { white-space: normal; }
}

.identity-mark svg,
.avatar-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 2026-10-06 homepage/header polish */
.header-cluster {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  max-width: min(100%, calc(100vw - 148px));
  min-height: 44px;
  padding: 2px 8px 2px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
}

.header-cluster.is-guest {
  padding-inline: 4px;
}

.header-cluster .nav-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
  flex: 0 0 16px;
}

.nav-toggle-bars span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.nav-toggle-label {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
}

.header-cluster .header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.72rem;
  overflow: hidden;
}

.header-cluster .header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.header-cluster .epo-badge {
  margin: 0;
  min-height: 0;
  padding: 0 2px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  gap: 4px;
}

.header-cluster .epo-n {
  max-width: 4.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-head.home-intro.site-block {
  padding: clamp(16px, 4vw, 24px);
  max-width: none;
  margin: 0 0 8px;
}

.home-kicker {
  margin: 0 0 6px;
  color: var(--petrol);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-greet {
  margin: 0 0 4px;
  color: var(--navy);
  font-family: var(--sans);
  font-size: clamp(1.45rem, 4vw, 2.05rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-head.home-intro h1,
.home-intro .home-h1 {
  max-width: none;
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.home-games-line {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}
.home-intro .home-h1.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  max-width: 1px;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.home-status-panel {
  margin: 16px 0 18px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--teal) 32%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 86%, var(--ivory));
  box-shadow: none;
}

.home-status-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: var(--section-head-gap);
}

.home-status-head h2,
.home-daily-head h2,
.home-current-copy h3,
.home-grid-copy strong,
.home-catalogue h2,
.home-recent h2,
.home-status-card h3,
.home-catalogue .game-chip strong {
  font-family: var(--sans);
  letter-spacing: -0.02em;
}

.home-status-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.home-status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 0;
}

.home-status-card {
  padding: 8px 10px;
  border: 0;
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  background: var(--card);
  box-shadow: none;
}

.home-status-card--member { border-left-color: var(--petrol); }
.home-status-card--premium { border-left-color: var(--brass-deep); }

.home-status-card h3 {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 700;
}

.home-status-card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.4;
}

.home-status-card .epo-badge {
  margin-right: 0.15em;
  vertical-align: -0.35em;
}

.home-status-actions {
  margin-top: 10px;
}

.home-status-actions .home-status-cta {
  width: auto;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
}

.home-current-card {
  grid-template-columns: 64px minmax(0, 1fr) auto;
}

.home-current-icon,
.home-current-icon .game-icon-slot {
  width: 64px;
  height: 64px;
}

.home-current-icon .game-logo {
  width: 56px;
  height: 56px;
}

.home-current-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
}
.home-current-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.home-current-actions .btn-play-wide {
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
}

.game-icon-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
}

.home-grid .game-icon-slot .game-logo,
.home-current-icon .game-icon-slot .game-logo {
  width: 48px;
  height: 48px;
}

.home-current-icon .game-icon-slot .game-logo {
  width: 56px;
  height: 56px;
}

.game-icon-overlay {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(16, 28, 40, 0.14);
}

.game-icon-overlay .puzzle-status-svg {
  width: 16px;
  height: 16px;
}

.game-icon-slot.is-played .game-icon-overlay { color: #2F6B45; }
.game-icon-slot.is-played_assisted .game-icon-overlay { color: #A85000; }
.game-icon-slot.is-started .game-icon-overlay { color: #C88708; }
.game-icon-slot.is-unplayed .game-icon-overlay { color: var(--muted); }

.home-grid-name,
.home-current-title {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
}

.home-grid-name strong {
  display: block;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
}

.home-grid-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.home-grid-meta .difficulty-badge,
.home-grid-meta .puzzle-status,
.home-current-copy .puzzle-status {
  margin-top: 0;
}

.home-grid-meta .epo-badge,
.home-grid-copy .epo-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  flex: 0 0 auto;
  margin: 0;
}

.home-grid-copy .epo-n,
.home-grid-meta .epo-n {
  display: inline;
  width: auto;
}

.home-current-card .puzzle-status.is-unplayed .puzzle-status-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-grid .btn-play-wide {
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: 8px 14px;
  font-size: 0.95rem;
}

.home-catalogue .game-chip-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  min-height: 64px;
  padding: 8px 10px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.home-catalogue .game-chip-wrap.is-playable {
  background: linear-gradient(165deg, #17616a 0%, var(--petrol) 42%, var(--petrol-deep) 100%);
  border-color: var(--petrol-deep);
  color: var(--ivory);
}

.home-catalogue .game-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
}

.home-catalogue .game-chip.is-playable {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
}

.home-catalogue .game-chip .game-logo {
  width: 40px;
  height: 40px;
  flex: none;
}

.home-catalogue .game-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-catalogue .game-chip-wrap .rules-pop {
  position: relative;
  flex: 0 0 auto;
}

.home-catalogue .rules-pop-inline .rules-help,
.home-grid .rules-pop-inline .rules-help,
.home-current-title-line .rules-pop-inline .rules-help {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 1.15rem;
}

.rules-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0 0 4px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ivory);
  color: var(--petrol-deep);
  font: 700 0.82rem/1 var(--sans);
  cursor: pointer;
}

@media (min-width: 800px) {
  .home-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .home-grid form {
    grid-column: 1 / -1;
    width: auto;
    justify-self: start;
  }
  .home-grid .btn-play-wide,
  .home-current-actions .btn-play-wide {
    width: auto;
    min-width: 0;
  }
  .home-current-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .home-current-icon,
  .home-current-icon .game-icon-slot {
    width: 56px;
    height: 56px;
  }
  .home-current-icon .game-logo,
  .home-current-icon .game-icon-slot .game-logo {
    width: 48px;
    height: 48px;
  }
  .home-current-actions {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .header-cluster.is-member .nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .header-cluster.is-member .nav-toggle {
    min-width: 44px;
    padding-inline: 8px;
  }
  .home-catalogue .game-chip .game-logo {
    width: 34px;
    height: 34px;
  }
  .home-catalogue .game-chip-wrap {
    min-height: 56px;
    padding: 6px 8px;
  }
}

/* Home polish: compact cards and a modal navigation panel. */
body.nav-open { overflow: hidden; }
.top:has(.nav.is-open) { z-index: 100; backdrop-filter: none; }
.nav-backdrop { position: fixed; inset: 0; z-index: 50; background: #102c3655; touch-action: none; }
.nav-backdrop[hidden] { display: none; }
body.nav-open .header-cluster .nav-toggle { position: relative; z-index: 61; }
.top .nav { padding: 14px; overscroll-behavior: contain; }
.top .nav > a { font-size: 1rem; padding: 12px; }
.top .nav > a[aria-current="page"] { background: #e5eeeb; color: var(--petrol); font-weight: 700; }
.nav-account-card { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--ivory); }
.nav-account-card > a { display: flex; flex: 1; gap: 10px; min-width: 0; padding: 0; }
.nav-account-card small { display: block; overflow-wrap: anywhere; color: var(--muted); }
.nav-account-card .identity-mark { width: 42px; height: 42px; flex: none; }
.nav-logout { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--petrol); cursor: pointer; }
.home-grids { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.home-grid { grid-template-columns: 62px minmax(0, 1fr); gap: 8px 10px; align-items: center; padding: 12px; }
.home-grid .game-icon-slot { width: 62px; height: 62px; }
.home-grid .game-icon-slot .game-logo { width: 58px; height: 58px; }
.home-grid form { grid-column: 2; width: auto; justify-self: start; }
.home-grid .btn-play-wide { width: auto; min-width: 0; min-height: 44px; padding: 7px 16px; }
.home-grid-name { margin: 0; gap: 7px; }
.home-grid-number { margin: 3px 0 6px; font-size: .8rem; color: var(--muted); }
.game-icon-overlay { width: 25px; height: 25px; }
.game-icon-overlay .puzzle-status-svg { width: 23px; height: 23px; }
.home-current-card { grid-template-columns: 72px minmax(0, 1fr) auto; column-gap: 8px; }
.home-current-icon, .home-current-icon .game-icon-slot { width: 72px; height: 72px; }
.home-current-icon .game-icon-slot .game-logo { width: 64px; height: 64px; }
.home-current-actions .btn-play-wide { min-height: 46px; padding: 10px 18px; }
.rules-card, .rules-card ol, .rules-card li { font-weight: 400; }
.rules-card > p { font-weight: 700; }
.home-catalogue .game-chip-wrap { gap: 8px; align-items: center; }
.home-catalogue .game-chip-wrap .rules-pop { align-self: center; margin: 0; inset: auto; width: 1.7rem; height: 1.7rem; min-width: 1.7rem; min-height: 1.7rem; border: 0; background: transparent; display: grid; place-items: center; }
.public-successes ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.public-successes li { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.public-successes li p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 480px) {
  .home-current-card { grid-template-columns: 64px minmax(0, 1fr); }
  .home-current-actions { grid-column: 2; justify-self: start; }
}

.nav-account-card .identity-mark, [data-profile-state="public"] > .identity-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #e5eeeb; color: var(--petrol); font-weight: 700; }
.nav-account-card .identity-mark svg, [data-profile-state="public"] > .identity-mark svg { width: 100%; height: 100%; }

/* Header cluster is one control. Homepage sections stack full width. */
.top button.header-cluster.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  color: var(--petrol-deep);
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}
.top button.header-cluster.nav-toggle:hover,
.top button.header-cluster.nav-toggle:focus-visible {
  border-color: var(--brass);
  cursor: pointer;
}
.top button.header-cluster.nav-toggle[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--teal) 45%, var(--line-strong));
  background: color-mix(in srgb, var(--card) 88%, var(--ivory));
}
.header-cluster .nav-toggle-bars,
.header-cluster .nav-toggle-label,
.header-cluster .header-avatar,
.header-cluster .epo-badge,
.header-cluster .epo-coin,
.header-cluster .epo-n {
  cursor: inherit;
}
body.nav-open .top button.header-cluster.nav-toggle {
  position: relative;
  z-index: 61;
}
.header-cluster .header-avatar,
.identity-mark,
.account-avatar-choice .identity-mark {
  overflow: hidden;
  border-radius: 50%;
}
.header-cluster .header-avatar {
  box-shadow: none;
}
.header-cluster .header-avatar img,
.identity-mark img,
.avatar-svg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.account-profile-main .identity-mark {
  width: 72px;
  height: 72px;
  flex: none;
}
.account-avatar-choice .identity-mark {
  width: 48px;
  height: 48px;
}
.page-head.home-intro,
.home-games-line,
.home-status-card p {
  max-width: none;
}
.home-status-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--section-rhythm);
  width: 100%;
}
.home-recent,
.activity-panel {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.btn.btn-replay,
.btn.btn-replay:hover,
.btn.btn-replay:focus-visible {
  background: #e7f6ec;
  color: #0f5132;
  border-color: #7dbe9a;
  box-shadow: none;
}
.btn.btn-resume,
.btn.btn-resume:hover,
.btn.btn-resume:focus-visible {
  background: #f4efe4;
  color: #3d3426;
  border-color: #cbbfa6;
  box-shadow: none;
}
.home-grid[data-viewer-status="played"] {
  background: color-mix(in srgb, #e7f6ec 46%, var(--card));
  border-color: #b7dfc8;
}
.home-grid[data-viewer-status="played_assisted"] {
  background: color-mix(in srgb, #fff1e0 55%, var(--card));
  border-color: #f0d2b0;
}
.game-icon-overlay.is-complete,
.game-icon-overlay.is-assisted,
.game-icon-overlay.is-lock {
  width: 30px;
  height: 30px;
}
.game-icon-overlay.is-complete .puzzle-status-svg,
.game-icon-overlay.is-assisted .puzzle-status-svg,
.game-icon-overlay.is-lock .puzzle-status-svg {
  width: 22px;
  height: 22px;
}
.game-icon-overlay.is-complete { color: #1f7a3a; background: #e7f6ec; }
.game-icon-overlay.is-assisted { color: #9a4b00; background: #fff1e0; }
.game-icon-overlay.is-lock { color: #5c4520; background: #fff6df; }
.profile-contact.is-locked { cursor: not-allowed; }
@media (min-width: 721px) {
  .home-current-card { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .home-current-icon,
  .home-current-icon .game-icon-slot { width: 80px; height: 80px; }
  .home-current-icon .game-logo,
  .home-current-icon .game-icon-slot .game-logo { width: 72px; height: 72px; }
  .home-current-actions .btn-play-wide { min-height: 48px; padding: 10px 20px; }
}
@media (max-width: 640px) {
  .top button.header-cluster.nav-toggle { min-width: 44px; padding: 6px 8px; }
}

/* Latest cards: one title line, locked EPO stacked under the icon. */
.home-grid {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0 8px;
  padding: 8px;
}
.home-grid-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 62px;
  min-width: 62px;
}
.home-grid-mark:has(.epo-badge) {
  justify-content: space-between;
}
.home-grid-mark .game-icon-slot {
  width: 62px;
  height: 62px;
}
.home-grid-mark .epo-badge {
  margin: 0;
}
.home-grid-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.home-grid-name {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
.home-grid-title {
  display: flex;
  align-items: baseline;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--navy);
}
.home-grid-game {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-grid-edition {
  flex: none;
  white-space: pre;
}
.home-grid-name .rules-pop {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
}
.home-grid-meta {
  margin-top: 0;
}
.home-grid-copy {
  container-type: inline-size;
}
.home-grid-copy form {
  grid-column: auto;
  width: auto;
  max-width: calc(100% - 12px);
  margin-top: auto;
  margin-right: 12px;
  margin-bottom: 0;
  margin-left: 0;
  min-width: 0;
  align-self: flex-end;
  justify-self: start;
}
.home-grid .btn-play-wide,
.home-grid .home-grid-cta {
  width: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 8px 16px;
  font-size: 1rem;
  box-sizing: border-box;
}
@container (min-width: 200px) {
  .home-grid .btn-play-wide,
  .home-grid .home-grid-cta {
    min-width: 7.6rem;
    padding: 10px 18px;
    font-size: 1.05rem;
  }
}

/* One rhythm: Jeux heading-to-strip is --section-head-gap; sections stack on --section-rhythm. */
#home-games + .game-about {
  margin-top: var(--section-rhythm);
}
.home-daily.section-rhythm,
.home-catalogue.section-rhythm,
.home-layout.section-rhythm {
  margin-top: var(--section-rhythm);
  margin-bottom: 0;
}
.home-layout.section-rhythm {
  gap: var(--section-rhythm);
}
.home-layout.section-rhythm > .home-recent,
.home-layout.section-rhythm > .home-multiplayer,
.home-layout.section-rhythm > .activity-panel {
  margin-top: 0;
}

.home-free-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 16px;
}

.home-free-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.home-free-list {
  list-style: none;
  margin: var(--section-head-gap) 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
}

.home-free-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto auto auto;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.home-free-row:first-child {
  border-top: 0;
}

.home-free-game {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.home-free-name {
  font-weight: 650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-free-number a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.home-free-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.home-free-unavailable {
  margin: 0;
  max-width: 12rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: right;
}

.home-game-tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: var(--section-head-gap);
}

.home-game-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 96%, var(--ivory));
  box-shadow: 0 1px 0 rgba(24, 36, 48, 0.04);
}

.home-game-tile[data-game-tint] {
  border-left: 3px solid color-mix(in srgb, var(--navy) 18%, var(--line));
}

.home-game-tile-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.home-game-tile-title h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
}

.home-game-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-game-tile-actions .btn {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

.home-salon-list {
  list-style: none;
  margin: var(--section-head-gap) 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.home-salon-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto auto auto auto;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.home-salon-list > .home-salon-row:first-child,
.salon-list > .home-salon-row:first-child {
  border-top: 0;
}

.home-salon-open {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.home-salon-game-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
}

.home-salon-game-icon:empty { display: none; }

.home-salon-game-icon .game-logo {
  width: 26px;
  height: 26px;
}

.home-salon-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-salon-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.home-salon-icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.home-salon-join.btn {
  min-height: 44px;
  padding: 6px 12px;
  white-space: nowrap;
  justify-self: end;
}

.home-multiplayer-actions {
  margin: 12px 0 0;
}

@media (max-width: 720px) {
  .home-free-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "game action"
      "number action"
      "diff status";
  }
  .home-free-game { grid-area: game; }
  .home-free-number { grid-area: number; }
  .home-free-diff { grid-area: diff; }
  .home-free-status { grid-area: status; }
  .home-free-action { grid-area: action; }
}
.section-rhythm > .band-head + .game-strip,
.section-rhythm > .band-head + .home-grids,
.section-rhythm > .band-head + .empty-block,
.section-rhythm > .band-head + .feed,
.section-rhythm > .home-daily-head + .home-current-card {
  margin-top: var(--section-head-gap);
}
.home-daily.section-rhythm > .home-daily-head,
.home-status-panel .home-status-head {
  margin-bottom: var(--section-head-gap);
}

.feed-sentence .feed-grid {
  color: inherit;
  font-weight: 650;
}

.header-cluster .header-avatar.is-collapsed {
  display: none;
  width: 0;
  height: 0;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

.game-grid-browser .game-grid-list {
  display: grid;
  gap: 8px;
  max-width: 42rem;
  margin-top: var(--section-head-gap);
  border: 0;
  min-width: 0;
}
.game-grid-list .game-grid-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: stretch;
  justify-content: stretch;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}
.game-grid-card-title {
  display: flex;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--navy);
  white-space: nowrap;
}
.game-grid-card-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-grid-card-no {
  flex: none;
  white-space: pre;
}
.game-grid-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.game-grid-card .game-icon-slot {
  width: 40px;
  height: 40px;
  flex: none;
}
.game-grid-card .game-icon-slot .game-logo {
  width: 36px;
  height: 36px;
}
.game-grid-card .game-icon-overlay {
  width: 18px;
  height: 18px;
}
.game-grid-card .game-icon-overlay .puzzle-status-svg {
  width: 14px;
  height: 14px;
}
.game-grid-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.game-grid-card .difficulty-badge,
.game-grid-card .epo-badge {
  margin: 0;
  width: max-content;
  max-width: 100%;
  flex: 0 0 auto;
}
.game-grid-list .game-grid-card form {
  grid-column: auto;
  width: auto;
  max-width: 46%;
  margin: 0 4px 0 auto;
  flex: 0 1 auto;
  min-width: 0;
}
.game-grid-card .game-grid-cta,
.game-grid-list .game-grid-card .btn-play-wide {
  width: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 6px 12px;
  font-size: 0.95rem;
  white-space: nowrap;
  box-sizing: border-box;
}
@media (max-width: 420px) {
  .game-grid-card {
    padding: 7px 8px;
  }
  .game-grid-card .game-grid-cta,
  .game-grid-list .game-grid-card .btn-play-wide {
    padding: 6px 10px;
    font-size: 0.88rem;
  }
}

.game-grid-browser .game-grid-list,
.archive-panel .game-grid-list {
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.game-grid-card-title { white-space: normal; }
@media (min-width: 900px) {
  .game-grid-card-title,
  .home-grid-title,
  .howto-line { white-space: nowrap; }
}
@media (max-width: 899px) {
  .howto-line,
  .tutorial-card,
  .game-grid-card-title,
  .home-grid-title { white-space: normal; }
}
.grid-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.grid-filters label { display: grid; gap: 4px; font-size: 0.82rem; }
.grid-search { flex: 1 1 180px; }
.game-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.game-nav-item { display: inline-flex; align-items: center; gap: 4px; }
.result-score-line {
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0;
}
.result-found { margin: 2px 0 10px; }
.btn-premium,
.btn-premium:hover,
.btn-premium:focus-visible {
  background: #f4e2b0;
  color: #1c1408;
  border: 1px solid #b0893e;
  font-weight: 700;
}
.btn-danger,
.btn-danger:hover,
.btn-danger:focus-visible {
  background: #9d1c1c;
  color: #fff;
  border-color: #7a1212;
}
.account-danger {
  border-color: #e7b4b4;
  background: #fff6f6;
}
.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plans ul,
.plans p { color: var(--ink, #1b2428); }
.plans .is-premium,
.plans .is-premium p,
.plans .is-premium li { color: #f7f1e4; }
.plans .is-premium h2 { color: #f4e2b0; }
.plans .is-premium a { color: #f4e2b0; }
.comments-card,
.comment-list { margin-top: 12px; }
.comment-list,
.friend-list,
.message-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.comment-form,
.social-card form { display: grid; gap: 12px; }
.comments-card .comment-form { margin-top: 4px; }
.comment-form-field { display: grid; gap: 6px; min-width: 0; }
.comment-form-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}
.comment-form-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  color: var(--ink);
  font: 500 1rem/1.45 var(--sans);
  resize: vertical;
}
.comment-form-input::placeholder { color: var(--muted); opacity: 0.85; }
.comment-form-input:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  border-color: var(--coral-deep);
  background: var(--card);
}
.comment-form-input:user-invalid {
  border-color: var(--error);
  background: #fff8f6;
}
.comment-form-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.comment-form-actions { display: flex; justify-content: flex-start; }
.comment-form-submit {
  min-width: 8.5rem;
  min-height: var(--control-touch-size);
  padding-inline: 18px;
}
.social-live { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tutorial-list { display: grid; gap: 8px; }
.tutorial-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.tutorial-card .game-logo { width: 42px; height: 42px; flex: none; }
.tutorial-card div { min-width: 0; flex: 1; }
.tutorial-title,
.tutorial-open { color: inherit; text-decoration: none; }
.tutorial-cta { margin: 16px 0; }
.rules-page-panel { max-width: 760px; }
.rules-page-header { display: grid; gap: 8px; margin-bottom: 20px; }
.rules-page-header h1 { margin: 0; }
.rules-page-icon { display: block; width: 48px; height: 48px; }
.rules-page-icon .game-logo { width: 100%; height: 100%; }
.rules-page-header .lede { margin: 0; }
.medal-icon { width: 18px; height: 18px; display: block; }
.success-track li { align-items: center; }
.public-successes ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.public-successes li { display: flex; align-items: center; gap: 8px; }
.success-kind {
  float: right;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0e3c44;
}
.success-kind.is-word { background: #1f7a4d; }
.success-kind.is-score { background: #b0893e; }
.success-kind.is-rounds { background: #2f5f9e; }
.success-kind.is-daily { background: #6b4c9a; }
.success-kind.is-guess { background: #9d4a2a; }
.profile-contact { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.recent a strong { font-size: 1.05rem; }
@media (max-width: 800px) {
  .social-live,
  .plans { grid-template-columns: 1fr; }
}

/* Shared published-puzzle cards. Featured current-free card intentionally keeps
   its compact title-aligned layout. All lists use the same spacing and sizing. */
.home-grids,
.game-grid-browser .game-grid-list,
.archive-panel .game-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--puzzle-card-gap);
}
.puzzle-card,
.game-grid-list .puzzle-card {
  display: flex;
  flex-direction: column;
  overflow: visible;
  gap: var(--puzzle-card-gap);
  min-width: 0;
  padding: var(--puzzle-card-padding);
  border: 1px solid var(--line);
  border-radius: var(--puzzle-card-radius);
  background: var(--card);
  color: var(--navy);
  box-shadow: var(--shadow);
}
.puzzle-card .puzzle-card-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.puzzle-card .game-icon-slot { flex: none; width: var(--puzzle-card-icon); height: var(--puzzle-card-icon); }
.puzzle-card .game-icon-slot .game-logo { width: 30px; height: 30px; }
.puzzle-card-title { flex: 1; min-width: 0; margin: 0; font: 700 1rem/1.3 var(--sans); overflow-wrap: anywhere; }
.puzzle-card-number { display: block; font-size: .85em; font-weight: 550; color: var(--muted); }
.puzzle-card .rules-pop { flex: none; margin: 0; }
.puzzle-card .puzzle-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.puzzle-card-current { width: 100%; font-size: .75rem; color: var(--petrol); font-weight: 650; }
.puzzle-card .puzzle-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.puzzle-card-actions form,
.game-grid-list .puzzle-card .puzzle-card-actions form { flex: 1; margin: 0; max-width: none; min-width: 0; }
.puzzle-card .puzzle-card-cta,
.game-grid-list .puzzle-card .puzzle-card-cta { width: 100%; min-height: 44px; padding: 8px 12px; font-size: .95rem; }
.puzzle-card[hidden] { display: none; }
@media (min-width: 350px) and (max-width: 599px) {
  .home-grids,
  .game-grid-browser .game-grid-list,
  .archive-panel .game-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .puzzle-card, .game-grid-list .puzzle-card { --puzzle-card-padding: 9px; --puzzle-card-icon: 28px; }
  .puzzle-card .puzzle-card-heading { flex-wrap: nowrap; gap: 6px; }
  .puzzle-card .game-icon-slot .game-logo { width: 26px; height: 26px; }
  .puzzle-card-title { flex-basis: auto; font-size: .9rem; }
  .puzzle-card .rules-pop { margin-left: 0; }
  .puzzle-card .puzzle-status { font-size: .75rem; }
}

.puzzle-card .game-icon-overlay { width: 16px; height: 16px; }
.puzzle-card .game-icon-overlay .puzzle-status-svg { width: 14px; height: 14px; }
.puzzle-card[data-viewer-status="played"] { background: var(--grid-surface-played, #faf6ee); border-color: var(--grid-border-played, #e8dcc8); }
.puzzle-card[data-viewer-status="played_assisted"] { background: var(--grid-surface-assisted, #fff8ed); border-color: var(--grid-border-assisted, #efd8af); }
/* Homepage current game: compact icon aligned to the title. */
.home-current-card {
  grid-template-columns: minmax(0, 1fr) auto;
}
.home-current-title .home-current-icon,
.home-current-title .home-current-icon .game-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.home-current-actions { grid-column: 2; }
@media (max-width: 720px) {
  .home-current-card { grid-template-columns: minmax(0, 1fr); }
  .home-current-title .home-current-icon,
  .home-current-title .home-current-icon .game-logo {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
  .home-current-actions { grid-column: 1; justify-self: start; }
}

.home-catalogue .game-chip strong {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}
.home-catalogue .game-chip .game-logo { width: 28px; height: 28px; }
.home-catalogue .game-chip strong { overflow-wrap: normal; word-break: normal; }
.home-grid-title { flex-wrap: wrap; }
.home-grid-game { overflow: visible; white-space: normal; }
/* Shared puzzle presentation follows the homepage recent-grid design. */
.home-catalogue .game-chip-wrap.is-playable,
:is(.home-recent, .archive-panel) .puzzle-card {
  background: var(--card);
  border-color: var(--line);
  color: var(--navy);
}
.home-catalogue .game-chip.is-playable strong,
.home-catalogue .game-chip.is-playable .game-logo { color: var(--navy); }
.home-catalogue .game-chip-wrap { gap: 8px; padding: 8px; }
.home-catalogue .game-chip { flex: 0 1 auto; gap: 6px; }
.home-catalogue .game-chip strong { font-size: .9rem; line-height: 1.25; }
.home-current-actions .btn { font-size: 1.05rem; min-height: 46px; padding: 10px 24px; }
:is(.home-recent, .archive-panel) .puzzle-card .puzzle-card-heading { flex-wrap: nowrap; gap: 5px; align-items: flex-start; }
:is(.home-recent, .archive-panel) .puzzle-card-title { flex: 1; overflow-wrap: normal; }
:is(.home-recent, .archive-panel) .puzzle-card .rules-pop { margin: 2px 0 0; }
@media (max-width: 720px) {
  .home-current-actions { justify-self: center; justify-content: center; }
}
@media (max-width: 640px) {
  .home-catalogue .game-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-catalogue .game-chip-wrap { min-height: 64px; }
  .home-catalogue .game-chip { min-height: 44px; }
  .home-catalogue .game-chip .game-logo { width: 24px; height: 24px; }
  .home-catalogue .game-chip strong { font-size: .85rem; }
  .home-grids, .archive-panel .game-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.home-recent, .archive-panel) .puzzle-card { --puzzle-card-padding: 9px; --puzzle-card-icon: 40px; gap: 8px; }
  :is(.home-recent, .archive-panel) .puzzle-card .game-icon-slot .game-logo { width: 36px; height: 36px; }
  :is(.home-recent, .archive-panel) .puzzle-card-title { font-size: .85rem; line-height: 1.3; }
  :is(.home-recent, .archive-panel) .puzzle-card .puzzle-status { font-size: .75rem; }
  :is(.home-recent, .archive-panel) .puzzle-card .puzzle-card-cta { padding-inline: 4px; gap: 2px; font-size: .8rem; }
}
@media (max-width: 349px) {
  .home-catalogue .game-chip-wrap { padding-inline: 6px; }
  .home-catalogue .game-chip { gap: 4px; }
  .home-catalogue .game-chip .game-logo { width: 20px; height: 20px; }
  :is(.home-recent, .archive-panel) .puzzle-card-title { overflow-wrap: anywhere; }
}

/* Enclose each homepage collection, including its heading and link. */
.home-catalogue,
.home-recent {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--teal) 32%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 86%, var(--ivory));
}
@media (max-width: 640px) {
  .home-catalogue,
  .home-recent { padding: 10px; }
  .home-catalogue .game-strip { gap: 8px; }
  .home-catalogue .game-chip-wrap { gap: 8px; padding-inline: 6px; }
  .home-catalogue .game-chip { gap: 4px; }
  .home-catalogue .game-chip .game-logo { width: 20px; height: 20px; }
}
@media (max-width: 349px) {
  .home-catalogue .game-chip-wrap { gap: 3px; padding-inline: 4px; }
  .home-catalogue .game-chip { gap: 3px; }
  .home-catalogue .game-chip .game-logo { width: 16px; height: 16px; }
}

/* Listing filters stay in a single row, including narrow mobile screens. */
.grid-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 6px;
}
.grid-filters select { width: 100%; min-width: 0; min-height: 44px; padding: 6px 2px; font-size: .8rem; }
.archive-panel { min-width: 0; }

/* Match the recent-grid container's mobile space and reset inherited panel headings. */
.puzzle-card .puzzle-card-title { margin: 0; }
@media (max-width: 640px) {
  .archive-panel { padding: 10px; }
}

/* Digigma motion rules are external for Eposigma strict CSP. */

    #achvToastStack.achv-toast-stack { gap: 10px; }
    #achvToastStack.achv-toast-stack .achv-toast {
      transform: translateY(32px) scale(0.975);
      transition: opacity 460ms ease, transform 460ms cubic-bezier(.2,.75,.25,1);
    }
    #achvToastStack.achv-toast-stack .achv-toast:not(:first-child) { margin-bottom: 0; }
    #achvToastStack.achv-toast-stack .achv-toast.is-in {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    #achvToastStack.achv-toast-stack .achv-toast.is-out {
      opacity: 0;
      transform: translateY(18px) scale(0.985);
      transition-duration: 390ms;
    }
    #achvToastStack.is-reduced .achv-toast,
    #achvToastStack.is-reduced .achv-toast.is-in,
    #achvToastStack.is-reduced .achv-toast.is-out {
      transition: none;
      transform: none;
    }

/* Homepage game families: soft tints retain the established navy typography. */
.home-catalogue .game-chip-wrap[data-game-tint="trouve-mots"] { background: var(--game-trouve-surface); border-color: var(--game-trouve-border); }
.home-catalogue .game-chip-wrap[data-game-tint="mot-mystere"] { background: var(--game-mot-surface); border-color: var(--game-mot-border); }
.home-catalogue .game-chip-wrap[data-game-tint="mots-caches"] { background: var(--game-mots-caches-surface); border-color: var(--game-mots-caches-border); }
.home-catalogue .game-chip-wrap[data-game-tint="anagrammes"] { background: var(--game-anagrammes-surface); border-color: var(--game-anagrammes-border); }
.home-catalogue .game-chip-wrap[data-game-tint="chaine-mots"] { background: #f5e6df; border-color: #e5cbbf; }
.home-catalogue .game-chip-wrap[data-game-tint="pyramots"],
.home-catalogue .game-chip-wrap[data-game-tint="pyramido"] { background: var(--game-pyramido-surface); border-color: var(--game-pyramido-border); }
.home-catalogue .game-chip-wrap[data-game-tint="indices-en-cascade"] { background: var(--game-indices-cascade-surface); border-color: var(--game-indices-cascade-border); }

/* Unified Premium action, including Messages and purchase cards. */
.btn-premium { background: #6027ba; color: #fff; border: 2px solid #6027ba; font-weight: 700; }
.btn-premium:hover { background: #481b94; color: #fff; border-color: #ff7518; }
.btn-premium:focus-visible { background: #6027ba; color: #fff; outline: 3px solid #ff7518; outline-offset: 3px; }
.account-shop-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: 12px; padding: 0; list-style: none; }
.account-shop-list > li { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; background: #f4eaff; border: 1px solid #c4a5ec; border-radius: 14px; color:#261536; }
.account-shop-list > li:nth-child(even) { background: #fff0e1; border-color:#efb883; }
.account-shop-list [hidden], .account-shop [hidden] { display:none; }
.account-ledger { display: block; padding:0; }
.account-ledger > li { display:grid; grid-template-columns:minmax(90px,1fr) 2fr auto; gap:8px; padding:8px 0; min-height:0; margin:0; align-items:center; border-bottom:1px solid #ddd; }
.account-shop output { display:block; overflow-wrap:anywhere; margin:12px 0; }
.account-shop form input { width:100%; box-sizing:border-box; margin:8px 0; }
@media(max-width:480px) { .account-ledger > li { grid-template-columns:1fr auto; } .account-ledger > li > span:first-child { grid-column:1/-1; font-size:.8rem; } }
@media(min-width:900px) {
  #account-panel-progress:not([hidden]) { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
  #account-panel-progress > .account-section-block, #account-panel-progress > section:first-of-type { grid-column:1/-1; }
}
/* Viewport anchoring prevents a scrolled page from stranding the open menu. */
.top .nav { position:fixed; top:calc(var(--header-menu-bottom, 60px) + 8px); max-height:calc(100dvh - var(--header-menu-bottom, 60px) - 20px); }
html.nav-open { overflow:hidden; }
body.nav-open { overflow:clip; }

/* Mot mystère: the play surface is separate from the existing leaderboard. */
.mot.mm-panel {
  box-sizing: border-box;
  padding-block: clamp(12px, 3vw, 24px);
  border: 1px solid #e4ddcf;
  border-radius: 24px;
  background: #fffcf5;
  box-shadow: 0 8px 28px rgb(40 54 63 / 8%);
}
.mm-panel .mm-board { max-width: 340px; }
.mm-panel .mm-keyboard-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.mm-panel .mm-mute { min-height: 44px; min-width: 44px; }
.mm-keyboard { display: grid; gap: 6px; margin: 12px 0; }
.mm-keyboard[hidden], .mm-keyboard-options[hidden] { display: none; }
.mm-keyboard-row { display: flex; gap: 4px; }
.mm-key {
  position: relative; flex: 1; min-width: 0; min-height: 48px;
  padding: 6px 0 12px; border: 1px solid #c8cec9; border-radius: 7px;
  background: #fff; color: #233a40; font: inherit; font-weight: 700;
  font-size: clamp(.75rem, 2.8vw, 1rem); cursor: pointer; touch-action: manipulation;
}
.mm-key[data-key="Enter"] { flex: 2; }
.mm-key[data-key="Backspace"] { flex: 1.4; }
.mm-key-mark { position: absolute; bottom: 1px; left: 0; width: 100%; font-size: 10px; line-height: 10px; }
.mm-key[data-mark="exact"] { background: var(--success); color: var(--paper); border-color: var(--success); }
.mm-key[data-mark="present"] { background: var(--coral); color: var(--coral-ink); border-color: var(--coral-deep); }
.mm-key[data-mark="absent"] { background: #d9dfe1; color: #39464d; }
.mm-key:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.mm-key:disabled { cursor: default; opacity: .55; }
.mm-panel .mm-actions { margin-bottom: 0; }

.mm-panel .mm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.mm-panel .mm-actions .mm-clear,
.mm-panel .mm-actions .mm-validate {
  box-sizing: border-box;
  flex: 1 1 9rem;
  width: auto;
  max-width: 100%;
  min-width: min(100%, 9rem);
  min-height: 44px;
}
@media (max-width: 430px) {
  .mm-panel .mm-actions .mm-clear,
  .mm-panel .mm-actions .mm-validate {
    flex: 1 1 0;
    min-width: 0;
  }
}
.end-actions,
.mm-end-actions,
.ana-end-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.shared-end-actions .replay-control,
.shared-end-actions .solution-help,
.shared-end-actions .mm-replay,
.shared-end-actions .ana-replay {
  display: contents;
}
.shared-end-actions .btn,
.shared-end-actions .btn-primary,
.shared-end-actions .btn-secondary,
.shared-end-actions .btn-premium {
  flex: 0 0 auto;
  width: 100%;
  min-height: 44px;
  white-space: normal;
}
.end-actions .btn-premium,
.shared-end-actions .btn-premium {
  background: #6027ba;
  border: 2px solid #6027ba;
  color: #fff;
}
.end-actions .btn-premium:hover,
.end-actions .btn-premium:focus-visible,
.shared-end-actions .btn-premium:hover,
.shared-end-actions .btn-premium:focus-visible {
  background: #481b94;
  border-color: #481b94;
  color: #fff;
}
@media (min-width: 900px) {
  .end-actions.shared-end-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .shared-end-actions .btn {
    width: auto;
    flex: 1 1 9.5rem;
  }
}
.end-actions .solution-help,
.mm-end-actions .solution-help,
.ana-end-actions .solution-help {
  display: contents;
}
.end-actions .btn,
.mm-end-actions .btn,
.ana-end-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.end-actions .btn-premium,
.mm-end-actions .btn-premium {
  flex-wrap: wrap;
  gap: 4px 6px;
  padding-inline: 10px;
}
.end-actions .mm-premium-pill,
.mm-end-actions .mm-premium-pill {
  white-space: nowrap;
  margin-left: 0;
}
/* Shared end card: three actions, stacked on phones, one row from 900px. */
.mm-end-actions,
.ana-end-actions {
  flex-wrap: nowrap;
  gap: 8px;
}
.mm-end-actions .replay-control,
.mm-end-actions .mm-replay,
.ana-end-actions .replay-control,
.ana-end-actions .ana-replay {
  display: contents;
}
.mm-end-actions .btn-primary {
  color: var(--petrol-deep);
  font-weight: 800;
}
.mm-end-actions .btn-primary:hover,
.mm-end-actions .btn-primary:focus-visible {
  color: var(--petrol-deep);
}
.mm-end-actions .btn-secondary,
.mm-end-actions .mm-replay-btn {
  background: color-mix(in srgb, var(--teal-soft) 72%, #f3ead7 28%);
  color: var(--petrol-deep);
  border-color: color-mix(in srgb, var(--teal) 55%, var(--line-strong));
  box-shadow: none;
}
.mm-end-actions .btn-secondary:hover,
.mm-end-actions .mm-replay-btn:hover,
.mm-end-actions .btn-secondary:focus-visible,
.mm-end-actions .mm-replay-btn:focus-visible {
  background: color-mix(in srgb, var(--teal-soft) 55%, #efe4cf 45%);
  border-color: var(--teal);
  color: var(--petrol-deep);
}
.mm-end-actions .btn,
.ana-end-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  font-size: clamp(0.78rem, 2.8vw, 0.95rem);
  line-height: 1.15;
}
.mm-solution-slot {
  margin-top: 10px;
  width: 100%;
}
.mm-replay-note:not(.visually-hidden) {
  flex-basis: 100%;
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
@media (max-width: 360px) {
  .mm-end-actions,
  .ana-end-actions { gap: 6px; }
  .mm-end-actions .btn,
  .ana-end-actions .btn {
    min-height: 44px;
    padding: 7px 8px;
    font-size: 0.76rem;
  }
}
.mm-premium-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffe08a;
  color: #3d2a00;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.6;
  vertical-align: 1px;
}
.end-action-note:empty,
.mm-solution-note:empty { display: none; }
.end-action-note,
.mm-solution-note { flex-basis: 100%; margin: 0; }
.mm-panel .mm-clear:focus-visible,
.mm-panel .mm-validate:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.mm-panel #mot-prefill-help { flex-basis: 100%; margin: 0; padding: 8px 10px; font-size: .82rem; }
.mm-panel #mot-prefill-help:empty { display: none; }
@media (max-width: 430px) { .mm-panel .mm-board { max-width: 300px; } }
/* Wallet: descriptive subscriptions, compact one-line EPO packs. */
.account-shop .subscription-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.account-shop .subscription-card { padding: 22px; gap: 16px; }
.subscription-card h4, .subscription-card p { margin: 0; }
.subscription-card h4 { font-size: 1.2rem; }
.subscription-price strong { font-size: 1.8rem; }
.subscription-benefits { display: grid; gap: 12px; padding-left: 20px; line-height: 1.5; }
.account-shop .subscription-card .subscription-benefits > li { display: list-item; padding: 0; border: 0; background: none; border-radius: 0; }
.account-shop .subscription-benefits li > .epo-badge { display: inline-flex; flex: none; width: auto; vertical-align: middle; }
.subscription-card > button { margin-top: auto; }
.account-shop .epo-packs { grid-template-columns: 1fr; gap: 8px; }
.account-shop .epo-packs > li { flex-direction: row; align-items: center; padding: 10px 14px; gap: 12px; background: var(--paper-bright, #fff9e8); border-color: var(--line); }
.account-shop .pack-amount-price { display: flex; align-items: center; gap: 16px; flex: 1; }
.pack-amount-price strong { white-space: nowrap; }
.account-shop .duo-redeem { display: flex; align-items: end; gap: 12px; }
.duo-redeem label { flex: 1; min-width: 0; }
.account-shop .duo-redeem input { margin: 8px 0 0; }
.account-shop button:disabled { opacity: .6; cursor: not-allowed; }
#achvToastStack .achv-card { flex-shrink: 0; }
#achvToastStack.achv-toast-stack { max-height: calc(100dvh - 32px); }
@media (max-width: 900px) {
  .account-shop .subscription-plans { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .account-shop .duo-redeem { flex-direction: column; align-items: stretch; }
}
/* Dedicated surfaces for word-chain and puzzle results. */
.chain.panel {
  width: min(100%, 680px);
  padding: clamp(16px, 3vw, 32px);
  gap: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgb(42 55 45 / 8%);
}
.chain.panel .chain-board { gap: 10px; }
.chain.panel .chain-input { min-height: 48px; }
.chain.panel .lb-board { margin-top: 12px; width: 100%; }
.chain.panel .lb-board-card { box-shadow: none; }
.puzzle-results-board { width: min(100%, 760px); margin: 24px auto; }
.puzzle-results-board > .meta { padding: 0 16px; }
@media (max-width: 420px) {
  .chain.panel { padding: 14px; border-radius: 18px; }
  .chain.panel .chain-board { gap: 6px; }
  .chain.panel .chain-card { padding: 8px 4px; }
}
#account-panel-settings .account-check,
.auth-card .settings-device-sound .account-check {
  justify-content: flex-start;
  flex-wrap: nowrap;
  align-items: center;
  min-height: 44px;
}
#account-panel-settings .account-check input,
.settings-device-sound input { flex: 0 0 auto; }
.settings-device-sound .meta { margin-top: 4px; }
.chain .lb-board .times-table th:first-child,
.chain .lb-board .times-table td:first-child,
.search-app .lb-board .times-table th:first-child,
.search-app .lb-board .times-table td:first-child,
.puzzle-results-board .times-table th:first-child,
.puzzle-results-board .times-table td:first-child { width: 3.5rem; }

/* One visible construction area; the native input still opens mobile keyboards. */
.ana-construction { position: relative; }
.ana-construction #ana-answer {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 44px;
  opacity: 0; margin: 0; padding: 0; font-size: 16px; pointer-events: none; z-index: 1;
}
.ana-construction #ana-answer:focus {
  pointer-events: auto;
}
.ana-construction:focus-within { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 8px; }
.ana-construction .ana-slots { cursor: text; }
.ana-construction .ana-slot.is-on { position: relative; z-index: 2; }
.ana [hidden] { display: none !important; }
.site-breadcrumb { margin: 0 0 6px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf6; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.site-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; list-style: none; padding: 0; margin: 0; }
.site-breadcrumb li { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; }
.site-breadcrumb li + li::before { content: "›"; color: var(--muted); }
.site-breadcrumb a, .site-breadcrumb [aria-current] { display: inline-flex; align-items: center; min-height: 28px; overflow-wrap: anywhere; color: var(--navy); }
.site-breadcrumb [aria-current] { font-weight: 600; }
.site-breadcrumb a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 3px; }

/* Shared grid cards: help sits on the name, completion is a small inline mark. */
.puzzle-card .puzzle-card-heading { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 8px; min-width: 0; width: 100%; }
.puzzle-card .puzzle-card-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.puzzle-card .puzzle-card-title-line { display: flex; align-items: flex-start; gap: 4px; min-width: 0; max-width: 100%; }
.puzzle-card .puzzle-card-title { flex: 0 1 auto; flex-basis: auto; min-width: 0; margin: 0; white-space: normal; overflow-wrap: break-word; word-break: normal; }
.puzzle-card .rules-pop { flex: none; margin: 1px 0 0; }
.puzzle-card .puzzle-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.puzzle-card .puzzle-card-meta .difficulty-badge,
.puzzle-card .puzzle-card-meta .puzzle-card-number { margin: 0; }
.puzzle-card .puzzle-card-meta .puzzle-status { margin: 0; }
.puzzle-card .puzzle-status.is-started { color: #C88708; }
.puzzle-card-done { display: inline-flex; flex: none; width: 18px; height: 18px; color: #8a5a12; }
.puzzle-card-done .puzzle-status-svg { display: block; width: 18px; height: 18px; }
.puzzle-card-done.is-assisted { color: #A85000; }
.home-recent .puzzle-card .game-icon-slot { width: 40px; height: 40px; }
.home-recent .puzzle-card .game-icon-slot .game-logo { width: 36px; height: 36px; }
.home-recent .puzzle-card-number { font-size: .8rem; }
.home-recent .difficulty-badge { padding-inline: 5px; }
.home-recent .puzzle-card-actions { gap: 6px; }
.home-recent .puzzle-card-actions form { flex-basis: 100%; }
@media (max-width: 349px) {
  .home-recent .home-grids { grid-template-columns: minmax(0, 1fr); }
}

/* Rules surface is shared in design-system/modals.css; lock after the reset. */
html.rules-open { overflow: hidden; }
.home-catalogue .game-chip-wrap .rules-pop.game-help .rules-help,
.rules-pop.game-nav-help .rules-help {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

/* Non-blocking feedback while a homepage document navigation is pending. */
.navigation-status {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: max-content;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 20px #102c3633;
  pointer-events: none;
}
.navigation-status[hidden] { display: none; }
.home-current-actions button:disabled { opacity: .65; cursor: not-allowed; }

.puzzle-card-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
.puzzle-card-heading { align-items: flex-start; }
.puzzle-card .rules-pop-inline .rules-help,
.home-catalogue .game-chip-wrap .rules-pop.game-help .rules-help {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--navy);
  display: inline-grid;
  place-items: center;
}
.puzzle-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.puzzle-card-top > .game-icon-slot {
  flex: none;
  width: var(--puzzle-card-icon);
  height: var(--puzzle-card-icon);
}
.puzzle-card-top > .game-icon-slot .game-logo {
  width: calc(var(--puzzle-card-icon) - 4px);
  height: calc(var(--puzzle-card-icon) - 4px);
}
.puzzle-card-body {
  display: grid;
  grid-template-columns: minmax(25%, 33%) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.puzzle-card-body .game-icon-slot { width: 100%; height: auto; aspect-ratio: 1; max-width: 72px; }
.puzzle-card .puzzle-card-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  flex: 1;
}
.puzzle-card .puzzle-card-title-line .puzzle-card-title {
  flex: 0 1 auto;
  min-width: 0;
}
.puzzle-card .puzzle-card-title-line .puzzle-card-number {
  display: inline;
  font-size: 0.82rem;
}
.puzzle-card .puzzle-card-title-line .difficulty-badge {
  margin: 0;
}
.puzzle-card .puzzle-card-copy > .puzzle-status {
  margin-top: 2px;
}
.puzzle-card-cta { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.puzzle-card-actions .puzzle-card-cta,
.puzzle-card-actions form { width: 100%; }
@media (min-width: 1100px) {
  .home-grids,
  .game-grid-browser .game-grid-list,
  .archive-panel .game-grid-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .home-grids,
  .game-grid-browser .game-grid-list,
  .archive-panel .game-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mot, .lb-board, .comments-card, .mm-summary {
  width: min(100%, 600px);
  max-width: 600px;
  margin-inline: auto;
}
/* Mot mystère SOLO: fill play-shell so panel matches title/stage/leaderboard (undo 600px cap). */
.play-shell .mot.mm-panel,
.play-shell .mot.mm-panel .mm-summary,
.play-shell > .play-shell-stage,
.play-shell > .lb-board,
.play-shell > .comments-card,
.play-shell .mm-summary {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  min-width: 0;
  box-sizing: border-box;
}
.play-shell .mot.mm-panel .mm-board {
  margin-inline: auto;
}
.lb-board .times-table th,
.lb-board .times-table td,
.board-table th,
.board-table td { border-left: 0; border-right: 0; }
.lb-board .times-table tr.is-you td,
.board-table tr.is-you td {
  box-shadow: none;
}
.lb-board .times-table tr.is-you td::before,
.lb-board .times-table tr.is-you td::after,
.board-table tr.is-you td::before,
.board-table tr.is-you td::after { content: none; }
.lb-board .times-table th:first-child,
.lb-board .times-table td:first-child { padding-left: 8px; width: 2.2rem; }
.lb-board .times-name,
.lb-board .times-table th:nth-child(2) { padding-left: 16px; }
#mot-prefill-help {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.premium-gate { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.premium-gate-mark {
  color: var(--brass-deep, #8a5a12);
  font-weight: 750;
}
html.grid-gate-open,
html.grid-gate-open body { overflow: hidden; overscroll-behavior: none; }
.grid-preview.visually-hidden { visibility: hidden; white-space: normal; }

.pyr[data-phase="complete"] .pyr-play,
.pyr[data-phase="complete"] .pyr-actions,
.pyr[data-phase="complete"] #pyr-hint,
.pyr.is-complete .pyr-play,
.pyr.is-complete .pyr-actions,
.pyr.is-complete #pyr-hint { display: none; }
.pyr-row .pyr-tile { font-size: 0.95rem; }
.win-confetti { display: flex; gap: 8px; height: 14px; margin: 0 0 12px; }
.win-confetti span {
  flex: 1;
  background: var(--brass);
  border-radius: 2px;
}
.win-confetti span:nth-child(2) { background: var(--coral); border-radius: 50%; }
.win-confetti span:nth-child(3) { background: var(--teal); }
.win-confetti span:nth-child(4) { background: var(--petrol); border-radius: 50%; }
.win-confetti span:nth-child(5) { background: var(--brass); }
.finish-band { margin: 12px 0; }
.chain-keys {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}
.chain-key {
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--petrol-deep);
  font-weight: 700;
}
button.chain-letter {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}
button.chain-letter[aria-pressed="true"] { outline: 2px solid var(--petrol); }
.nav-install, .nav-install-ios { margin: 8px 16px; }
.nav-install-ios { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 640px) {
  :root { --play-scroll-offset: 60px; }
}
@media (max-width: 390px) {
  .pyr { gap: 4px; }
  .pyr-rows { gap: 3px; }
  .pyr-slots { grid-auto-columns: 22px; gap: 2px; }
  .pyr-row.is-current .pyr-slots,
  .pyr-row.is-solved .pyr-slots,
  .pyr-row.is-locked .pyr-slots { padding: 1px; }
  .pyr-meters p { padding: 2px 8px; }
  .pyr-answer-slots[data-count="6"], .pyr-bank[data-count="6"] { grid-template-columns: repeat(6, 36px); }
  .pyr-answer-slots[data-count="7"], .pyr-bank[data-count="7"] { grid-template-columns: repeat(7, 34px); gap: 2px; }
  .pyr-answer-slots[data-count="8"], .pyr-bank[data-count="8"] { grid-template-columns: repeat(8, 30px); gap: 2px; }
  .pyr-answer-slots[data-count="9"], .pyr-bank[data-count="9"] { grid-template-columns: repeat(9, 28px); gap: 2px; }
  .pyr-answer-slots[data-count="10"], .pyr-bank[data-count="10"] { grid-template-columns: repeat(10, 26px); gap: 1px; }
}
@media (max-width: 370px) {
  .pyr-answer-slots[data-count="8"], .pyr-bank[data-count="8"] { grid-template-columns: repeat(8, 28px); gap: 2px; }
}
@media (max-width: 340px) {
  .pyr-answer-slots[data-count="7"], .pyr-bank[data-count="7"] { grid-template-columns: repeat(7, 32px); gap: 2px; }
  .pyr-answer-slots[data-count="8"], .pyr-bank[data-count="8"] { grid-template-columns: repeat(8, 26px); }
  .chain-keys { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .chain-key { min-height: 32px; font-size: 0.85rem; }
}
@media (min-width: 900px) {
  .pyr-rows { gap: 12px; }
  .pyr-slots { grid-auto-columns: 30px; }
  .pyr-answer-slots[data-count="7"], .pyr-bank[data-count="7"] { grid-template-columns: repeat(7, 44px); }
}
@media (prefers-reduced-motion: reduce) {
  .win-confetti span, .finish-band.is-won .win-confetti span, .pyr-celebrate.is-on .win-confetti span { animation: none; }
}

/* Mobile feed and compact paid CTAs. The coin already names the currency. */
.feed {
  container-type: inline-size;
  container-name: activity-feed;
  min-width: 0;
  max-width: 100%;
}
.activity-panel .feed .feed-mark,
.feed .feed-item > .feed-mark {
  display: grid;
  place-items: center;
}
.activity-panel .feed .feed-sentence,
.activity-panel .feed .feed-sentence strong.feed-user,
.activity-panel .feed .feed-sentence a {
  display: inline;
}
.activity-panel .feed .feed-sentence {
  display: block;
}
@container activity-feed (min-width: 560px) {
  .feed .feed-item {
    grid-template-columns: 28px 22px minmax(0, 1fr) auto;
    grid-template-areas: "mark avatar sentence tail";
  }
  .feed .feed-item > .feed-tail { justify-content: flex-end; }
}

:is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card-top {
  align-items: center;
  gap: 8px;
}
:is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card-top > .game-icon-slot {
  width: 40px;
  height: 40px;
}
:is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card-top > .game-icon-slot .game-logo {
  width: 36px;
  height: 36px;
}
:is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card .game-icon-overlay {
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
}
@media (min-width: 350px) and (max-width: 767px) {
  :is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card-top > .game-icon-slot {
    width: 36px;
    height: 36px;
  }
  :is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card-top > .game-icon-slot .game-logo {
    width: 32px;
    height: 32px;
  }
}
.puzzle-card .puzzle-card-actions { min-width: 0; }
.puzzle-card .puzzle-card-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 4px 6px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  white-space: normal;
  overflow: visible;
  line-height: 1.15;
}
.puzzle-card .puzzle-card-cta .epo-badge {
  flex: 0 0 auto;
  min-height: 0;
  height: 22px;
  gap: 3px;
  padding: 0 6px 0 1px;
}
.puzzle-card .puzzle-card-cta .epo-coin {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
.puzzle-card .puzzle-card-cta .epo-n { font-size: 0.85rem; }

/* Each homepage tile has separate catalogue and game-rules links. */
.home-catalogue .game-chip-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 60px;
}
.home-catalogue .game-chip {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  align-self: stretch;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 60px;
  margin: 0;
  padding: 8px 10px;
}
.home-catalogue .game-chip .game-logo {
  width: 28px;
  height: 28px;
  flex: none;
}
.home-catalogue .game-chip strong {
  align-self: center;
}
@media (max-width: 640px) {
  .home-catalogue .game-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .home-catalogue .game-chip-wrap,
  .home-catalogue .game-chip {
    min-height: 56px;
  }
  .home-catalogue .game-chip {
    gap: 6px;
    padding: 6px 8px;
  }
  .home-catalogue .game-chip .game-logo {
    width: 24px;
    height: 24px;
  }
}
@media (max-width: 349px) {
  .home-catalogue .game-chip {
    gap: 6px;
    padding: 6px;
  }
  .home-catalogue .game-chip .game-logo {
    width: 22px;
    height: 22px;
  }
}

/* Help sits on the first line, directly after the title text, at a 44px target. */
:is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card .puzzle-card-heading {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
:is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card .puzzle-card-title {
  flex: 0 1 auto;
  width: fit-content;
  max-width: calc(100% - 52px);
  min-width: 0;
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: break-word;
}
:is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card .rules-pop {
  align-self: flex-start;
  margin: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
:is(.home-recent, .archive-panel, .game-grid-browser) .puzzle-card .rules-pop-inline .rules-help {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  font-size: 1.15rem;
}

a.puzzle-card-number {
  display: inline;
  width: fit-content;
  max-width: 100%;
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}
a.puzzle-card-number:hover,
a.puzzle-card-number:focus-visible {
  color: var(--petrol-deep);
}

/* The ? follows the last word of the title and stays a 44px target. */
.page-head.compact:has(.title-with-help) { max-width: min(100%, 46rem); }
.page-head .title-with-help {
  display: block;
  width: auto;
  max-width: 100%;
  text-align: start;
}
.page-head .title-with-help > h1 {
  display: inline;
  width: auto;
  max-width: none;
  margin: 0;
}
.page-head .title-with-help > .rules-pop {
  display: inline-flex;
  vertical-align: middle;
  margin-inline-start: 8px;
}
.home-current-title-line.title-with-help,
.game-nav-item.title-with-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
}
.home-current-title-line.title-with-help > .home-current-title {
  flex: 0 1 auto;
  width: fit-content;
  max-width: calc(100% - 52px);
  min-width: 0;
  margin: 0;
}
.home-current-title-line.title-with-help .title-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.page-head .title-with-help > .rules-pop,
.home-current-title-line.title-with-help > .rules-pop,
.game-nav-item.title-with-help > .rules-pop,
.page-head .title-with-help .rules-help,
.home-current-title-line.title-with-help .rules-help,
.game-nav-item.title-with-help .rules-help {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
.game-nav { overflow-x: visible; }
.game-nav-item.title-with-help > a {
  min-width: 0;
  max-width: calc(100% - 52px);
  white-space: normal;
}

/* Actual 44px targets keep adjacent result controls from overlapping. */
.result-word-info { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
.result-word-info::before { content: none; }
.result-word-info:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.chain-results .chain-chip { gap: 8px; }
.def-pop .def-text, .def-pop .def-meta { overflow-wrap: anywhere; }
.pyr-results .pyr-rows { grid-template-columns: minmax(0, 1fr); }
.pyr-results .pyr-row-meta { align-items: center; }
.pyr-results .pyr-status { flex-wrap: wrap; white-space: normal; }


/* Reserve the entire touch target in flow; only its circle is compact. */
.puzzle-card .puzzle-card-heading > .rules-pop.rules-pop-inline,
.home-current-title-line.title-with-help > .rules-pop.rules-pop-inline {
  position: relative;
  flex: 0 0 44px;
  display: inline-flex;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  align-self: flex-start;
}

.puzzle-card .puzzle-card-heading > .rules-pop.rules-pop-inline .rules-help,
.home-current-title-line.title-with-help > .rules-pop.rules-pop-inline .rules-help,
.rules-pop .rules-help,
.result-word-info {
  position: relative;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  font: 700 14px/1 var(--sans);
  isolation: isolate;
}

.puzzle-card .puzzle-card-heading > .rules-pop.rules-pop-inline .rules-help::before,
.home-current-title-line.title-with-help > .rules-pop.rules-pop-inline .rules-help::before,
.rules-pop .rules-help::before,
.result-word-info::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  pointer-events: none;
}

.search-word .def-btn.result-word-info {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  font-size: 0.82rem;
}
.search-word .def-btn.result-word-info::before {
  width: 22px;
  height: 22px;
}

.home-current-title-line.title-with-help > .home-current-title {
  max-width: calc(100% - 52px);
}

.home-current-copy .home-current-number {
  margin: 3px 0 4px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Keep the small circle on the card title's first line, while the rest of
   its reserved 44px target extends down into the heading's own space. */
.puzzle-card .puzzle-card-heading > .rules-pop.rules-pop-inline .rules-help {
  align-items: start;
  line-height: 22px;
}
.puzzle-card .puzzle-card-heading > .rules-pop.rules-pop-inline .rules-help::before {
  top: 11px;
}

/* Keep the secondary link inside each chip, with its own keyboard/touch target. */
.home-catalogue .game-chip-rules {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 2px 8px;
  color: var(--navy);
  font-size: .8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-top: 1px solid rgba(16, 28, 40, .12);
  border-radius: 0 0 10px 10px;
}
.home-catalogue :is(.game-chip, .game-chip-rules):focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: -3px;
}
.home-catalogue .game-chip-rules:hover { background: rgba(255, 255, 255, .4); }

/* Separate native hit areas: the rules band must not cover the game link. */
.home-catalogue .game-chip-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 0;
}
.home-catalogue .game-chip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 56px;
  height: auto;
  margin: 0;
  padding: 6px;
  box-sizing: border-box;
}
.home-catalogue .game-chip-rules {
  position: static;
  align-self: stretch;
  width: 100%;
  min-height: 32px;
  margin: 0;
  flex: 0 0 auto;
}

.replay-control { margin-top: 12px; text-align: center; }
.replay-control .btn { min-height: 44px; max-width: 100%; white-space: normal; }
.replay-control .meta { margin: 6px 0 0; }

a[data-mp-invite-badge][data-count]::after {
  content: " (" attr(data-count) ")";
  font-weight: 700;
  color: #a66a00;
}
.account-mp-invites .room-invitation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Site-wide block shell. Homepage classes only tune the content inside it. */
.site-block.panel {
  margin-top: 14px;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 38%),
    var(--card);
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}
.site-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.site-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  color: var(--navy);
}
.site-block .site-block-titlelink {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  color: inherit;
  text-decoration: none;
}
/* Keep a ~44px hit target without inventing a gap under the h2 text. */
.site-block .site-block-titlelink::after {
  content: "";
  position: absolute;
  inset: -10px -4px;
}
.site-block-head .text-link {
  margin-top: 0;
}
.site-block :is(h2, h3) {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.site-block-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  margin-top: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--teal) 14%, var(--card));
  color: var(--petrol);
}
.site-block-glyph {
  width: 20px;
  height: 20px;
}
.site-block-bolt {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  margin-top: 0;
  font-size: 1.05rem;
  line-height: 1;
}
.site-block-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.site-block-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}
.home-free.site-block .site-block-actions {
  flex: 1 1 11rem;
  display: flex;
  justify-content: flex-end;
}
.home-free.site-block .countdown {
  flex: 1 1 auto;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: right;
}
.home-free.site-block .countdown span {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.82rem;
  font-weight: 650;
}
.home-free.site-block .countdown strong {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
}
.site-block .home-free-list,
.site-block .home-salon-list {
  margin: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid var(--line);
}
.home-free-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
}
.home-free-icon .game-logo {
  width: 26px;
  height: 26px;
}
.home-free-cta.btn {
  min-height: 44px;
  padding: 6px 12px;
}
/* The server selects the featured card from the visible catalogue count. */
.site-block .home-game-tiles {
  gap: 16px;
  margin-top: var(--section-head-gap);
}
.site-block .home-game-tile {
  min-width: 0;
  padding: clamp(16px, 3vw, 32px);
  border-radius: var(--radius);
  box-shadow: none;
}
.site-block .home-game-tile[data-game-tint="trouve-mots"] { background: var(--game-trouve-surface); border-color: var(--game-trouve-border); }
.site-block .home-game-tile[data-game-tint="mot-mystere"] { background: var(--game-mot-surface); border-color: var(--game-mot-border); }
.site-block .home-game-tile[data-game-tint="mots-caches"] { background: var(--game-mots-caches-surface); border-color: var(--game-mots-caches-border); }
.site-block .home-game-tile[data-game-tint="anagrammes"] { background: var(--game-anagrammes-surface); border-color: var(--game-anagrammes-border); }
.site-block .home-game-tile[data-game-tint="pyramots"] { background: var(--game-pyramido-surface); border-color: var(--game-pyramido-border); }
.site-block .home-game-tile[data-game-tint="indices-en-cascade"] { background: var(--game-indices-cascade-surface); border-color: var(--game-indices-cascade-border); }
.site-block .home-game-tile[data-game-tint="definimo"] { background: var(--game-definimo-surface); border-color: var(--game-definimo-border); }
.site-block .home-game-tile[data-game-tint="la-roue-deposigma"] { background: var(--game-la-roue-surface); border-color: var(--game-la-roue-border); }
.home-game-tile-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}
.site-block .home-game-tile-title {
  min-width: 0;
  min-height: var(--control-touch-size);
  gap: 12px;
}
.site-block .home-game-tile-title h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}
.home-game-tile-icon .game-logo {
  width: 44px;
  height: 44px;
  flex: none;
}
.home-game-tile-description {
  margin: 0;
  max-width: 52ch;
  color: var(--ink);
  line-height: 1.6;
}
.home-game-tile-actions {
  margin-top: auto;
}
.site-block .home-game-tile-actions .btn {
  min-height: var(--control-touch-size);
  padding: 10px 16px;
  white-space: normal;
  text-align: center;
}
.home-game-tile .home-game-tile-grids {
  background: var(--petrol);
  color: var(--card);
  border-color: var(--petrol-deep);
  box-shadow: none;
}
.home-game-tile .home-game-tile-grids:hover {
  background: var(--petrol-deep);
}
.home-game-tile a:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 4px;
}
.home-game-tile.is-featured {
  grid-column: 1 / -1;
  border-left-color: var(--petrol);
  background: linear-gradient(115deg, var(--card), var(--paper));
}
.home-game-tile-motif {
  display: none;
  pointer-events: none;
}
@media (min-width: 768px) {
  .home-game-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-game-tile.is-featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 24%);
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
  }
  .home-game-tile-motif {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    max-width: 224px;
    justify-self: center;
    transform: rotate(4deg);
  }
  .home-game-tile-motif span {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--petrol-deep);
    font: 600 clamp(1rem, 2vw, 1.5rem) var(--serif);
    box-shadow: 0 3px 0 var(--line);
  }
  .home-game-tile-motif span:nth-child(-n+4) {
    background: var(--teal-soft);
    border-color: var(--petrol);
  }
}
.site-block-body > .empty-block {
  margin-top: 8px;
  padding: 12px;
}
.home-multiplayer-actions {
  margin: 10px 0 0;
}
.home-multiplayer-actions .btn {
  min-height: 44px;
}
@media (max-width: 900px) {
  .home-free-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "game action"
      "number action"
      "diff status";
  }
  .home-free-game { grid-area: game; }
  .home-free-number { grid-area: number; }
  .home-free-diff { grid-area: diff; }
  .home-free-status { grid-area: status; }
  .home-free-action { grid-area: action; }
  .home-free.site-block .site-block-actions,
  .home-free.site-block .countdown {
    flex-basis: 100%;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
  }
}
@media (max-width: 720px) {
  .home-salon-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "open join"
      "mode rounds"
      "seats seats";
  }
  .home-salon-open { grid-area: open; }
  .home-salon-join { grid-area: join; }
  .home-salon-mode { grid-area: mode; }
  .home-salon-rounds { grid-area: rounds; justify-self: end; }
  .home-salon-seats { grid-area: seats; }
}

/* Homepage section titles: one size for free grids, salons and letter games. */
.home-free .site-block-title h2,
.home-multiplayer .site-block-title h2,
.home-games-tiles .site-block-title h2 {
  font-size: clamp(1.12rem, 2.2vw, 1.35rem);
  line-height: 1.2;
}
.home-free .site-block-title,
.home-multiplayer .site-block-title,
.home-games-tiles .site-block-title {
  align-items: center;
  gap: 10px;
}
.home-free .site-block-icon,
.home-multiplayer .site-block-icon,
.home-games-tiles .site-block-icon {
  width: 36px;
  height: 36px;
  margin-top: 0;
}

/* Mot mystère duel: fixed 6-row shared board + mobile keyboard-friendly input. */
#board.mot-duel-board {
  width: min(100%, 340px);
  max-width: 100%;
  gap: clamp(4px, 1.4vw, 6px);
  touch-action: manipulation;
  grid-template-columns: repeat(var(--mot-duel-cols, 5), minmax(0, 1fr));
}
#board.mot-duel-board[data-cols="5"] { --mot-duel-cols: 5; }
#board.mot-duel-board[data-cols="6"] { --mot-duel-cols: 6; }
#board.mot-duel-board[data-cols="7"] { --mot-duel-cols: 7; }
#board.mot-duel-board[data-cols="8"] { --mot-duel-cols: 8; }
#board.mot-duel-board[data-cols="9"] { --mot-duel-cols: 9; }
#board.mot-duel-board[data-cols="10"] { --mot-duel-cols: 10; }
#board.mot-duel-board .mot-duel-cell {
  border-radius: 10px;
  font-size: clamp(0.85rem, 4.2vw, 1.35rem);
  cursor: default;
  text-transform: uppercase;
}
#board.mot-duel-board .mot-duel-cell[data-mark="exact"] {
  background: var(--success);
  border-color: var(--success);
  color: var(--paper);
}
#board.mot-duel-board .mot-duel-cell[data-mark="present"] {
  background: var(--coral);
  border-color: var(--coral-deep);
  color: var(--coral-ink);
}
#board.mot-duel-board .mot-duel-cell[data-mark="absent"],
#board.mot-duel-board .mot-duel-cell[data-unknown="1"] {
  background: #d9dfe1;
  border-color: #c5ced2;
  color: #39464d;
}
#board.mot-duel-board .mot-duel-cell[data-reveal="1"] {
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 700;
}
.mot-duel-guess {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: min(100%, 340px);
  margin: 10px auto 0;
}
.mot-duel-guess input {
  flex: 1 1 10rem;
  min-height: 44px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-family: var(--serif);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mot-duel-guess button { min-height: 44px; }
.mot-duel-history {
  width: min(100%, 340px);
  margin: 8px auto 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
  max-height: 7.5rem;
  overflow: auto;
}
.mot-duel-history li { padding: 2px 0; }
.mot-duel-solution {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.04em;
}
@media (max-width: 430px) {
  #board.mot-duel-board { width: min(100%, 300px); }
  .mot-duel-guess, .mot-duel-history { width: min(100%, 300px); }
}
.site-block .home-free-list {
  border: 0;
  border-radius: 0;
}
.site-block .home-free-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-areas: "game copy action";
  gap: 2px 10px;
  min-height: 48px;
  padding: 7px 0;
  border-top: 0;
}
.site-block .home-free-row + .home-free-row {
  margin-top: 2px;
}
.site-block .home-free-game {
  grid-area: game;
  align-self: stretch;
  justify-content: center;
}
.site-block .home-free-icon,
.site-block .home-free-icon .game-logo {
  width: 34px;
  height: 34px;
}
.site-block .home-free-copy {
  grid-area: copy;
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
}
.site-block .home-free-title-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.25;
}
.site-block .home-free-title-line a {
  color: inherit;
  text-decoration: none;
}
.site-block .home-free-number { color: var(--muted); font-weight: 600; }
.site-block .home-free-diff .difficulty-badge {
  margin: 0;
  padding: 1px 7px;
  font-size: .7rem;
  line-height: 1.25;
}
.site-block .home-free-action {
  grid-area: action;
  align-self: center;
  justify-content: center;
}
.site-block .home-free-cta.btn {
  min-height: 44px;
  padding: 5px 12px;
}
.site-block .home-free-unavailable {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
@media (max-width: 359px) {
  .site-block .home-free-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap-inline: 6px; }
  .site-block .home-free-icon,
  .site-block .home-free-icon .game-logo { width: 30px; height: 30px; }
  .site-block .home-free-title-line { font-size: .87rem; }
  .site-block .home-free-cta.btn { padding-inline: 9px; }
}

/* Eposigma home free grids: two columns, local badge flow, and light separators. */
/* HOME-FREE-RESPONSIVE-2COL-BADGE-20261025 */
.site-block .home-free-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  gap: 0;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.site-block .home-free-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-areas: "game copy action";
  gap: 2px 10px;
  min-width: 0;
  min-height: 48px;
  padding: 7px 0;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.site-block .home-free-row + .home-free-row {
  margin-top: 0;
}

.site-block .home-free-row:last-child {
  border-bottom: 0;
}

.site-block .home-free-game {
  grid-area: game;
  min-width: 0;
}

.site-block .home-free-copy {
  display: grid;
  grid-area: copy;
  align-content: center;
  gap: 1px;
  min-width: 0;
}

.site-block .home-free-title-line {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-block .home-free-copy > .home-free-diff {
  grid-area: auto;
  grid-column: 1;
  justify-self: start;
  align-self: start;
  text-align: left;
}

.site-block .home-free-action {
  grid-area: action;
  min-width: 0;
  justify-self: end;
}

.site-block .home-free-action .home-free-cta {
  max-width: 100%;
}

@media (min-width: 960px) {
  .site-block .home-free-list {
    grid-template-rows: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    gap: 0 24px;
  }

  .site-block .home-free-row:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
  }
}

@media (max-width: 959px) {
  .site-block .home-free-list {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

/* EPOSIGMA-GAME-PAGE-UX-20261025 */
/* Shared full-width introduction for all six game landing pages. */
.game-intro { width: 100%; max-width: none; margin-bottom: 14px; }
.game-intro-title {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px 12px;
}
.game-intro-title h1 { margin: 0; min-width: 0; font-size: clamp(1.65rem, 3.6vw, 2.6rem); line-height: 1.12; overflow-wrap: anywhere; }
.game-intro-icon, .game-intro-icon .game-logo { display: block; width: 48px; height: 48px; }
.game-intro-title > .rules-pop { width: 44px; min-width: 44px; }
.game-intro > .lede { margin: 10px 0 12px; max-width: 70ch; }
.game-intro > .btn { margin-top: 2px; }
.salon-promo { width: 100%; max-width: none; margin-bottom: 14px; }
.game-salon-list { margin-top: 12px; }
.game-salon-list > .home-salon-row { min-width: 0; }

/* Game rules: icon and H1 side by side; CTA belongs to the same full-width card. */
.rules-page-panel { width: 100%; max-width: none; }
.rules-page-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 20px;
}
.rules-page-header h1 { margin: 0; min-width: 0; font-size: clamp(1.65rem, 3.6vw, 2.6rem); line-height: 1.12; overflow-wrap: anywhere; }
.rules-page-header .lede { grid-column: 1 / -1; margin: 0; }
.rules-page-icon { display: grid; place-items: center; width: 48px; height: 48px; }
.rules-page-icon .game-logo { width: 48px; height: 48px; }
.rules-page-panel > .tutorial-cta {
  margin: 20px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.rules-page-panel > .tutorial-cta .btn {
  max-width: 100%;
  text-align: center;
  white-space: normal;
}
@media (max-width: 380px) {
  .game-intro-title { grid-template-columns: 36px minmax(0, 1fr) 44px; gap: 8px; }
  .game-intro-icon, .game-intro-icon .game-logo, .rules-page-icon, .rules-page-icon .game-logo { width: 36px; height: 36px; }
  .rules-page-header { grid-template-columns: 36px minmax(0, 1fr); gap: 8px; }
  .game-intro-title h1, .rules-page-header h1 { font-size: clamp(1.48rem, 7vw, 1.95rem); }
}

/* EPOSIGMA-ARCHIVE-MOBILE-ONECOL-20261025
   Keep archive cards readable at phone widths: the shared card has enough
   horizontal room for its icon, title, number, difficulty, and help target. */
@media (max-width: 640px) {
  .game-grid-browser .game-grid-list,
  .archive-panel .game-grid-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-grid-browser .game-grid-list .puzzle-card,
  .archive-panel .game-grid-list .puzzle-card {
    min-width: 0;
    overflow: visible;
  }

  .game-grid-browser .game-grid-list .puzzle-card-top,
  .archive-panel .game-grid-list .puzzle-card-top {
    align-items: center;
    min-width: 0;
    gap: 8px;
  }

  .game-grid-browser .game-grid-list .puzzle-card-copy,
  .archive-panel .game-grid-list .puzzle-card-copy,
  .game-grid-browser .game-grid-list .puzzle-card-heading,
  .archive-panel .game-grid-list .puzzle-card-heading,
  .game-grid-browser .game-grid-list .puzzle-card-title-line,
  .archive-panel .game-grid-list .puzzle-card-title-line {
    min-width: 0;
  }

  .game-grid-browser .game-grid-list .puzzle-card-title,
  .archive-panel .game-grid-list .puzzle-card-title {
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
  }

  .game-grid-browser .game-grid-list .puzzle-card .rules-pop-inline,
  .archive-panel .game-grid-list .puzzle-card .rules-pop-inline {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
  }

  .game-grid-browser .game-grid-list .puzzle-card-actions,
  .archive-panel .game-grid-list .puzzle-card-actions,
  .game-grid-browser .game-grid-list .puzzle-card-actions form,
  .archive-panel .game-grid-list .puzzle-card-actions form,
  .game-grid-browser .game-grid-list .puzzle-card-cta,
  .archive-panel .game-grid-list .puzzle-card-cta {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}

/* EPOSIGMA-HOME-NAV-SPACING-20261025 */
@media (max-width: 640px) {
  main:has(> .home-intro) {
    margin-top: 2px;
  }
}

/* EPOSIGMA-COMPACT-MULTIPLAYER-UX-20261025 */
.home-multiplayer .home-salon-list {
  margin: 7px 0 0;
  border: 0;
  background: transparent;
}
.home-multiplayer .home-salon-row,
.game-salon-list > .home-salon-row,
.salon-list > .home-salon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "open stats action";
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
  padding: 7px 4px;
  border-top: 1px solid var(--line);
}
.home-multiplayer .home-salon-open,
.game-salon-list .home-salon-open,
.salon-list .home-salon-open { grid-area: open; min-width: 0; min-height: 36px; }
.home-multiplayer .home-salon-meta,
.game-salon-list .home-salon-meta,
.salon-list .home-salon-meta {
  grid-area: stats;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  align-items: center;
  min-width: 0;
}
.home-multiplayer .home-salon-meta .home-salon-stat,
.game-salon-list .home-salon-meta .home-salon-stat,
.salon-list .home-salon-meta .home-salon-stat {
  grid-area: auto;
  justify-self: auto;
  font-size: .82rem;
  line-height: 1.2;
}
.home-multiplayer .home-salon-join,
.home-multiplayer .home-salon-phase,
.game-salon-list .home-salon-join,
.game-salon-list .home-salon-phase,
.salon-list .home-salon-join,
.salon-list .home-salon-phase {
  grid-area: action;
  justify-self: end;
  white-space: nowrap;
}
.home-multiplayer .home-salon-join.btn { min-height: 38px; padding: 6px 12px; font-size: .85rem; }
.home-multiplayer .home-salon-phase,
.game-salon-list .home-salon-phase,
.salon-list .home-salon-phase {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  background: #efe9dd;
  color: #55625d;
  border: 1px solid #d5cbb8;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}
.home-multiplayer .site-block-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.home-multiplayer .home-salon-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}
.home-multiplayer .home-salon-nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-align: right;
  line-height: 1.25;
}
.home-multiplayer .home-salon-filter-wrap {
  position: relative;
  flex: none;
}
.home-multiplayer .home-salon-filter-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--teal) 10%, #f5f0e6);
  color: var(--petrol);
  cursor: pointer;
}
.home-multiplayer .home-salon-filter-btn[aria-expanded="true"] {
  position: relative;
  z-index: 81;
  background: color-mix(in srgb, var(--teal) 18%, #f5f0e6);
  border-color: var(--teal);
}
.home-multiplayer .home-salon-filter-icon {
  width: 18px;
  height: 18px;
}
.home-multiplayer .home-salon-filter-popover {
  position: absolute;
  z-index: 12;
  top: calc(100% + 6px);
  right: 0;
  width: min(18.5rem, calc(100vw - 2rem));
  padding: 10px 11px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #f8f3ea;
  box-shadow: 0 10px 28px rgba(20, 36, 32, 0.14);
}
.home-multiplayer .home-salon-filter-group {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}
.home-multiplayer .home-salon-filter-group:last-child {
  margin-bottom: 0;
}
.home-multiplayer .home-salon-filter-group legend {
  padding: 0;
  margin: 0 0 6px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-multiplayer .home-salon-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.home-multiplayer .home-salon-filter-option {
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fffaf1;
  color: var(--petrol-deep);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}
.home-multiplayer .home-salon-filter-option.is-selected {
  background: #0f513e;
  color: #fffaf1;
  border-color: #0f513e;
}
/* Narrow headers wrap and pin the filter control to the left. An absolute
   popover then extends off-screen and body overflow-x:clip hides it. */
.home-multiplayer .home-salon-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(16, 28, 40, 0.34);
}
.home-multiplayer .home-salon-filter-backdrop[hidden] { display: none !important; }
.home-multiplayer .home-salon-filter-head { display: none; }
.home-multiplayer .home-salon-filter-title { margin: 0; font-size: 1rem; font-weight: 800; color: var(--petrol-deep); }
.home-multiplayer .home-salon-filter-close {
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fffaf1;
  color: var(--petrol-deep);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}
.home-multiplayer .home-salon-filter-close:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 2px;
}
.home-multiplayer .home-salon-filter-popover.is-sheet {
  position: fixed;
  z-index: 80;
  top: auto;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  left: max(8px, env(safe-area-inset-left));
  width: auto;
  max-height: min(32rem, calc(100dvh - 5.5rem));
  margin: 0;
  overflow: auto;
  background: #f8f3ea;
}
.home-multiplayer .home-salon-filter-popover.is-sheet .home-salon-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
.home-multiplayer .home-salon-filter-popover.is-sheet .home-salon-filter-option {
  min-height: 44px;
  padding: 8px 12px;
}
.home-multiplayer .home-multiplayer-actions {
  margin: 9px 0 0;
  padding-top: 12px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.home-multiplayer .home-multiplayer-actions .btn { min-height: 42px; }
.home-multiplayer .home-salon-row[hidden],
.game-salon-list > .home-salon-row[hidden],
.salon-list > .home-salon-row[hidden] { display: none !important; }
@media (max-width: 720px) {
  .home-multiplayer .home-salon-row,
  .game-salon-list > .home-salon-row,
  .salon-list > .home-salon-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "open action" "stats stats";
    column-gap: 6px;
    row-gap: 2px;
    padding: 7px 2px;
  }
  .home-multiplayer .home-salon-meta,
  .game-salon-list .home-salon-meta,
  .salon-list .home-salon-meta {
    gap: 5px 11px;
  }
  .home-multiplayer .home-salon-phase,
  .game-salon-list .home-salon-phase,
  .salon-list .home-salon-phase {
    padding: 5px 9px;
    font-size: .77rem;
    /* Long labels ("Premium uniquement", "Départ imminent") wrap inside a capped pill
       instead of squeezing the game title and creator out of the identity column. */
    max-width: 5.75rem;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }
}


.answer-grid[data-size="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.answer-grid[data-size="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); width: min(100%, 280px); }

/* Shared salon identity stays compact on homepage and room lists. */
.home-salon-summary { min-width: 0; }
.home-multiplayer .home-salon-summary, .game-salon-list .home-salon-summary, .salon-list .home-salon-summary { grid-area: open; }
/* #153: a running salon reads as live (small status dot), never as a join action. */
.home-salon-row[data-phase="playing"] .home-salon-phase::before,
.home-salon-row[data-phase="intermission"] .home-salon-phase::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--success);
}
.home-salon-summary .home-salon-open { min-height: 28px; }
/* Each public room has a stable short identifier in addition to its creator. */
.home-salon-code {
  display: none;
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 3px;
  padding: 2px 8px;
  border: 1px solid #d9e3d8;
  border-radius: 7px;
  background: #edf4ec;
  color: #265847;
  font-size: .69rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: .025em;
}
.home-multiplayer .home-salon-list {
  display: grid;
  gap: 10px;
  overflow: visible;
}
.home-multiplayer .home-salon-list > .home-salon-row {
  padding: 9px 6px;
  border: 1px solid #dfd5c2;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 2px 8px rgba(37, 53, 38, .055);
}
.home-multiplayer .home-salon-list > .home-salon-row:first-child {
  border-top: 1px solid #dfd5c2;
}

.salon-creator { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; white-space: nowrap; font-size: .85rem; line-height: 1.25; font-weight: 400; vertical-align: middle; }
.salon-creator-label { flex: none; }
.salon-creator-profile { display: inline-flex; align-items: center; gap: 5px; min-width: 0; min-height: 32px; padding: 4px; box-sizing: border-box; color: inherit; text-decoration: none; border-radius: 4px; }
.salon-creator-profile:hover .salon-creator-name { text-decoration: underline; }
.salon-creator-profile:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.salon-creator-avatar { position: relative; display: grid; place-items: center; width: 22px; height: 22px; flex: none; overflow: hidden; border-radius: 50%; background: var(--line); font-size: .65rem; }
.salon-creator-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.salon-creator-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: inherit; font-weight: 600; }
.salon-creator-heading { margin: 0 0 12px; min-width: 0; }

/* #153 P1-5: per-grid fact sheet (server-rendered, crawlable) */
.grid-facts[hidden] { display: none !important; }
.grid-facts { display: grid; gap: 10px; max-width: min(100%, 50rem); margin-inline: auto; width: min(100%, 50rem); box-sizing: border-box; }
.grid-facts h2 { margin: 0; font-size: clamp(1.05rem, 2.4vw, 1.25rem); }
.grid-facts-summary { margin: 0; color: var(--muted); line-height: 1.5; }
.grid-facts-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 8px 14px; margin: 0; }
.grid-fact { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.grid-fact dt { margin: 0; font-size: .78rem; letter-spacing: .02em; color: var(--muted); }
.grid-fact dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.grid-facts-nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; justify-content: center; margin-top: 4px; }
.grid-facts-nav--buttons .grid-facts-nav-btn { flex: 1 1 100%; justify-content: center; text-align: center; min-height: var(--control-touch-size, 44px); }
.grid-facts-nav-btn--prev {
  background: color-mix(in srgb, var(--teal-soft) 92%, var(--card));
  border-color: color-mix(in srgb, var(--teal) 32%, var(--line));
  color: var(--teal-deep);
}
.grid-facts-nav-btn--next {
  background: color-mix(in srgb, var(--coral-text) 14%, var(--card));
  border-color: color-mix(in srgb, var(--coral-text) 30%, var(--line));
  color: var(--coral-text);
}
.grid-facts-nav-btn--all { background: var(--card); }
.grid-facts-nav-btn--prev:focus-visible,
.grid-facts-nav-btn--next:focus-visible,
.grid-facts-nav-btn--all:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }
@media (min-width: 640px) {
  .grid-facts-nav--buttons { flex-wrap: nowrap; }
  .grid-facts-nav--buttons .grid-facts-nav-btn { flex: 1 1 0; min-width: 0; max-width: none; }
}
.grid-facts-nav .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.lb-board .lb-score-words { font-size: 0.85em; font-weight: 500; color: var(--muted); }
.archive-more { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.archive-more .archive-link { min-height: 44px; }
.archive-more-centered { justify-content: center; margin-top: 16px; }
.grid-filter-note { margin: 0 0 10px; font-size: 0.86rem; }
.catalog-tile-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.catalog-tile a.catalog-rules {
  align-self: stretch;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  text-align: center;
  line-height: 1.2;
}
.game-card.is-playable .catalog-tile-actions .btn-quiet {
  background: rgba(255, 253, 248, 0.92);
  border-color: rgba(248, 239, 220, 0.85);
  color: var(--petrol-deep);
}
.site-block.catalog-intro-block { max-width: none; margin-bottom: 4px; }
.site-block.catalog-intro-block h1 {
  font-size: clamp(1.45rem, 4.6vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.site-block.catalog-intro-block .catalog-intro-note { margin: 0; max-width: 62ch; }
/* EPOSIGMA-CATALOG-ARCHIVE-PLAY-CTA-20261102 — inherits shared --cta-* tokens */
.archive-panel .puzzle-card .puzzle-card-cta.btn-primary {
  color: var(--cta-ink, #2a1606);
}
.archive-panel .puzzle-card .puzzle-card-cta.btn-primary:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 2px;
}

/* #153 P1-9: the "?" rules link in every grid card keeps its compact 22px circle but now owns a real
   44x44 touch target (pseudo-element hit area, no layout cost). Small result links get a >= 44px
   hit area the same way. */
.puzzle-card .puzzle-card-heading > a.text-link {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  align-self: flex-start;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  min-width: 0;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--navy);
  font: 700 13px/1 var(--sans);
  text-decoration: none;
}
.puzzle-card .puzzle-card-heading > a.text-link::after {
  content: "";
  position: absolute;
  inset: -11px;
}
.puzzle-card .puzzle-card-heading > a.text-link:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; }
a.puzzle-card-number { position: relative; }
a.puzzle-card-number::after { content: ""; position: absolute; inset: -13px -6px; }
.lb-more { position: relative; display: inline-flex; align-items: center; min-height: 44px; }

/* #153 P2-12: the title-with-help variant must not wrap the game name ("Trouve-/mots") in the chip. */
.game-nav-item.title-with-help > a:first-child { white-space: nowrap; }

/* ==== #154 P2-13: remaining touch targets (buttons and stand-alone links reach ~44px; dense score tables stay dense) ==== */
/* Footer links and credit */
.foot-links a { min-height: 44px; }
.foot-credit { min-height: 44px; }
/* Breadcrumb: the visual line stays 28px, the hit area reaches 44px */
.site-breadcrumb a { position: relative; }
.site-breadcrumb a::after { content: ""; position: absolute; inset: -8px -4px; }
/* Tabs (leaderboard scope), salon filter button, grid pagination */
.tabs a { min-height: 44px; }
.home-multiplayer .home-salon-filter-btn { width: 44px; height: 44px; }
.game-nav-item.title-with-help > a.text-link { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
.grid-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin: 20px 0 4px; }
.grid-pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong, var(--line)); border-radius: 12px; background: var(--card); color: var(--navy); font-weight: 700; text-decoration: none; }
.grid-pager a:hover { background: color-mix(in srgb, var(--brass) 14%, var(--card)); }
.grid-pager a:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }
.grid-pager span { color: var(--muted); font-variant-numeric: tabular-nums; }
/* Pseudonym links in dense score tables: row height unchanged, the link box (or its hit layer) is 44px tall */
.lb-board .lb-pseudo { display: block; line-height: 44px; margin-block: -11px; }
.board-table a.lb-pseudo, .lb-cards li strong a { position: relative; display: inline-block; }
.board-table a.lb-pseudo::after, .lb-cards li strong a::after { content: ""; position: absolute; inset: -13px -8px; }
.podium strong a { position: relative; }
.podium strong a::after { content: ""; position: absolute; inset: -12px -8px; }
/* Salon creator name keeps its compact look but gets a 44px hit layer */
.salon-creator-profile { position: relative; }
.salon-creator-profile::after { content: ""; position: absolute; inset: -8px -4px; }
/* Stand-alone link lines: footer, home free-grid title, legal/comment link rows, "Voir les règles" */
.foot-links a { min-width: 44px; justify-content: center; }
.home-free-title-line a { position: relative; }
.home-free-title-line a::after { content: ""; position: absolute; inset: -13px -6px; }
.legal-actions a, .comment-note a, .game-start-rules-link { display: inline-flex; align-items: center; min-height: 44px; }
.legal-actions, .comment-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }

.lb-page-head.site-block.panel,
.activity-page-block.site-block.panel {
  margin-top: 0;
  max-width: none;
}
.lb-page-head :is(h1, h2),
.activity-page-block h1 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.lb-scope-tabs { margin: 12px 0 8px; flex-wrap: wrap; }
.lb-rankings.panel {
  padding: 12px 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.lb-empty-state { padding: 8px 4px 12px; }
.lb-empty-links { margin: 8px 0 12px; }
.lb-aggregate-table td,
.lb-multiplayer-table td { font-variant-numeric: tabular-nums; }
.lb-multiplayer-block { margin-top: 18px; }
.lb-stats-footnote { margin-top: 10px; }

.lb-ranked-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}
.lb-ranked-row {
  display: grid;
  grid-template-columns: 2rem 30px minmax(0, 1fr) minmax(5.5rem, auto);
  gap: 8px 10px;
  align-items: center;
  min-height: 44px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.lb-ranked-row.is-you {
  background: rgba(244, 230, 196, 0.55);
  border-radius: 8px;
  padding-inline: 6px;
}
.lb-rank-place {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  flex-shrink: 0;
}
.lb-ranked-row.is-rank-1 .lb-rank-place { color: var(--brass-deep); }
.lb-ranked-row.is-rank-2 .lb-rank-place { color: color-mix(in srgb, var(--navy) 85%, var(--muted)); }
.lb-ranked-row.is-rank-3 .lb-rank-place { color: var(--coral-text); }
.lb-compact-avatar,
.lb-compact-avatar.identity-mark,
.lb-compact-avatar.avatar-svg {
  display: block;
  width: 30px !important;
  height: 30px !important;
  max-width: 30px;
  max-height: 30px;
  flex: 0 0 30px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  align-self: center;
}
.lb-compact-avatar :is(img, svg, .social-avatar) {
  display: block;
  width: 30px !important;
  height: 30px !important;
  max-width: 30px;
  max-height: 30px;
  aspect-ratio: 1;
  object-fit: cover;
  overflow: hidden;
  flex: 0 0 30px;
  border-radius: 50%;
}
.lb-ranked-primary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.lb-ranked-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  max-width: 100%;
}
.lb-secondary-item .lb-metric-lbl { margin-inline-end: 0.35em; }
.lb-ranked-score {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  text-align: right;
}
.lb-metric-single {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lb-metric-primary-large .lb-metric-val {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  line-height: 1;
  color: var(--petrol-deep);
}
.lb-metric-single .lb-metric-lbl {
  font-size: 0.78rem;
  white-space: nowrap;
}
.lb-ranked-name {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.lb-ranked-name:hover { text-decoration: underline; }
.lb-ranked-row .lb-you {
  font-style: normal;
  color: var(--brass-deep);
  font-size: 0.75rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.lb-ranked-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 4px 10px;
  min-width: 0;
  max-width: 100%;
  text-align: right;
  font-size: 0.82rem;
  line-height: 1.35;
}
.lb-metric-lbl {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lb-metric-val { font-weight: 700; }
.lb-metric-primary .lb-metric-val { color: var(--petrol); }
.lb-ranked-metrics .lb-grid-link { font-weight: 600; }
@media (max-width: 768px) {
  .lb-ranked-row {
    grid-template-columns: 1.75rem 30px minmax(0, 1fr);
    grid-template-areas:
      "rank avatar name"
      ". . score";
    row-gap: 4px;
    min-height: 54px;
    padding-block: 8px;
  }
  .lb-rank-place { grid-area: rank; font-size: 1.35rem; }
  .lb-compact-avatar { grid-area: avatar; }
  .lb-ranked-primary { grid-area: name; }
  .lb-ranked-score {
    grid-area: score;
    justify-content: flex-start;
    text-align: left;
  }
  .lb-metric-single { justify-content: flex-start; }
  .lb-ranked-metrics {
    grid-area: metrics;
    justify-content: flex-start;
    text-align: left;
  }
}
@media (max-width: 390px) {
  .lb-ranked-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14rem;
  }
}

.site-block :is(h1) { margin: 0; }

/* Owner GO 2026-11-03: explanatory block on the Trouve-mots game page (below the grid list). */
.game-about.site-block .site-block-body {
  padding-top: 4px;
}
.game-about.site-block .site-block-body p {
  margin: 0.65em 0 0;
  line-height: 1.55;
  color: var(--ink, inherit);
}
.game-about.site-block .site-block-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
}
.game-about.site-block .site-block-footer .text-link {
  margin-top: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.feed-results { display: block; overflow-wrap: anywhere; }

/* Trouve-mots results: compact SSR actions, including on narrow phones. */
.results[data-results="trouve-mots"] .results-actions {
  flex-wrap: wrap;
  align-items: center;
}
.results[data-results="trouve-mots"] .results-actions .replay-control { margin: 0; width: auto; max-width: 100%; }
.results-replay-note { margin: 8px 0 0; text-align: center; }
/* Trouve-mots results use the shared three-button row. A one-column grid
   here used to override display:contents and keep the actions stacked on desktop. */
.results[data-results="trouve-mots"] .end-actions.trouve-end {
  scroll-margin-top: 96px;
}
.results[data-results="trouve-mots"] .trouve-end .solution-help,
.results[data-results="trouve-mots"] .trouve-end .replay-control {
  display: contents;
}
.results[data-results="trouve-mots"] .trouve-end .btn {
  min-height: 44px;
  box-sizing: border-box;
}
.results[data-results="trouve-mots"] .trouve-end .mm-premium-pill {
  position: static;
  flex: 0 0 auto;
  margin-left: 0;
}
.results[data-results="trouve-mots"] .trouve-end-note {
  margin: 0;
  color: var(--navy, #1c2b33);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
}
#solution { scroll-margin-top: 88px; }
.results[data-results="trouve-mots"] .solution-help { text-align: center; }
.results[data-results="trouve-mots"] .all-words {
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}
.results[data-results="trouve-mots"] .all-words summary {
  display: inline-flex;
  width: auto;
  min-height: 44px;
}
.results[data-results="trouve-mots"] .all-words-panel {
  margin-top: 12px;
  text-align: start;
}

/* Room identities belong beside their role, with no leading profile column. */
.feed .feed-item.feed-room {
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-areas: "mark sentence" "tail tail";
}
/* Override the older home-panel span rule: roles and results are prose,
   never block columns. Keep each small avatar attached to its name. */
.feed .feed-item.feed-room .feed-results { display: inline; font-size: inherit; line-height: inherit; }
.feed .feed-item.feed-room .feed-actor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
}
.feed .feed-item.feed-room .feed-actor .feed-user { white-space: nowrap; }
.feed .feed-item.feed-room .feed-avatar {
  display: inline-block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}
.feed-more { margin: 12px 0 0; text-align: center; }
.feed-pagination { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; }
.premium-helper { display: block; font-size: .72rem; font-weight: 400; line-height: 1.4; color: var(--muted); margin-top: 4px; }
.all-words > summary:has(.premium-helper) { flex-direction: column; gap: 0; }
@container activity-feed (min-width: 560px) {
  .feed .feed-item.feed-room {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    grid-template-areas: "mark sentence tail";
  }
}


/* Shared card surface for the same salon renderer on home and /salons. */
:root {
  --game-trouve-surface: #e1efe7;
  --game-trouve-border: #bfd5c8;
  --game-mot-surface: #e3ecf8;
  --game-mot-border: #c2d2e8;
  --game-mots-caches-surface: #f3ead8;
  --game-mots-caches-border: #e0d0af;
  --game-anagrammes-surface: #eee7f3;
  --game-anagrammes-border: #d9cbe2;
}
.panel.game-intro[data-game-tint="trouve-mots"],
.rules-page-panel[data-game-tint="trouve-mots"],
.play-shell[data-game-tint="trouve-mots"] > .play-shell-head.panel {
  background: var(--game-trouve-surface);
  border-color: var(--game-trouve-border);
}
.panel.game-intro[data-game-tint="mot-mystere"],
.rules-page-panel[data-game-tint="mot-mystere"],
.play-shell[data-game-tint="mot-mystere"] > .play-shell-head.panel {
  background: var(--game-mot-surface);
  border-color: var(--game-mot-border);
}
.panel.game-intro[data-game-tint="mots-caches"],
.rules-page-panel[data-game-tint="mots-caches"],
.play-shell[data-game-tint="mots-caches"] > .play-shell-head.panel,
.play-shell[data-game-tint="mots-caches"] > .play-shell-stage {
  --game-surface: var(--game-mots-caches-surface);
  background: var(--game-mots-caches-surface);
  border-color: var(--game-mots-caches-border);
}
.panel.game-intro[data-game-tint="anagrammes"],
.rules-page-panel[data-game-tint="anagrammes"],
.play-shell[data-game-tint="anagrammes"] > .play-shell-head.panel,
.play-shell[data-game-tint="anagrammes"] > .play-shell-stage .ana {
  --game-surface: var(--game-anagrammes-surface);
}
.panel.game-intro[data-game-tint="anagrammes"],
.rules-page-panel[data-game-tint="anagrammes"],
.play-shell[data-game-tint="anagrammes"] > .play-shell-head.panel {
  background: var(--game-anagrammes-surface);
  border-color: var(--game-anagrammes-border);
}
.panel.game-intro[data-game-tint="pyramots"],
.rules-page-panel[data-game-tint="pyramots"],
.play-shell[data-game-tint="pyramots"] > .play-shell-head.panel {
  background: var(--game-pyramido-surface);
  border-color: var(--game-pyramido-border);
}
.panel.game-intro[data-game-tint="indices-en-cascade"],
.rules-page-panel[data-game-tint="indices-en-cascade"],
.play-shell[data-game-tint="indices-en-cascade"] > .play-shell-head.panel {
  background: var(--game-indices-cascade-surface);
  border-color: var(--game-indices-cascade-border);
}
.play-shell[data-game-tint="pyramots"] > .game-play-panel {
  margin-top: 0;
  padding-top: 12px;
}
.catalog-tile[data-game="trouve-mots"].is-playable { background: var(--game-trouve-surface); border-color: var(--game-trouve-border); }
.catalog-tile[data-game="mot-mystere"].is-playable { background: var(--game-mot-surface); border-color: var(--game-mot-border); }
.catalog-tile[data-game="mots-caches"].is-playable { background: var(--game-mots-caches-surface); border-color: var(--game-mots-caches-border); color: var(--ink); }
.catalog-tile[data-game="mots-caches"].is-playable h2,
.catalog-tile[data-game="mots-caches"].is-playable .text-link { color: var(--navy); }
.catalog-tile[data-game="mots-caches"].is-playable p { color: var(--muted); }
.catalog-tile[data-game="anagrammes"].is-playable { background: var(--game-anagrammes-surface); border-color: var(--game-anagrammes-border); color: var(--ink); }
.catalog-tile[data-game="anagrammes"].is-playable h2,
.catalog-tile[data-game="anagrammes"].is-playable .text-link { color: var(--navy); }
.catalog-tile[data-game="anagrammes"].is-playable p { color: var(--muted); }
.catalog-tile[data-game="pyramots"].is-playable { background: var(--game-pyramido-surface); border-color: var(--game-pyramido-border); color: var(--ink); }
.catalog-tile[data-game="indices-en-cascade"].is-playable { background: var(--game-indices-cascade-surface); border-color: var(--game-indices-cascade-border); color: var(--ink); }
.catalog-tile[data-game="definimo"] { background: var(--game-definimo-surface); border-color: var(--game-definimo-border); color: var(--ink); }
.catalog-tile[data-game="la-roue-deposigma"] { background: var(--game-la-roue-surface); border-color: var(--game-la-roue-border); color: var(--ink); }
.catalog-tile[data-game="definimo"] h2,
.catalog-tile[data-game="la-roue-deposigma"] h2 { color: var(--navy); }
.catalog-tile[data-game="pyramots"].is-playable h2,
.catalog-tile[data-game="indices-en-cascade"].is-playable h2 { color: var(--navy); }
.catalog-tile[data-game="pyramots"].is-playable p,
.catalog-tile[data-game="indices-en-cascade"].is-playable p { color: var(--ink); }
.home-salon-row[data-game="adjacent-letter-grid"] {
  --salon-row-surface: var(--game-trouve-surface);
  --salon-row-border: var(--game-trouve-border);
}
.home-salon-row[data-game="mot-mystere"] {
  --salon-row-surface: var(--game-mot-surface);
  --salon-row-border: var(--game-mot-border);
}
.home-salon-row[data-game="placed-word-search"] {
  --salon-row-surface: var(--game-mots-caches-surface);
  --salon-row-border: var(--game-mots-caches-border);
}
.home-salon-row[data-game="anagrammes"] {
  --salon-row-surface: var(--game-anagrammes-surface);
  --salon-row-border: var(--game-anagrammes-border);
}
.home-salon-row[data-game="pyramots"] {
  --salon-row-surface: var(--game-pyramido-surface);
  --salon-row-border: var(--game-pyramido-border);
  color: var(--ink);
}
.home-salon-row[data-game="indices-cascade"] {
  --salon-row-surface: var(--game-indices-cascade-surface);
  --salon-row-border: var(--game-indices-cascade-border);
  color: var(--ink);
}
.home-multiplayer .home-salon-list > .home-salon-row,
.home-multiplayer .home-salon-list > .home-salon-row:first-child,
.game-salon-list > .home-salon-row,
.room-app .salon-list > .home-salon-row,
.room-app .salon-list > .home-salon-row:first-child {
  background: var(--salon-row-surface, var(--ivory));
  border: 1px solid var(--salon-row-border, var(--line));
  border-radius: 12px;
  box-shadow: 0 2px 9px rgba(28, 70, 46, .06);
}
/* A 44px touch target, with a deliberately smaller visible filter control. */
.home-multiplayer .home-salon-filter-btn,
.home-multiplayer .home-salon-filter-btn[aria-expanded="true"] {
  position: relative;
  width: 44px;
  height: 44px;
  z-index: auto;
  border: 0;
  background: transparent;
  color: var(--petrol);
}
.home-multiplayer .home-salon-filter-btn::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--teal) 10%, #f5f0e6);
  pointer-events: none;
}
.home-multiplayer .home-salon-filter-btn[aria-expanded="true"]::before {
  background: color-mix(in srgb, var(--teal) 18%, #f5f0e6);
  border-color: var(--teal);
}
.home-multiplayer .home-salon-filter-icon {
  position: relative;
  width: 16px;
  height: 16px;
}
.home-multiplayer .home-salon-filter-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -1px;
}

/* 2026-11-09 Owner: consistent colored game CTA buttons, centered in intro. */
.game-intro > .actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px auto 0;
  width: 100%;
}
.game-intro > .actions > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 15px;
  border: 1px solid #95b9a6;
  background: #e1f0e7;
  color: #124d38;
  font-weight: 750;
  text-align: center;
  line-height: 1.2;
}
.game-intro > .actions > .btn:hover { background: #c9e5d5; }
.game-intro > .actions > .btn:nth-child(2) {
  background: #f2a347;
  border-color: #b76c20;
  color: #442507;
}
.game-intro > .actions > .btn:nth-child(2):hover { background: #e99331; }
@media (max-width: 380px) {
  .game-intro > .actions { gap: 8px; }
  .game-intro > .actions > .btn { padding-inline: 12px; font-size: .91rem; }
}

/* Archive cards already have a check over their game icon.
   Hiding the duplicate check eliminates its extra line and unused space. */
.game-grid-browser .grid-archive-item .puzzle-card-done { display: none; }
.game-grid-browser .grid-archive-item .puzzle-card-top { align-items: center; }
.game-grid-browser .grid-archive-item .puzzle-card-copy { min-width: 0; flex: 1 1 auto; }
.game-grid-browser .grid-archive-item .puzzle-card-heading {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 6px;
}
.game-grid-browser .grid-archive-item .puzzle-card-title-line {
  display: flex;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
}
.game-grid-browser .grid-archive-item .puzzle-card-title-line .puzzle-card-title {
  line-height: 1.2;
}
.game-grid-browser .grid-archive-item .puzzle-card-heading > a.text-link {
  align-self: center;
  margin: 0;
  flex: 0 0 22px;
}

/* Shared first-paint breadcrumb spacing, including compact game layouts. */
body main#main:has(> .site-breadcrumb) { margin-top: 12px; padding-top: 0; }
@media (max-width: 640px) {
  body main#main:has(> .site-breadcrumb) { margin-top: 10px; }
}

/* Homepage only: inline identity and facts, with the action spanning both rows. */
.home-multiplayer .home-salon-list { grid-template-columns: minmax(0, 1fr); }
.home-multiplayer .home-salon-list > .home-salon-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "open action" "stats action";
  gap: 2px 10px;
  padding: 10px;
  min-height: 80px;
}
.home-multiplayer .home-salon-join.btn { min-height: 44px; }
@media (min-width: 960px) {
  .home-multiplayer .home-salon-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.home-salon-title-comma { display: none; }
.home-multiplayer .home-salon-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 4px;
}
.home-multiplayer .home-salon-summary .home-salon-open {
  display: inline-flex;
  max-width: 100%;
  gap: 4px;
  font-size: .85rem;
}
.home-multiplayer .home-salon-title-comma { display: inline; }
.home-multiplayer .salon-creator-label { text-transform: lowercase; }
.home-multiplayer .home-salon-meta { gap: 4px 6px; }
.home-multiplayer .home-salon-meta .home-salon-icon { display: none; }
.home-multiplayer .home-salon-stat + .home-salon-stat::before { content: "·"; }
.home-multiplayer .home-salon-join,
.home-multiplayer .home-salon-phase {
  align-self: center;
  max-width: 7rem;
  white-space: normal;
  text-align: center;
}

/* 2026-11-16 · Pastel game identities and readable catalogue cards.
   Previously the launch cards inherited ivory lettering from the old dark
   petrol .game-card.is-playable surface. Keep all 4 live titles readable. */
:is(
  .catalog-tile[data-game="trouve-mots"],
  .catalog-tile[data-game="mot-mystere"],
  .catalog-tile[data-game="mots-caches"],
  .catalog-tile[data-game="anagrammes"]
).is-playable {
  color: var(--ink);
}
:is(
  .catalog-tile[data-game="trouve-mots"],
  .catalog-tile[data-game="mot-mystere"],
  .catalog-tile[data-game="mots-caches"],
  .catalog-tile[data-game="anagrammes"],
  .catalog-tile[data-game="pyramots"],
  .catalog-tile[data-game="indices-en-cascade"]
).is-playable :is(h2, .catalog-tile-title h3, .game-logo, .text-link) {
  color: var(--navy);
}
:is(
  .home-game-tile[data-game="pyramots"],
  .home-game-tile[data-game="indices-en-cascade"],
  .home-catalogue .game-chip-wrap[data-game-tint="pyramots"],
  .home-catalogue .game-chip-wrap[data-game-tint="pyramido"],
  .home-catalogue .game-chip-wrap[data-game-tint="indices-en-cascade"]
) .game-logo { color: var(--navy); }
:is(
  .catalog-tile[data-game="trouve-mots"],
  .catalog-tile[data-game="mot-mystere"],
  .catalog-tile[data-game="mots-caches"],
  .catalog-tile[data-game="anagrammes"]
).is-playable p {
  color: var(--muted);
}

/* The actual letter-grid/board stays WHITE; use the game's identity colour
   only on the surrounding title, rankings and comments. No impact on other
   games, controls or scoring. */
.play-shell:is([data-game-tint="mots-caches"], [data-game-tint="anagrammes"]) > .play-shell-stage,
body:has(.grid-title-card[data-game-tint="mots-caches"]) .panel[data-published-grid],
body:has(.grid-title-card[data-game-tint="anagrammes"]) .panel[data-published-grid] {
  --game-surface: #fff;
  background: #fff;
  border-color: var(--line);
}
.play-shell[data-game-tint="anagrammes"] > .play-shell-stage .ana,
.play-shell[data-game-tint="mots-caches"] > .play-shell-stage .search-app {
  --game-surface: #fff;
}

/* Published-grid introduction cards use the same game identity as the
   play page, without tinting the actual grid. */
.grid-title-card[data-game-tint="mots-caches"] {
  background: var(--game-mots-caches-surface);
  border-color: var(--game-mots-caches-border);
}
.grid-title-card[data-game-tint="anagrammes"] {
  background: var(--game-anagrammes-surface);
  border-color: var(--game-anagrammes-border);
}
.grid-title-card[data-game-tint="pyramots"] {
  background: var(--game-pyramido-surface);
  border-color: var(--game-pyramido-border);
}
.grid-title-card[data-game-tint="indices-en-cascade"] {
  background: var(--game-indices-cascade-surface);
  border-color: var(--game-indices-cascade-border);
}
:is(.play-shell[data-game-tint="mots-caches"], body:has(.grid-title-card[data-game-tint="mots-caches"])) :is(.lb-board-card, .comments-card.panel) {
  background: var(--game-mots-caches-surface);
  border-color: var(--game-mots-caches-border);
  color: var(--ink);
}
:is(.play-shell[data-game-tint="anagrammes"], body:has(.grid-title-card[data-game-tint="anagrammes"])) :is(.lb-board-card, .comments-card.panel) {
  background: var(--game-anagrammes-surface);
  border-color: var(--game-anagrammes-border);
  color: var(--ink);
}
:is(.play-shell[data-game-tint="pyramots"], body:has(.grid-title-card[data-game-tint="pyramots"])) :is(.lb-board-card, .comments-card.panel) {
  background: var(--game-pyramido-surface);
  border-color: var(--game-pyramido-border);
  color: var(--ink);
}
:is(.play-shell[data-game-tint="indices-en-cascade"], body:has(.grid-title-card[data-game-tint="indices-en-cascade"])) :is(.lb-board-card, .comments-card.panel) {
  background: var(--game-indices-cascade-surface);
  border-color: var(--game-indices-cascade-border);
  color: var(--ink);
}

/* 2026-11-16 · Anagrammes: words / score / clock stay in this order.
   The clock is last with a fixed-width column; its digits cannot move the
   neighbouring meters as the seconds count down. Scope to SOLO timed runs. */
.ana-hud.is-words-only.has-clock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(4.7rem, .55fr) 7rem;
  gap: 6px;
  align-items: stretch;
}
.ana-hud.is-words-only.has-clock > .ana-clock {
  width: 7rem;
  min-width: 7rem;
  justify-self: end;
}
.ana-hud.is-words-only.has-clock #ana-timer {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-kerning: none;
  white-space: nowrap;
}
@media (max-width: 390px) {
  .ana-hud.is-words-only.has-clock {
    grid-template-columns: minmax(0, 1fr) minmax(3.8rem, .5fr) 6.4rem;
    gap: 4px;
  }
  .ana-hud.is-words-only.has-clock > .ana-clock {
    width: 6.4rem;
    min-width: 6.4rem;
    padding-inline: 5px;
  }
}

/* SOLO Anagrammes: reserve a fixed feedback slot across ready/selecting/
   validating/rejected/accepted. Never move the rack when feedback appears. */
#ana .ana-feedback {
  box-sizing: border-box;
  display: flex;
  height: 68px;
  min-height: 68px;
  max-height: 68px;
  margin: 0;
  overflow: hidden;
  line-height: 1.28;
  font-size: .98rem;
}
#ana .ana-feedback[data-tone="ready"],
#ana .ana-feedback[data-tone="selecting"] {
  display: flex;
  visibility: hidden;
}
#ana .ana-tools[data-solo-clear-only] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
#ana #ana-clear.btn-primary {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f5a347, #e58b22);
  color: #291c0c;
  border-color: #b76e17;
  font-weight: 800;
  opacity: 1;
}
#ana #ana-clear.btn-primary:disabled { opacity: .72; }
@media (max-width: 480px) {
  #ana .ana-feedback {
    height: 74px;
    min-height: 74px;
    max-height: 74px;
    padding: 7px 10px;
    font-size: .91rem;
    line-height: 1.28;
  }
}

/* Dedicated games use the same archive and pre-start components. */
/* Listing variants reuse the homepage palette and the shared white archive panel. */
.panel.game-intro[data-game-tint="definimo"],
.play-shell[data-game-tint="definimo"] > .play-shell-head.panel {
  background: var(--game-definimo-surface);
  border-color: var(--game-definimo-border);
}
.panel.game-intro[data-game-tint="la-roue-deposigma"],
.play-shell[data-game-tint="la-roue-deposigma"] > .play-shell-head.panel {
  background: var(--game-la-roue-surface);
  border-color: var(--game-la-roue-border);
}
.game-intro:is([data-game-tint="definimo"], [data-game-tint="la-roue-deposigma"]) > .lede {
  max-width: none;
  margin-bottom: 12px;
}
.game-intro:is([data-game-tint="definimo"], [data-game-tint="la-roue-deposigma"]) > .actions {
  margin-top: 0;
}
.game-intro-links { margin-top: 12px; }
.game-intro-links > summary { cursor: pointer; }
.game-intro-links .actions { flex-wrap: wrap; }
.game-ready-card { width: 100%; text-align: center; }
.game-ready-card .game-start-actions { display: flex; justify-content: center; }

.shared-end-actions [data-replay] { gap: .5rem; }

/* Incoming contacts: independent from multiplayer invitation badges. */
.contact-request-count { display:inline-flex; align-items:center; justify-content:center; min-width:1.5em; padding:0 .35em; border-radius:999px; background:var(--accent, #0e3c44); color:#fff; font-size:.8rem; font-weight:800; line-height:1.5; }
.contact-request-count[hidden] { display:none; }
.top button.header-cluster.nav-toggle { position:relative; }
.header-cluster > .contact-request-count { position:absolute; top:-.35rem; right:-.25rem; border:2px solid var(--paper, #fff); }
[data-contact-request-link] .contact-request-count { margin-inline-start:.35em; }

.home-salon-row[data-game="la-roue-deposigma"] { --salon-row-surface: #fff0f6; --salon-row-border: #e8a5c2; }

/* Solo finish controls share one row on desktop and stack on narrow screens. */
.play-shell .shared-end-actions:has([data-replay]) [data-replay] {
  background: transparent;
  border: 2px solid #267549;
  color: #21643f;
}
@media (min-width: 900px) {
  .play-shell .shared-end-actions:has([data-replay]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .play-shell .shared-end-actions:has([data-replay]) .btn { width: 100%; min-width: 0; box-sizing: border-box; }
  .play-shell .shared-end-actions:has([data-replay]) > form,
  .play-shell .shared-end-actions:has([data-replay]) .solution-help form { display: contents; }
  .play-shell .shared-end-actions:has([data-replay]) .end-action-note:empty { display: none; }
}

.play-shell > .comments-card { margin-top: 0; }


/* The existing room always uses the same card template as salon creation. */
.salon-resume[hidden] { display: none !important; }
.salon-resume [data-resume-link][hidden] { display: none !important; }
.salon-resume .salon-resume-description { margin: 0 0 12px; color: var(--muted); }
.salon-resume [data-resume-link] { min-height: 44px; }


.lr-round-preparing {
  margin: 10px auto;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  text-align: center;
}
.lr-round-preparing strong { font-variant-numeric: tabular-nums; }

/* Single-active-salon feedback is visible before attempting another room. */
.salon-single-active-message { margin: 12px 0; line-height: 1.55; color: var(--ink); font-weight: 600; }
.salon-single-active-message[hidden] { display: none !important; }
.salon-single-active-message a { color: var(--accent); text-decoration: underline; }
