@font-face {
  font-family: Bricolage;
  src: url("fonts/bricolage-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #101018;
  --panel: #191922;
  --ink: #f5f2fb;
  --sub: #bbb8cb;
  --muted: #a39fb3;
  --line: #3e3c4c;
  --mint: #b7fac8;
  --lilac: #c9b1ff;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: Bricolage, Inter, system-ui, sans-serif;
  font-optical-sizing: auto;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #efdc87;
  outline-offset: 4px;
}
main:focus, .game-library:focus, #player-title:focus { outline: 0; }
::selection { background: var(--lilac); color: #201629; }
.frame { width: min(1200px, calc(100% - clamp(32px, 8vw, 112px))); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 8px; left: 12px; padding: 10px 18px; border-radius: 6px; background: var(--mint); color: var(--bg); transform: translateY(-150%); }
.skip:focus-visible { transform: translateY(0); }

.mast { border-bottom: 1px solid #302e3c; }
.mast-inner { display: flex; align-items: center; min-height: 75px; gap: clamp(22px, 4vw, 60px); }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 1.25rem; font-weight: 750; letter-spacing: -.065em; }
.brand b { color: #cac2da; font-weight: 530; }
.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  transform: rotate(-10deg);
}
.brand-mark i { background: var(--mint); border-radius: 2px 7px 2px 7px; }
.brand-mark i:nth-child(2) { transform: rotate(82deg); background: #c8b2ff; }
.brand-mark i:nth-child(3) { transform: rotate(82deg); background: #9483cf; }
.brand-mark i:nth-child(4) { background: #d8fce2; }
.mast nav { display: flex; gap: clamp(10px, 2.2vw, 32px); align-items: center; }
.mast nav a, .parent-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .94rem; font-weight: 570; color: var(--sub); }
.mast nav a { position: relative; }
.mast nav a[aria-current]:not([aria-current="false"]) { color: var(--ink); }
.mast nav a[aria-current]:not([aria-current="false"])::after {
  content: ""; position: absolute; inset: auto 0 3px; height: 2px; background: var(--mint); border-radius: 2px;
}
.parent-link { margin-left: auto; gap: 7px; white-space: nowrap; }
.parent-link > :last-child { color: var(--mint); font-size: 1.12em; }
.short-name { display: none; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 406px;
  display: flex;
  align-items: center;
  margin-top: clamp(20px, 3.5vw, 44px);
  border: 1px solid #3b354d;
  border-radius: 17px;
  background: #1a1828;
}
.hero-art { position: absolute; z-index: -1; inset: 0 0 0 auto; width: 62%; }
.hero-art img { display: block; height: 100%; width: 100%; object-fit: cover; object-position: 62% center; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #1a1828 0%, #1a1828bd 8%, #1a182824 29%, transparent 48%); }
.hero-copy { padding: clamp(32px, 3.5vw, 50px) clamp(26px, 4.4vw, 64px); position: relative; }
.eyebrow, .genre, .section-meta, .mono, .back { font-family: var(--mono); }
.eyebrow, .genre, .section-meta { font-size: .72rem; font-weight: 650; line-height: 1.35; }
.eyebrow, .genre { text-transform: uppercase; letter-spacing: .115em; }
.eyebrow { display: flex; align-items: center; gap: .68rem; margin: 0; color: var(--mint); }
.crosshair {
  position: relative;
  width: 13px;
  height: 13px;
  color: currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat, linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
}
.crosshair::after { content: ""; position: absolute; inset: 3px; border: 1px solid currentColor; transform: rotate(45deg); }
.hero h1 { max-width: max-content; margin: 15px 0 17px; font-size: clamp(4.5rem, 7.6vw, 6.4rem); font-weight: 780; line-height: .84; letter-spacing: -.065em; }
.hero h1 em { display: block; font-style: normal; color: var(--lilac); }
.hero-copy > p { max-width: min(43vw, 390px); margin: 0; font-size: clamp(.99rem, 1.24vw, 1.1rem); line-height: 1.47; color: #d3cede; }
.hero-actions, .win-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.action, .play-tools > *, .levels button, .text-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 43px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 670;
  line-height: 1.18;
  text-align: center;
}
.action { padding: .73rem 1.03rem; font-size: .9rem; }
.primary { border-color: var(--mint); color: #17251d; background-color: var(--mint); }
.ghost { border-color: #605970; background-color: #201d30; color: var(--ink); }
.play-glyph {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: .34em solid transparent;
  border-bottom: .34em solid transparent;
  border-left: .55em solid currentColor;
}

.game-library { margin: clamp(35px, 4.1vw, 58px) 0 0; scroll-margin-top: 18px; }
.section-heading { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-heading h2, .win-panel h2 { margin: 0; font-weight: 735; letter-spacing: -.06em; line-height: 1.08; }
.section-heading h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
.section-meta { color: var(--muted); letter-spacing: .015em; white-space: nowrap; }
.section-meta i { color: #716a82; margin: 0 4px; font-weight: 400; }
.surprise { min-height: 44px; color: var(--lilac); }
.die { font-family: system-ui, sans-serif; font-size: 1.45rem; line-height: 1; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.game-card {
  --accent: var(--mint);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background-color: var(--panel);
  border: 1px solid #393644;
  border-radius: 12px;
  transition: transform .18s ease-out, border-color .18s ease-out, box-shadow .18s ease-out;
}
.sudoku-card { --accent: #91e8ef; }
.forge-card { --accent: #ffcb8c; }
.parity-card { --accent: #d5b4ff; }
.nim-card { --accent: #f2d87e; }
.reversi-card { --accent: #9ad8bd; }
.card-art { overflow: hidden; flex: none; aspect-ratio: 2.68; border-bottom: 1px solid #ffffff12; background-color: #24202f; }
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease-out; }
.card-copy { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; padding: clamp(16px, 2vw, 26px); }
.genre { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: .675rem; letter-spacing: .11em; }
.genre i { width: 7px; height: 7px; background-color: currentColor; display: inline-block; }
.lattice-card .genre i { transform: rotate(45deg); border-radius: 1px; }
.forge-card .genre i { clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.parity-card .genre i { border-radius: 2px; }
.nim-card .genre i { border-radius: 50% / 28%; }
.reversi-card .genre i { border-radius: 50%; }
.card-copy h3 { margin: 9px 0 6px; font-size: clamp(1.33rem, 2.15vw, 1.88rem); font-weight: 720; line-height: 1.1; letter-spacing: -.054em; }
.card-copy p { margin: 0 0 20px; color: var(--sub); font-size: .96rem; line-height: 1.5; }
.card-play { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; color: var(--accent); font-size: .88rem; font-weight: 680; }
.card-play .play-glyph { font-size: .75rem; }

.player { margin: 0 auto; padding-top: clamp(25px, 3.5vw, 46px); max-width: 866px; }
.back { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: 15px; font-size: .82rem; color: var(--sub); }
.play-heading, .settings, .bottom-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.play-heading { align-items: flex-end; }
.player h1 { margin: .24em 0 0; line-height: .98; font-size: clamp(2.55rem, 6.1vw, 4.65rem); letter-spacing: -.07em; font-weight: 760; }
.play-tools, .levels { display: flex; align-items: center; flex-wrap: wrap; }
.play-tools { gap: 6px; }
.play-tools > *, .text-button { padding: .55rem .86rem; font-size: .85rem; background: var(--panel); border-color: var(--line); color: var(--ink); }
.settings { border-block: 1px solid var(--line); padding-block: 12px; margin-block: clamp(19px, 2.6vw, 32px) 19px; }
.levels { gap: 3px; }
.levels button { min-height: 38px; color: var(--sub); border-color: transparent; background: transparent; font-size: .9rem; padding: .45rem .8rem; }
.levels button[aria-pressed="true"], .levels button[aria-current="true"], .levels button.active { color: var(--mint); border-color: #4f665b; background: #20302c; }
.daily-level { display: inline-flex; align-items: center; min-height: 38px; padding: .42rem .76rem; border: 1px solid #4f665b; border-radius: 7px; background: #20302c; color: var(--mint); font-size: .9rem; font-weight: 650; }
.mono { color: var(--muted); font-size: .78rem; }
#game-board, .win-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: clamp(14px, 2.4vw, 30px); }
#game-board { min-width: 0; }
.win-panel { margin-top: 16px; border-color: #546f60; background: linear-gradient(125deg, #253831, #1b2322); }
.win-panel h2 { margin: 7px 0 10px; font-size: clamp(1.75rem, 3.8vw, 2.55rem); }
.win-panel p { margin: 5px 0; max-width: 64ch; }
#win-explanation { color: #d1dfd5; }
.win-actions { margin-top: 18px; }
.bottom-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 14px; }
.share-status { color: var(--mint); font-size: .9rem; }
.share-status:not(:empty) { margin-top: .8rem; }
.share-status input { display: block; width: min(100%, 29rem); margin-top: .35rem; padding: .55rem; border: 1px solid var(--mint); border-radius: 4px; background: var(--panel); color: var(--ink); font: inherit; }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding-block: 21px 28px; margin-top: clamp(38px, 5.3vw, 77px); border-top: 1px solid #35323f; font-size: .85rem; color: var(--muted); }
.footer a { color: #d5cfdf; }
.footer > a span { color: var(--mint); margin-left: 3px; }
.nojs { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; color: var(--sub); }
.nojs a { text-decoration: underline; }

@media (hover: hover) {
  .mast a:hover, .footer a:hover, .back:hover { color: var(--mint); }
  .game-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 9px 25px #05050c55; }
  .game-card:hover .card-art img { transform: scale(1.045); }
  .primary:hover { background-color: #d3ffde; border-color: #d3ffde; }
  .ghost:hover, .text-button:hover, .play-tools > :hover, .levels button:hover { color: var(--ink); background-color: #302d40; border-color: #79718b; }
}

@media (min-width: 681px) and (max-width: 820px) {
  .hero { min-height: 374px; }
  .card-copy { padding: 14px; }
  .card-copy p { font-size: .92rem; }
}
@media (max-width: 680px) {
  .frame { width: calc(100% - 32px); }
  .mast-inner { min-height: 61px; gap: 15px; }
  .mast nav { gap: 13px; }
  .mast nav a, .parent-link { font-size: .83rem; }
  .brand { gap: 7px; font-size: 1.1rem; }
  .brand-mark { width: 22px; height: 22px; }
  .author-name { display: none; }
  .short-name { display: inline; }
  .hero { min-height: 0; margin-top: 18px; border-radius: 13px; }
  .hero-art { inset: 19px -1% auto auto; width: 57%; height: clamp(145px, 34vw, 218px); }
  .hero-art img { object-fit: cover; object-position: 64% center; }
  .hero-art::after { background: linear-gradient(90deg, #1a1828 1%, #1a182800 35%), linear-gradient(0deg, #1a1828, #1a182800 21%, #1a182800 80%, #1a1828); }
  .hero-copy { padding: clamp(23px, 5vw, 35px); }
  .hero h1 { font-size: clamp(3.6rem, 11.6vw, 5rem); margin: 15px 0 18px; }
  .hero-copy > p { max-width: min(96%, 440px); font-size: .99rem; }
  .hero-actions { margin-top: 18px; }
  .action { padding: .66rem .79rem; }
  .game-library { margin-top: 33px; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .card-copy { padding: 17px; }
  .card-copy h3 { font-size: 1.55rem; }
  .play-heading { flex-direction: column; align-items: flex-start; gap: 12px; }
  .settings { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .settings .mono { align-self: center; }
}

@media (min-width: 500px) and (max-width: 680px) {
  .cards { grid-template-columns: 1fr; }
  .game-card { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
  .card-art { aspect-ratio: auto; border: 0; border-right: 1px solid #ffffff12; }
  .card-art img { min-height: 100%; object-fit: cover; }
  .card-copy p { margin-bottom: 12px; }
}
@media (max-width: 420px) {
  .frame { width: calc(100% - 24px); }
  .mast-inner { gap: 12px; }
  .mast nav { gap: 10px; }
  .parent-link { gap: 2px; }
  .hero-copy { padding: 23px 17px; }
  .hero .eyebrow { font-size: .63rem; letter-spacing: .085em; }
  .hero-art { height: 138px; top: 26px; width: 55%; }
  .hero h1 { margin-block: 15px 19px; }
  .hero-actions { gap: 7px; }
  .hero-actions .action { font-size: .825rem; padding-inline: .7rem; }
}
@media (max-width: 340px) {
  .brand { gap: 5px; font-size: .97rem; }
  .mast-inner, .mast nav { gap: 8px; }
  .mast nav a, .parent-link { font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  .game-card, .card-art img { transition: none; }
}

.notes-link { display: flex; flex-wrap: wrap; column-gap: 26px; margin: 20px 0 0; color: var(--sub); font-size: .95rem; }
.notes-link a { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; text-decoration: underline; text-underline-offset: .23em; }
.notes-link a:hover { color: var(--mint); }

.boardroom-feature {display:flex;flex-wrap:wrap;align-items:center;gap:1.5rem 2rem;justify-content:space-between;margin-top:2rem;padding:clamp(1.15rem,3vw,2.2rem);border:1px solid var(--line);border-left:4px solid var(--mint);border-radius:12px;background:var(--panel)}
.boardroom-feature h3{font-size:clamp(1.55rem,3.1vw,2.5rem);line-height:1.1;letter-spacing:-.045em;margin:.45rem 0}.boardroom-feature p:not(.eyebrow){max-width:55ch;color:var(--sub);margin:.45rem 0 0}.boardroom-links{display:flex;gap:.6rem;flex-wrap:wrap}

@media (min-width:681px) and (max-width:1000px) { .cards { grid-template-columns:repeat(2, minmax(0, 1fr)); } }

.sudoku-resume-wrap {margin:0}.sudoku-resume-wrap a{padding-top:.4rem;color:var(--mint)}
