/* Studio palette and typography */
:root {
  --paper:#faf7f2;
  --back:#f1ece7;
  --ink:#282134;
  --body:#514859;
  --muted:#665d6b;
  --line:#dfd6dd;
  --blue:#573e8b;
  --blue-dark:#402c6a;
  --studio-panel:#281e37;
  --studio-panel-deep:#1e172c;
  --studio-soft:#e8ddf7;
  --studio-accent:#ffc383;
  --studio-outline:#5a496c;
}
body {background:var(--paper)}
.wrap,.header-inner,.footer-top,.footer-bottom {max-width:1360px}
.header {height:74px;background:rgb(250 247 242 / .97);border-color:var(--line)}
.header-inner {gap:clamp(1.6rem,4vw,3.4rem)}
.header .brand {color:var(--ink)}
.desktop-nav {gap:clamp(1rem,3vw,2.5rem)}
.desktop-nav a {font-size:14px;font-weight:700}
.desktop-nav a[aria-current=page] {text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:7px}
.header-search {background:#f4edf4;border-color:var(--line)}
.header-search input {font-size:13px}
.mobile-nav {background:var(--paper);border-color:var(--line)}
.eyebrow {color:#665577}
.section-head .eyebrow,.eyebrow {font-size:11px;letter-spacing:.12em}
.section-head h2 {font-size:clamp(30px,4vw,48px);line-height:1.13;letter-spacing:-.055em}
.section-head > .text-link {font-size:14px}
.breadcrumbs {color:var(--muted)}
.footer {background:#ede5ee;border-top:1px solid var(--line)}
.footer-top,.footer-bottom {border-color:var(--line)}
:focus-visible {scroll-margin:14px}
.studio-home {padding-top:24px}

/* The featured replay uses paired crops from the real board. */
.studio-feature {
  display:grid;
  grid-template-columns:1.04fr minmax(0,1fr);
  align-items:center;
  gap:clamp(1.2rem,4vw,4.2rem);
  padding:clamp(1.5rem,4.4vw,4.1rem);
  color:#fff8f0;
  background:radial-gradient(ellipse at 100% 0%,#47345b,var(--studio-panel) 57%);
  border:1px solid #3a2c4b;
  border-radius:clamp(1.05rem,2vw,1.65rem);
}
.feature-copy {min-width:0}
.feature-copy .eyebrow {color:#dbc6f7;font-weight:800}
.feature-copy .eyebrow span,.play-heading .eyebrow span {margin:0 .4em;color:var(--studio-accent)}
.feature-copy h1 {margin:.2em 0 .28em;font-size:clamp(38px,5.1vw,75px);line-height:1.03;letter-spacing:-.066em}
.feature-copy h1 span {color:var(--studio-accent)}
.feature-copy > p:not(.eyebrow) {max-width:425px;color:#e4d9ee;font-size:clamp(15px,1.5vw,17px);line-height:1.62}
.feature-actions {display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1.45rem;margin-top:1.65rem}
.button.feature-play {
  min-height:49px;
  gap:1rem;
  padding:.75rem 1.12rem;
  background:var(--studio-accent);
  color:#2e1f22;
  border:1px solid #ffcd96;
  border-radius:.55rem;
  font-weight:800;
  font-size:14px;
  white-space:nowrap;
}
.button.feature-play:hover {background:#ffdaac;color:#261825}
.feature-actions .feature-browse {font-size:14px;text-decoration:none;font-weight:800;color:#fff4ff}
.feature-browse:hover,.feature-replay a:hover {text-decoration:underline}
.feature-browse span {margin-left:.3rem}
.feature-copy .feature-note {margin-top:1.1rem;font-size:13px!important;color:#d4c6df!important}
.feature-note span,.play-note span {padding:0 .36rem}
.feature-replay {
  background:var(--studio-panel-deep);
  border:1px solid var(--studio-outline);
  border-radius:1rem;
  padding:clamp(.7rem,2vw,1.15rem);
  min-width:0;
}
.replay-top {display:flex;justify-content:space-between;gap:.5rem;color:#eee6f4;padding:0 .12rem .7rem;font-size:13px;font-weight:700}
.replay-top span:first-child {color:#e4c3fb;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.replay-frames {display:grid;grid-template-columns:1fr 1fr;gap:clamp(.38rem,1vw,.8rem)}
.replay-frames > div {min-width:0}
.replay-shot {overflow:hidden;border:1px solid #647095;border-radius:.55rem;background:#1e2b4b;aspect-ratio:1.06}
.replay-shot img,.game-card-image img,.stage-image img {height:100%;width:100%;object-fit:cover}
.replay-shot img {object-position:center 41%}
.replay-frames p {display:flex;align-items:baseline;gap:.35rem;color:#ece2f2;font-size:clamp(11px,1vw,13px);line-height:1.35;margin:.5rem 0}
.replay-frames p span {color:var(--studio-accent);font:700 .84em/1.4 ui-monospace,monospace}
.feature-replay figcaption {display:flex;justify-content:flex-end;border-top:1px solid #493b5d;padding-top:.55rem;margin-top:.25rem}
.feature-replay a {display:inline-flex;align-items:center;gap:.36rem;text-decoration:none;color:#f3e9f6;font-weight:800;font-size:12px}
.studio-feature :focus-visible,.play-hero :focus-visible {outline-color:var(--studio-accent)}

/* Library cards pair an in-game crop with the game's actual title. */
.studio-home .library-section {margin-top:clamp(2rem,4.8vw,4.25rem)}
.game-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:1.1rem}
.game-card {
  min-width:0;
  border:1px solid var(--line);
  border-radius:.95rem;
  background:#fffcf8;
  overflow:clip;
  transition:border-color .2s,box-shadow .2s;
}
.game-card:has(.game-card-link:hover),.game-card:has(.game-card-link:focus-visible) {border-color:#947db5;box-shadow:0 .35rem 1rem #3a244416}
.game-card-link {display:block;height:100%;text-decoration:none}
.game-card-link:focus-visible {outline-offset:-4px}
.game-card-link:hover {color:var(--ink)}
.game-card-image {
  position:relative;
  display:block;
  aspect-ratio:1.85;
  overflow:hidden;
  background:var(--studio-panel);
  border:0;
  border-radius:0;
}
.game-card-image img {position:static;aspect-ratio:auto;object-position:center var(--capture-y,48%);transition:transform .24s ease}
.game-card-link:hover img {transform:scale(1.035)}
.capture-smashblocks {--capture-y:41%}
.capture-puzzlehex {--capture-y:53%}
.capture-puzzlewatersort {--capture-y:51%}
.capture-blockpuzzlesavegirl {--capture-y:63%}
.capture-hunterevolveuprising {--capture-y:47%}
.capture-castle-cup {--capture-y:55%}
.capture-acestrike {--capture-y:64%}
.game-card-image .card-category {
  position:absolute;
  z-index:1;
  left:.62rem;
  top:.62rem;
  margin:0;
  padding:.24rem .5rem;
  border-radius:.34rem;
  background:#211830;
  color:#f9e9ff;
  font-size:11px;
  font-weight:700;
  letter-spacing:.01em;
}
.game-card-image .card-play {right:.6rem;bottom:.6rem;background:var(--studio-accent);color:#271c2a;font-size:17px}
.game-card-info {padding:.9rem 1.05rem 1.05rem}
.game-card-info h3 {font-size:clamp(17px,1.6vw,21px);line-height:1.24}
.game-card-info > p {font-size:14px;color:var(--body);line-height:1.52;margin-top:.4rem}
.filter-tabs button {background:#fffcf8;font-size:13px;border-radius:.52rem;padding:.5rem .83rem;min-height:42px}
.filter-tabs button[aria-pressed=true] {background:var(--studio-panel);color:#fff2f7}
.catalog-result {color:var(--muted);font-size:13px}
.studio-lab {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.13fr);
  gap:clamp(1.2rem,4vw,4rem);
  align-items:center;
  margin:clamp(2.5rem,6vw,5.5rem) 0;
  background:#eadff4;
  border:1px solid #dcd0e8;
  border-radius:1.2rem;
  padding:clamp(1.3rem,4.25vw,3.4rem);
}
.lab-copy h2 {font-size:clamp(30px,4vw,49px);line-height:1.08;margin:.26em 0}
.lab-copy > p:not(.eyebrow) {max-width:430px;margin:1rem 0;color:#4b4055}
.lab-links {display:grid;gap:.58rem}
.lab-links > a:not(.lab-replay-link) {
  display:grid;
  position:relative;
  gap:.1rem;
  background:#fffcf8;
  border:1px solid #d6c5e1;
  padding:.8rem 2.7rem .8rem .9rem;
  border-radius:.72rem;
  text-decoration:none;
}
.lab-links strong {font-family:Manrope,sans-serif;font-size:clamp(17px,2vw,22px);line-height:1.25}
.lab-links span:first-child {font-size:12px;font-weight:800;color:#684d86}
.lab-links p {font-size:13px}
.lab-links .lab-arrow {position:absolute;right:.95rem;top:50%;translate:0 -50%;font-size:20px}
.lab-links a:hover strong {text-decoration:underline}
.lab-links .lab-replay-link {justify-self:end;margin:.2rem .2rem 0;font-weight:800;font-size:13px}

/* The primary launch button is part of the first-screen player. */
.studio-game .breadcrumbs {padding-bottom:18px}
.play-hero {
  display:grid;
  grid-template-columns:minmax(0,.79fr) minmax(0,1.21fr);
  align-items:center;
  gap:clamp(1.2rem,3.6vw,3.6rem);
  padding:clamp(1.25rem,3.7vw,3.4rem);
  border-radius:1.45rem;
  color:#fff8f1;
  background:radial-gradient(ellipse at 95% 7%,#4e395e,var(--studio-panel) 61%);
}
.play-heading {min-width:0}
.play-heading .eyebrow {text-transform:uppercase;color:#dec9f4}
.play-heading h1 {font-size:clamp(37px,5.3vw,68px);line-height:1.02;margin:.27em 0 .36em;text-wrap:balance}
.play-heading .play-deck {max-width:410px;color:#ede2f2;font-size:clamp(15px,1.4vw,18px)}
.play-links {display:flex;flex-wrap:wrap;gap:.6rem 1.2rem;margin:1.4rem 0 1.05rem;font-size:14px;font-weight:800}
.play-links a {display:inline-flex;align-items:center;gap:.3rem;color:var(--studio-accent)}
.play-links a:hover {color:#ffe0ba}
.play-heading .play-note {color:#d6c8e2;font-size:13px}
.play-stage.player-section {min-width:0;margin:0;scroll-margin-top:90px}
.play-stage .player-topline {display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin:0 0 .5rem;color:#fff6ff}
.play-stage .player-topline h2 {font-size:17px;color:inherit;line-height:1.2}
.play-stage .player-topline>span {color:#e3d4eb;font-size:12px}
.play-stage .player-shell {border:1px solid #685777;border-radius:.8rem;background:#1c1527}
.play-stage .player-screen {background:#20192d;min-height:0}
.play-stage .player-placeholder {
  position:relative;
  isolation:isolate;
  display:grid;
  place-items:center;
  width:100%;
  max-width:none;
  padding:1.8rem;
  min-height:clamp(245px,27vw,390px);
}
.stage-image {position:absolute;inset:0;z-index:-2;background:var(--studio-panel-deep)}
.stage-image img {margin:0;width:100%;height:100%;border-radius:0;box-shadow:none;object-position:center var(--capture-y,48%)}
.stage-image::after {content:'';position:absolute;inset:0;background:linear-gradient(180deg,transparent 7%,#17102026 29%,#171020b8 74%,#171020d6)}
.stage-action {
  display:grid;
  justify-items:center;
  gap:.36rem;
  align-self:end;
  padding:.7rem 1rem .55rem;
  border-radius:.65rem;
  background:#21182bd9;
}
.stage-action .button {margin:0}
.stage-action > p {color:#eee0f2;font-size:12px;line-height:1.3}
.play-stage .player-toolbar {background:#1d1629;color:#efe2f2;gap:.55rem;padding:.68rem .8rem}
.play-stage .player-toolbar p {color:#efe2f2;font-size:12px}
.play-stage .player-toolbar button {border-color:#746287;background:#3b2c4b;min-height:36px}
.play-stage .player-help {margin:.42rem 0 0;color:#f1e6f7;font-size:12px}
.play-stage .player-help a {color:inherit}
.play-stage noscript p {color:#f1e6f7}
.play-stage .player-screen iframe {height:min(730px,86svh);width:100%;max-width:470px}
.play-stage .player-screen:fullscreen iframe {height:100svh;max-width:calc(100svh * .62)}
.play-stage .player-loading {background:#241a37ed}
.game-manual {margin-top:clamp(2.5rem,5.4vw,5.2rem)}
.game-manual .reading-aside {display:grid;gap:1rem;align-content:start}
.game-manual .opening-proof {margin:0;background:#efe6f3;border-color:#d7c9df}
.game-manual .opening-frames img {border-color:#574567;box-shadow:none}
.game-manual .review-note {padding:0;margin:0}
.game-manual .opening-proof figcaption {color:#553d68}
.game-manual .opening-proof figcaption > span {font-size:11px}
.game-manual .opening-proof figcaption a {font-size:13px}

/* Reading pages share the navigation, surface colors and contrast. */
.page-heading,.article-heading {border-bottom:1px solid var(--line);padding-bottom:clamp(1rem,3vw,1.8rem)}
.page-heading h1,.article-heading h1 {text-wrap:balance}
.walkthrough-article {padding-top:clamp(.8rem,2vw,1.35rem)}
.guide-jumps .text-link {background:#fffaf6;border:1px solid var(--line);border-radius:.4rem;padding:.32rem .61rem;min-height:36px}
.article-byline .author-mark {background:#eee3f5;color:var(--blue)}
.note,.category-explainer,.table-of-contents {background:#f1e9f1;border-color:#e0d3e4}
.walkthrough-frames,.walkthrough-level {background:#f0e8f5;border-color:#e0d3e8}
.move-frame a {background:var(--studio-panel)}
.walkthrough-lesson {background:#f3ebdc}
.walkthrough-steps li::before {background:var(--studio-panel);color:#fbeafa}
.sort-practice {background:#eef4e9;border-color:#d8e1cf}
.sort-stack[aria-pressed=true] {border-color:var(--blue);background:#f2eafb;box-shadow:0 0 0 2px var(--blue)}
.sort-controls,.sort-hint,.move-frame figcaption {color:#4a3e55}
.faq-list details {background:#fffaf5;border-color:var(--line)}
.guide-tile {background:#fffaf5;border-color:var(--line)}
.story-card .story-art {border-radius:.95rem}
.story-card h3 {font-size:22px;line-height:1.26}
.story-card > .text-link {font-size:13px}

@media(max-width:980px) {
  .studio-feature {gap:1.3rem;padding:1.55rem}
  .play-hero {grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:1.3rem;padding:1.45rem}
  .game-grid {gap:.8rem}
}
@media(max-width:760px) {
  .header {height:65px}
  .header-inner {gap:.6rem}
  .header-search {width:152px;padding-inline:.58rem;gap:.45rem}
  .studio-home {padding-top:14px}
  .studio-feature,.studio-lab,.play-hero {grid-template-columns:1fr}
  .studio-feature {gap:1rem;padding:1.12rem}
  .feature-copy h1 {font-size:clamp(36px,8.7vw,54px)}
  .feature-copy .eyebrow {font-size:10px}
  .feature-actions {margin-top:1.05rem;gap:.55rem 1.05rem}
  .button.feature-play {min-height:44px;font-size:13px;padding:.55rem .77rem}
  .feature-actions .feature-browse {font-size:13px}
  .feature-copy .feature-note {margin-top:.68rem;font-size:12px!important}
  .feature-replay {padding:.62rem}
  .replay-shot {aspect-ratio:1.36}
  .replay-top {padding-bottom:.42rem}
  .replay-frames p {font-size:11px}
  .feature-replay figcaption {padding-top:.28rem}
  .studio-lab {gap:.85rem}
  .guide-jumps {gap:.45rem}
  .studio-home .library-section {margin-top:2.15rem}
  .studio-home .library-section .section-head {margin-bottom:1rem}
  .game-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .game-card-image {aspect-ratio:1.48}
  .game-card-image .card-category {font-size:10px;left:.28rem;top:.28rem;padding:.15rem .35rem}
  .game-card-image .card-play {right:.35rem;bottom:.35rem;width:24px;height:24px;font-size:13px}
  .game-card-info {padding:.55rem .66rem .68rem}
  .game-card-info h3 {font-size:15px}
  .game-card-info > p {font-size:12px}
  .play-hero {gap:1rem;padding:1rem;border-radius:1rem}
  .play-heading h1 {font-size:clamp(33px,8.8vw,52px);text-wrap:pretty}
  .play-heading .play-deck {font-size:15px}
  .play-links {margin:.76rem 0 .56rem}
  .play-stage .player-placeholder {min-height:220px;padding:.75rem}
  .stage-action {align-self:center}
  .play-stage .player-topline h2 {font-size:15px}
  .play-stage .player-screen iframe {height:calc(100svh - 100px);min-height:420px}
  .studio-game .breadcrumbs {padding-bottom:12px}
}
@media(max-width:375px) {
  .header-search {width:112px}
  .header-search > svg {display:none}
  .feature-copy h1 {font-size:31px}
  .feature-copy > p:not(.eyebrow) {font-size:14px}
  .studio-feature {padding:.94rem}
  .feature-actions {gap:.35rem .65rem}
  .feature-actions .feature-browse {font-size:12px}
  .filter-tabs {gap:.24rem}
  .filter-tabs button {padding:.38rem .46rem;font-size:12px}
  .section-head > .text-link {font-size:12px}
  .replay-frames p {gap:.24rem;font-size:10px}
}
@media(prefers-reduced-motion:reduce) {
  .game-card,.game-card-image img {transition:none}
}

.guide-addition {font-size:.8rem;font-weight:700;color:#684d86}
.board-exercise {
  background:#f0e8f5;
  border:1px solid #e0d3e8;
  border-radius:var(--radius);
  margin:1rem 0;
  padding:clamp(.75rem,3vw,1.4rem);
}
.board-exercise h3 {margin:.3rem 0}
.board-diagram {
  width:min(100%,22rem);
  table-layout:fixed;
  border-spacing:4px;
  margin:.8rem auto 1rem;
  text-align:center;
}
.board-diagram th {font-size:.78rem;color:#51405f}
.board-diagram td {height:clamp(18px,6.5vw,32px);border-radius:4px}
.board-diagram .open-cell {background:#fffaf6;border:1px solid #d6c5df}
.board-diagram .occupied {background:#5c4778;border:1px solid #5c4778}
.board-choices summary {min-height:44px}
.walkthrough-follow-up .walkthrough-steps {margin-top:1rem;max-width:75ch}
.follow-up-frames {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr));
  align-items:start;
  gap:.9rem;
  max-width:54rem;
  margin:1rem auto;
}
.follow-up-frames .move-frame {width:100%;max-width:16rem;justify-self:center}
