:root {
  color-scheme: dark;
  --ink: #fff7ea;
  --muted: #b9b7d1;
  --night: #070815;
  --desktop: #0d1024;
  --panel: #151a35;
  --panel-raised: #1d2448;
  --panel-deep: #090c1d;
  --cream: #fff7df;
  --cyan: #36e6ff;
  --cyan-deep: #10a8bc;
  --pink: #ff4f9f;
  --violet: #795cff;
  --orange: #ff914d;
  --blue: #3c8cff;
  --gold: #ffd166;
  --danger: #ff5f72;
  --line: #3b4772;
  --shadow: #02040a;
  --nono-clue: #d45e9d;
  --nono-clue-solved: #60466f;
  --nono-paper: #f2efff;
  --nono-grid: #6575ad;
  --nono-cross: #b42346;
  --readable-ui: Arial, Helvetica, "Segoe UI", sans-serif;
  --cell-size: 42px;
  --mine-cell-size: 34px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  scrollbar-gutter: stable both-edges;
  background: var(--night);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--desktop);
  background-image:
    linear-gradient(rgba(7, 8, 21, 0.13), rgba(7, 8, 21, 0.3)),
    url("/assets/neon-coast-background-v2.jpg");
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a {
  color: var(--cyan);
}

button,
select {
  font: inherit;
}

button,
.button-link,
select {
  min-height: 42px;
  border: 1px solid #6575ad;
  border-radius: 7px;
  color: var(--ink);
  background: linear-gradient(145deg, #35406c, #22274d);
  box-shadow:
    inset 1px 1px rgba(255, 255, 255, 0.13),
    inset -1px -1px rgba(0, 0, 0, 0.45),
    0 2px 0 var(--shadow);
  cursor: pointer;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  text-decoration: none;
}

button:hover,
.button-link:hover,
select:hover {
  border-color: var(--cyan);
}

button:focus-visible,
.button-link:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

button:active,
.button-link:active,
button[aria-pressed="true"] {
  transform: translateY(1px);
  color: #08110f;
  background: var(--cyan);
  box-shadow: inset 1px 1px rgba(0, 0, 0, 0.35);
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-150%);
  color: #07100f;
  background: var(--cyan);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 21, 0.92);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.36), 0 1px 0 rgba(255, 79, 159, 0.2);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1460px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  font-weight: 800;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 220, 130, 0.76);
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe77a 0 28%, var(--orange) 58%, var(--pink));
  box-shadow: 0 0 22px rgba(255, 79, 159, 0.42), 0 0 8px rgba(255, 209, 102, 0.38);
}

.brand-mark::after {
  position: absolute;
  inset: 0;
  content: "";
  background: repeating-linear-gradient(to bottom, transparent 0 6px, rgba(7, 8, 21, 0.72) 6px 8px);
}

.brand strong {
  display: block;
  font-size: 1.02rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.site-nav a {
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(54, 230, 255, 0.42);
}

.home-page .header-inner {
  justify-content: center;
  min-height: 44px;
}

.home-page .site-nav {
  justify-content: center;
  flex-wrap: wrap;
}

.home-page .site-nav a {
  padding: 6px 10px;
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 800;
}

.home-page .page-layout {
  grid-template-columns: minmax(0, 720px);
  width: min(720px, calc(100% - 24px));
}

.home-page .site-footer {
  width: min(720px, calc(100% - 32px));
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1040px);
  justify-content: center;
  width: min(1040px, calc(100% - 24px));
  margin: 24px auto 0;
}

.page-content {
  min-width: 0;
}

.window {
  overflow: hidden;
  border: 1px solid rgba(54, 230, 255, 0.46);
  border-radius: 12px;
  background: var(--panel);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.46),
    0 0 32px rgba(255, 79, 159, 0.08),
    inset 1px 1px rgba(255, 255, 255, 0.09);
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 7px 10px 7px 14px;
  color: #18091a;
  background: linear-gradient(90deg, var(--pink), var(--orange) 55%, var(--gold));
  font-family: "Courier New", monospace;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.window-controls {
  display: flex;
  gap: 5px;
}

.window-controls span {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(4, 17, 14, 0.72);
  background: rgba(255, 255, 255, 0.35);
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.55);
}

.hero-window {
  padding-bottom: 8px;
  background: #0b0d20;
}

.arcade-menu {
  padding: 0 0 30px;
  border-color: rgba(54, 230, 255, 0.7);
  background: rgba(7, 9, 27, 0.95);
  box-shadow:
    0 0 8px rgba(54, 230, 255, 0.42),
    0 0 24px rgba(54, 230, 255, 0.22),
    0 22px 55px rgba(0, 0, 0, 0.48),
    inset 0 0 32px rgba(54, 230, 255, 0.035);
}

.home-intro {
  max-width: 54ch;
  margin: 0 auto 20px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  text-align: center;
}

.arcade-masthead {
  display: grid;
  justify-items: center;
  padding: 34px 24px 24px;
  text-align: center;
}

.arcade-sun {
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
}

.arcade-masthead h1 {
  max-width: none;
  margin: 0;
  color: var(--pink);
  font-family: "Arial Black", Impact, "Segoe UI Black", sans-serif;
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-style: italic;
  letter-spacing: -0.075em;
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #5b2aa8, 0 0 24px rgba(255, 79, 159, 0.28);
}

.arcade-masthead h1 span {
  color: var(--gold);
  background: linear-gradient(180deg, #ffe47a, var(--orange) 52%, var(--pink));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.arcade-masthead p {
  margin: 12px 0 0;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 16px;
  gap: 18px;
  color: #fff4dc;
  background: linear-gradient(90deg, #ae287b, #5f39c6 55%, #126f99);
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero {
  display: block;
  background: var(--panel-deep);
}

.hero-copy-block {
  position: relative;
  z-index: 1;
  padding: clamp(34px, 5vw, 68px);
  background:
    radial-gradient(circle at 12% 0%, rgba(121, 92, 255, 0.24), transparent 26rem),
    radial-gradient(circle at 92% 80%, rgba(255, 79, 159, 0.15), transparent 26rem),
    linear-gradient(115deg, rgba(10, 13, 32, 0.98) 18%, rgba(17, 21, 50, 0.98) 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.08;
}

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 6vw, 5.25rem);
  letter-spacing: -0.055em;
}

.hero h1 {
  max-width: 9ch;
  margin: 0 0 8px;
  color: var(--pink);
  font-family: "Arial Black", Impact, "Segoe UI Black", sans-serif;
  font-size: clamp(3rem, 7vw, 6.2rem);
  font-style: italic;
  letter-spacing: -0.075em;
  line-height: 0.84;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 #5b2aa8, 8px 8px 24px rgba(255, 79, 159, 0.35);
}

.hero h1 span {
  color: var(--gold);
  background: linear-gradient(180deg, #ffe47a, var(--orange) 52%, var(--pink));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  margin: 18px 0 6px;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 58ch;
  color: #c3ccdf;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.primary-action {
  border-color: rgba(255, 255, 255, 0.56);
  color: #160b1a;
  background: linear-gradient(105deg, var(--gold), var(--orange) 48%, var(--pink));
  box-shadow: 0 8px 24px rgba(255, 79, 159, 0.24);
  font-weight: 850;
}

.text-action {
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.shelf {
  padding: clamp(24px, 4vw, 44px);
}

.game-shelf {
  padding: 0 30px;
}

.arcade-menu .game-grid {
  grid-template-columns: repeat(2, minmax(120px, 150px));
  justify-content: center;
  gap: 18px;
}

.arcade-menu .game-card {
  align-items: center;
  min-height: 142px;
  padding: 16px 8px 13px;
  justify-content: center;
  border-radius: 10px;
  text-align: center;
}

.arcade-menu .game-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: 150px;
  justify-self: center;
}

.arcade-menu .game-icon {
  width: 68px;
  height: 68px;
  margin: 0 0 12px;
  border-width: 2px;
  border-radius: 9px;
  font-size: 1.75rem;
}

.arcade-menu .game-card h2 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.15;
}

.arcade-menu .card-status {
  margin-top: 6px;
  padding: 0;
  font-size: 0.62rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading p {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.game-card {
  position: relative;
  display: flex;
  min-height: 190px;
  padding: 18px;
  flex-direction: column;
  border: 1px solid var(--line);
  color: var(--ink);
  background: linear-gradient(145deg, #22284c, #12162d);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--card-accent, var(--cyan)) 14%, transparent), transparent 11rem),
    linear-gradient(145deg, #22284c, #12162d);
  text-decoration: none;
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.07);
}

.game-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: var(--card-accent, var(--cyan));
}

.game-card:hover {
  border-color: var(--card-accent, var(--cyan));
  transform: translateY(-2px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--card-accent, var(--cyan)) 16%, transparent);
}

.game-card.is-planned {
  color: #a9b2c7;
  background: rgba(14, 21, 36, 0.74);
}

.game-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid var(--card-accent, var(--violet));
  color: var(--card-accent, var(--violet));
  background: #0b1120;
  font-family: "Courier New", monospace;
  font-size: 1.35rem;
  font-weight: 800;
}

.accent-cyan { --card-accent: var(--cyan); }
.accent-pink { --card-accent: var(--pink); }
.accent-gold { --card-accent: var(--gold); }
.accent-violet { --card-accent: #a98bff; }
.accent-coral { --card-accent: var(--orange); }
.accent-blue { --card-accent: var(--blue); }

.game-card h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.card-status {
  display: inline-block;
  margin-top: auto;
  padding-top: 18px;
  color: var(--card-accent, var(--cyan));
  font-family: "Courier New", monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.is-planned .card-status {
  color: #7f8aa2;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--line);
}

.principles div {
  padding: 22px;
  background: var(--panel-deep);
}

.principles strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-family: "Courier New", monospace;
  text-transform: uppercase;
}

.principles p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.game-heading {
  padding: 24px 28px 16px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(54, 230, 255, 0.11), transparent 22rem),
    radial-gradient(circle at 80% 0%, rgba(255, 79, 159, 0.11), transparent 22rem);
}

.game-heading h1 {
  max-width: none;
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.game-heading p {
  margin: 0;
  color: var(--muted);
}

.game-links {
  display: flex;
  justify-content: center;
  gap: 5px 16px;
  padding: 0 20px 18px;
  flex-wrap: wrap;
  font-family: "Courier New", monospace;
  font-size: 0.86rem;
}

.game-links a,
.game-links button {
  min-height: auto;
  padding: 3px;
  border: 0;
  color: var(--cyan);
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
}

.game-panel {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 18px;
  border: 1px solid rgba(54, 230, 255, 0.46);
  border-radius: 8px;
  background: #0e1627;
  box-shadow:
    0 0 0 6px rgba(54, 230, 255, 0.035),
    inset 0 0 34px rgba(0, 0, 0, 0.45);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar button,
.toolbar select {
  padding: 8px 12px;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-top: 14px;
  padding: 8px 12px;
  gap: 12px;
  border: 1px solid #2e3c58;
  color: #c8d1e4;
  background: #0a101d;
  font-family: "Courier New", monospace;
  font-size: 0.86rem;
}

.status-strip strong {
  color: var(--gold);
}

.game-board-wrap {
  overflow: auto;
  padding: 10px;
  border: 1px solid #070b12;
  background: #27334e;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
}

.nonogram-board {
  --row-clue-width: 104px;
  display: grid;
  width: max-content;
  margin: auto;
  color: var(--ink);
  background: #090d24;
  user-select: none;
}

.nonogram-board[data-size="10"] {
  --row-clue-width: 120px;
}

.nonogram-board[data-size="15"] {
  --cell-size: 36px;
  --row-clue-width: 120px;
}

.nono-corner,
.nono-clue {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--cell-size);
  min-height: var(--cell-size);
  padding: 4px;
  border: 1px solid var(--nono-grid);
  color: #180d25;
  background: linear-gradient(145deg, #ff9d71, var(--nono-clue));
  font-family: var(--readable-ui);
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32);
}

.nono-corner {
  color: #24102e;
}

.nono-clue.column {
  align-items: end;
  line-height: 1.1;
  white-space: pre-line;
}

.nono-clue.row {
  justify-content: end;
  width: var(--row-clue-width);
  min-width: var(--row-clue-width);
  padding-right: 9px;
  white-space: nowrap;
  word-spacing: 4px;
}

.nonogram-board[data-size="15"] .nono-clue {
  font-size: calc(1rem + 1pt);
  line-height: 1.1;
}

.nonogram-board[data-size="15"] .nono-clue.column {
  padding-block: 6px;
  line-height: 1.18;
}

.nonogram-board[data-size="15"] .nono-clue.row {
  padding-inline: 2px 5px;
  word-spacing: 1px;
}

.nono-clue.solved {
  color: #d9cfe4;
  background: var(--nono-clue-solved);
  text-decoration: line-through;
  text-decoration-color: #b6a6c4;
  text-shadow: none;
}

.nono-clue.has-mistake {
  color: #fff;
  background: linear-gradient(145deg, #7b173d, #43132f);
  box-shadow: inset 0 0 0 2px var(--danger), 0 0 10px rgba(255, 95, 114, 0.38);
  text-decoration: none;
}

.nono-cell {
  position: relative;
  width: var(--cell-size);
  min-width: var(--cell-size);
  height: var(--cell-size);
  min-height: var(--cell-size);
  padding: 0;
  border: 1px solid var(--nono-grid);
  border-radius: 0;
  background: var(--nono-paper);
  box-shadow: none;
  cursor: crosshair;
  touch-action: none;
  transform: none;
}

.nono-cell[aria-pressed="true"] {
  color: inherit;
  box-shadow: none;
  transform: none;
}

.nono-cell.major-column,
.nono-clue.major-column {
  border-right-width: 3px;
  border-right-color: #271848;
}

.nono-cell.major-row,
.nono-clue.major-row {
  border-bottom-width: 3px;
  border-bottom-color: #271848;
}

.nono-cell[data-state="filled"] {
  background: var(--nono-paper);
}

.nono-cell[data-state="filled"]::before {
  position: absolute;
  inset: 3px;
  border-radius: 1px;
  content: "";
  background: #151922;
  pointer-events: none;
}

.nono-cell[data-state="crossed"] {
  background: var(--nono-paper);
}

.nono-cell[data-state="crossed"]::before,
.nono-cell[data-state="crossed"]::after {
  position: absolute;
  top: 50%;
  left: 18%;
  width: 64%;
  height: 3px;
  content: "";
  border-radius: 99px;
  background: var(--nono-cross);
}

.nono-cell[data-state="crossed"]::before {
  transform: rotate(45deg);
}

.nono-cell[data-state="crossed"]::after {
  transform: rotate(-45deg);
}

.nono-cell.is-hinted {
  box-shadow: inset 0 0 0 3px var(--gold);
}

.nono-cell.is-mistake {
  z-index: 2;
  box-shadow: inset 0 0 0 3px var(--danger), 0 0 12px rgba(255, 95, 114, 0.78);
}

.nonogram-library {
  width: min(680px, calc(100% - 24px));
  margin: 0 auto 24px;
  padding: 14px;
  border: 1px solid rgba(255, 79, 159, 0.58);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% -10%, rgba(121, 92, 255, 0.24), transparent 28rem),
    rgba(5, 7, 25, 0.91);
  box-shadow:
    0 0 8px rgba(255, 79, 159, 0.42),
    0 0 24px rgba(255, 79, 159, 0.22),
    0 22px 55px rgba(0, 0, 0, 0.48);
}

.library-topline,
.puzzle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 4px 6px 12px;
  gap: 12px;
  color: #f7efff;
  font-family: var(--readable-ui);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.library-topline span,
.puzzle-bar span {
  color: #cbb9eb;
  font-size: 0.84rem;
}

.nono-folders {
  display: grid;
  gap: 10px;
}

.nono-folder {
  overflow: hidden;
  border: 1px solid #5a438c;
  border-radius: 12px;
  background: rgba(8, 9, 29, 0.82);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.28);
}

.nono-folder summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 74px;
  padding: 10px 14px;
  gap: 10px 14px;
  color: #fff6ef;
  background: linear-gradient(100deg, #21153f, #171533 58%, #30153f);
  cursor: pointer;
  list-style: none;
}

.nono-folder summary::-webkit-details-marker {
  display: none;
}

.folder-icon {
  position: relative;
  width: 42px;
  height: 31px;
  border: 2px solid #c5a8ff;
  border-radius: 4px;
  background: linear-gradient(145deg, #8d64e4, #4a2b82);
  box-shadow: 0 0 12px rgba(121, 92, 255, 0.42);
}

.folder-icon::before {
  position: absolute;
  bottom: 25px;
  left: 2px;
  width: 18px;
  height: 7px;
  border: 2px solid #c5a8ff;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  content: "";
  background: #6c45ba;
}

.folder-copy {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.folder-copy strong {
  color: #fff7ea;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.12rem;
}

.folder-count {
  color: #d8ccef;
  font-family: var(--readable-ui);
  font-size: 0.86rem;
  font-weight: 700;
}

.folder-percent {
  color: var(--cyan);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(54, 230, 255, 0.48);
}

.folder-meter {
  grid-column: 2 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #09081a;
}

.folder-meter i {
  display: block;
  width: var(--folder-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
  box-shadow: 0 0 9px rgba(255, 79, 159, 0.5);
}

.puzzle-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(121, 92, 255, 0.34);
}

.puzzle-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 8px 10px 10px;
  gap: 10px;
  border-top: 1px solid rgba(121, 92, 255, 0.24);
}

.puzzle-pager button {
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid #68529a;
  border-radius: 8px;
  color: #fff6ef;
  background: linear-gradient(145deg, #2b1d50, #171833);
  font-family: var(--readable-ui);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.puzzle-pager button[aria-disabled="true"] {
  border-color: #39344f;
  color: #756f89;
  cursor: default;
  opacity: 0.72;
}

.puzzle-page-range {
  color: #d8ccef;
  font-family: var(--readable-ui);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.puzzle-tile {
  display: grid;
  min-height: 122px;
  padding: 10px 8px;
  place-items: center;
  border: 1px solid #4c4678;
  border-radius: 9px;
  color: #fff6ef;
  background: linear-gradient(145deg, rgba(38, 31, 77, 0.96), rgba(14, 18, 46, 0.96));
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 0 16px rgba(54, 230, 255, 0.025);
}

.puzzle-tile:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(54, 230, 255, 0.14);
}

.puzzle-tile.is-started {
  border-color: #8c63db;
}

.puzzle-tile.is-complete {
  border-color: rgba(255, 79, 159, 0.7);
  background: linear-gradient(145deg, rgba(62, 28, 82, 0.96), rgba(18, 19, 48, 0.96));
}

.puzzle-tile strong {
  display: block;
}

.puzzle-tile strong {
  margin-top: 7px;
  font-size: 0.78rem;
}

.puzzle-visual {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid #7653b4;
  border-radius: 7px;
  color: var(--pink);
  background: #0a0b20;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.2rem;
  text-shadow: 0 0 10px rgba(255, 79, 159, 0.55);
}

.mini-nonogram {
  display: grid;
  grid-template-columns: repeat(var(--mini-size), 1fr);
  overflow: hidden;
  background: var(--nono-paper);
}

.mini-nonogram span {
  width: 100%;
  aspect-ratio: 1;
  background: var(--nono-paper);
}

.mini-nonogram span.filled {
  background: #151922;
}

.puzzle-bar {
  min-height: 46px;
  padding-inline: 2px;
  font-size: 1rem;
  flex-wrap: wrap;
}

.puzzle-bar span {
  margin-left: auto;
  font-size: 0.96rem;
}

.completion-dialog {
  width: min(470px, calc(100% - 24px));
  padding: 24px;
  overflow: visible;
  border: 2px solid var(--pink);
  border-radius: 18px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 92, 255, 0.42), transparent 17rem),
    linear-gradient(155deg, #151033, #070918 76%);
  box-shadow: 0 0 0 1px rgba(54, 230, 255, 0.48), 0 0 38px rgba(255, 79, 159, 0.42), 0 28px 80px rgba(0, 0, 0, 0.72);
  text-align: center;
}

.completion-dialog[open] {
  animation: completion-pop 220ms ease-out;
}

.completion-dialog::backdrop {
  background: rgba(3, 3, 15, 0.76);
  backdrop-filter: blur(5px);
}

.completion-dialog form {
  margin: 0;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  color: #e9ddff;
  background: transparent;
  box-shadow: none;
  font-size: 1.6rem;
}

.dialog-close:focus-visible {
  outline: 0;
  color: #fff;
  text-shadow: 0 0 9px var(--cyan);
}

#sudoku-complete .dialog-close,
#sudoku-complete .dialog-close:hover,
#sudoku-complete .dialog-close:focus,
#sudoku-complete .dialog-close:active {
  border: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  transform: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

#sudoku-complete .dialog-close:focus-visible {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

#sudoku-complete {
  -webkit-user-select: none;
  user-select: none;
}

#sudoku-complete:focus {
  outline: 0;
}

.completion-kicker {
  margin: 0 0 4px;
  color: var(--cyan);
  font-family: var(--readable-ui);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.completion-dialog h2 {
  margin: 0 0 16px;
  color: var(--pink);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(1.8rem, 8vw, 2.8rem);
  font-style: italic;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #40105f, 0 0 12px rgba(255, 79, 159, 0.55);
}

.completion-preview {
  width: min(260px, 68vw);
  margin: 0 auto 16px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 9px;
  background:
    linear-gradient(var(--nono-paper), var(--nono-paper)) padding-box,
    linear-gradient(120deg, var(--cyan), var(--violet), var(--pink), var(--gold)) border-box;
  box-shadow: 0 0 22px rgba(54, 230, 255, 0.16);
}

.completion-preview.mini-nonogram {
  grid-template-columns: repeat(var(--mini-size), 1fr);
}

.completion-time {
  margin: 0;
  color: #c9c2dd;
  font-family: var(--readable-ui);
  font-size: 0.94rem;
}

.completion-time strong {
  color: var(--gold);
}

.completion-pack-progress {
  margin: 6px 0 18px;
  color: #9f96bd;
  font-family: var(--readable-ui);
  font-size: 0.88rem;
}

.completion-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

#sudoku-complete .completion-actions {
  margin-top: 12px;
}

.completion-actions button,
.completion-actions .button-link,
.control-dock .button-link {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #7653b4;
  border-radius: 7px;
  color: #fff5e8;
  background: linear-gradient(145deg, #43245e, #181a42);
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.13), 0 3px 10px rgba(0, 0, 0, 0.24);
  font-weight: 750;
  text-decoration: none;
}

.completion-actions button:first-child {
  border-color: #fff0b5;
  color: #1b0b26;
  background: linear-gradient(115deg, var(--gold), var(--orange) 48%, var(--pink));
}

@keyframes completion-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mine-board {
  display: grid;
  width: max-content;
  margin: auto;
  gap: 1px;
  padding: 5px;
  background: #080c14;
  user-select: none;
}

.mine-cell {
  display: grid;
  width: var(--mine-cell-size);
  min-width: var(--mine-cell-size);
  height: var(--mine-cell-size);
  min-height: var(--mine-cell-size);
  padding: 0;
  place-items: center;
  border: 1px solid #697797;
  border-radius: 1px;
  color: #152035;
  background: linear-gradient(145deg, #364561, #222d45);
  box-shadow:
    inset 2px 2px rgba(255, 255, 255, 0.13),
    inset -2px -2px rgba(0, 0, 0, 0.4);
  font-family: "Courier New", monospace;
  font-weight: 900;
}

.mine-cell.revealed {
  border-color: #8991a0;
  color: #141923;
  background: #d9d9d1;
  box-shadow: none;
}

.mine-cell.flagged {
  color: var(--gold);
}

.mine-cell.mine {
  color: #fff;
  background: var(--danger);
}

.mine-cell[data-adjacent="1"] { color: #1353c4; }
.mine-cell[data-adjacent="2"] { color: #14753a; }
.mine-cell[data-adjacent="3"] { color: #c13535; }
.mine-cell[data-adjacent="4"] { color: #5424a8; }
.mine-cell[data-adjacent="5"],
.mine-cell[data-adjacent="6"],
.mine-cell[data-adjacent="7"],
.mine-cell[data-adjacent="8"] { color: #6d263d; }

.rules-panel {
  margin-top: 24px;
  padding: clamp(24px, 4vw, 42px);
  color: #c7d0e2;
  line-height: 1.7;
}

.rules-panel h2,
.rules-panel h3 {
  color: var(--ink);
}

.rules-panel h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.rules-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.rules-panel kbd {
  padding: 2px 6px;
  border: 1px solid #68738a;
  border-radius: 3px;
  color: var(--ink);
  background: #101727;
  box-shadow: 0 2px 0 #05070c;
  font-family: "Courier New", monospace;
}

.site-footer {
  width: min(1040px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 24px 0 40px;
  color: #818ca4;
  font-size: 0.84rem;
  text-align: center;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.site-footer nav a {
  display: inline-flex;
  min-height: 40px;
  padding: 5px 3px;
  align-items: center;
}

.info-page .page-layout {
  grid-template-columns: minmax(0, 760px);
  width: min(760px, calc(100% - 24px));
}

.info-card {
  padding: clamp(26px, 5vw, 48px);
  background:
    radial-gradient(circle at 100% 0%, rgba(121, 92, 255, 0.16), transparent 22rem),
    rgba(7, 9, 27, 0.96);
}

.info-card h1 {
  max-width: none;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: clamp(2.1rem, 7vw, 3.6rem);
}

.info-card h2 {
  margin: 30px 0 8px;
  color: var(--cyan);
  font-size: 1.2rem;
}

.info-card p,
.info-card li {
  color: #d2d4e4;
  line-height: 1.7;
}

.info-card a {
  overflow-wrap: anywhere;
}

.info-lead {
  max-width: 56ch;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 1.08rem;
}

.info-note {
  margin-top: 30px;
  padding: 14px 16px;
  border-left: 3px solid var(--pink);
  background: rgba(255, 79, 159, 0.08);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 19, 42, 0.84);
}

.faq-list summary {
  padding: 16px 18px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.faq-list details p {
  margin: 0;
  padding: 0 18px 18px;
}

.prototype-note {
  padding: 12px 16px;
  border: 1px solid #3b4968;
  color: #aeb8cb;
  background: #0b111e;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.6;
}

@media (max-width: 1220px) {
  .game-panel {
    width: min(680px, calc(100% - 32px));
  }
}

@media (max-width: 940px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .arcade-menu .game-grid {
    grid-template-columns: repeat(2, minmax(120px, 150px));
  }
}

@media (max-width: 620px) {
  :root {
    --cell-size: 34px;
    --mine-cell-size: 30px;
  }

  .header-inner {
    align-items: flex-start;
    padding: 12px 0;
    flex-direction: column;
    gap: 8px;
  }

  .home-page .header-inner {
    align-items: center;
    padding: 6px 0;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }

  .home-page .site-nav {
    justify-content: flex-start;
  }

  .hero-copy-block,
  .shelf,
  .rules-panel {
    padding: 24px 18px;
  }

  .hero-ribbon span:last-child {
    display: none;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 18vw, 5.2rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button-link {
    width: 100%;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .game-grid,
  .principles,
  .rules-columns {
    grid-template-columns: 1fr;
  }

  .game-shelf {
    padding: 0 14px;
  }

  .arcade-menu {
    padding-bottom: 16px;
  }

  .arcade-menu .game-grid {
    grid-template-columns: repeat(2, minmax(0, 150px));
  }

  .game-panel {
    width: calc(100% - 16px);
    padding: 10px;
  }

  .nono-clue.row {
    min-width: 64px;
  }

  .nono-clue.column {
    min-height: 60px;
  }

  .nonogram-board[data-size="5"] {
    --cell-size: clamp(38px, 11.5vw, 44px);
    --row-clue-width: 64px;
  }

  .nonogram-board[data-size="10"] {
    --cell-size: clamp(19px, 5.4vw, 29px);
    --row-clue-width: 80px;
  }

  .nonogram-board[data-size="15"] {
    --cell-size: clamp(24px, 7vw, 28px);
    --row-clue-width: 92px;
  }

  .nonogram-board[data-size="10"] .nono-clue {
    font-size: 1.06rem;
    line-height: 1.08;
  }

  .nonogram-board[data-size="10"] .nono-clue.row {
    padding-inline: 2px 5px;
    font-size: 1rem;
    word-spacing: 1px;
    white-space: nowrap;
  }

  .nonogram-board[data-size="10"] .nono-cell[data-state="filled"]::before {
    inset: 2px;
  }

  .nonogram-board[data-size="15"] .nono-clue {
    font-size: calc(0.8rem + 1pt);
    line-height: 1.1;
  }

  .nonogram-board[data-size="15"] .nono-clue.column {
    padding-block: 4px;
    line-height: 1.16;
  }

  .nonogram-board[data-size="15"] .nono-clue.row {
    padding-inline: 2px 4px;
    font-size: calc(0.76rem + 1pt);
    word-spacing: 0;
  }

  .nonogram-board[data-size="15"] .nono-cell[data-state="filled"]::before {
    inset: 2px;
  }

  .status-strip {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .game-card,
  button {
    transition: transform 100ms ease, border-color 100ms ease, background 100ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .completion-dialog[open] {
    animation: none;
  }
}

/* Transparent masthead and compact arcade play surfaces. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.header-inner,
.home-page .header-inner {
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 4px 0 8px;
  flex-direction: column;
  gap: 0;
}

.site-wordmark-link {
  display: block;
  width: min(480px, 48vw);
  line-height: 0;
}

.site-wordmark {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  margin-inline: auto;
  object-fit: contain;
}

.game-masthead {
  display: inline-block;
  padding: 5px 14px 1px;
  color: var(--pink);
  background: linear-gradient(180deg, #fff3ac 0%, #ffb341 36%, #ff547d 68%, #e73eff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Arial Black", Impact, "Segoe UI Black", sans-serif;
  font-size: clamp(2.35rem, 5.2vw, 4.15rem);
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.94;
  text-decoration: none;
  text-transform: uppercase;
  filter: drop-shadow(4px 5px 0 #40105f) drop-shadow(0 0 10px rgba(255, 63, 201, 0.48));
}

.site-nav,
.home-page .site-nav {
  justify-content: center;
  width: auto;
  gap: 4px;
  overflow: visible;
  flex-wrap: wrap;
}

.site-nav a,
.home-page .site-nav a {
  display: inline-flex;
  min-height: 40px;
  padding: 4px 9px;
  align-items: center;
  color: #f3d9ff;
  font-family: var(--readable-ui);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 700;
  text-shadow: 0 1px 2px #070815, 0 0 10px rgba(255, 79, 159, 0.7);
}

.home-page .page-layout {
  grid-template-columns: minmax(0, 900px);
  width: min(900px, calc(100% - 24px));
}

.home-page .site-footer {
  width: min(900px, calc(100% - 32px));
}

.home-page .arcade-menu {
  padding: 28px clamp(18px, 4vw, 36px) 36px;
}

.home-title {
  max-width: none;
  margin: 0 0 8px;
  color: var(--pink);
  font-family: "Arial Black", Impact, "Segoe UI Black", sans-serif;
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-style: italic;
  letter-spacing: -0.045em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #40105f, 0 0 18px rgba(255, 79, 159, 0.36);
}

.home-page .home-intro {
  margin-bottom: 24px;
  padding: 0;
}

.home-page .game-shelf {
  padding: 0;
}

.home-page .arcade-menu .game-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.home-page .arcade-menu .game-card,
.home-page .arcade-menu .game-card:last-child:nth-child(odd) {
  grid-column: span 2;
  width: auto;
  min-height: 0;
  aspect-ratio: 8 / 5;
  padding: 0;
  justify-self: stretch;
  overflow: hidden;
  isolation: isolate;
  border-radius: 11px;
  background: #090c1d;
  text-align: left;
}

.home-page .arcade-menu .game-card:nth-last-child(2):nth-child(3n + 1) {
  grid-column: 2 / span 2;
}

.home-page .arcade-menu .game-card:last-child:nth-child(3n + 2) {
  grid-column: 4 / span 2;
}

.game-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.04);
}

.home-page .arcade-menu .game-card::before {
  z-index: 3;
}

.home-page .arcade-menu .game-card::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(to bottom, transparent 45%, rgba(5, 6, 18, 0.1) 66%, rgba(5, 6, 18, 0.64) 100%);
  pointer-events: none;
}

.home-page .arcade-menu .game-card h2 {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  left: 8px;
  margin: 0;
  padding: 7px 10px 6px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 74%, white);
  border-radius: 6px;
  color: #fff3bd;
  background: linear-gradient(105deg, rgba(10, 8, 31, 0.95), rgba(40, 17, 64, 0.96) 52%, rgba(8, 15, 36, 0.95));
  box-shadow:
    3px 3px 0 color-mix(in srgb, var(--card-accent) 42%, #381050),
    0 0 11px color-mix(in srgb, var(--card-accent) 30%, transparent);
  font-family: "Arial Black", Impact, "Segoe UI Black", sans-serif;
  font-size: clamp(0.82rem, 1.75vw, 1.05rem);
  font-style: italic;
  letter-spacing: -0.025em;
  line-height: 1;
  text-align: center;
  text-shadow: 2px 2px 0 #541b68;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-page .arcade-menu .game-card h2::before {
  position: absolute;
  top: 2px;
  right: 7px;
  left: 7px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .game-card-image {
    transition: transform 140ms ease, filter 140ms ease;
  }

  .home-page .game-card:hover .game-card-image,
  .home-page .game-card:focus-visible .game-card-image {
    transform: scale(1.035);
    filter: saturate(1.12) contrast(1.06);
  }
}

@media (max-width: 620px) {
  .home-page .arcade-menu {
    padding: 24px 12px 18px;
  }

  .home-title {
    font-size: clamp(1.65rem, 9vw, 2.2rem);
  }

  .home-page .home-intro {
    margin-bottom: 20px;
    font-size: 0.95rem;
  }

  .home-page .arcade-menu .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .home-page .arcade-menu .game-card,
  .home-page .arcade-menu .game-card:last-child:nth-child(odd),
  .home-page .arcade-menu .game-card:nth-last-child(2):nth-child(3n + 1),
  .home-page .arcade-menu .game-card:last-child:nth-child(3n + 2) {
    grid-column: span 2;
  }

  .home-page .arcade-menu .game-card:last-child:nth-child(odd) {
    grid-column: 2 / span 2;
  }

  .home-page .arcade-menu .game-card h2 {
    right: 6px;
    bottom: 6px;
    left: 6px;
    padding: 6px 5px 5px;
    font-size: 0.78rem;
  }
}

@media (forced-colors: active) {
  .home-page .arcade-menu .game-card h2 {
    border-color: CanvasText;
    color: CanvasText;
    background: Canvas;
    box-shadow: none;
    text-shadow: none;
  }

  .home-page .arcade-menu .game-card h2::before {
    display: none;
  }
}

.game-page .page-layout {
  grid-template-columns: minmax(0, 760px);
  width: min(760px, calc(100% - 24px));
}

.game-stage {
  width: min(760px, 100%);
  margin-inline: auto;
}

.game-heading {
  padding: 4px 18px 14px;
  text-align: center;
  background: transparent;
}

.game-heading .game-title {
  max-width: none;
  margin: 0;
  color: var(--pink);
  background: linear-gradient(180deg, #ffe978 0%, #ff9a3d 42%, #ff547d 72%, #e73eff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Arial Black", Impact, "Segoe UI Black", sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  font-style: italic;
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-transform: uppercase;
  filter: drop-shadow(4px 5px 0 #40105f) drop-shadow(0 0 9px rgba(255, 63, 201, 0.44));
}

.game-heading .game-title span {
  display: inline-block;
  margin-right: 0.08em;
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
  font-size: 0.58em;
  vertical-align: 0.2em;
  filter: drop-shadow(0 0 8px rgba(54, 230, 255, 0.8));
}

.game-page .game-panel {
  width: min(680px, calc(100% - 24px));
  margin: 0 auto 24px;
  padding: 18px;
  border: 1px solid rgba(255, 79, 159, 0.62);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 92, 255, 0.2), transparent 24rem),
    rgba(5, 7, 25, 0.9);
  box-shadow:
    0 0 8px rgba(255, 79, 159, 0.42),
    0 0 24px rgba(255, 79, 159, 0.22),
    0 22px 55px rgba(0, 0, 0, 0.48),
    inset 0 0 32px rgba(54, 230, 255, 0.035);
}

.game-page .game-panel[data-size="15"] {
  width: min(720px, 100%);
}

.game-page .game-board-wrap {
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 9px;
  border: 2px solid transparent;
  border-radius: 11px;
  background:
    linear-gradient(#090d24, #090d24) padding-box,
    linear-gradient(120deg, var(--cyan), var(--violet) 48%, var(--pink), var(--orange)) border-box;
  box-shadow: 0 0 20px rgba(54, 230, 255, 0.15), 0 0 24px rgba(255, 79, 159, 0.1);
}

.control-dock {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(121, 92, 255, 0.36);
  flex-wrap: wrap;
}

.control-dock button,
.control-dock select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #7653b4;
  color: #fff5e8;
  background: linear-gradient(145deg, #43245e, #181a42);
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.13), 0 3px 10px rgba(0, 0, 0, 0.24);
  font-weight: 750;
}

.control-dock button:hover,
.control-dock select:hover {
  border-color: var(--pink);
}

.minesweeper-page #mine-level option {
  color: #261334;
  background: #d8b9ee;
  font-weight: 750;
}

.minesweeper-page #mine-level option:checked {
  color: #fff7ff;
  background: #70418f;
}

.control-dock button[aria-pressed="true"] {
  border-color: #fff0b5;
  color: #1b0b26;
  background: linear-gradient(115deg, var(--gold), var(--orange) 48%, var(--pink));
  box-shadow: 0 0 16px rgba(255, 79, 159, 0.27);
}

.minesweeper-page .mine-mode-button {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  padding-inline: 0;
  place-items: center;
  font-size: 1.25rem;
  line-height: 1;
}

.minesweeper-page #mine-new {
  min-width: 64px;
  padding-inline: 12px;
}

.minesweeper-page #mine-reveal-mode {
  color: #64f1b5;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 0 0 9px rgba(100, 241, 181, 0.82);
}

.minesweeper-page #mine-reveal-mode[aria-pressed="true"] {
  border-color: #64f1b5;
  color: #64f1b5;
  background: linear-gradient(145deg, #173c35, #121832);
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.12), 0 0 16px rgba(100, 241, 181, 0.42);
}

.mine-readout,
.puzzle-readout {
  display: grid;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(54, 230, 255, 0.25);
  border-radius: 8px;
  color: #d7d9ef;
  background: rgba(10, 12, 38, 0.78);
  font-family: var(--readable-ui);
  font-size: 0.95rem;
}

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

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

.readout-message {
  font-size: 0.8rem;
}

.readout-counter {
  display: grid;
  min-width: 58px;
  justify-items: end;
}

.readout-counter small {
  color: #c29ed9;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.readout-counter strong {
  color: var(--gold);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.28rem;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 0 9px rgba(255, 209, 102, 0.42);
}

.record-line {
  margin-top: 9px;
  color: #9e93bb;
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  text-align: center;
}

.minesweeper-page .game-panel {
  width: max-content;
  max-width: calc(100% - 24px);
}

.mine-console {
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 15px;
  background:
    linear-gradient(#120923, #090d22) padding-box,
    linear-gradient(120deg, var(--cyan), var(--violet) 42%, var(--pink) 72%, var(--gold)) border-box;
  box-shadow: 0 0 28px rgba(255, 79, 159, 0.15), 0 16px 40px rgba(0, 0, 0, 0.53);
}

.mine-scorebar {
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  align-items: center;
  min-width: 320px;
  margin-bottom: 9px;
  padding: 7px 9px;
  gap: 12px;
  border: 1px solid rgba(255, 79, 159, 0.28);
  border-radius: 9px;
  background: linear-gradient(90deg, #1c1037, #090819 50%, #301028);
  box-shadow: inset 0 0 16px rgba(54, 230, 255, 0.04);
}

.score-pod {
  display: grid;
}

.score-pod--time {
  justify-items: end;
}

.score-pod small {
  color: #d6a5ed;
  font-family: "Courier New", monospace;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.score-pod strong {
  min-width: 3ch;
  color: #ff6ba9;
  font-family: "Courier New", monospace;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 0.95;
  text-shadow: 0 0 10px currentColor;
}

.score-pod--time strong {
  color: var(--cyan);
}

.mine-face {
  position: relative;
  width: 40px;
  aspect-ratio: 1;
  border: 1px solid #fff0b5;
  border-radius: 50%;
  background: linear-gradient(#ffe978, #ff914d 55%, #ff4f9f);
  box-shadow: 0 0 16px rgba(255, 79, 159, 0.56);
}

.mine-face::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #40105f;
  content: "✦";
  font-size: 1.25rem;
  font-weight: 900;
}

.mine-console[data-state="playing"] .mine-face::before { content: "◆"; }
.mine-console[data-state="won"] .mine-face::before { content: "★"; }
.mine-console[data-state="lost"] .mine-face::before { content: "✹"; }

.mine-console .game-board-wrap {
  padding: 5px;
  border: 1px solid rgba(54, 230, 255, 0.35);
  border-radius: 7px;
  background: #050715;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.56);
}

.mine-board {
  gap: 2px;
  padding: 5px;
  border-radius: 5px;
  background: #050715;
}

.mine-cell {
  border: 1px solid #df82f3;
  border-radius: 3px;
  color: #fff;
  background: linear-gradient(145deg, #b94c8d, #613992 52%, #1b5278);
  box-shadow:
    inset 2px 2px rgba(255, 215, 235, 0.3),
    inset -2px -2px rgba(0, 0, 0, 0.42),
    0 0 4px rgba(121, 92, 255, 0.18);
}

.mine-cell:hover:not(.revealed) {
  border-color: var(--cyan);
  background: linear-gradient(145deg, #d15ca0, #7546ad 52%, #24709a);
}

.mine-cell.revealed {
  border-color: #293653;
  color: #fff;
  background: #0d1428;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.42);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.02rem;
  font-weight: 900;
  text-shadow: 0 0 8px currentColor;
}

.mine-cell.flagged {
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.8);
}

.mine-cell.mine {
  border-color: #ffd166;
  color: #fff;
  background: linear-gradient(145deg, #ff914d, #ff416d 58%, #751b66);
}

.mine-cell[data-adjacent="1"] { color: #36e6ff; }
.mine-cell[data-adjacent="2"] { color: #64f1b5; }
.mine-cell[data-adjacent="3"] { color: #ff7a66; }
.mine-cell[data-adjacent="4"] { color: #b18cff; }
.mine-cell[data-adjacent="5"] { color: #ff4f9f; }
.mine-cell[data-adjacent="6"] { color: #ffd166; }
.mine-cell[data-adjacent="7"] { color: #fff7ea; }
.mine-cell[data-adjacent="8"] { color: #ff9f43; }

.game-page .rules-panel {
  width: min(680px, calc(100% - 24px));
  margin: 18px auto 0;
  padding: 18px 24px;
  border-color: rgba(121, 92, 255, 0.36);
  color: #c8c8dc;
  background: rgba(7, 8, 25, 0.82);
  line-height: 1.55;
}

.game-page .rules-panel h2 {
  margin-bottom: 7px;
  color: var(--gold);
  font-size: 1.15rem;
  text-transform: uppercase;
}

.game-page .rules-panel p {
  margin: 0;
}

@media (max-width: 1400px) {
  .game-page .page-layout {
    width: min(760px, calc(100% - 24px));
  }
}

@media (max-width: 620px) {
  .header-inner,
  .home-page .header-inner {
    align-items: center;
    padding: 2px 0 7px;
  }

  .site-wordmark-link {
    width: min(240px, 60vw);
  }

  .site-wordmark {
    width: 100%;
    max-height: none;
  }

  .game-masthead {
    padding-top: 3px;
    font-size: clamp(1.9rem, 11vw, 2.75rem);
  }

  .site-nav,
  .home-page .site-nav {
    justify-content: center;
  }

  .game-heading {
    padding-bottom: 11px;
  }

  .game-heading .game-title {
    font-size: clamp(1.9rem, 9.6vw, 2.55rem);
    letter-spacing: -0.065em;
  }

  .game-heading .game-title span {
    display: block;
    margin: 0 0 7px;
    font-size: 0.62em;
  }

  .game-page .game-panel {
    width: calc(100% - 8px);
    padding: 10px;
    border-radius: 13px;
  }

  .game-page .game-panel[data-size="15"] {
    width: calc(100% - 8px);
  }

  .game-page .game-board-wrap {
    padding: 6px;
  }

  .mine-readout {
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 8px;
  }

  .readout-message {
    font-size: 0.7rem;
  }

  .control-dock {
    gap: 6px;
  }

  .puzzle-readout {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  #nono-status {
    line-height: 1.35;
  }

  #nono-stats {
    color: #bdb3d9;
    font-size: 0.82rem;
    text-align: right;
  }

  .control-dock button,
  .control-dock select,
  .control-dock .button-link {
    padding: 7px 9px;
    font-size: 0.84rem;
  }

  .nonogram-library {
    width: calc(100% - 8px);
    padding: 9px;
    border-radius: 13px;
  }

  .puzzle-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }

  .puzzle-pager {
    padding-inline: 8px;
    gap: 6px;
  }

  .puzzle-pager button {
    min-height: 44px;
    padding-inline: 9px;
    font-size: 0.78rem;
  }

  .puzzle-page-range {
    font-size: 0.76rem;
  }

  .nono-folder summary {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding-inline: 10px;
  }

  .puzzle-tile {
    min-height: 112px;
  }

  .completion-dialog {
    padding: 22px 16px 18px;
  }

  .minesweeper-page .control-dock {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 44px 44px;
    align-items: center;
  }

  .minesweeper-page #mine-level {
    min-width: 0;
    width: 100%;
  }

  .minesweeper-page #mine-new {
    width: 58px;
    min-width: 58px;
    padding-inline: 6px;
  }

  .minesweeper-page .game-panel {
    width: max-content;
    max-width: calc(100% - 8px);
  }

  .mine-console {
    max-width: calc(100vw - 40px);
    padding: 7px;
  }

  .mine-scorebar {
    min-width: 0;
  }
}

/* Sudoku */
.sudoku-page {
  --sudoku-cell-size: clamp(34px, 7.2vw, 50px);
}

.sudoku-page .game-panel {
  width: max-content;
  max-width: calc(100% - 24px);
}

.sudoku-toolbar {
  display: flex;
  width: min(100%, 456px);
  min-height: 46px;
  margin: 0 auto 10px;
  padding: 9px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(54, 230, 255, 0.28);
  border-radius: 9px;
  color: #e7ddf4;
  background: linear-gradient(90deg, rgba(28, 16, 55, 0.96), rgba(9, 8, 25, 0.96), rgba(48, 16, 40, 0.96));
  font-family: var(--readable-ui);
  font-size: 0.88rem;
}

.sudoku-clock {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.sudoku-clock small {
  color: #d6a5ed;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sudoku-clock strong {
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 1.18rem;
  text-shadow: 0 0 9px rgba(54, 230, 255, 0.55);
}

.sudoku-page .sudoku-board-wrap {
  width: min(100%, 466px);
  padding: 5px;
  border-radius: 9px;
}

.sudoku-board {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  overflow: hidden;
  border: 3px solid #21162f;
  border-radius: 4px;
  background: #21162f;
  box-shadow: 0 0 18px rgba(54, 230, 255, 0.17);
}

.sudoku-row {
  display: contents;
}

.sudoku-cell {
  position: relative;
  display: grid;
  container-type: inline-size;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  padding: 0;
  place-items: center;
  border: 0;
  border-right: 1px solid #aa9bb8;
  border-bottom: 1px solid #aa9bb8;
  border-radius: 0;
  color: #241b30;
  background: #fffaf0;
  box-shadow: none;
  touch-action: manipulation;
}

.sudoku-row .sudoku-cell:nth-child(3n):not(:nth-child(9n)) {
  border-right: 3px solid #32213d;
}

.sudoku-row .sudoku-cell:nth-child(9n) {
  border-right: 0;
}

.sudoku-row:nth-child(3) .sudoku-cell,
.sudoku-row:nth-child(6) .sudoku-cell {
  border-bottom: 3px solid #32213d;
}

.sudoku-row:nth-child(9) .sudoku-cell {
  border-bottom: 0;
}

.sudoku-cell:hover {
  border-color: #aa9bb8;
  background: #fff0c8;
}

.sudoku-cell.matching {
  background: #ccefeb;
}

.sudoku-cell.selected {
  z-index: 2;
  background: #fff3a8;
  box-shadow: inset 0 0 0 3px #43245e, inset 0 0 0 5px var(--cyan), inset 0 0 16px rgba(54, 230, 255, 0.22);
}

.sudoku-cell.selected.has-notes {
  box-shadow: inset 0 0 0 2px #43245e, inset 0 0 0 3px var(--cyan), inset 0 0 12px rgba(54, 230, 255, 0.2);
}

.sudoku-cell:focus-visible {
  z-index: 3;
  outline: 3px solid #43245e;
  outline-offset: -3px;
}

.sudoku-cell.conflict {
  color: #a90e43;
  background: #ffd0dd;
  box-shadow: inset 0 0 0 2px #e53a72;
}

.sudoku-cell.conflict.selected {
  box-shadow: inset 0 0 0 3px #e53a72, inset 0 0 14px rgba(229, 58, 114, 0.25);
}

.sudoku-cell.conflict .sudoku-cell-digit {
  color: #a90e43;
}

.sudoku-cell-digit {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 500;
  line-height: 1;
}

.sudoku-cell.given .sudoku-cell-digit {
  color: #1e1729;
  font-weight: 500;
}

.sudoku-cell.user-value .sudoku-cell-digit {
  color: #7037a1;
}

.sudoku-cell-notes {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 3px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  overflow: hidden;
  color: #624e73;
  font-family: Arial, Helvetica, sans-serif;
  font-size: calc(clamp(0.5rem, 1.55vw, 0.68rem) + 2pt);
  font-size: min(calc(clamp(0.5rem, 1.55vw, 0.68rem) + 2pt), 30cqi);
  font-weight: 600;
  line-height: 1;
}

.sudoku-cell-note {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
}

.sudoku-entry {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  border: 0;
  pointer-events: none;
}

.sudoku-controls {
  display: grid;
  width: min(100%, 456px);
  margin-inline: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sudoku-controls button {
  min-width: 0;
}

@media (max-width: 620px) {
  .sudoku-page {
    --sudoku-cell-size: clamp(32px, 9vw, 38px);
  }

  .sudoku-page .game-panel {
    max-width: calc(100% - 8px);
  }

  .sudoku-toolbar {
    min-height: 42px;
    margin-bottom: 7px;
    padding: 7px 9px;
    font-size: 0.76rem;
  }

  .sudoku-page .sudoku-board-wrap {
    padding: 4px;
  }

  .sudoku-cell-notes {
    padding: 1px;
    font-size: calc(clamp(0.56rem, 2.5vw, 0.68rem) + 2pt);
    font-size: min(calc(clamp(0.56rem, 2.5vw, 0.68rem) + 2pt), 30cqi);
  }

  .sudoku-controls {
    gap: 5px;
  }

  .sudoku-controls button {
    padding-inline: 4px;
    font-size: 0.76rem;
  }
}

@media (max-width: 340px) {
  html {
    min-width: 0;
  }
}

/* Yatzy */
.yatzy-page .page-layout {
  grid-template-columns: minmax(0, 1fr);
  width: min(1080px, calc(100% - 24px));
}

.yatzy-page .game-stage {
  width: min(1040px, 100%);
}

.yatzy-page .game-panel {
  width: min(1000px, calc(100% - 24px));
}

.yatzy-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.82fr);
  align-items: stretch;
  gap: 18px;
}

.yatzy-playfield {
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-areas:
    "secondary bot ."
    "turn turn turn"
    "dice dice dice"
    "result result result"
    "controls controls controls";
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  align-items: stretch;
}

.yatzy-matchup {
  display: contents;
}

.yatzy-contestant {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: min(220px, 100%);
  min-width: 0;
  padding: 6px 8px;
  justify-self: center;
  gap: 7px;
  border: 1px solid rgba(54, 230, 255, 0.28);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(29, 18, 65, 0.94), rgba(8, 11, 30, 0.94));
}

.yatzy-contestant--player {
  margin: 0;
}

.yatzy-contestant--bot {
  grid-area: bot;
  margin-bottom: 0;
  justify-content: flex-end;
  border-color: rgba(255, 79, 159, 0.34);
  transform: translateY(-4px);
}

.yatzy-avatar,
.yatzy-bot-avatar {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 1px;
  flex: 0 0 46px;
  place-items: center;
  overflow: visible;
  border: 2px solid rgba(255, 240, 181, 0.9);
  border-radius: 15px;
  background: #11142e;
  box-shadow: 0 0 14px rgba(255, 79, 159, 0.36);
}

.yatzy-bot-avatar {
  border-color: rgba(54, 230, 255, 0.9);
  box-shadow: 0 0 14px rgba(54, 230, 255, 0.34);
}

.arcade-avatar-art {
  display: block;
  width: 100%;
  height: 100%;
}

.yatzy-contestant-copy {
  display: grid;
  min-width: 0;
}

.yatzy-contestant-copy strong {
  overflow: hidden;
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yatzy-contestant-copy small {
  color: #bcaed6;
  font-family: "Courier New", monospace;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.yatzy-total {
  display: none;
  margin-left: auto;
  color: var(--gold);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.15rem;
  text-shadow: 0 0 9px rgba(255, 209, 102, 0.42);
}

.yatzy-contestant--bot .yatzy-total {
  margin: 0 auto 0 0;
  color: var(--cyan);
  text-shadow: 0 0 9px rgba(54, 230, 255, 0.46);
}

.yatzy-turn {
  grid-area: turn;
  min-width: 74px;
  margin-bottom: 8px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 209, 102, 0.46);
  border-radius: 999px;
  color: #24102e;
  background: linear-gradient(115deg, var(--gold), var(--orange) 55%, var(--pink));
  font-family: var(--readable-ui);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 0 13px rgba(255, 79, 159, 0.25);
}

.yatzy-turn[data-turn="bot"] {
  background: linear-gradient(115deg, var(--cyan), #5f83ff 65%, #ba83ff);
}

.yatzy-turn.is-complete {
  border-color: rgba(255, 240, 181, 0.9);
  color: #24102e;
  background: linear-gradient(115deg, var(--gold), var(--orange) 48%, var(--pink));
  box-shadow: 0 0 18px rgba(255, 79, 159, 0.42);
}

.yatzy-dice-zone {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  grid-area: dice;
  padding: 14px;
  border: 2px solid transparent;
  border-radius: 14px;
  background:
    linear-gradient(#090b24, #100822) padding-box,
    linear-gradient(120deg, var(--cyan), var(--violet) 44%, var(--pink), var(--gold)) border-box;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.56), 0 0 22px rgba(54, 230, 255, 0.12);
}

.yatzy-readout {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 20px;
  margin-bottom: 6px;
  gap: 12px;
  color: #dfd7ee;
  font-size: 0.82rem;
}

#yatzy-roll-count {
  flex: 0 0 auto;
  margin-inline-start: auto;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.yatzy-dice {
  position: relative;
  display: block;
  width: 100%;
  max-width: 620px;
  min-height: 258px;
  margin-inline: auto;
  flex: 1;
}

.yatzy-dice::before,
.yatzy-dice::after {
  position: absolute;
  right: 4%;
  left: 4%;
  z-index: 0;
  height: 20%;
  content: "";
  pointer-events: none;
}

.yatzy-dice::before {
  top: 0;
  border-bottom: 1px solid rgba(255, 209, 102, 0.32);
  border-radius: 10px 10px 50% 50%;
  background: linear-gradient(0deg, rgba(255, 209, 102, 0.015), rgba(255, 79, 159, 0.08));
  box-shadow: 0 5px 18px rgba(255, 79, 159, 0.05);
}

.yatzy-dice::after {
  bottom: 0;
  border-top: 1px solid rgba(255, 209, 102, 0.32);
  border-radius: 50% 50% 10px 10px;
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.015), rgba(255, 79, 159, 0.08));
  box-shadow: 0 -5px 18px rgba(255, 79, 159, 0.05);
}

.yatzy-die {
  --die-left: 50%;
  --die-top: 50%;
  --die-r: 0deg;
  --die-lift: 0px;
  --die-press: 0px;
  position: absolute;
  z-index: 1;
  left: var(--die-left);
  top: var(--die-top);
  display: grid;
  width: clamp(54px, 5.4vw, 64px);
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  border: 2px solid #e9dff4;
  border-radius: 13px;
  color: #25142f;
  background: linear-gradient(145deg, #fffdf7, #eadff3);
  box-shadow:
    inset 3px 3px rgba(255, 255, 255, 0.78),
    inset -3px -3px rgba(66, 39, 78, 0.14),
    0 6px 10px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, calc(-50% + var(--die-lift) + var(--die-press))) rotate(var(--die-r));
  transition:
    left 220ms ease,
    top 220ms ease,
    border-color 130ms ease,
    box-shadow 130ms ease,
    background 130ms ease,
    transform 150ms ease;
  touch-action: manipulation;
  user-select: none;
}

.yatzy-die:hover:not(:disabled) {
  border-color: var(--cyan);
  background: linear-gradient(145deg, #fffdf7, #dcfaff);
}

.yatzy-die:active:not(:disabled) {
  --die-press: 1px;
  color: #25142f;
  background: linear-gradient(145deg, #fffdf7, #dcfaff);
}

.yatzy-die.is-held {
  --die-lift: 0px;
  --held-die-half: clamp(27px, 2.7vw, 32px);
  border-color: var(--gold);
  background: linear-gradient(145deg, #fff6ba, #ffc875 58%, #ff8ab8);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.42), inset 2px 2px rgba(255, 255, 255, 0.48);
  transform: translate(-50%, -50%) rotate(var(--die-r));
  transition:
    left 360ms cubic-bezier(0.22, 0.8, 0.28, 1),
    top 360ms cubic-bezier(0.22, 0.8, 0.28, 1),
    border-color 130ms ease,
    box-shadow 130ms ease,
    background 130ms ease,
    transform 150ms ease;
}

.yatzy-dice[data-roller="player"] .yatzy-die.is-held {
  top: calc(100% - 10px - var(--held-die-half));
  bottom: auto;
}

.yatzy-dice[data-roller="bot"] .yatzy-die.is-held {
  top: calc(10px + var(--held-die-half));
  bottom: auto;
}

.yatzy-die.is-held:active:not(:disabled) {
  --die-press: 1px;
}

.yatzy-die.is-hold-queued {
  outline: 2px dashed var(--cyan);
  outline-offset: 3px;
}

.yatzy-die.is-rolling:nth-child(odd) {
  animation: yatzy-tumble-clockwise var(--roll-duration, 520ms) cubic-bezier(0.2, 0.72, 0.3, 1);
}

.yatzy-die.is-rolling:nth-child(even) {
  animation: yatzy-tumble-counter var(--roll-duration, 520ms) cubic-bezier(0.2, 0.72, 0.3, 1);
}

.yatzy-die.is-rolling:nth-child(2) { animation-delay: 18ms; }
.yatzy-die.is-rolling:nth-child(3) { animation-delay: 34ms; }
.yatzy-die.is-rolling:nth-child(4) { animation-delay: 12ms; }
.yatzy-die.is-rolling:nth-child(5) { animation-delay: 28ms; }

.yatzy-dice[data-roller="bot"] .yatzy-die:not(.is-rolling) {
  transition:
    left 360ms cubic-bezier(0.22, 0.8, 0.28, 1),
    top 360ms cubic-bezier(0.22, 0.8, 0.28, 1),
    border-color 130ms ease,
    box-shadow 130ms ease,
    background 130ms ease,
    transform 150ms ease;
}

.yatzy-die.is-blank {
  transition:
    border-color 130ms ease,
    box-shadow 130ms ease,
    background 130ms ease,
    transform 150ms ease;
}

.yatzy-dice[data-roller="bot"] .yatzy-die.is-rolling {
  transition:
    left var(--roll-duration, 900ms) cubic-bezier(0.2, 0.72, 0.3, 1),
    top var(--roll-duration, 900ms) cubic-bezier(0.2, 0.72, 0.3, 1),
    border-color 130ms ease,
    box-shadow 130ms ease,
    background 130ms ease,
    transform 150ms ease;
}

@keyframes yatzy-tumble-clockwise {
  0% { transform: translate(calc(-50% - 7px), calc(-50% - 11px)) rotate(calc(var(--die-r) - 28deg)) scale(0.94); }
  38% { transform: translate(calc(-50% + 8px), calc(-50% + 5px)) rotate(calc(var(--die-r) + 86deg)) scale(1.04); }
  72% { transform: translate(calc(-50% - 4px), calc(-50% - 2px)) rotate(calc(var(--die-r) + 176deg)) scale(0.98); }
  100% { transform: translate(-50%, calc(-50% + var(--die-lift))) rotate(var(--die-r)) scale(1); }
}

@keyframes yatzy-tumble-counter {
  0% { transform: translate(calc(-50% + 6px), calc(-50% - 10px)) rotate(calc(var(--die-r) + 25deg)) scale(0.94); }
  38% { transform: translate(calc(-50% - 8px), calc(-50% + 6px)) rotate(calc(var(--die-r) - 88deg)) scale(1.04); }
  72% { transform: translate(calc(-50% + 4px), calc(-50% - 2px)) rotate(calc(var(--die-r) - 174deg)) scale(0.98); }
  100% { transform: translate(-50%, calc(-50% + var(--die-lift))) rotate(var(--die-r)) scale(1); }
}

.yatzy-die:disabled {
  cursor: default;
  opacity: 1;
}

.yatzy-die.is-blank {
  background: linear-gradient(145deg, #30294a, #19152d);
}

.yatzy-die.is-blank::after {
  display: grid;
  grid-area: 1 / 1 / 4 / 4;
  place-items: center;
  color: #8b7ba2;
  content: "?";
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.45rem;
}

.yatzy-pip {
  display: grid;
  place-items: center;
}

.yatzy-pip.is-on::before {
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #32193d;
  box-shadow: inset 1px 1px rgba(0, 0, 0, 0.36);
  content: "";
}

.yatzy-controls {
  display: grid;
  grid-area: controls;
  margin-top: 6px;
  padding-top: 6px;
  grid-template-columns: minmax(130px, 0.48fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.yatzy-controls button.yatzy-contestant--player {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 52px;
  padding: 4px 7px;
  justify-self: stretch;
  justify-content: flex-start;
  overflow: hidden;
  border-color: rgba(255, 209, 102, 0.42);
  color: #fff5e8;
  background: linear-gradient(145deg, rgba(29, 18, 65, 0.94), rgba(8, 11, 30, 0.94));
  box-shadow: 0 0 14px rgba(255, 79, 159, 0.12);
  cursor: pointer;
}

.yatzy-controls button.yatzy-contestant--player:hover,
.yatzy-controls button.yatzy-contestant--player:focus-visible {
  border-color: var(--cyan);
  background: linear-gradient(145deg, rgba(45, 27, 84, 0.98), rgba(10, 17, 43, 0.98));
}

.yatzy-controls button.yatzy-contestant--player:disabled {
  cursor: default;
  opacity: 0.7;
}

.yatzy-controls .yatzy-contestant-copy {
  overflow: hidden;
}

.yatzy-secondary-controls {
  display: grid;
  width: auto;
  min-width: 0;
  margin-top: 0;
  grid-area: secondary;
  grid-template-columns: minmax(0, 1fr);
  align-self: center;
  justify-self: start;
  gap: 6px;
}

.yatzy-secondary-controls button {
  display: grid;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  place-items: center;
  border-color: #7653b4;
  color: #fff5e8;
  background: linear-gradient(145deg, #43245e, #181a42);
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.13), 0 3px 10px rgba(0, 0, 0, 0.24);
  font-family: Arial, sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

.yatzy-page .record-line {
  display: none;
}

.yatzy-controls .yatzy-roll-button {
  border-color: #fff0b5;
  color: #1b0b26;
  background: linear-gradient(115deg, var(--gold), var(--orange) 48%, var(--pink));
}

.yatzy-controls .yatzy-roll-button:disabled {
  border-color: #5c4c72;
  color: #978aa8;
  background: #221b37;
  cursor: default;
}

.yatzy-result {
  grid-area: result;
  margin: 7px 0 1px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 240, 181, 0.76);
  border-radius: 9px;
  color: #fff8dc;
  background: linear-gradient(115deg, rgba(67, 36, 94, 0.96), rgba(24, 26, 66, 0.96));
  box-shadow: 0 0 16px rgba(255, 79, 159, 0.28);
  font-family: var(--readable-ui);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.yatzy-result[hidden] {
  display: none;
}

.yatzy-score-wrap {
  margin-top: 0;
  overflow: hidden;
  border: 1px solid rgba(121, 92, 255, 0.48);
  border-radius: 10px;
  background: rgba(7, 9, 26, 0.92);
}

.yatzy-scorecard {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #eee8f5;
  font-family: var(--readable-ui);
  font-size: 0.8rem;
}

.yatzy-scorecard th,
.yatzy-scorecard td {
  height: 35px;
  padding: 4px 9px;
  border-right: 1px solid rgba(121, 92, 255, 0.25);
  border-bottom: 1px solid rgba(121, 92, 255, 0.22);
  text-align: center;
}

.yatzy-scorecard th:first-child {
  width: 54%;
  text-align: left;
}

.yatzy-scorecard th:last-child,
.yatzy-scorecard td:last-child {
  border-right: 0;
}

.yatzy-scorecard thead th {
  color: #21112c;
  background: linear-gradient(90deg, #ffd166, #ff914d 54%, #ff6fac);
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.yatzy-scorecard tbody th {
  color: #d9cce7;
  font-weight: 650;
}

.yatzy-scorecard tbody td {
  color: #a99ab9;
}

.yatzy-scorecard td.is-scored {
  color: var(--gold);
  font-weight: 850;
}

.yatzy-scorecard td.is-new-score {
  color: #151029;
  background: var(--score-flash);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.58), 0 0 14px var(--score-flash);
}

.yatzy-scorecard td.is-player-score {
  --score-flash: rgba(255, 209, 102, 0.76);
}

.yatzy-scorecard td.is-bot-score {
  --score-flash: rgba(54, 230, 255, 0.68);
}

.yatzy-scorecard tr.yatzy-upper-summary th,
.yatzy-scorecard tr.yatzy-upper-summary td {
  color: #c9bdd9;
  background: rgba(39, 23, 62, 0.84);
  font-weight: 750;
}

.yatzy-scorecard tr.yatzy-upper-sum th,
.yatzy-scorecard tr.yatzy-upper-sum td {
  border-top: 2px solid rgba(255, 209, 102, 0.44);
}

.yatzy-scorecard tr.yatzy-lower-start th,
.yatzy-scorecard tr.yatzy-lower-start td {
  border-top: 2px solid rgba(54, 230, 255, 0.52);
}

.yatzy-score-choice {
  width: 100%;
  height: 25px;
  min-height: 25px;
  padding: 0 5px;
  border: 1px solid rgba(54, 230, 255, 0.54);
  border-radius: 5px;
  color: #151029;
  background: linear-gradient(145deg, #bff8ff, #70ddeb);
  box-shadow: 0 0 8px rgba(54, 230, 255, 0.12);
  font-size: 0.79rem;
  font-weight: 900;
}

.yatzy-score-choice:hover {
  border-color: #fff0b5;
  background: linear-gradient(145deg, #fff0a4, #ff9a74);
}

.yatzy-score-choice.is-zero {
  color: #a99ab9;
  background: #241b37;
}

.yatzy-scorecard tfoot th,
.yatzy-scorecard tfoot td {
  color: #c9bdd9;
  background: rgba(39, 23, 62, 0.84);
  font-weight: 750;
}

.yatzy-scorecard tfoot .yatzy-grand-total th,
.yatzy-scorecard tfoot .yatzy-grand-total td {
  border-bottom: 0;
  color: var(--gold);
  background: linear-gradient(90deg, rgba(64, 24, 78, 0.98), rgba(24, 24, 70, 0.98));
  font-size: 0.92rem;
  font-weight: 900;
}

.yatzy-rules p + p {
  margin-top: 8px;
  color: #aca0c3;
  font-size: 0.88rem;
}

.yatzy-profile-dialog {
  width: min(500px, calc(100% - 24px));
  padding: 24px;
  border: 2px solid var(--cyan);
  border-radius: 18px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 92, 255, 0.44), transparent 18rem),
    linear-gradient(155deg, #151033, #070918 78%);
  box-shadow: 0 0 0 1px rgba(255, 79, 159, 0.45), 0 0 38px rgba(54, 230, 255, 0.35), 0 28px 80px rgba(0, 0, 0, 0.72);
}

.yatzy-profile-dialog::backdrop {
  background: rgba(3, 3, 15, 0.78);
  backdrop-filter: blur(5px);
}

.yatzy-profile-dialog h2 {
  margin: 0 0 18px;
  color: var(--pink);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(1.55rem, 7vw, 2.35rem);
  font-style: italic;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #40105f, 0 0 12px rgba(255, 79, 159, 0.5);
}

.yatzy-profile-dialog .completion-kicker {
  text-align: center;
}

.yatzy-profile-dialog fieldset {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

.yatzy-profile-dialog legend,
.yatzy-name-field {
  display: grid;
  width: 100%;
  gap: 6px;
  color: #d2c1e3;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.yatzy-name-field input {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #7653b4;
  border-radius: 8px;
  color: #fff8f0;
  background: #0c0d27;
  font: inherit;
  font-size: 1rem;
  text-transform: none;
}

.yatzy-name-field input:focus {
  border-color: var(--cyan);
  outline: 3px solid rgba(54, 230, 255, 0.25);
}

.yatzy-avatar-choices {
  display: grid;
  margin-top: 7px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.yatzy-avatar-choice {
  display: grid;
  min-width: 0;
  min-height: 78px;
  padding: 6px 4px;
  place-items: center;
  border-color: #59407d;
  background: #151231;
}

.yatzy-avatar-choice .arcade-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 1px;
  place-items: center;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: #11142e;
  box-shadow: 0 0 10px rgba(54, 230, 255, 0.12);
}

.yatzy-avatar-choice small {
  color: #c6b7d8;
  font-size: 0.56rem;
}

.yatzy-avatar-choice[aria-pressed="true"] {
  border-color: #fff0b5;
  color: #24102e;
  background: linear-gradient(145deg, var(--gold), var(--orange) 54%, var(--pink));
  transform: none;
}

.yatzy-avatar-choice[aria-pressed="true"] .arcade-avatar {
  border-color: #24102e;
  box-shadow: 0 0 0 2px #fff8dc, 0 0 14px rgba(255, 79, 159, 0.45);
}

.yatzy-avatar-choice[aria-pressed="true"] small {
  color: #24102e;
}

.yatzy-profile-note {
  margin: 14px 0;
  color: #9f93b5;
  font-size: 0.74rem;
  text-align: center;
}

.yatzy-profile-dialog .completion-actions button:first-child {
  order: 0;
}

.yatzy-profile-dialog .completion-actions button:last-child {
  order: 1;
}

#yatzy-complete,
#yatzy-complete .dialog-close {
  -webkit-user-select: none;
  user-select: none;
}

#yatzy-complete:focus {
  outline: 0;
}

#yatzy-complete .dialog-close,
#yatzy-complete .dialog-close:hover,
#yatzy-complete .dialog-close:focus,
#yatzy-complete .dialog-close:active {
  border: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  transform: none;
  -webkit-tap-highlight-color: transparent;
}

.yatzy-final-score {
  margin: 4px 0 18px;
  color: #e2d9ec;
  font-size: 1.05rem;
  font-weight: 750;
}

@media (max-width: 1400px) {
  .yatzy-page .page-layout {
    grid-template-columns: minmax(0, 1fr);
    width: min(1080px, calc(100% - 24px));
  }
}

@media (max-width: 900px) {
  .yatzy-page .page-layout,
  .yatzy-page .game-stage {
    width: min(760px, calc(100% - 24px));
  }

  .yatzy-page .game-panel {
    width: min(680px, calc(100% - 24px));
  }

  .yatzy-board-layout {
    grid-template-columns: minmax(0, 1fr) minmax(245px, 0.82fr);
    gap: 12px;
  }

  .yatzy-dice-zone {
    min-height: 338px;
  }

  .yatzy-dice {
    min-height: 236px;
  }

  .yatzy-die {
    width: clamp(50px, 7vw, 62px);
  }

  .yatzy-die.is-held {
    --held-die-half: clamp(16px, 2.5vw, 20px);
    width: clamp(32px, 5vw, 40px);
    padding: 4px;
    border-radius: 8px;
  }
}

@media (max-width: 620px) {
  .yatzy-page {
    overflow-x: hidden;
  }

  .yatzy-page .page-layout,
  .yatzy-page .game-stage {
    width: 100%;
  }

  .yatzy-page .game-panel {
    width: calc(100% - 4px);
    padding: 8px;
  }

  .yatzy-playfield {
    grid-template-areas:
      "secondary bot"
      "turn turn"
      "dice dice"
      "result result"
      "controls controls";
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .yatzy-contestant {
    min-height: 34px;
    padding: 3px 4px;
    gap: 4px;
    border-radius: 8px;
  }

  .yatzy-avatar,
  .yatzy-bot-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-width: 1px;
    border-radius: 9px;
  }

  .yatzy-contestant-copy strong {
    font-size: 0.9rem;
  }

  .yatzy-contestant-copy small {
    display: none;
  }

  .yatzy-contestant--bot {
    justify-self: end;
    transform: translateY(-3px);
  }

  .yatzy-total {
    font-size: 1.05rem;
  }

  .yatzy-turn {
    min-width: 0;
    margin-bottom: 5px;
    padding: 3px 7px;
    justify-self: center;
    font-size: 0.71rem;
  }

  .yatzy-board-layout {
    grid-template-columns: minmax(0, 1fr) clamp(160px, 45vw, 180px);
    gap: 6px;
  }

  .yatzy-dice-zone {
    min-height: 292px;
    padding: 7px;
    border: 1px solid rgba(54, 230, 255, 0.28);
    border-radius: 10px;
    background: rgba(7, 9, 26, 0.92);
    box-shadow: none;
  }

  .yatzy-readout {
    display: block;
    min-height: 0;
    margin-bottom: 6px;
    font-size: 0.85rem;
    line-height: 1.18;
  }

  .yatzy-status {
    display: block;
    padding: 6px 7px;
    border-radius: 7px;
    color: #24102e;
    background: #d9b35d;
    font-family: var(--readable-ui);
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.25;
    text-align: left;
  }

  .yatzy-status[hidden] {
    display: none;
  }

  #yatzy-roll-count {
    display: none;
  }

  .yatzy-dice {
    max-width: none;
    min-height: 208px;
  }

  .yatzy-dice::before,
  .yatzy-dice::after {
    display: none;
  }

  .yatzy-die {
    width: clamp(36px, 11vw, 44px);
    padding: 5px;
    border-width: 1px;
    border-radius: 8px;
  }

  .yatzy-die.is-held {
    --held-die-half: clamp(13.5px, 4.25vw, 17px);
    width: clamp(27px, 8.5vw, 34px);
    padding: 4px;
    border-radius: 8px;
  }

  .yatzy-dice[data-roller="player"] .yatzy-die.is-held,
  .yatzy-dice[data-roller="bot"] .yatzy-die.is-held {
    top: var(--die-top);
  }

  .yatzy-controls {
    margin-top: 8px;
    padding-top: 8px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: center;
    gap: 5px;
  }

  .yatzy-controls .yatzy-roll-button {
    width: min(116px, 72%);
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  .yatzy-controls button.yatzy-contestant--player {
    width: auto;
    max-width: 100%;
    min-height: 40px;
    padding: 3px 4px;
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  .yatzy-controls button,
  .yatzy-secondary-controls button {
    min-height: 36px;
    padding-inline: 4px;
    font-size: 0.93rem;
  }

  .yatzy-result {
    margin-top: 5px;
    padding: 6px;
    font-size: 0.87rem;
  }

  .yatzy-secondary-controls {
    margin-top: 0;
    gap: 5px;
  }

  .yatzy-secondary-controls button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    font-size: 1.3rem;
  }

  .yatzy-page .record-line {
    margin-top: 6px;
    font-size: 0.8rem;
  }

  .yatzy-scorecard {
    font-size: 0.83rem;
    line-height: 1.05;
  }

  .yatzy-scorecard th,
  .yatzy-scorecard td {
    height: 34px;
    padding: 3px 2px;
  }

  .yatzy-scorecard th:first-child {
    width: 60%;
    white-space: nowrap;
  }

  .yatzy-scorecard thead th {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
  }

  .yatzy-scorecard thead th:not(:first-child) {
    padding-inline: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .yatzy-score-choice {
    height: 24px;
    min-height: 24px;
    padding: 0;
    font-size: 0.87rem;
  }

  .yatzy-scorecard tfoot .yatzy-grand-total th,
  .yatzy-scorecard tfoot .yatzy-grand-total td {
    font-size: 0.9rem;
  }

  .yatzy-profile-dialog legend,
  .yatzy-name-field {
    font-size: 0.97rem;
  }

  .yatzy-name-field input {
    font-size: 1.25rem;
  }

  .yatzy-avatar-choice small {
    font-size: 0.81rem;
  }

  .yatzy-profile-note {
    font-size: 0.99rem;
  }

  .yatzy-avatar-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .yatzy-die.is-rolling {
    animation: none;
    filter: none;
  }
}

@media (max-width: 620px) {
  .game-page .game-panel,
  .game-page .game-panel[data-size="15"] {
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-footer nav {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}
