.play-page {
  background: radial-gradient(ellipse 72rem 34rem at 85% 13%, #28202d 0%, transparent 76%), var(--ink);
}
.play-page [hidden] { display: none !important; }
.play-main { padding-block: clamp(32px, 4.6vw, 64px) clamp(40px, 5vw, 72px); }
.play-heading { margin-bottom: clamp(24px, 3vw, 42px); }
.play-kicker { font: 600 .85rem/1.5 var(--mono); color: var(--acid); letter-spacing: .09em; text-transform: uppercase; }
.play-heading h1 { font: italic 800 clamp(3.1rem, 6.5vw, 7rem)/.98 var(--display); text-transform: uppercase; letter-spacing: -.025em; margin: 7px 0 14px; }
.play-heading h1 em { color: var(--lilac); font-style: inherit; }
.play-heading > p:last-child { max-width: 63ch; color: #ded8e2; font-size: clamp(1rem, 1.4vw, 1.2rem); }
.play-page a.play-link, .play-note a { color: var(--lilac); text-decoration: underline; text-underline-offset: .2em; }
.play-page a.play-link:hover, .play-note a:hover { color: var(--paper); }
.play-note { font-size: .9rem; line-height: 1.6; color: var(--muted); }
.play-footnote { max-width: 88ch; margin-top: 24px; }
.room-switch { display: inline-flex; align-items: stretch; padding: 3px; border: 1px solid #58505e; background: #121115; border-radius: 5px; }
.room-switch button { padding: 7px 17px; min-height: 39px; color: #e5dfe9; font-weight: 650; border-radius: 3px; }
.room-switch button[aria-pressed="true"] { color: #201b23; background: var(--lilac); }
.room-switch button:focus-visible { position: relative; z-index: 1; }
.puzzle-room { display: grid; grid-template-columns: minmax(0, 1.63fr) minmax(0, .9fr); align-items: start; gap: clamp(24px, 3.7vw, 56px); }
.room-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 13px; }
.binder-overlay { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; cursor: pointer; }
.binder-overlay input { width: 20px; height: 20px; accent-color: var(--lilac); }
.puzzle-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.solve-control { color: var(--acid); border: 1px solid #65704d; border-radius: 4px; padding: 7px 12px; min-height: 40px; font-size: .95rem; font-weight: 650; }
.solve-control[aria-pressed="true"] { color: var(--paper); border-color: #706577; }
.solve-panel { padding: clamp(15px, 2vw, 24px); border: 1px solid #4c424f; border-radius: 6px; background: #1a171f; margin-top: 60px; }
.solve-panel h2 { margin-block: 6px; font-size: clamp(1.8rem, 2.5vw, 2.5rem); line-height: 1.05; }
.solve-panel p { line-height: 1.5; }
.loose-tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.loose-piece { display: block; position: relative; padding: 0; border: 2px solid #53495d; border-radius: 3px; overflow: hidden; }
.loose-piece[aria-pressed="true"] { border-color: var(--acid); }
.loose-piece img { display: block; width: 100%; height: auto; aspect-ratio: 1.45; }
.loose-piece span { position: absolute; right: 0; bottom: 0; padding: 1px 4px; font: .75rem/1.5 var(--mono); color: white; background: #17141ad9; }
.solve-panel .play-note:not(:empty) { margin: 12px 0 0; color: var(--lilac); }
.solve-restart { min-height: 44px; text-decoration: underline; font-weight: 650; padding: 4px 0; color: var(--acid); }
.puzzle-board { --puzzle-gap: 2px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: var(--puzzle-gap); aspect-ratio: 1.455; width: 100%; background: #0c0b0f; border: 2px solid #4c414e; box-shadow: 0 12px 22px #08070a4d; }
.puzzle-piece { position: relative; min-width: 0; min-height: 0; padding: 0; border-radius: 0; background: repeating-linear-gradient(135deg, #211d26 0 8px, #242029 8px 9px); }
.puzzle-piece img { display: block; width: 100%; height: 100%; object-fit: fill; }
.puzzle-piece[aria-pressed="true"]::after { content: ""; position: absolute; inset: 2px; border: 3px solid var(--acid); box-shadow: 0 0 0 1px #151319bd; pointer-events: none; }
.puzzle-piece:hover { filter: brightness(1.08); }
.puzzle-piece:focus-visible { z-index: 1; outline-offset: 0; }
.empty-slot { display: grid; place-items: center; height: 100%; padding: 5px; text-align: center; color: #d3c8dd; font: .9rem/1.4 var(--mono); }
.board-meta { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 2px 9px; padding: 11px 0 0; }
.board-meta strong { font-size: 1.1rem; }
.board-meta time, .board-meta span { color: #cbc2d0; font: .88rem/1.5 var(--mono); }
.piece-detail { border: 1px solid #4c424f; background: #1a171f; border-radius: 6px; overflow: hidden; margin-top: 60px; scroll-margin: 15px; }
.piece-figure { display: grid; place-items: center; background: radial-gradient(ellipse at 50% 75%, #3c2d42, #17141b 80%); padding: clamp(12px, 2vw, 24px); }
.piece-figure img { display: block; width: 100%; height: clamp(150px, 17vw, 237px); object-fit: contain; filter: drop-shadow(0 4px 9px #0005); }
.piece-info { border-top: 1px solid #463d4a; padding: clamp(15px, 2vw, 25px); }
.piece-info h2 { font-size: clamp(1.55rem, 2.3vw, 2.4rem); line-height: 1.06; margin: 5px 0 14px; }
.piece-actions { display: flex; flex-wrap: wrap; gap: 8px 15px; align-items: center; }
.piece-info .play-note:not(:empty) { margin-top: 9px; }
.quiz-main { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 70px); align-items: start; }
.question-figure { margin: 0; min-width: 0; }
.scene-window { display: block; position: relative; width: 100%; overflow: hidden; aspect-ratio: 1.83; background: #111015; }
.scene-window img { position: absolute; display: block; top: 0; left: 0; width: 100%; height: auto; }
.large-window { border: 1px solid #5a4f5c; box-shadow: 0 12px 24px #07060755; border-radius: 4px; }
.quiz-choices { display: grid; gap: 8px; margin-top: 6px; }
.choice { display: grid; grid-template-columns: minmax(95px, 43%) 1fr; gap: 0; align-items: center; padding: 0; background: #211c26; border: 1px solid #574b5c; color: var(--paper); text-align: left; border-radius: 4px; overflow: hidden; }
.choice:hover:enabled { border-color: var(--lilac); background: #302638; }
.choice:disabled { cursor: default; opacity: 1; }
.choice.correct { border-color: var(--acid); background: #25291b; }
.choice.incorrect { border-color: #b9a7cb; }
.choice-caption { display: flex; flex-wrap: wrap; flex-direction: column; gap: 2px; padding: 7px 15px; font-weight: 650; }
.choice-state { font: .83rem/1.4 var(--mono); color: var(--lilac); }
.choice-state:empty { display: none; }
.choice.correct .choice-state { color: var(--acid); }
.quiz-play > .play-note { margin-top: 9px; }
.quiz-result { margin-top: clamp(28px, 4vw, 54px); padding-block: 22px; border-block: 1px solid var(--line); }
.result-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.result-heading h2 { font-size: clamp(1.8rem, 3.5vw, 3.3rem); line-height: 1.05; margin: 5px 0; }
.quiz-result > p { margin-block: 9px; }
.quiz-result .room-switch { margin: 6px 0 14px; }
.answer-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2.5vw, 30px); }
.revealed-card img { display: block; width: 100%; max-height: 355px; object-fit: contain; background: #141116; border-radius: 3px; border: 1px solid #4c424f; }
.revealed-card strong { display: block; font-size: 1rem; padding: 6px 0; color: var(--lilac); text-decoration: underline; text-underline-offset: .2em; }
.share-text { display: block; width: min(100%, 65ch); padding: 8px; font: .95rem/1.5 var(--mono); background: #211c26; color: var(--paper); border: 1px solid var(--line); }
@media (max-width:760px) {
  .puzzle-room,.quiz-main { grid-template-columns: 1fr; gap: 22px; }
  .piece-detail { margin: 0; display: grid; grid-template-columns: minmax(100px, 30%) 1fr; }
  .piece-figure { padding: 9px; }
  .piece-figure img { height: auto; max-height: 176px; }
  .piece-info { border-top: 0; border-left: 1px solid #463d4a; padding: 14px; }
  .solve-panel { margin: 0; }
  .loose-tray { max-width: 470px; }
  .piece-actions .btn { font-size: .9rem; padding: 7px 10px; }
  .quiz-play { max-width: 100%; }
  .quiz-choices { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .choice { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; }
  .choice-caption { padding: 5px 8px; }
  .board-meta strong { font-size: 1rem; }
}
@media (max-width:430px) {
  .room-switch button { padding-inline: 12px; }
  .binder-overlay { font-size: .91rem; gap: 3px; }
  .empty-slot { font-size: .78rem; }
  .quiz-choices { grid-template-columns: 1fr; }
  .choice { grid-template-columns: minmax(100px, 45%) 1fr; align-items: center; }
  .choice-caption { padding-inline: 14px; }
  .play-page .bar { gap: 8px; }
  .play-page .bar .brand { font-size: 21px; }
  .play-page .bar .binder-btn { padding-inline: 8px; }
}
