/* V2: paper content, glass controls. Only review/viewer surfaces change. */
body.reviewing, body.viewing {
  --bg: #f7f3e9; --paper: #eee8da; --navy: #181713; --ink: #181713;
  --muted: #625e55; --line: #ded5c4; --line-2: #ded5c4;
  --serif: ui-serif, Georgia, serif;
}
body.reviewing { background: var(--bg); }
body.reviewing .result-topbar { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 12px; padding-block: calc(8px + env(safe-area-inset-top, 0px)) 8px; }
body.reviewing .result-topbar .icon-button { width: 44px; height: 44px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.7); justify-content: center; font-size: 28px; }
body.reviewing .result-topbar .icon-button::after { content: none; }
body.reviewing .completion-badge { grid-column: 2; margin: 0; font-size: 15px; font-weight: 650; text-align: center; color: var(--ink); }
body.reviewing .review-meta { margin-block: 0 8px; }
body.reviewing .review-meta .text-button { padding: 8px 14px; border-radius: 22px; background: rgba(255,255,255,.65); font-size: 13px; }
.ply-card .deck-face { background: transparent; border: 0; padding: 0; gap: 12px; border-radius: 0; }
.ply-card .evidence-crops { gap: 8px; }
.ply-card .evidence-crop-cell { position: relative; gap: 4px; }
.ply-card .evidence-enlarge { position: relative; border: 0; background: var(--paper); border-radius: 16px; overflow: hidden; padding: 0; }
.ply-card .evidence-enlarge::after { position: absolute; right: 8px; bottom: 8px; padding: 8px 12px; border-radius: 22px; background: rgba(247,243,233,.94); box-shadow: 0 3px 12px #18171320; font-size: 12px; font-weight: 650; }
.ply-card .deck-face .evidence-crop { height: 120px; border-radius: 0; }
.ply-card .deck-face .evidence-crop.row-crop { height: 100px; }
.review-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.review-heading h2 { margin: 0; font: 700 clamp(28px,8vw,36px)/1.15 var(--serif); letter-spacing: -.035em; overflow-wrap: anywhere; }
.review-heading p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.review-heading .card-tag { color: #805515; background: #f3e5c8; }
.ply-card .review-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; }
.review-tools .review-history { flex: 1; min-width: 0; border: 0; padding: 0; }
.review-tools .review-history summary { min-height: 44px; justify-content: flex-start; gap: 8px; font-size: 14px; }
.review-tools .review-where { padding-block: 13px; font-size: 13px; color: var(--muted); }
.review-tools:has(.review-history[open]) { display: block; }
.review-tools:has(.review-history[open]) .review-where { display: none; }
.ply-card .review-position { gap: 6px; }
.ply-card .position-caption { font-size: 13px; font-weight: 500; margin: 0; }
.ply-card .review-board, .ply-card .board-files { width: 100%; max-width: 440px; }
.ply-card .mini-board { border-radius: 12px; box-shadow: 0 8px 24px #18171314; }
.review-read-details { color: var(--muted); font-size: 13px; }
.review-read-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.ply-card .deck-actions { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.8fr); background: rgba(247,243,233,.94); backdrop-filter: blur(16px); border: 0; gap: 8px; }
.ply-card .deck-other, .ply-card .deck-later { background: #ffffffa8; border: 1px solid #1817130b; color: var(--ink); }
.ply-card .deck-other, .ply-card .deck-later, .ply-card .deck-confirm { border-radius: 18px; font-size: 14px; min-height: 54px; padding: 10px 8px; }
.ply-card .review-editor { background: var(--paper); border: 0; padding: 16px; border-radius: 20px; }
body.viewing { background: #181713; color: var(--bg); }
body.viewing .result-topbar { padding-block: calc(12px + env(safe-area-inset-top, 0px)) 12px; }
body.viewing .result-topbar .icon-button { background: #ffffff15; min-width: 44px; min-height: 44px; border-radius: 50%; }
body.viewing .result-topbar-copy strong { color: var(--bg); }
.viewer-destinations { display: flex; padding: 4px; border-radius: 16px; background: #ffffff10; gap: 4px; margin: 8px 0 20px; }
.viewer-destinations button { flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: #d4cec2; font-size: 15px; }
.viewer-destinations button[aria-pressed="true"] { background: #ffffff18; color: #fff; font-weight: 650; }
.viewer-stage { padding: 0 0 20px; }
.viewer-board { width: min(100%,440px); }
.viewer-sheet { color: var(--ink); background: var(--bg); border-radius: 24px 24px 0 0; padding-top: 16px; }
.viewer-nav { background: #eee8da; border-radius: 16px; padding: 4px; }
.viewer-nav button { background: #ffffff90; border-radius: 12px; }
.viewer-move-info span:first-child { font-weight: 650; }
.viewer-evidence-col { padding-top: 16px; }
.viewer-evidence-col .evidence-crops.compact .evidence-crop { height: 120px; }
.viewer-evidence-col .evidence-crops.compact .evidence-crop.row-crop { height: 90px; }
.viewer-moves { max-height: min(34dvh,300px); }
.viewer-actions button { border-radius: 16px; }
.viewer-photos { display: grid; gap: 20px; padding-block: 8px 24px; }
.viewer-photos figure { margin: 0; display: grid; gap: 8px; }
.viewer-photos figcaption { font-size: 14px; color: #d4cec2; }
.viewer-photo-expand { display: block; width: 100%; border: 0; background: transparent; padding: 0; border-radius: 16px; overflow: hidden; }
.viewer-photo-expand img { display: block; width: 100%; height: auto; }
.viewer-photo-empty { margin: 0; padding: 24px; border-radius: 20px; background: #ffffff10; color: #eee8da; font-size: 16px; line-height: 1.5; }
.game-viewer.show-photos .viewer-stage, .game-viewer.show-photos .viewer-evidence-col, .game-viewer.show-photos .viewer-columns, .game-viewer.show-photos .viewer-moves, .game-viewer.show-photos .viewer-legend { display: none; }
@media (max-width:360px) {
 .ply-card .deck-actions { grid-template-columns: 1fr 1fr; }
 .ply-card .deck-confirm { grid-column: 1/-1; }
}
@media (prefers-reduced-transparency: reduce) { .ply-card .deck-actions { background: var(--bg); backdrop-filter: none; } }
@media (prefers-contrast: more) { body.reviewing, body.viewing { --muted: #4a443a; --line: #777268; --line-2: #777268; } }

body.reviewing .alignment-warning { padding: 8px 12px; margin-bottom: 8px; border-radius: 14px; font-size: 13px; }
body.reviewing .alignment-warning summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
body.reviewing .alignment-warning p { margin: 8px 0; line-height: 1.5; }
body.reviewing .result-topbar { position: sticky; top: 0; z-index: 65; background: rgba(247,243,233,.96); backdrop-filter: blur(16px); }

body.reviewing .viewer-move, body.viewing .viewer-move, body.reviewing .editor-cancel { min-height: 44px; }

.ply-card .deck-actions { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: var(--shell); max-width: 640px; margin: 0; padding: 12px 0 calc(12px + var(--safe-bottom)); }
