/* Parsicle v3 — the sunlit house and words with real weight.
   Load after game.css/evidence-map.css. Diagram coordinates stay in diagram.js.
   Background plates are presentation only; labels and states remain semantic HTML. */
:root {
  --paper: #fbfcfe;
  --white: #fffefa;
  --ink: #132c5b;
  --muted: #53667f;
  --blue: #164cc6;
  --coral: #ce4e39;
  --gold: #bb8d34;
  --line: #d6dfe9;
  --wash: #edf4ff;
  --ceramic-blue: url('/assets/v3/ceramic-cobalt-blank.webp');
}
html { background: var(--paper); }
body { background: radial-gradient(ellipse at 50% 0,#eaf7ff 0,transparent 680px),var(--paper); color: var(--ink); }
body::before { opacity: .015; }
header { border-color: #cfdfed; padding-block: 20px; }
footer { color: var(--muted); border-color: var(--line); }
h1,h2,h3 { color: var(--ink); }
.eyebrow { color: var(--blue); font-size: .64rem; }
.lede,.muted { color: var(--muted); }
.topnav button { color: #435a78; }
.topnav button.active,.topnav button.active:hover { color: var(--blue); }
.topnav button.active::after { background: var(--gold); height: 3px; border-radius: 3px; }
button.quiet:hover { background: #eaf2fc; }
button.text-link { color: #174ba8; }
:focus-visible { outline: 3px solid #185edc; outline-offset: 5px; }
input,textarea,select { border-color: #aabdd3; background: #fff; color: var(--ink); }
input:focus,textarea:focus,select:focus { border-color: var(--blue); }
::selection { background: #c8e4ff; color: #132c5b; }

/* Actions borrow the magnetic words' straight edges and shallow depth.
   Keep the word wrappers untouched: they own placement and diagram geometry. */
button.primary,a.primary,.ceramic-button,
.game-board .toolbar .primary,.reward-copy>.primary {
  --action-face: #164cc6; --action-hover: #1242b0; --action-edge: #10368c;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 50px; min-width: 144px; max-width: 100%; padding: 12px 22px;
  color: #fff; background: var(--action-face);
  border: 1px solid var(--action-edge); border-radius: 3px; box-shadow: 0 2px 0 var(--action-edge);
  font: 500 1rem/1.25 var(--serif); letter-spacing: -.015em;
  text-align: center; text-decoration: none; text-shadow: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: translate .12s ease,box-shadow .12s ease,background-color .12s ease;
}
button.primary:hover,a.primary:hover,.ceramic-button:hover,
.game-board .toolbar .primary:hover,.reward-copy>.primary:hover {
  background: var(--action-hover); border-color: var(--action-edge);
  box-shadow: 0 2px 0 var(--action-edge);
}
button.primary:active,a.primary:active,.ceramic-button:active,
.game-board .toolbar .primary:active,.reward-copy>.primary:active {
  translate: 0 2px; transform: none; box-shadow: none;
}
.primary.coral,.primary.earned,.primary[data-earned="true"],
.closure>.actions .primary,.feedback.good .primary,.evidence-reward .primary {
  --action-face: #b94330; --action-hover: #a83b2b; --action-edge: #843224;
}
.primary[aria-busy="true"] { cursor: progress; }

/* Arrival is one memorable place, with one useful next action. */
.welcome-shell {
  display: grid; grid-template-columns: minmax(0,1.08fr) minmax(320px,.92fr);
  align-items: stretch; min-height: 670px; overflow: hidden; margin: 6px 0 34px;
  border: 1px solid #d7e3ee; border-radius: 26px 26px 10px 10px;
  background: #fffefa; box-shadow: 0 14px 44px #214e8010;
}
.welcome-art {
  min-height: 670px; position: relative; background: #91d0ef url('/assets/v3/coastal-house-clean.webp') center 52%/cover no-repeat;
}
.welcome-art>img { display: block; width: 100%; height: 100%; min-height: inherit; object-fit: cover; }
.welcome-art .welcome-wordmark,.welcome-art>h1 {
  position: absolute; z-index: 1; top: 6%; inset-inline: 7%; margin: 0;
  color: #072e91; text-align: center; font: 650 clamp(3rem,7vw,6.2rem)/.95 var(--serif); letter-spacing: -.07em;
}
.welcome-copy { min-width: 0; padding: clamp(30px,4vw,64px); align-self: center; }
.welcome-copy>h1 { font-size: clamp(2.6rem,4.4vw,4.4rem); line-height: 1.03; margin-bottom: 22px; }
.welcome-copy>h1 em { font-weight: 450; color: var(--coral); }
.welcome-copy>.lede { font-size: 1rem; line-height: 1.7; max-width: 35ch; }
.welcome-copy>.eyebrow { margin-bottom: 20px; }
.welcome-copy>.primary { margin: 12px 0 10px; min-width: 230px; }
.welcome-copy .small { color: var(--muted); line-height: 1.6; }
.welcome-copy .actions { margin-top: 22px; align-items: center; }
.welcome-copy .release-note { margin-top: 24px; }
.story-cover { gap: clamp(28px,4vw,62px); padding: 22px 0 34px; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); }
.story-cover .cover-copy { padding: 0; }
.story-cover h1 { color: #0b359c; font-size: clamp(3.2rem,5.7vw,5.5rem); }
.story-cover h1 em,.cover-period { color: var(--coral); }
.story-cover .lede { font-size: .95rem; max-width: 390px; }
.story-cover .cover-art,.story-cover>img {
  width: 100%; margin: 0; aspect-ratio: 1.12; object-fit: cover; object-position: center 55%;
  mix-blend-mode: normal; border-radius: 18px 18px 5px 5px; box-shadow: 0 8px 28px #164b7b13;
}
.story-cover .cover-art img { object-fit: cover; mix-blend-mode: normal; }
.story-cover .cover-sticker { display: none; }
.chapter-hero img { border: 1px solid #cbdceb; box-shadow: 4px 5px 0 #e4eff9; border-radius: 6px; }

/* Seven readable windows. Completion and availability are independent states. */
.chapter-strip {
  gap: clamp(7px,1.6vw,18px); border-color: #cdddeb; padding: 23px 4px 25px;
  margin: 10px 0 28px; align-items: center; justify-content: center; background: transparent;
}
.chapter-strip .strip-label { color: #4d6380; font-size: .68rem; margin-right: 12px; }
.chapter-strip button,.chapter-strip .window-token {
  flex: 0 1 70px; width: 70px; min-height: 82px; padding: 12px 5px 8px;
  color: #53667f; border: 1px solid #bac9d6; border-radius: 3px;
  background: #f5f8fb; box-shadow: 0 2px 0 #d2dce5;
  transition: translate .16s ease,box-shadow .16s ease;
}
.chapter-strip button::before,.chapter-strip .window-token::before { display: none; }
.chapter-strip .window-number { font-size: 1.45rem; }
.chapter-strip .window-status { font-size: .66rem; }
.chapter-strip button.current,.chapter-strip .window-token.current {
  color: #fff; background: #164cc6;
  border-color: #10368c; box-shadow: 0 2px 0 #10368c;
}
.chapter-strip button.complete,.chapter-strip button.done,.chapter-strip .window-token.complete,.chapter-strip .window-token.done {
  color: #214c82; background: #edf4ff; border-color: #8ca9ce;
  box-shadow: 0 2px 0 #bed0e5;
}
.chapter-strip button:not(:disabled):hover { border-color: #164cc6; }
.chapter-strip button:not(:disabled):active { translate: 0 2px; transform: none; box-shadow: none; }
.chapter-strip button:disabled { opacity: 1; cursor: default; }
.chapter-strip [aria-current="step"] { outline: 2px solid #2468da; outline-offset: 5px; }

/* Keep magnetic words quiet, legible and angular. Never transform the wrappers. */
.atelier-world .world-title em { color: var(--coral); }
.world-illustration img { mix-blend-mode: normal; }
.world-caption { border-color: var(--line); }
.folio-index { color: var(--blue); border-color: #c8d7e8; }
.world-caption p { color: #586c82; }
.board-card.game-board { background: #fffefa; border-color: #bccddd; border-radius: 8px; box-shadow: 0 3px 0 #e5edf4,0 4px 0 #b9ccdc,0 8px 0 #f5f8fb,0 18px 36px #204f7910; }
.board-card.game-board::before { background: var(--gold); width: 58px; }
.game-board .sentence { color: #172c4c; }
.game-board .task-prompt { color: #516783; font-size: .84rem; }
.game-board .puzzle-kicker { color: #8f5f29; }
.game-board .draft-tag { color: #60728a; font-size: .55rem; }
.game-board .board-status { flex-wrap: wrap; }
.game-board .board-status .draft-tag { flex: 1 1 95px; }
.sound-controls { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.game-board .sound-controls .sound-toggle { padding-inline: 6px; color: #53667f; }
.game-board .sound-controls .sound-toggle[aria-pressed="true"] { color: #164cc6; background: #edf4ff; }
.game-board .diagram-lines { color: #25446c; }
.game-board .word-face,.word-tile .word-face {
  background: #fffdf5; border-color: #a9bacb; color: #18314b;
  box-shadow: inset 0 1px 0 #fff,0 2px 0 #cdd8df,0 4px 6px #153a5b13;
}
.game-board .diagram-word[data-supplied="true"] .word-face { border-color: #bfccd5; background: #fffdf7; box-shadow: 0 2px 0 #d7e1e6; }
.game-board .diagram-word.is-selected .word-face,.game-board .word-tile.selected .word-face {
  background: #fff4e4; border-color: #cb7047; box-shadow: 0 3px 0 #dcb193,0 5px 12px #b3532522;
}
.game-board .diagram-drop.empty-word .word-face { background: #eff5fd; border-color: #7e9cbb; color: #536f90; }
.game-board .is-confirmed .word-face { border-color: #b08b36; box-shadow: 0 2px 0 #d7c28b; }
/* A confirmed diagram is still learning content: keep its words fully legible
   when the accepted board disables movement. Other disabled controls stay dim. */
.sentence-diagram.is-confirmed .diagram-word:disabled { opacity: 1; }
.game-board .is-confirmed .complement-trace { stroke: #b88722; }
.magnet-shelf { background: #eff5fc; border-color: #d4e1ef; }
.shelf-label,.magnet-shelf .tray-caption,.magnet-shelf .tray-empty { color: #5c7088; }
.magnet-shelf .tray-caption { font-size: .7rem; }
.game-board .toolbar { gap: 7px; padding-block: 16px 21px; align-items: center; }
.game-board .toolbar .primary { min-width: 144px; min-height: 48px; padding: 11px 20px; font-size: .94rem; }
.game-board .toolbar .quiet { color: #48637f; font-size: .76rem; }
.game-board .toolbar .quiet:hover { background: #e8f1fc; }
.game-board .relationship-options>summary,.game-board .relation-reading>summary { color: #576f8b; min-height: 44px; }
.sentence-diagram .diagram-choices { border: 1px solid #a9bacb; border-radius: 4px; background: #fffefa; box-shadow: 0 8px 24px #153f7125; }
.sentence-diagram .diagram-choices .local-choice-label { color: #18314b; }
.sentence-diagram .diagram-choices .diagram-choice { color: #18314b; background: #fffdf5; border-color: #a9bacb; box-shadow: 0 2px 0 #cdd8df; }
.sentence-diagram .diagram-choices .diagram-choice:hover,.sentence-diagram .diagram-choices .diagram-choice:focus-visible { background: #edf4ff; color: #18314b; border-color: #527bb1; }
.sentence-diagram .diagram-choices .diagram-choice:active { box-shadow: none; }
.game-board .feedback.good { background: #eef5ff; border-color: #c5d8ef; color: #183963; }
.game-board .feedback.repair { background: #fff3e9; border-color: #e5cbb5; }
.game-board .hint { background: #f3f7fd; border-color: #cfdeef; }
.game-board .feedback p,.game-board .hint p { font-size: .82rem; }
.game-board .consequence,.game-board .prediction-result { border-color: #c6d8ed; }
.result-seal { color: #9c6c15; border-color: #c6a35e; background: #fff7dd; }
.game-progress .step.done { background: #1f4ba0; border-color: #1f4ba0; }
.game-progress .step.current { background: var(--coral); border-color: var(--coral); outline-color: #fae2d4; }
.game-footnote { color: #60748a; }

/* Account and recovery flows belong to the same place, not an admin dashboard. */
.auth-panel { max-width: 480px; min-width: 0; margin: 26px auto; padding: 28px 0; border-top: 1px solid #d3dfeb; }
.welcome-copy .auth-panel { margin: 23px 0 0; padding-top: 23px; }
.auth-panel h1,.auth-panel h2 { font-size: clamp(1.9rem,3.5vw,2.7rem); margin-bottom: 14px; }
.auth-panel p { color: var(--muted); font-size: .86rem; line-height: 1.65; }
.auth-panel form { display: grid; gap: 13px; }
.auth-panel label { display: block; color: #1b3b62; font-size: .79rem; font-weight: 600; }
.auth-panel input { display: block; width: 100%; margin-top: 6px; min-height: 50px; border-radius: 6px; font-size: 16px; }
.auth-panel .primary { width: 100%; margin-top: 8px; }
.auth-panel .actions { gap: 8px; justify-content: space-between; margin-top: 12px; }
.auth-panel .text-link,.auth-panel .quiet { font-size: .78rem; min-height: 44px; }
.auth-panel [role="alert"],.auth-panel .error { padding: 12px 14px; border-left: 3px solid #ba5236; background: #fff1e8; color: #893f2d; border-radius: 0 4px 4px 0; }
.auth-panel [role="status"] { color: #245784; font-size: .8rem; line-height: 1.55; }
.release-note { border-left: 2px solid var(--gold); padding: 7px 0 7px 15px; margin: 20px 0; color: #4b6580; font-size: .82rem; line-height: 1.65; max-width: 65ch; }
.release-note strong { color: #1b3f70; }
.release-note time { font-variant-numeric: tabular-nums; }
.release-note p:last-child { margin-bottom: 0; }
.sync-note { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; min-height: 32px; margin: 8px 0 16px; color: #536c83; font-size: .72rem; line-height: 1.5; }
.sync-note button { min-height: 44px; padding: 6px 10px; font-size: .74rem; }
.sync-note[data-status="saved"] { color: #246080; }
.sync-note[data-status="pending"],.sync-note[data-status="offline"] { color: #805c22; }
.sync-note[data-status="error"],.sync-note[role="alert"] { color: #923e2c; background: #fff0e7; padding: 10px 13px; border-left: 2px solid #bd5738; }
.note-history { border-top: 1px solid #d5e0ea; margin-top: 22px; padding-top: 10px; }
.note-history>summary { color: #21589d; font-size: .8rem; min-height: 48px; }
.note-history article,.note-history li { border-bottom: 1px solid #e0e7ee; padding: 15px 0; }
.note-history time { display: block; font-size: .69rem; color: #5b728b; margin-bottom: 8px; }
.note-history p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .87rem; color: #243f61; }
.note-history .conflict { border-left: 3px solid #d69c48; padding-left: 15px; }

/* Paper remains an intentional reading surface within the bright coast. */
.paper,.evidence-artifact,.case-map-board,.evidence-reward { background-color: #fffefa; border-color: #c9d9e7; }
.paper { box-shadow: 3px 4px 0 #e5edf5,4px 5px 0 #cbd9e7,0 12px 28px #16406b06; }
.paper::before { background: var(--gold); }
.paper p { color: #2f4866; }
.revisit,.welcome-back { background: #eef5ff; border-left-color: var(--blue); }
.claim-card { background: #fff9e8; border-color: #e5d1a1; }
.discovery-seal { border-color: #b88a35; outline-color: #dcc28b; color: #8c5f17; background: #fffae9; }
.reward-copy>p:not(.eyebrow),.artifact-summary { color: #4c6582; }
.reward-seal { background: #fff7de; color: #805b19; border-color: #b88b3c; }
.evidence-mini-card { border-color: #c6d6e5; background-color: #fffefa; }
.evidence-mini-card.is-selected { border-color: var(--blue); }
.timeline-event { background-color: #fffefa; border-color: #ccdbe8; }
.timeline-feedback { background: #fff6e4; border-color: #c29a49; }
.timeline-feedback.is-confirmed { background: #eaf3ff; border-color: #4c7ebd; }
.timeline-move .quiet { color: #4d6786; }
.timeline-move .quiet:hover { background: #edf4fd; }

/* Live keepsake preview: no puzzle geometry or private notes in this frame. */
.share-keepsake { position: relative; isolation: isolate; max-width: 430px; margin: 24px auto; padding: 28px 26px; overflow: hidden; border: 2px solid #c69b47; border-radius: 14px; background: #103d9f; color: #fff7de; box-shadow: 0 9px 0 #e7edf4,0 17px 34px #1a44851a; text-align: center; }
.share-keepsake::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ceramic-blue) center/340% 230% no-repeat; opacity: .55; }
.share-keepsake h2,.share-keepsake h3 { color: #fff7df; font-size: 2.2rem; line-height: 1.05; }
.share-keepsake>img { display: block; width: 116px; height: 116px; object-fit: cover; object-position: center 52%; border: 3px solid #e7c16e; border-radius: 50%; margin: 0 auto 22px; }
.share-keepsake p { color: #fff6dc; }
.share-keepsake .chapter-strip { gap: 7px; border-color: #ffffff42; margin-bottom: 0; padding: 18px 0 5px; }
.share-keepsake .window-token { min-height: 53px; width: 34px; flex-basis: 34px; border-radius: 18px 18px 2px 2px; }
.share-keepsake .window-number { font-size: 1rem; }
.share-keepsake .small { font-size: .72rem; color: #f5e6c4; }

@media (max-width: 920px) {
  .welcome-shell { grid-template-columns: minmax(0,1fr) minmax(300px,1fr); min-height: 590px; }
  .welcome-art { min-height: 590px; }
  .welcome-copy { padding: 30px; }
  .story-cover { gap: 25px; }
  .story-cover h1 { font-size: clamp(2.8rem,5.7vw,4.3rem); }
}
@media (max-width: 650px) {
  header { padding-block: 12px; }
  main { padding-top: 18px; }
  .welcome-shell { display: flex; flex-direction: column; min-height: 0; margin: -2px -2px 27px; border-radius: 18px 18px 8px 8px; }
  .welcome-art { min-height: 0; height: clamp(300px,55svh,460px); flex: none; background-position: center 52%; }
  .welcome-art>img { min-height: 0; }
  .welcome-art .welcome-wordmark,.welcome-art>h1 { font-size: clamp(3.2rem,16vw,5.3rem); top: 6%; }
  .welcome-copy { padding: 25px 23px 28px; }
  .welcome-copy>h1 { font-size: clamp(2rem,9.7vw,3rem); margin-bottom: 16px; }
  .welcome-copy>.lede { font-size: .91rem; line-height: 1.65; max-width: none; }
  .welcome-copy>.eyebrow { margin-bottom: 12px; }
  .welcome-copy>.primary { width: 100%; min-width: 0; margin-top: 8px; }
  .welcome-copy .actions { flex-direction: column; align-items: stretch; margin-top: 15px; }
  .welcome-copy .actions>* { width: 100%; }
  button.primary,a.primary,.ceramic-button { min-height: 50px; padding: 12px 20px; font-size: 1rem; }
  .story-cover { display: flex; flex-direction: column-reverse; padding: 0 0 20px; gap: 23px; }
  .story-cover .cover-art,.story-cover>img { width: 100%; margin: 0; aspect-ratio: 1.48; object-position: center 48%; border-radius: 13px 13px 4px 4px; }
  .story-cover .cover-copy { width: 100%; padding: 0 8px; }
  .story-cover .eyebrow { margin-bottom: 12px; }
  .story-cover h1 { font-size: clamp(2.65rem,11vw,3.7rem); margin-bottom: 17px; }
  .story-cover .lede { font-size: .9rem; max-width: none; margin-bottom: 18px; }
  .story-cover .cover-copy>.primary { width: 100%; }
  .chapter-strip { gap: clamp(4px,1.4vw,9px); padding: 19px 0 22px; margin: 5px 0 23px; }
  .chapter-strip .strip-label { display: none; }
  .chapter-strip button,.chapter-strip .window-token { flex: 1 1 0; width: auto; min-width: 0; min-height: 66px; padding: 9px 2px 7px; border-radius: 3px; }
  .chapter-strip .window-number { font-size: 1.13rem; }
  .chapter-strip .window-status { font-size: .59rem; }
  .chapter-strip [aria-current="step"] { outline-offset: 3px; }
  .game-board .task-prompt { font-size: .83rem; }
  .game-board .toolbar { padding: 13px 14px 18px; gap: 5px; }
  .game-board .toolbar .quiet { min-height: 44px; font-size: .74rem; padding-inline: 8px; }
  .game-board .toolbar .primary { min-height: 48px; min-width: 142px; padding: 11px 18px; font-size: .94rem; }
  .game-board .feedback p,.game-board .hint p { font-size: .81rem; }
  .auth-panel { padding: 21px 0; margin: 18px auto; }
  .auth-panel h1,.auth-panel h2 { font-size: 2rem; }
  .auth-panel .actions { flex-direction: row; flex-wrap: wrap; }
  .auth-panel .actions>* { width: auto; flex: 1 1 auto; }
  .release-note { font-size: .78rem; padding-left: 12px; }
  .sync-note { font-size: .72rem; }
  .share-keepsake { padding: 25px 19px; }
  .share-keepsake h2 { font-size: 1.95rem; }
}
@media (max-width: 360px) {
  .welcome-copy { padding: 23px 17px 25px; }
  .welcome-copy>h1 { font-size: 2rem; }
  .welcome-art { height: 315px; }
  .chapter-strip { gap: 4px; }
  .chapter-strip button,.chapter-strip .window-token { min-height: 62px; }
  .chapter-strip .window-number { font-size: 1.05rem; }
  .game-board .toolbar .primary { width: 100%; margin-left: 0; margin-top: 5px; }
  .game-board .toolbar .quiet { flex: 1; }
  .story-cover .cover-copy { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .primary,.ceramic-button,.chapter-strip button,.chapter-strip .window-token { transition: none!important; }
  button.primary:hover,a.primary:hover,.ceramic-button:hover,.chapter-strip button:not(:disabled):hover { translate: none; }
}
.no-motion .primary,.no-motion .ceramic-button,.no-motion .chapter-strip button { transition: none!important; }
.no-motion button.primary:hover,.no-motion a.primary:hover,.no-motion .ceramic-button:hover,.no-motion .chapter-strip button:not(:disabled):hover { translate: none; }
button.primary:disabled,.ceramic-button:disabled,.game-board .toolbar .primary:disabled,.reward-copy>.primary:disabled,
.feedback.good button.primary:disabled,.evidence-reward button.primary:disabled {
  background: #e7edf4; color: #53667f; border: 1px solid #c1cdd9;
  box-shadow: none!important; opacity: 1; translate: none; transform: none; text-shadow: none; cursor: default;
}

/* The operator desk uses the same materials, with explicit, readable controls.
   Its seven release rows are a form; no player-facing dashboard is introduced. */
.admin-shell { max-width: 880px; margin: 0 auto 50px; padding: clamp(20px,5vw,52px); background: #fffefa; border: 1px solid #c9d9e7; border-top: 4px solid var(--gold); border-radius: 9px; box-shadow: 0 12px 40px #214e8010; }
.admin-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 20px; font-size: .78rem; }
.admin-shell>h1 { font-size: clamp(2.2rem,5vw,3.5rem); line-height: 1.08; margin: 0 0 22px; }
.admin-shell>h1 em { color: var(--coral); font-weight: 450; }
.admin-intro { max-width: 57ch; font-size: .9rem; line-height: 1.7; color: var(--muted); }
.admin-edition { display: flex; flex-wrap: wrap; gap: 9px 18px; margin: 25px 0 30px; padding: 15px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: .69rem; overflow-wrap: anywhere; }
.admin-shell fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 36px; }
.admin-shell legend { display: block; float: none; width: 100%; padding: 0; margin: 0 0 15px; font: 500 1.55rem/1.2 var(--serif); color: var(--ink); }
.admin-shell legend>span { float: right; padding: 4px 8px; font: 600 .65rem/1.4 var(--sans); letter-spacing: .08em; border: 1px solid #b7cde4; background: var(--wash); border-radius: 4px; }
.admin-shell .small { font-size: .75rem; line-height: 1.65; }
.admin-shell label { font-size: .8rem; font-weight: 550; line-height: 1.4; }
.admin-shell input:not([type="checkbox"]),.admin-shell textarea { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 12px 11px; border: 1px solid #a8bdd4; border-radius: 6px; background: #fff; color: var(--ink); font: 400 .8rem/1.4 var(--sans); box-sizing: border-box; }
.admin-shell textarea { resize: vertical; }
.admin-shell input[type="checkbox"] { width: 21px; height: 21px; flex: 0 0 21px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.admin-shell .admin-check { display: flex; align-items: center; min-height: 46px; gap: 10px; cursor: pointer; }
.admin-shell .admin-check input { align-self: center; }
.admin-pause>.small,.admin-invitation>.small { margin-top: 3px; }
.admin-release-list { margin-top: 20px; border-top: 1px solid var(--line); }
.admin-release-row { display: grid; grid-template-columns: 38px minmax(80px,.7fr) minmax(200px,1.4fr) auto; align-items: center; gap: 13px; min-width: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.admin-chapter-number { display: flex; align-items: center; justify-content: center; width: 34px; height: 45px; color: #1a4d9e; background: #eef6ff; box-shadow: inset 0 0 0 1px #adc8e2,inset 0 0 0 4px #fffefa; border-radius: 18px 18px 3px 3px; font: 500 1.1rem/1 var(--serif); }
.admin-release-row>label:not(.admin-check)>span { display: block; margin-top: 4px; font-size: .62rem; font-weight: 400; color: var(--muted); }
.admin-shell .admin-published { gap: 7px; font-size: .68rem; }
.admin-invitation-fields { margin-top: 20px; padding: 23px; background: #f0f6fc; border: 1px solid #c3d6e9; border-radius: 8px; }
.admin-invitation-fields>label { display: block; margin: 18px 0 8px; }
.admin-invitation-fields>label:first-child { margin-top: 0; }
.admin-date-pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; margin-top: 20px; }
.admin-date-pair label { display: block; margin-bottom: 8px; }
.admin-status { min-height: 1.6em; margin: 0 0 16px; font-size: .82rem; line-height: 1.6; color: var(--muted); }
.admin-status[data-status="error"] { border-left: 3px solid var(--coral); padding: 10px 14px; background: #fff0e9; color: #963826; }
.admin-status[data-status="saved"] { color: #174c64; padding: 10px 14px; border-left: 3px solid var(--gold); background: #edf8fb; }
.admin-status[data-status="pending"] { color: #77541e; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 22px; }
.admin-actions .primary { min-width: 240px; }
.admin-shell button.quiet { min-height: 46px; color: var(--blue); font-size: .75rem; }
.admin-shell fieldset:disabled { opacity: .75; }
.admin-shell [hidden] { display: none!important; }
.admin-retained,.admin-audit { padding-top: 25px; margin-top: 30px; border-top: 1px solid var(--line); }
.admin-retained summary,.admin-audit summary { min-height: 44px; padding: 10px 0; font-size: .78rem; cursor: pointer; overflow-wrap: anywhere; }
.admin-retained textarea { font-family: ui-monospace,monospace; font-size: .7rem; }
.admin-audit h2 { font: 500 1.6rem/1.2 var(--serif); }
.admin-audit h3 { font: 600 .8rem/1.4 var(--sans); margin: 18px 0 8px; }
.admin-audit-list details { border-bottom: 1px solid var(--line); }
.admin-audit-list pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; border-radius: 6px; background: #edf4fa; color: #1e426b; font: .65rem/1.5 ui-monospace,monospace; }
@media (max-width: 730px) {
  .admin-release-row { grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px 13px; }
  .admin-release-row>input { grid-row: 2; grid-column: 2 / -1; }
  .admin-release-row .admin-published { grid-row: 1; grid-column: 3; }
  .admin-date-pair { grid-template-columns: minmax(0,1fr); gap: 17px; }
}
@media (max-width: 400px) {
  .admin-shell { padding: 23px 16px; }
  .admin-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .admin-actions .primary { width: 100%; min-width: 0; font-size: .95rem; }
  .admin-invitation-fields { padding: 16px; }
  .admin-release-row { gap: 8px; }
  .admin-shell .admin-published { font-size: .63rem; }
}

/* A quiet, optional invitation after the player's first confirmed puzzle. */
.guest-account-offer { margin: 24px 0 0; padding: clamp(22px,4vw,34px); border-top: 2px solid #205dc2; background: linear-gradient(135deg,#f2f7ff,#fffdf6); border-radius: 5px 24px 24px 24px; box-shadow: 0 5px 0 #dce6f0; }
.guest-account-offer .eyebrow { margin-bottom: 10px; color: #3b64a0; }
.guest-account-offer h2 { margin-bottom: 14px; font-size: clamp(1.65rem,3vw,2.15rem); color: #213b52; }
.guest-account-offer h2 em { color: #ac573e; }
.guest-account-offer>p:not(.eyebrow) { max-width: 44ch; font-size: .9rem; line-height: 1.55; color: #495c6b; }
.guest-account-offer .actions { margin-top: 18px; gap: 10px 18px; }
.guest-account-offer .actions>button { flex: 1 1 auto; }
.notebook-choice select { max-width: 100%; min-height: 48px; padding: 10px; border: 1px solid #c3d0dd; border-radius: 8px; background: #fff; color: var(--ink); }
@media(max-width:450px) { .guest-account-offer .actions { align-items: stretch; } .guest-account-offer .actions>button { width: 100%; } .notebook-choice { width: 100%; } .notebook-choice select { width: 100%; } }
