/* Four Lights: a focused, single-column game surface. */
.explore-page {
  --game-bg: #fffdf8;
  --game-panel: #fffdf8;
  --game-line: #f6f2e9;
  --game-ink: #f5f1e9;
  --game-muted: #b2bfc6;
  --game-mint: #f7e5b0;
  --game-gold: #f0d78c;
  color-scheme: dark;
  min-height: 100vh;
  /* Light page, as on the Explore hub; the game boards and panels stay
     dark as focused playing surfaces. Page-level text is restyled below. */
  background: radial-gradient(ellipse at 50% 0%, #fcfbf8 0, #f7f4ee 45%, #f0ece2 100%);
  color: var(--game-ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
}

.explore-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.explore-page .skip-link { background: var(--game-mint); color: #263841; }
.explore-page :is(a, button, input, summary):focus-visible { outline: 2px solid var(--game-gold); outline-offset: 5px; }
.explore-page button { -webkit-tap-highlight-color: transparent; }
.explore-page button:disabled { cursor: default; }
.explore-page [hidden] { display: none !important; }

.game-header {
  width: min(1120px, calc(100% - 64px));
  min-height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.game-header .brand img { width: 180px; height: auto; }
.game-header nav { display: flex; align-items: center; gap: 27px; font-size: .875rem; }
.game-header nav > a { color: var(--game-muted); padding-block: 7px; }
.game-header nav > a:hover { color: #fff; }
.help-button {
  border: 1px solid #5f757f;
  background: transparent;
  color: #ede7da;
  border-radius: 6px;
  padding: 8px 14px;
  min-height: 39px;
  font-size: .875rem;
  line-height: 1.5;
  transition: background .18s, border-color .18s;
}
.help-button:hover:not(:disabled) { background: #2c3f49; border-color: #899faa; }
.help-button:disabled { opacity: .5; }

.game-shell {
  width: min(760px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: 16px 30px;
}
.game-intro { text-align: center; max-width: 680px; margin-inline: auto; }
.game-intro h1 {
  color: var(--game-ink);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 3.15rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.1;
  margin: 0 0 11px;
}
.game-intro > p { font-size: 1rem; line-height: 1.75; margin: 0 auto 7px; color: #e6e1d4; max-width: 610px; }
.game-intro strong { color: #f1ede2; font-weight: 600; }
.game-intro > .game-rule { max-width: 570px; color: #9fb1ba; font-size: .875rem; line-height: 1.8; }

.game-stage { max-width: 440px; margin: 16px auto 18px; border-radius: 12px; scroll-margin-top: 20px; }
.game-stage:focus-visible { outline: 2px solid var(--game-gold); outline-offset: 9px; }
.replay-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: .8125rem; color: #cad3d8; padding: 0 3px 6px; }
.replay-actions { display: flex; align-items: center; gap: 14px; }
.close-replay { width: 32px; height: 32px; border: 1px solid #d6cfbf; border-radius: 50%; background: transparent; color: #4b5b63; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; line-height: 1; }
.close-replay:hover { background: #f6f2e9; }
.light-board {
  position: relative;
  width: min(100%, 268px);
  aspect-ratio: 1;
  margin-inline: auto;
  border: 1px solid #445862;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 46%, #283b45, #202f37 75%);
  box-shadow: inset 0 1px 1px #7395a510, 0 10px 30px #00000015;
  transition: border-color .22s, box-shadow .22s;
}
.light-board.is-matched { border-color: #efcc61; box-shadow: 0 0 0 3px #efcc6110, 0 0 30px #f3d98912; }
.board-wires { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #53707e; stroke-width: 1.2; opacity: .62; }
.board-wires .diagonal-wire { stroke-dasharray: 3 7; opacity: .42; }
.lamp {
  position: absolute;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 36%;
  transform: translate(-50%, -50%);
}
.lamp-a { left: 21.7%; top: 21.7%; }
.lamp-b { left: 78.3%; top: 21.7%; }
.lamp-c { left: 78.3%; top: 78.3%; }
.lamp-d { left: 21.7%; top: 78.3%; }
.lamp-letter { font-size: .8125rem; font-weight: 600; color: #c9d6dc; line-height: 1.4; margin-bottom: 7px; }
.lamp-disc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border: 1px solid #5f7c8a;
  border-radius: 50%;
  color: #8ca1ab;
  background: #2b3e48;
  box-shadow: inset 0 1px 1px #ffffff04, 0 3px 6px #0000000d;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.lamp-disc svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lamp-state { margin-top: 7px; color: #c9d6dc; font-size: .875rem; letter-spacing: .07em; line-height: 1.4; font-weight: 600; }
.lamp.is-on .lamp-disc { background: #e8d7a3; color: #31454e; border-color: #ffefbe; box-shadow: 0 0 22px #ecd28218, inset 0 1px 2px #f8f6f066; }
.lamp.is-on .lamp-state { color: #eedba2; }
.lamp.was-toggled .lamp-disc { outline: 2px solid #f3d98b; outline-offset: 5px; }

.replay-area { padding: 17px 20px; margin-top: 17px; background: #fffdf8; border: 1px solid #d6cfbf; border-radius: 9px; }
.replay-position { display: flex; align-items: start; justify-content: space-between; gap: 15px; font-size: .875rem; }
.replay-position strong { font-weight: 600; color: #22313a; }
.replay-position > span { font-size: .75rem; color: #4b5b63; white-space: nowrap; margin-top: 2px; }
.step-description { color: #4b5b63; font-size: .875rem; line-height: 1.75; margin-block: 7px 9px; }
.replay-slider { display: block; width: 100%; margin: 0 0 12px; min-height: 23px; accent-color: #f3d98a; cursor: pointer; }
.replay-slider:disabled { opacity: .45; cursor: default; }
.replay-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.replay-button { min-height: 37px; padding: 7px 10px; border: 1px solid #d6cfbf; border-radius: 5px; background: transparent; color: #4b5b63; font-size: .875rem; line-height: 1.4; }
.replay-button:hover:not(:disabled) { background: #f6f2e9; border-color: #d6cfbf; }
.replay-button.replay-play { background: #f5de98; border-color: #f5de98; color: #2f414a; font-weight: 600; }
.replay-button.replay-play:hover:not(:disabled) { background: #f9eabd; }
.replay-button:disabled { opacity: .35; }

.sequence-panel { border: 1px solid #f6f2e9; border-radius: 13px; padding: 20px 24px 20px; background: linear-gradient(145deg, #fffdf8, #fffdf8); box-shadow: 0 7px 22px #00000008; }
.sequence-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.sequence-heading h2 { font-family: var(--sans); font-size: 1.0625rem; font-weight: 600; line-height: 1.5; letter-spacing: -.01em; margin: 0; color: #22313a; }
.command-count { font-size: .8125rem; color: #4b5b63; line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sequence-well { min-height: 66px; padding: 11px; border: 1px dashed #d6cfbf; border-radius: 7px; background: #fffdf8; margin-bottom: 13px; }
.sequence-empty { font-size: .875rem; text-align: center; color: #4b5b63; margin: 10px 0; line-height: 1.65; }
.sequence { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 0; }
.sequence-item { display: inline-flex; align-items: center; gap: 7px; min-height: 37px; padding: 3px 4px 3px 9px; border: 1px solid #d6cfbf; border-radius: 5px; background: #f6f2e9; max-width: 100%; }
.sequence-item.op-edge { background: #f6f2e9; border-color: #d6cfbf; }
.sequence-item.op-opposite { background: #f6f2e9; border-color: #7a7050; }
.sequence-index { color: #4b5b63; font-size: .75rem; min-width: 10px; font-variant-numeric: tabular-nums; }
.sequence-type { font-size: .875rem; color: #22313a; line-height: 1.5; font-weight: 600; }
.sequence-remove { width: 29px; height: 29px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 3px; color: #4b5b63; background: transparent; font-size: 1.15rem; line-height: 1; }
.sequence-remove:hover { background: #d6cfbf35; color: #22313a; }
.sequence-remove:focus-visible { outline-offset: 1px; }
.sequence-item.is-current { outline: 2px solid #f6e2a5; outline-offset: 2px; background: #d6cfbf; }
.command-palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.command-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 0;
  min-height: 86px;
  padding: 8px;
  border: 1px solid #d6cfbf;
  border-radius: 7px;
  background: #f6f2e9;
  color: #7d5a10;
  transition: background .16s, border-color .16s, transform .16s, box-shadow .16s;
}
.command-button svg { width: 25px; height: 25px; fill: none; stroke: #2d424d; stroke-width: 1.3; stroke-linecap: round; margin-bottom: 5px; }
.command-button svg .filled { fill: #d9a92b; stroke: #8a6414; }
.command-button strong { font-size: .875rem; font-weight: 600; line-height: 1.5; letter-spacing: .03em; }
.command-button > span { font-size: .75rem; color: #4b5b63; line-height: 1.5; margin-top: 2px; }
.command-button:hover:not(:disabled):not([aria-disabled="true"]) { background: #f6f2e9; border-color: #efcc61; box-shadow: 0 0 0 2px #f4dc9208; }
.command-button:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(1px); background: #d6cfbf; }
.command-button:disabled, .command-button[aria-disabled="true"] { opacity: .45; }
.command-button:focus-visible { outline: 3px solid #2d424d; outline-offset: 3px; }
.sequence-tools { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 10px 0 14px; }
.sequence-tools > div { display: flex; align-items: center; gap: 20px; }
.quiet-button { border: 0; background: transparent; padding: 3px 0; font-size: .875rem; color: #4b5b63; line-height: 1.6; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.quiet-button:hover:not(:disabled) { color: #22313a; }
.quiet-button:disabled { color: #7b8e97; text-decoration: none; }
.check-button { width: 100%; min-height: 49px; padding: 12px 20px; background: #f6e09f; color: #31424b; border: 1px solid #f6e09f; border-radius: 6px; font-size: 1rem; font-weight: 600; line-height: 1.5; transition: background .16s, box-shadow .16s; }
.check-button:hover:not(:disabled) { background: #ebe4d4; border-color: #ebe4d4; box-shadow: 0 0 20px #f6e09f0a; }
.check-button:disabled { background: #f6f2e9; border-color: #d6cfbf; color: #7e919a; }
.feedback { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 16px 0 0; margin-top: 16px; border-top: 1px solid #d6cfbf; color: #7d5a10; }
.feedback-symbol { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d6cfbf; color: #7d5a10; border-radius: 50%; font-size: 1rem; line-height: 1; }
.feedback > p { color: #22313a; font-size: 1rem; line-height: 1.65; margin: 0; }
.feedback-action { display: inline-block; background: transparent; border: 0; padding: 4px 0; color: #7d5a10; font-size: .875rem; line-height: 1.6; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.feedback-action:hover:not(:disabled) { color: #22313a; text-decoration-thickness: 2px; }
.feedback-action:disabled { color: #7d919b; text-decoration: none; }
.feedback[data-verdict="failure"] .feedback-symbol { border-color: #aa9557; color: #7d5a10; }
.feedback[data-verdict="failure"] > p { color: #7d5a10; }
.feedback[data-verdict="success"] .feedback-symbol { border-color: #efcc61; color: #7d5a10; }
.feedback[data-verdict="optimal"] .feedback-symbol { color: #7d5a10; border-color: #c2ac6c; background: #63552a35; }
.feedback[data-verdict="optimal"] > p { color: #7d5a10; }
.no-script-note { color: #7d5a10; font-size: .875rem; margin: 16px 0 0; }

.game-extras { padding-top: 20px; text-align: center; }
.game-extras > details { display: inline-block; text-align: left; vertical-align: top; margin: 0 22px 12px 0; max-width: 100%; }
.game-extras > details:last-child { margin-right: 0; }
.game-extras > details[open] { display: block; margin-right: 0; }
.game-extras summary { display: inline-block; color: #a1b2bb; padding: 0; list-style: none; font-size: .875rem; line-height: 1.6; font-weight: 400; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; cursor: pointer; }
.game-extras summary::-webkit-details-marker { display: none; }
.game-extras summary:hover { color: #e8e0cf; }
.game-extras details[open] > summary { color: #f8e9bd; }
.extras-content { margin-top: 14px; padding: 21px 24px; background: #fffdf8; border: 1px solid #d6cfbf; border-radius: 8px; }
.extras-content p { font-size: 1rem; line-height: 1.8; color: #4b5b63; margin-bottom: 17px; }
.extras-content p:last-child { margin-bottom: 0; }
.hint-list { padding-left: 22px; margin: 0 0 15px; color: #4b5b63; }
.hint-list:empty { display: none; }
.hint-list li { padding-left: 4px; margin-bottom: 13px; font-size: 1rem; line-height: 1.8; }
.hint-list li::marker { color: #4b5b63; }
.hint-count { color: #4b5b63; font-size: .75rem; margin-left: 13px; }
.extras-content .solution-sequence { padding: 13px 15px; background: #f6f2e9; border-left: 2px solid #d6cfbf; border-radius: 0 4px 4px 0; color: #7d5a10; font-size: .875rem; line-height: 1.9; font-weight: 600; overflow-wrap: anywhere; }
.minimum-details { margin-top: 20px; border-top: 1px solid #d6cfbf; padding-top: 17px; }
.minimum-details > summary { color: #4b5b63; }
.minimum-details > div { padding-top: 15px; }
.minimum-details ol { color: #4b5b63; padding-left: 25px; }
.minimum-details li { font-size: 1rem; line-height: 1.8; margin-bottom: 5px; padding-left: 4px; }
.game-signoff { color: #7d919b; text-align: center; font-size: .75rem; letter-spacing: .06em; margin: 14px 0 0; }

.rules-dialog {
  width: min(520px, calc(100% - 36px));
  max-height: calc(100vh - 48px);
  padding: 31px 32px 27px;
  margin: auto;
  background: #fffdf8;
  color: #22313a;
  border: 1px solid #d6cfbf;
  border-radius: 13px;
  box-shadow: 0 24px 80px #0000004d;
  overflow: auto;
}
.rules-dialog::backdrop { background: #fffdf8e0; backdrop-filter: blur(6px); }
.rules-dialog form { margin: 0; }
.dialog-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d6cfbf; border-radius: 50%; background: transparent; color: #7d5a10; font-size: 1.45rem; line-height: 1; }
.dialog-close:hover { background: #f6f2e9; }
.rules-dialog h2 { font-family: var(--sans); font-size: 1.5rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; margin: 0 40px 21px 0; color: #22313a; }
.rules-dialog > p { font-size: 1rem; line-height: 1.8; color: #4b5b63; margin-bottom: 17px; }
.rules-dialog strong { color: #22313a; font-weight: 600; }
.rules-dialog dl { margin: 20px 0; }
.rules-dialog dl > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); border-color: #d6cfbf; gap: 16px; padding-block: 12px; }
.rules-dialog dt { color: #7d5a10; font-size: .875rem; font-weight: 600; }
.rules-dialog dd { font-size: .9375rem; line-height: 1.7; font-weight: 400; color: #4b5b63; }
.rules-dialog > .credits { margin-top: 23px; padding-top: 18px; border-top: 1px solid #d6cfbf; color: #4b5b63; font-size: .8125rem; line-height: 1.8; margin-bottom: 0; }
.rules-dialog a { color: #7d5a10; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 700px) {
  .game-header { width: calc(100% - 40px); min-height: 74px; gap: 20px; }
  .game-header .brand img { width: 164px; }
  .game-header nav { gap: 19px; }
  .game-shell { padding-top: 24px; }
  .game-intro h1 { font-size: 2.9rem; }
  .sequence-panel { padding-inline: 20px; }
  .feedback { grid-template-columns: 25px minmax(0, 1fr); }
  .feedback-action { grid-column: 2; justify-self: start; }
}

@media (max-width: 480px) {
  .game-header { width: calc(100% - 32px); min-height: 68px; gap: 12px; }
  .game-header .brand img { width: 147px; }
  .game-header nav { gap: 13px; font-size: .8125rem; }
  .help-button { font-size: .8125rem; padding: 7px 10px; min-height: 36px; }
  .game-shell { width: calc(100% - 32px); padding-block: 20px 25px; }
  .game-intro h1 { font-size: 2.65rem; margin-bottom: 13px; }
  .game-intro > p { font-size: 1rem; line-height: 1.75; max-width: 350px; }
  .game-intro > .game-rule { font-size: .8125rem; margin-top: 10px; }
  .game-stage { margin-block: 18px 20px; }
  .light-board { width: min(100%, 268px); border-radius: 19px; }
  .lamp-disc { width: 57px; height: 57px; }
  .lamp-disc svg { width: 29px; height: 29px; }
  .lamp-letter { margin-bottom: 6px; font-size: .75rem; }
  .lamp-state { font-size: .875rem; margin-top: 6px; }
  .lamp.was-toggled .lamp-disc { outline-offset: 4px; }
  .replay-area { padding: 15px 16px; margin-top: 14px; }
  .step-description { font-size: .8125rem; }
  .replay-position { font-size: .8125rem; gap: 10px; }
  .replay-position > span { font-size: .6875rem; }
  .replay-controls { gap: 7px; }
  .replay-button { padding-inline: 6px; font-size: .875rem; }
  .sequence-panel { padding: 19px 16px 18px; border-radius: 11px; }
  .sequence-heading { margin-bottom: 11px; }
  .sequence-heading h2 { font-size: 1rem; }
  .command-count { font-size: .75rem; }
  .sequence-well { min-height: 62px; padding: 10px; margin-bottom: 13px; }
  .sequence-empty { margin-block: 9px; }
  .sequence-item { gap: 5px; padding-left: 7px; }
  .sequence-type { font-size: .875rem; }
  .command-palette { gap: 8px; }
  .command-button { padding: 12px 5px 10px; min-height: 97px; }
  .command-button strong { letter-spacing: 0; font-size: .875rem; }
  .command-button > span { font-size: .6875rem; }
  .command-button svg { width: 27px; height: 27px; }
  .sequence-tools { margin-block: 11px 14px; gap: 10px; }
  .sequence-tools > div { gap: 17px; }
  .quiet-button { font-size: .875rem; }
  .check-button { min-height: 47px; font-size: .9375rem; }
  .feedback { margin-top: 14px; padding-top: 14px; column-gap: 10px; row-gap: 7px; }
  .feedback > p { font-size: 1rem; }
  .feedback-action { font-size: .875rem; }
  .game-extras { padding-top: 17px; }
  .game-extras > details { margin-right: 24px; }
  .extras-content { padding: 19px 18px; }
  .extras-content p, .hint-list li, .minimum-details li { font-size: 1rem; }
  .game-signoff { margin-top: 10px; font-size: .6875rem; }
  .rules-dialog { padding: 27px 22px 24px; max-height: calc(100vh - 32px); }
  .rules-dialog h2 { font-size: 1.35rem; }
  .rules-dialog > p { font-size: .9375rem; }
  .rules-dialog dl > div { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 12px; }
  .rules-dialog dd { font-size: .875rem; }
}

@media (max-width: 360px) {
  .game-header .brand img { width: 132px; }
  .game-header nav { gap: 11px; }
  .game-header nav > a { display: none; }
  .help-button { padding-inline: 8px; }
  .game-intro h1 { font-size: 2.45rem; }
  .sequence-panel { padding-inline: 13px; }
  .command-button { padding-inline: 3px; }
  .command-button svg { width: 25px; height: 25px; }
  .command-button > span { font-size: .6875rem; }
  .sequence-tools > div { gap: 15px; }
  .sequence-remove { width: 27px; height: 29px; }
  .sequence-empty { font-size: .8125rem; }
  .light-board { width: min(100%, 250px); }
  .lamp-disc { width: 53px; height: 53px; }
  .lamp-disc svg { width: 27px; height: 27px; }
  .replay-area { padding-inline: 13px; }
  .rules-dialog dl > div { display: grid; grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .explore-page *, .explore-page *::before, .explore-page *::after { transition: none !important; animation: none !important; }
}

/* Support either verdict hook while the interaction layer evolves. */
.feedback--failure .feedback-symbol { border-color: #aa9557; color: #7d5a10; }
.feedback--failure > p { color: #7d5a10; }
.feedback--success .feedback-symbol { border-color: #efcc61; color: #7d5a10; }
.feedback--optimal .feedback-symbol { color: #7d5a10; border-color: #c2ac6c; background: #63552a35; }
.feedback--optimal > p { color: #7d5a10; }

/* Light page: page-level elements (outside the dark game cards) use dark
   text. Everything inside .game-card, .sequence-panel, .light-board and the
   other panels keeps its dark-surface colours. */
body.explore-page { --page-ink: #283b45; --page-muted: #5c6c74; --page-line: #b8c3c8; }
body.explore-page .game-header nav > a { color: var(--page-muted); }
body.explore-page .game-header nav > a:hover,
body.explore-page .game-header nav > a[aria-current="page"] { color: var(--page-ink); }
body.explore-page .help-button { color: var(--page-ink); border-color: var(--page-line); background: #fff; }
body.explore-page .help-button:hover:not(:disabled) { background: #f4f0e7; border-color: #8fa0a8; }
body.explore-page .game-intro h1 { color: var(--page-ink); }
body.explore-page .game-intro > p { color: var(--page-muted); }
body.explore-page .game-intro strong { color: var(--page-ink); }
body.explore-page .game-intro > .game-rule { color: #55626a; }
body.explore-page .level-group { color: #55626a; }
body.explore-page .level-chip { color: var(--page-ink); border-color: var(--page-line); background: #fff; }
body.explore-page .level-chip:hover { background: #f4f0e7; border-color: #8fa0a8; }
body.explore-page .level-chip[aria-current="step"] { background: var(--green, #2d424d); border-color: var(--green, #2d424d); color: #fff; }
body.explore-page .stage-step { color: var(--page-ink); border-color: var(--page-line); background: #fff; }
body.explore-page .stage-step span { border-color: #8fa0a8; }
body.explore-page .stage-step:hover { background: #f4f0e7; border-color: #8fa0a8; }
body.explore-page .stage-step.is-past span { background: #e8e0cf; border-color: #8fa0a8; }
body.explore-page .stage-step[aria-current="step"] { background: var(--green, #2d424d); border-color: var(--green, #2d424d); color: #fff; }
body.explore-page .stage-step[aria-current="step"] span { border-color: #f6e09f; }
body.explore-page .replay-heading { color: var(--page-muted); }
body.explore-page .replay-heading .quiet-button { color: var(--page-ink); }
body.explore-page .game-extras summary { color: var(--page-ink); }
body.explore-page .game-extras summary:hover,
body.explore-page .game-extras details[open] > summary { color: #23343c; }
body.explore-page .game-signoff { color: #5c6c74; }
body.explore-page .skip-link { background: var(--green, #2d424d); color: #fff; }
body.explore-page .game-card, body.explore-page .sequence-panel, body.explore-page .light-board { box-shadow: 0 12px 30px #283b451f; }

/* Framed and matted (Max's option 2): each game board is the one dark
   element on the page. A warm greige mat and a soft shadow step the eye
   down from the light page to the dark board; everything around the board
   (cards, commands, text) is light. */
body.explore-page { --mat: #ddd6c7; --mat-shadow: 0 18px 38px rgba(45, 66, 77, .16); }
body.explore-page .light-board,
body.explore-page .os-board,
body.explore-page .lc-board {
  box-shadow: 0 0 0 28px var(--mat), 0 0 0 29px #cfc7b6, var(--mat-shadow);
}
body.explore-page .light-board { margin-block: 34px 46px; }
body.explore-page .os-stage { padding: 32px 0 38px; }
body.explore-page .lc-board {
  padding: clamp(12px, 2.4vw, 18px);
  border-radius: 16px;
  background: radial-gradient(circle at 50% 45%, #283b45, #202f37 75%);
  width: min(100%, calc(var(--size) * 76px + 36px));
  margin-block: 32px 40px;
}
body.explore-page .game-card, body.explore-page .sequence-panel { box-shadow: 0 8px 24px rgba(45, 66, 77, .08); }
@media (max-width: 620px) {
  body.explore-page .light-board, body.explore-page .os-board, body.explore-page .lc-board {
    box-shadow: 0 0 0 14px var(--mat), 0 0 0 15px #cfc7b6, var(--mat-shadow);
  }
  body.explore-page .light-board { margin-block: 22px 32px; }
  body.explore-page .os-stage { padding: 20px 0 26px; }
  body.explore-page .lc-board { margin-block: 20px 28px; }
}
