/* Guardian Angel game, redesign round 1 (Nov 30, 2026).
   Source: the approved Claude artifact (hpclaude-1125-gameredo/round4/game.css), with its own
   masthead and mock account dialog removed, every rule scoped under #pv-rdg so the site theme
   cannot restyle it, and the card size fitted to the space under the site header.
   Light is the default; the site's toggle puts class "dark-mode" on <html> for dark. */

#pv-rdg {
  color-scheme: light;
  --paper: #f3eee3;
  --surface: #faf5ea;
  --inset: #ece5d6;
  --ink: #2e2c25;
  --muted: #59554a;
  --edge: #a39a87;
  --accent: #2a3d66;
  --button-fill: #385dff;
  --on-accent: #fff;
  --top: 90px;
  --gutter: 44px;
  --board-offset: 8px;
  --row-gap: 8px;
  --face-gap: 6px;
  --fit-h: calc((100svh - var(--top) - 56px - var(--board-offset) - 3 * var(--row-gap) - 12px) / 4);
  --fit-w: calc((100vw - 2 * var(--gutter) - 12 * var(--face-gap) - 17px) / 13);
  --face-h: clamp(100px, min(var(--fit-h), var(--fit-w) * 1.4), 190px);
  --face-w: calc(var(--face-h) / 1.4);
  --board-w: calc(13 * var(--face-w) + 12 * var(--face-gap));
  --result-width: 1240px;
  --result-w: 380px;
  --result-h: 532px;
  --result-gap: 56px;
  --body-font: 'Nunito Sans', Arial, sans-serif;
  --ui-font: Nunito, Arial, sans-serif;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  float: none;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--body-font);
  text-align: start;
}
html.dark-mode #pv-rdg {
  color-scheme: dark;
  --paper: #1b1b18;
  --surface: #22231f;
  --inset: #272923;
  --ink: #e3e0d5;
  --muted: #b7b7a9;
  --edge: #515348;
  --accent: #c99a2e;
}

@media (max-width: 1439px) {
  #pv-rdg {
    --gutter: 32px;
    --board-offset: 6px;
    --face-gap: 8px;
    --result-width: 1120px;
    --result-w: clamp(230px, 26.5625vw, 340px);
    --result-h: calc(var(--result-w) * 1.4);
  }
}
@media (max-width: 1000px) {
  #pv-rdg { --gutter: 20px; --face-gap: 4px; --result-gap: 28px;
    --face-h: clamp(62px, min(var(--fit-h), var(--fit-w) * 1.4), 190px); }
}
@media (max-width: 768px) {
  #pv-rdg { --gutter: 17px; --board-offset: 0px; --row-gap: 3px; --face-w: 68px; --face-h: 50px; }
}
@media (max-width: 385px) {
  #pv-rdg { --gutter: 10px; --face-w: min(68px, calc((100vw - 36px) / 5)); }
}

#pv-rdg, #pv-rdg *, #pv-rdg *::before, #pv-rdg *::after { box-sizing: border-box; }
#pv-rdg [hidden] { display: none !important; }
#pv-rdg :is(h1, h2, p) { margin: 0; padding: 0; color: inherit; font-family: var(--body-font); letter-spacing: normal; text-transform: none; }
#pv-rdg a { color: inherit; }
#pv-rdg button { appearance: none; margin: 0; min-width: 0; width: auto; height: auto; color: inherit; font: 700 14px/1.2 var(--ui-font); letter-spacing: normal; text-transform: none; text-shadow: none; cursor: pointer; }
#pv-rdg :is(button, textarea) { font-synthesis: none; }
#pv-rdg :is(button, a, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#pv-rdg #spread-view { width: calc(100% - 2 * var(--gutter)); margin-inline: auto; }
#pv-rdg .selection-rail { width: min(calc(100% - 2 * var(--gutter)), var(--result-width)); margin-inline: auto; }

/* Round 3: on laptops the title row sits in the site's 1200 px rail (the header logo and the footer); the card grid stays centred under it */
@media (min-width: 769px) { #pv-rdg { --title-w: min(1200px, 100%); } }
#pv-rdg .title-row { height: 56px; max-width: var(--title-w, var(--board-w)); margin-inline: auto; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 14px 20px; align-items: center; }
#pv-rdg .title-row h1 { font: 800 30px/1.1 var(--body-font); white-space: nowrap; color: var(--ink); }
#pv-rdg .cue { font-size: 17px; color: var(--muted); line-height: 1.2; }
#pv-rdg .phone-cue { display: none; }
#pv-rdg :is(.button, .text-button) { white-space: nowrap; }
#pv-rdg .text-button { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0; text-decoration: none; color: var(--rb-accent, var(--accent)); font-weight: 800; }
#pv-rdg .text-button:hover { background: transparent; color: var(--rb-accent, var(--accent)); text-decoration: underline; text-underline-offset: 3px; }
/* Buttons: the site's one button family (round 1 review). Pills; the main button is the navy fill with the thin edge that
   becomes the brand ribbon on hover (same recipe as rd.css); every other button is the outlined pill; links use the site's link color. */
#pv-rdg .button { min-height: 36px; display: inline-grid; align-items: center; text-align: center; border: 1.5px solid var(--rb-outline, var(--edge)); border-radius: 999px; background: transparent; color: var(--rb-accent, var(--ink)); box-shadow: none; padding: 0 16px; text-decoration: none; font: 800 14px/1.2 var(--ui-font); transition: background-color .2s, border-color .2s; }
#pv-rdg .button:hover { border-color: var(--rb-accent, var(--accent)); background: color-mix(in srgb, var(--rb-accent, var(--accent)) 9%, transparent); color: var(--rb-accent, var(--ink)); }
#pv-rdg .button:is(.primary, .draw) { color: var(--rb-on-primary, #fffdf8); border: 1.5px solid transparent; background: linear-gradient(var(--rb-primary-fill, #2a3d66), var(--rb-primary-fill, #2a3d66)) padding-box, var(--rb-primary-edge, linear-gradient(#2a3d66, #2a3d66)) border-box; }
#pv-rdg .button:is(.primary, .draw):is(:hover, :focus-visible) { color: var(--rb-on-primary, #fffdf8); border: 1.5px solid transparent; box-shadow: none; background: linear-gradient(var(--rb-primary-fill-hover, #34497a), var(--rb-primary-fill-hover, #34497a)) padding-box, var(--rb-primary-edge-hover, linear-gradient(#2a3d66, #2a3d66)) border-box; }
#pv-rdg .button.outline, #pv-rdg .button.outline:hover { color: var(--rb-accent, var(--accent)); }
#pv-rdg .button[disabled] { opacity: .6; cursor: default; }

#pv-rdg .spread { margin-top: var(--board-offset); padding-bottom: 12px; display: grid; grid-template: repeat(4, var(--face-h)) / repeat(26, calc((var(--face-w) - var(--face-gap)) / 2)); gap: var(--row-gap) var(--face-gap); justify-content: center; }
#pv-rdg .face { grid-column: span 2; z-index: 0; position: relative; display: block; width: var(--face-w); height: var(--face-h); min-height: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: 0 2px 8px rgba(0,0,0,.5); transition: transform 200ms ease-out; }
#pv-rdg .face:nth-child(1), #pv-rdg .face:nth-child(39) { grid-column: 2 / span 2; }
#pv-rdg .face:nth-child(-n+12) { transform-origin: 50% 0; }
#pv-rdg .face:nth-child(n+39) { transform-origin: 50% 100%; }
#pv-rdg .face picture { display: block; width: 100%; height: 100%; border-radius: inherit; }
#pv-rdg .face img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: inherit; object-fit: cover; object-position: top; }
@media (hover: hover) and (min-width: 769px) { #pv-rdg .face:hover { z-index: 1; transform: scale(1.5); } }
@media (min-width: 769px) { #pv-rdg .face:focus-visible { z-index: 2; transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) {
  #pv-rdg .face, #pv-rdg .face:hover, #pv-rdg .face:focus-visible { transition: none; transform: none; }
  #pv-rdg .face:hover { outline: 2px solid var(--accent); outline-offset: 2px; }
}

#pv-rdg .selection-bar { height: 40px; display: flex; align-items: center; gap: 18px; }
#pv-rdg .selection-bar .help { margin-inline-start: auto; }
#pv-rdg .selection-bar .draw { min-height: 29px; }
#pv-rdg .selection { display: grid; grid-template-columns: var(--result-w) minmax(0, 1fr); gap: var(--result-gap); padding-bottom: 24px; }
#pv-rdg .selected-face { width: var(--result-w); height: var(--result-h); display: block; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.5); outline: 2px solid var(--accent); outline-offset: 2px; background: var(--surface); }
#pv-rdg .selected-face img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: inherit; visibility: hidden; }
#pv-rdg .selected-face img.loaded { visibility: visible; }
#pv-rdg .reflection { display: grid; grid-template-rows: auto minmax(110px,1fr) auto; gap: 20px; min-height: var(--result-h); }
#pv-rdg .card-intro h1 { font-size: 42px; line-height: 1; font-weight: 800; color: var(--ink); outline-offset: 6px; }
#pv-rdg .card-intro h1:focus:not(:focus-visible) { outline: 0; }
#pv-rdg .card-intro p { margin-top: 10px; color: var(--muted); font-size: 17px; }
#pv-rdg .writing { display: grid; grid-template-rows: auto minmax(60px,1fr) auto; gap: 8px; }
#pv-rdg .writing label { display: block; margin: 0; color: var(--ink); font: 800 16px/1.45 var(--body-font); }
#pv-rdg .writing textarea { display: block; width: 100%; max-width: none; height: 100%; min-height: 60px; margin: 0; resize: vertical; padding: 12px; border: 1px solid var(--edge); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: none; font: 400 16px/1.45 var(--body-font); }
#pv-rdg .writing textarea::placeholder { color: var(--muted); opacity: 1; }
#pv-rdg .field-meta { display: flex; align-items: start; gap: 10px; color: var(--muted); font-size: 13px; }
#pv-rdg #save-note { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.3; }
#pv-rdg #words-count { white-space: nowrap; margin-inline-start: auto; }
#pv-rdg .field-error { color: var(--accent); font-size: 14px; }
#pv-rdg .share-area { padding-top: 13px; border-top: 1px solid var(--edge); }
#pv-rdg .share-area p { line-height: 1.4; margin-bottom: 12px; }
@media (min-width: 769px) and (max-width: 1439px) { #pv-rdg .share-area p { font-size: 15.5px; } }
#pv-rdg .actions { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; }
#pv-rdg .actions button { min-height: 48px; padding-inline: 17px; }
#pv-rdg .actions .daily-link { justify-self: end; align-self: center; font: 800 14px/1.2 var(--ui-font); }
#pv-rdg .account-links { margin-top: 12px; padding: 13px 15px; border: 1px solid var(--edge); border-radius: 10px; background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
#pv-rdg .account-links p { margin: 0; flex: 1 1 240px; color: var(--ink); font-size: 15px; }
#pv-rdg .account-links .button { min-height: 44px; padding-inline: 17px; }

#pv-rdg dialog { position: fixed; inset: 96px 0 auto; width: min(416px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 112px); margin: 0 auto; border: 1px solid var(--edge); border-radius: 14px; padding: 23px; background: var(--surface); color: var(--ink); box-shadow: 0 16px 56px #0008; overflow: auto; }
#pv-rdg dialog::backdrop { background: rgb(0 0 0 / 62%); }
#pv-rdg dialog h2 { font: 800 24px/1.2 var(--body-font); padding-right: 32px; color: var(--ink); }
#pv-rdg dialog p { margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--muted); }
#pv-rdg dialog p a { color: var(--rb-accent, var(--accent)); text-decoration: underline; text-underline-offset: 3px; }
#pv-rdg dialog .close { position: absolute; inset: 13px 13px auto auto; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 1px solid var(--edge); border-radius: 50%; background: transparent; color: var(--ink); font-size: 20px; line-height: 1; }
#pv-rdg #help-dialog p { margin-bottom: 12px; }

@media (max-width: 768px) {
  #pv-rdg .title-row { height: auto; max-width: none; grid-template-areas: 'title title draw' 'cue cue help'; grid-template-columns: auto 1fr auto; grid-template-rows: 30px auto; gap: 8px 6px; padding: 5px 0 8px; }
  #pv-rdg .title-row h1 { grid-area: title; font-size: 23px; }
  #pv-rdg .title-row .draw { grid-area: draw; justify-self: end; min-height: 27px; padding-inline: 8px; font-size: 12px; }
  #pv-rdg .title-row .help { grid-area: help; justify-self: end; font-size: 12px; }
  #pv-rdg .cue { grid-area: cue; font-size: 15px; line-height: 18px; }
  #pv-rdg .phone-cue { display: inline; }
  #pv-rdg .laptop-cue { display: none; }
  #pv-rdg .spread { grid-template: repeat(10, var(--face-h)) / repeat(5, var(--face-w)); gap: var(--row-gap) 4px; padding-bottom: 12px; }
  #pv-rdg .spread .face { grid-column: auto; border-radius: 5px; }
  #pv-rdg .spread .face img { object-fit: fill; }
  #pv-rdg .selection-bar { gap: 8px; white-space: nowrap; }
  #pv-rdg .selection-bar .text-button, #pv-rdg .selection-bar .draw { font-size: 12px; }
  #pv-rdg .selection-bar .draw { padding-inline: 6px; }
  #pv-rdg .selection { grid-template-columns: 116px 1fr; gap: 12px; padding-bottom: 16px; }
  #pv-rdg .selected-face { width: 116px; height: auto; aspect-ratio: 5 / 7; align-self: start; grid-column: 1; grid-row: 1; border-radius: 8px; }
  #pv-rdg .reflection { display: contents; }
  #pv-rdg .card-intro { grid-column: 2; }
  #pv-rdg .card-intro h1 { font-size: 25px; line-height: 1.05; }
  #pv-rdg .card-intro p { font-size: 14px; line-height: 1.35; }
  #pv-rdg .writing, #pv-rdg .share-area { grid-column: 1 / -1; }
  #pv-rdg .writing { grid-template-rows: auto minmax(110px,1fr) auto; }
  #pv-rdg .writing label { font-size: 14px; }
  #pv-rdg .writing textarea { font-size: 16px; min-height: 110px; }
  #pv-rdg .share-area p { font-size: 14px; }
  #pv-rdg .field-meta, #pv-rdg #save-note { font-size: 11px; }
  #pv-rdg .share-area { padding-top: 10px; }
  #pv-rdg .share-area p { line-height: 1.33; margin-bottom: 10px; }
  #pv-rdg .actions { grid-template-columns: 1.25fr 1fr; gap: 8px; }
  #pv-rdg .actions button { min-width: 0; white-space: normal; padding-inline: 5px; font-size: 12px; }
  #pv-rdg .actions .daily-link { justify-self: start; font-size: 12px; min-height: 28px; display: inline-grid; align-items: center; }
  #pv-rdg dialog { top: 70px; max-height: calc(100dvh - 86px); padding: 19px; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  #pv-rdg .title-row { height: auto; min-height: 64px; column-gap: 12px; }
}
@media (max-width: 768px) and (max-height: 700px) {
  #pv-rdg { --face-w: min(64px, calc((100vw - 36px) / 5)); --face-h: calc(var(--face-w) * 50 / 68); }
}
@media (max-width: 430px) {
  #pv-rdg #spread-view { width: calc(100% - 24px); }
  #pv-rdg .spread { grid-template: auto / repeat(5, minmax(0, 1fr)); column-gap: 2px; }
  #pv-rdg .spread .face { width: 100%; height: auto; aspect-ratio: 204 / 150; }
}

/* The game uses the full width under the site header. */
body.pv-rdg-page #primary { display: block; width: 100%; max-width: none; margin: 0; padding: 0; float: none; }
/* Round 4 [C11]: 32 px of air above the title row on laptops; the card height gives those 32 px back so the four rows still fit the screen */
@media (min-width: 769px) {
  #pv-rdg { --fit-h: calc((100svh - var(--top) - 88px - var(--board-offset) - 3 * var(--row-gap) - 12px) / 4); }
  #pv-rdg .title-row { box-sizing: content-box; padding-top: 32px; }
}

/* Round 11 (Nov 30): the instructions are part of play. A line under the question says writing is optional and why;
   an ending replaces the writing side once the visitor goes on. Same type and buttons as the rest of the game. */
#pv-rdg .ask p { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.4; }
#pv-rdg .actions a.button { min-height: 48px; padding-inline: 17px; }
#pv-rdg .ending { align-self: start; display: grid; gap: 14px; }
#pv-rdg .ending h2 { font: 800 28px/1.15 var(--body-font); color: var(--ink); outline-offset: 6px; }
#pv-rdg .ending h2:focus:not(:focus-visible) { outline: 0; }
#pv-rdg .ending p { font-size: 17px; line-height: 1.45; }
#pv-rdg .ending .end-use { font-size: 21px; line-height: 1.4; }
#pv-rdg .ending .quiet { color: var(--muted); font-size: 15px; }
#pv-rdg .ending p a { color: var(--rb-accent, var(--accent)); text-decoration: underline; text-underline-offset: 3px; }
#pv-rdg .ending .actions { margin-top: 6px; }
@media (max-width: 768px) {
  #pv-rdg .ask p { font-size: 13px; line-height: 1.35; }
  #pv-rdg .ending { grid-column: 1 / -1; gap: 10px; }
  #pv-rdg .ending h2 { font-size: 22px; }
  #pv-rdg .ending p { font-size: 15px; }
  #pv-rdg .ending .end-use { font-size: 17px; }
  #pv-rdg .ending .quiet { font-size: 13px; }
}

/* Round 11 review (Claude Design A2, B): one main button per screen, the card view on the site's 1200 px rail,
   the ending's link beside its buttons, stacked phone buttons, underlined text links. The spread of cards is untouched. */
#pv-rdg .selection-bar .draw { display: none; }
@media (min-width: 769px) { #pv-rdg .selection-rail { width: min(calc(100% - 2 * var(--gutter)), 1200px); } }
#pv-rdg .text-button, #pv-rdg .text-button:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
#pv-rdg .ending .actions .daily-link { justify-self: start; margin-inline-start: 8px; }
@media (max-width: 768px) {
  #pv-rdg .selection-rail { width: calc(100% - 28px); } /* the header logo starts 14 px in on phones */
  #pv-rdg .ending .actions { grid-template-columns: 1fr; }
  #pv-rdg .ending .actions button { font-size: 14px; }
  #pv-rdg .ending .actions .daily-link { margin-inline-start: 0; }
}
