/* Spark Play v13. Play section follows the site's shared scale and appearance. Practice dimensions (P-383): board 500 + gap 32 + panel 600 = 1132 px. All rules are scoped to `.play-section`. */

.play-section { padding-block: 22px var(--section-space); scroll-margin-top: 70px; }
.play-section .section-head { margin-bottom: 24px; }
.play-shell {
  display: grid;
  grid-template-columns: 500px 600px;
  gap: 32px;
  justify-content: center;
  align-items: stretch;
}
.play-board-column { min-width: 0; }

/* Board. */
.play-section .lab-board-frame { margin: 0; perspective: 1400px; }
.play-section .lab-board-wrap { position: relative; transform-style: preserve-3d; backface-visibility: hidden; }
/* Separate board class: Practice makes the first `.position-lab-board` inert. */
.play-section .play-chessboard {
  position: relative; box-sizing: border-box; width: 100%; aspect-ratio: 1;
  border-radius: 3px; overflow: hidden; background: #263a52; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.play-section .lab-pieces { pointer-events: none; }
.play-section .lab-piece.is-ghost { pointer-events: none; }
.play-section .lab-grid.is-playable .lab-square { cursor: pointer; }
.play-section .lab-square:disabled { cursor: default; }
/* v16: rotate only the board. The former `.play-section .is-black` also matched black arrows (`polygon.is-black`), rotating them around the board corner and out of view. */
#play-board.is-black { transform: rotate(180deg); }
#play-board.is-black .lab-piece img { transform: rotate(180deg); }
.play-section .lab-piece.is-dragging { z-index: 9; filter: drop-shadow(0 8px 8px rgba(0,0,0,.45)); }
.play-section .lab-square.play-participant { box-shadow: inset 0 0 0 3px #FFD24D; }
.play-section .lab-target-marker { z-index: 5; pointer-events: none; }
.play-section .lab-target-marker + .lab-target-marker { margin-left: 8px; }

/* Interaction markers and Black orientation use shared spark-analysis.css rules. */

/* v13: changing the handicap flashes a lilac outline three times on squares where pieces appear or disappear. */
.play-section .lab-square.play-blink::after {
  content: ''; position: absolute; inset: 0; z-index: 6; pointer-events: none;
  box-shadow: inset 0 0 0 4px #B89CFF, inset 0 0 0 5px rgba(20, 10, 46, .55);
  animation: play-blink 1080ms steps(1, end) both;
}
@keyframes play-blink { 0%, 33%, 67% { opacity: 1; } 17%, 50%, 83%, 100% { opacity: 0; } }

/* v13: engine variation arrows; the script sets their dimensions (Spark Chess GUI). */
.play-arrows { position: absolute; inset: 0; z-index: 8; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.play-arrows .spark-arrow { stroke-width: .035; stroke-linejoin: round; }
.play-arrows .spark-arrow.is-white { fill: rgba(114, 182, 214, .72); stroke: rgba(7, 20, 31, .55); }
.play-arrows .spark-arrow.is-black { fill: rgba(28, 34, 42, .66); stroke: rgba(230, 240, 250, .45); }
.play-arrows .spark-arrow.is-reply { opacity: .78; }

/* Legend. */
.play-section .play-key { display: flex; flex-wrap: wrap; box-sizing: border-box; width: 100%; margin: 7px 0 0; min-height: 36px; padding: 7px 10px; gap: 4px 14px; justify-content: center; }
.play-section .play-key span { white-space: nowrap; }
/* v16: shared board tools row in spark-analysis.css; navigation buttons inherit its tool size. */
.play-section .spark-board-tools { gap: 6px; margin-top: 12px; }
/* Height 42 matches the minimum site `.demo-control` height; row icons use the same height. */
.play-section .spark-board-tools .demo-control { box-sizing: border-box; width: 44px; height: 42px; flex: none; }

/* Promotion. */
.play-promotion { position: absolute; inset: 22px; z-index: 11; border-radius: 3px; background: rgba(6, 12, 22, .55); animation: play-fade 260ms var(--ease) both; }
.play-promotion-strip {
  position: absolute; top: 0; left: calc(var(--column, 0) * 12.5%); width: 12.5%;
  display: grid; grid-auto-rows: 1fr; height: 50%;
  border: 2px solid var(--seal-edge); border-radius: 0 0 12px 12px; overflow: hidden;
  background: var(--seal-face); box-shadow: 0 14px 30px rgba(0,0,0,.55);
}
.play-promotion-strip.is-bottom { top: auto; bottom: 0; border-radius: 12px 12px 0 0; }
.play-promotion-strip button { display: grid; place-items: center; padding: 6%; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.play-promotion-strip button + button { border-top: 1px solid rgba(255, 210, 77, .22); }
.play-promotion-strip button img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); transition: transform 180ms var(--ease); }
.play-promotion-strip button:hover, .play-promotion-strip button:focus-visible { background: rgba(255, 210, 77, .2); outline: 0; }
.play-promotion-strip button:hover img, .play-promotion-strip button:focus-visible img { transform: scale(1.08); }
@keyframes play-fade { from { opacity: 0; } }

/* Board overlay. */
/* Overlay follows first-screen dialogs (P-327): state badge and one gold dismissal button. Resignation confirmation adds a steel-colored Resign button. */
.play-window {
  position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; padding: 22px;
  background: rgba(9, 16, 27, .58); backdrop-filter: blur(2.5px); border-radius: 12px;
  animation: play-appear 460ms var(--ease) both;
}
@keyframes play-appear { from { opacity: 0; transform: scale(.985); } }
.play-window-box {
  width: min(100%, 340px); box-sizing: border-box; padding: 24px 23px 22px; text-align: center;
  border: 1px solid var(--seal-edge); border-radius: 14px; color: var(--seal-text);
  background: radial-gradient(circle at 50% 0, rgba(255, 226, 140, .16), transparent 62%), var(--seal-face);
  box-shadow: var(--seal-lift), inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.play-window-tag {
  display: inline-block; padding: 11px 28px; border-radius: 999px;
  font: 850 1.25rem/1.2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase;
  box-shadow: inset 0 0 0 2px rgba(6, 14, 26, .3), 0 8px 20px rgba(4, 10, 20, .5);
}
.play-window-tag:empty { display: none; }
.play-window[data-outcome="win"] .play-window-tag { background: #63E69A; color: #06281A; box-shadow: inset 0 0 0 2px rgba(6, 14, 26, .3), 0 8px 20px rgba(4, 10, 20, .5), 0 0 26px rgba(99, 230, 154, .34); }
.play-window[data-outcome="loss"] .play-window-tag { background: #8B6CFF; color: #140A2E; box-shadow: inset 0 0 0 2px #C6B4FF, 0 8px 20px rgba(4, 10, 20, .5); }
.play-window[data-outcome="draw"] .play-window-tag { background: #7FD6FF; color: #06202E; }
.play-section .play-window-box h3 { margin: 0; color: var(--seal-text); font: 700 1.35rem/1.25 var(--font-display); }
.play-section .play-window-box h3:empty { display: none; }
.play-section .play-window-box p { margin: 12px 0 0; color: #9DD5FF; font-size: 1rem; font-weight: 700; line-height: 1.4; }
.play-section .play-window-box p:empty { display: none; }
.play-window-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.play-section .play-window-box .btn { width: auto; min-height: 43px; margin: 0; padding-inline: 22px; }

/* Panel. */
.play-section .play-panel {
  display: flex; flex-direction: column; box-sizing: border-box; min-width: 0; min-height: 0;
  padding: 26px 32px 28px; position: relative;
}
.play-section .play-panel:hover { border-color: var(--border); box-shadow: 0 8px 32px rgba(0,0,0,.25); }
/* v13: panel height always matches the board column. The board sets row height; notation scrolls internally without affecting it. */
@media (min-width: 901px) {
  .play-section .play-panel { contain: size; }
}
.play-setup, .play-game { display: flex; flex-direction: column; min-height: 0; }
.play-setup { flex: 1 1 auto; gap: 16px; }
.play-game { flex: 1 1 auto; }
.play-label { display: block; margin-bottom: 7px; color: #9DB3C8; font: 800 .74rem/1.2 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }

/* v14: dependent selectors use the Practice pattern (P-396): slate when unselected, light board-square fill with dark text when selected. The previous blue selection made the panel too cold (AMBI). */
.play-choice {
  display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 6px; padding: 5px;
  border: 1px solid rgba(157, 213, 255, .22); border-radius: 13px; background: rgba(9, 21, 38, .55);
}
.play-choice button, .play-handicaps button {
  display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px;
  border: 1px solid rgba(157, 213, 255, .3); border-radius: 9px;
  background: linear-gradient(180deg, #3B506B 0%, #2B3C52 100%); color: #D7E6F5;
  font: 700 .9rem/1.2 var(--font-sans); cursor: pointer;
  transition: background 320ms var(--ease), color 320ms var(--ease), border-color 320ms var(--ease);
}
.play-choice button img { width: 26px; height: 26px; }
.play-choice.is-dotted button::before {
  content: ''; box-sizing: border-box; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(215, 230, 245, .6); transition: background 320ms var(--ease), border-color 320ms var(--ease);
}
.play-choice button:hover, .play-handicaps button:hover { background: linear-gradient(180deg, #47607F 0%, #33475F 100%); color: #FFFFFF; }
.play-choice button.is-active, .play-handicaps button.is-active {
  border-color: #FFF7E2; background: linear-gradient(180deg, #FFF7E2 0%, #F2E7C2 55%, #E2D5A8 100%); color: #1E2A38;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -2px 0 rgba(120, 100, 60, .28), 0 3px 0 rgba(4, 13, 26, .6);
}
/* Selected level dot: site emerald with a dark rim. */
.play-choice.is-dotted button.is-active::before {
  border-color: #1E2A38; background: radial-gradient(circle, #1FB866 0 3.6px, #1E2A38 3.8px 100%);
  box-shadow: 0 0 0 2px rgba(99, 230, 154, .55);
}
.play-choice button:focus-visible, .play-handicaps button:focus-visible { outline: 2px solid #FFD24D; outline-offset: 1px; }

/* v16: custom position uses condition-field labels, gold FEN badge, warm graphite field, blue Paste (P-390), and clear button. Accepted position: emerald; rejected: red. Handicap is dimmed meanwhile. */
.play-fen-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.play-fen-head .play-label { margin: 0; }
.play-fen-note { padding: 2px 9px; border-radius: 999px; background: #FFD24D; color: #2C2100; font: 850 .72rem/1.3 var(--font-sans); letter-spacing: .04em; }
.play-fen-row { display: flex; gap: 8px; }
.play-fen-box { position: relative; display: flex; flex: 1 1 auto; min-width: 0; }
.play-fen-input {
  flex: 1 1 auto; min-width: 0; box-sizing: border-box; height: 42px; padding: 0 36px 0 12px; border: 1px solid rgba(255, 236, 160, .3); border-radius: 10px;
  background: linear-gradient(145deg, #232833, #1A1E26); color: #FFFFFF; font: 600 .82rem/1 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}
.play-fen-input::placeholder { color: #B9C2CE; font-family: var(--font-sans); }
.play-fen-input:focus-visible { outline: 2px solid #FFD24D; outline-offset: 1px; }
.play-fen-field.is-valid .play-fen-input { border-color: #63E69A; }
.play-fen-field.is-invalid .play-fen-input { border-color: #D9463C; }
.play-fen-clear {
  position: absolute; top: 7px; right: 6px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: #DCE7F2; font: 800 1.1rem/1 var(--font-sans); cursor: pointer;
}
.play-fen-clear:hover { background: rgba(255, 255, 255, .1); }
.play-fen-clear[hidden] { display: none; }
.play-section .btn.play-fen-paste {
  flex: none; min-height: 42px; margin: 0; padding: 0 16px; border: 1px solid #4D86D8; border-radius: 10px;
  background: linear-gradient(180deg, #3977CA 0%, #245CA8 52%, #173F79 100%); color: #FFFFFF; font-weight: 850; white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .42); box-shadow: inset 0 1px rgba(255, 255, 255, .32), 0 3px 0 #102D59;
}
.play-fen-status { margin: 7px 0 0; font: 700 .8rem/1.35 var(--font-sans); }
.play-fen-status[hidden] { display: none; }
.play-fen-field.is-valid .play-fen-status { color: #63E69A; }
.play-fen-field.is-invalid .play-fen-status { color: #FF8178; }
.play-handicap-field.is-resting .play-handicaps { opacity: .45; }

/* Handicap label: emerald badge and gold question mark. */
.play-handicap-field { position: relative; }
.play-handicap-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.play-section .play-handicap-title { margin: 0; color: #FFFFFF; font-size: .86rem; }
/* v16: solid emerald badge with dark text like Tip; light text on transparent emerald had blended into the panel (AMBI). */
.play-handicap-note {
  padding: 3px 11px; border: 1px solid #9BF3C4; border-radius: 999px;
  background: #63E69A; color: #06281A; font: 800 .78rem/1.3 var(--font-sans);
}
.play-help {
  display: grid; place-items: center; width: 26px; height: 26px; margin-left: auto; padding: 0;
  border: 1px solid #FFE9A8; border-radius: 50%; background: linear-gradient(135deg, #FFD24D 0%, #E5B830 100%);
  color: #1A1200; font: 900 .9rem/1 var(--font-sans); cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 0 #8A5E12; transition: filter 220ms var(--ease);
}
.play-help:hover, .play-help[aria-expanded="true"] { filter: brightness(1.08); }
/* Tip note: dark with emerald border; Tip label is solid emerald with dark text like Correct. */
.play-tip {
  position: absolute; z-index: 5; right: -6px; top: calc(100% + 12px); width: 290px;
  padding: 12px 14px; border: 1px solid rgba(99, 230, 154, .75); border-radius: 12px;
  background: #1B2433; color: #F4FAFF; font: 600 .88rem/1.45 var(--font-sans);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55); animation: play-tip-in 320ms var(--ease) both;
}
.play-tip::after {
  content: ''; position: absolute; right: 12px; top: -7px; width: 12px; height: 12px;
  border-left: 1px solid rgba(99, 230, 154, .75); border-top: 1px solid rgba(99, 230, 154, .75); background: #1B2433; transform: rotate(45deg);
}
.play-tip strong {
  display: inline-block; margin: 0 0 7px; padding: 3px 11px; border-radius: 999px;
  background: #63E69A; color: #06281A; font: 850 .72rem/1.3 var(--font-sans); letter-spacing: .1em; text-transform: uppercase;
}
.play-tip span { display: block; }
.play-tip.is-leaving { animation: play-tip-out 320ms var(--ease) both; }
@keyframes play-tip-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes play-tip-out { to { opacity: 0; transform: translateY(-6px); } }

.play-handicaps {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 5px;
  border: 1px solid rgba(157, 213, 255, .22); border-radius: 13px; background: rgba(9, 21, 38, .55);
}
.play-handicaps button { flex-direction: column; gap: 6px; min-height: 80px; padding: 8px 4px; font-size: .8rem; text-align: center; }
/* Handicap pieces sit on a light board square like editor pieces (P-408). */
.play-handicap-pieces { display: flex; justify-content: center; align-items: center; height: 32px; min-width: 36px; padding: 0 4px; border-radius: 7px; background: #E9DDB4; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.play-handicaps button.is-active .play-handicap-pieces { box-shadow: inset 0 0 0 1px rgba(30, 42, 56, .35); }
.play-handicap-pieces img { width: 28px; height: 28px; margin-inline: -3px; }
.play-handicap-pieces.is-equal { color: #1E2A38; }
.play-handicap-pieces.is-equal svg { width: 28px; height: 28px; }

.play-setup-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: auto; }
.play-setup-actions:has(#play-cancel:not([hidden])) { grid-template-columns: 1fr 2fr; }
.play-section .play-setup-actions .btn { min-height: 48px; margin: 0; width: 100%; }

/* Analysis. */
/* Shared engine row in spark-analysis.css. */
#play-engine { animation: play-in 260ms var(--ease) backwards; }

/* Game notation. */
.play-section .play-score {
  display: grid; grid-template-rows: auto auto minmax(0, 1fr); flex: 1 1 auto; min-height: 0; margin: 0 0 10px;
  border: 1px solid rgba(157, 213, 255, .2); border-radius: 11px; background: rgba(7, 17, 29, .34); overflow: hidden;
}
/* v14: notation header has large You and Computer labels; underline the side to move. */
.play-players {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr); align-items: stretch;
  background: rgba(59, 80, 107, .6); box-shadow: 0 1px rgba(157, 213, 255, .24);
}
.play-no { display: grid; place-items: center; color: #C7D4E2; font: 900 .74rem/1 var(--font-sans); }
.play-player {
  position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 48px; padding: 5px 12px;
  border-left: 1px solid rgba(157, 213, 255, .18);
}
.play-player img { flex: none; width: 28px; height: 28px; }
.play-player strong { overflow: hidden; color: #FFFFFF; font: 800 1.08rem/1.15 var(--font-sans); white-space: nowrap; text-overflow: ellipsis; }
.play-player::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #63E69A; transform: scaleX(0); transition: transform 320ms var(--ease); }
.play-player.is-turn::after { transform: scaleX(1); }
.play-player.is-thinking strong::after { content: '…'; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; animation: play-dots 1.2s steps(4) infinite; }
@keyframes play-dots { from { width: 0; } to { width: 1.2em; } }
.play-alert { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; border-bottom: 1px solid rgba(87, 199, 255, .3); background: #153D57; color: #EAF6FF; font: 600 .84rem/1.35 var(--font-sans); }
.play-alert[hidden] { display: none; }
.play-section #play-notation { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.play-section #play-notation .lab-score-row { grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr); }
.play-move {
  padding: 1px 4px; margin: -1px -1px; border: 0; border-radius: 6px; background: none;
  color: inherit; font: inherit; cursor: pointer; transition: background 200ms var(--ease);
}
.play-move:hover { background: rgba(157, 213, 255, .16); }
.play-move.is-current { background: #E9DDB4; color: #1E2A38; font-weight: 800; }
.play-variation {
  grid-column: 1 / -1; display: block; padding: 4px 12px 6px calc(10px + var(--depth, 1) * 12px); border-left: 2px solid rgba(99, 230, 154, .45);
  margin-left: calc(var(--depth, 1) * 10px); color: #B5F5D1; font: italic 600 .86rem/1.9 var(--font-sans);
}
.play-variation .play-move { font-style: italic; }
/* Shared variation actions in spark-analysis.css (`.spark-variation-actions`). */
/* Actions extend beyond variation indentation to notation width so both buttons fit on one row even on phones. */
.play-variation > .play-variation-actions { margin-left: calc(-10px - var(--depth, 1) * 12px); margin-right: -12px; }
.play-notation-result { grid-column: 1 / -1; box-sizing: border-box; width: 100%; padding: 10px; border-top: 1px solid rgba(157, 213, 255, .24); text-align: center; color: #FFFFFF; font: 700 1.3rem/1 var(--font-display); }
.play-notation-result[data-outcome="win"] { background: rgba(99, 230, 154, .16); color: #9BF3C4; }
.play-notation-result[data-outcome="loss"] { background: rgba(139, 108, 255, .16); color: #C6B4FF; }
.play-notation-result[data-outcome="draw"] { background: rgba(127, 214, 255, .14); color: #9DD5FF; }

/* v16: split export controls below notation use turquoise for taking data away (P-390). Flexible widths accommodate longer translations. */
.play-section .btn.play-copy {
  box-sizing: border-box; min-width: 0; min-height: 40px; margin: 0; padding: 6px 12px; border: 1px solid #36AAA6; border-radius: 10px;
  background: linear-gradient(#25A29E 0%, #187D7D 52%, #0D575F 100%); color: #FFFFFF; font: 850 .82rem/1.2 var(--font-sans); white-space: normal;
  box-shadow: inset 0 1px rgba(255,255,255,.2), inset 0 -2px rgba(0,0,0,.18), 0 3px 0 rgba(4,13,26,.72);
  transition: filter 220ms var(--ease), transform 180ms var(--ease);
}
.play-section .btn.play-copy:hover { filter: brightness(1.08); transform: translateY(-1px); }
.play-section .btn.play-copy.is-done { border-color: #9BF3C4; background: #63E69A; color: #06281A; }

.play-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px; }
.play-actions.is-single { grid-template-columns: 1fr; }
.play-inline-action { margin-left: auto; padding: 5px 12px; border: 1px solid #57C7FF; border-radius: 8px; background: rgba(87, 199, 255, .14); color: #FFFFFF; font: 700 .8rem/1 var(--font-sans); cursor: pointer; }

/* v14: panel content changes use the Practice tab pattern. */
.play-section .play-panel > * { transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.play-section .play-panel.is-leaving > * { opacity: 0; transform: translateY(-3px); pointer-events: none; }
.play-section .play-panel.is-entering > * { animation: play-in 260ms var(--ease) backwards; }
@keyframes play-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Site button families (P-390): steel for tools, gold for the panel's single primary action. */
.play-section .btn.play-tool {
  min-height: 42px; margin: 0; padding: 12px 10px; border-radius: 10px; color: #FFFFFF;
  font: 850 .84rem/1.2 var(--font-sans); white-space: nowrap;
  border: 1px solid #57C7FF; background: linear-gradient(#38769C 0%, #275B7E 52%, #17415C 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.32), 0 4px 0 #0E2C41, 0 8px 16px rgba(0,0,0,.24);
  transition: transform 180ms var(--ease), filter 220ms var(--ease), box-shadow 180ms var(--ease);
}
.play-section .btn.play-tool:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.07); }
.play-section .btn.play-tool:active:not(:disabled) { transform: translateY(2px); }
.play-section .btn:disabled, .play-section .demo-control:disabled { opacity: .42; cursor: not-allowed; transform: none; filter: saturate(.6); }
.play-section .btn.play-main { width: 100%; min-height: 48px; margin: 0; flex: none; }
.play-export { width: 100%; min-height: 60px; margin: 0 0 10px; color: #FFFFFF; background: #0F1D2E; border: 1px solid #3D4559; border-radius: 8px; font: 400 .8rem/1.35 ui-monospace, monospace; }
.play-section [hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .play-window, .play-promotion, .play-tip, #play-engine, .play-player.is-thinking strong::after { animation: none; }
  .play-section .play-panel > * { transition: none; }
  .play-section .lab-square.play-blink::after { animation-duration: 1ms; }
}

/* Narrow screens. */
@media (max-width: 1180px) {
  .play-shell { grid-template-columns: minmax(0, 500px) minmax(0, 600px); gap: 24px; }
}
@media (max-width: 900px) {
  .play-shell { grid-template-columns: minmax(0, 560px); }
  .play-section .play-panel { padding: 20px; }
  .play-section .play-score { flex: none; }
  .play-section #play-notation { height: 240px; }
  .play-tip { right: 0; }
}
@media (max-width: 520px) {
  .play-section .lab-board-frame { padding: 8px; }
  /* v16: on phones the handicap tip enters normal flow between the heading and buttons, obscuring nothing; its arrow still points to the question mark (AMBI). */
  .play-tip { position: relative; right: auto; top: auto; width: auto; margin: 12px 0 10px; }
  .play-handicaps { grid-template-columns: repeat(3, 1fr); }
  .play-handicaps button { min-height: 70px; }
  .play-choice button { gap: 6px; padding-inline: 4px; font-size: .84rem; }
  .play-choice.is-dotted button::before { width: 12px; height: 12px; }
  .play-handicap-head { flex-wrap: wrap; }
  .play-section .spark-board-tools .demo-control { width: 40px; }
  .play-section .btn.play-tool { white-space: normal; }
  .play-player { padding: 6px 8px; gap: 6px; }
  .play-player img { width: 22px; height: 22px; }
  .play-player strong { font-size: .95rem; }
  .play-window { padding: 10px; }
}
/* v16: keep Computer fully visible on phones with a smaller label, icon and tighter spacing. Thinking dots still fit at 390 px. */
@media (max-width: 420px) {
  .play-player { padding: 6px; gap: 5px; }
  .play-player img { width: 20px; height: 20px; }
  .play-player strong { font-size: .86rem; }
}
@media (max-width: 380px) {
  .play-player { padding: 6px 5px; gap: 4px; }
  .play-player img { width: 18px; height: 18px; }
  .play-player strong { font-size: .78rem; }
  .play-window-box { padding: 16px; }
}

/* v20 items 4 and 28: denser Play variation lines, 1.45 instead of 1.9. */
.play-variation { line-height:1.45; }
