/* ============================================================
   css/print-builder.css — print-builder.php's own styles.
   New file, chat 2.14. Adapted directly from the approved design
   mockup (print-mode-mockup.html) rather than built fresh — every
   token/component here reuses style.css's real values and the site's
   existing pill/card patterns, same discipline as builder.css.
   ============================================================ */

.print-page {
    /* Deliberately NOT position:relative — this is a centered,
       max-width:1180px column, so positioning it would anchor
       .print-nav-bar to that narrow box instead of the viewport. Left
       unpositioned, the bar's position:absolute anchors to the
       viewport (initial containing block), landing full-width exactly
       like index.php's nav — which is the goal. Top padding raised
       chat 2.24 (3rem→6rem) to clear the absolutely-positioned bar. */
    max-width: 1180px;
    margin: 0 auto;
    padding: 6rem 2rem 5rem;
}
/* Desktop nav bar — new, chat 2.23, same fix as category.php/
   dashboard.php/builder.php. Confirmed .print-page (below) is not
   position:relative and sets no overflow, unlike those three pages'
   own wrapper — so plain left:0/right:0 already resolves against the
   true viewport, no viewport-breakout technique needed here.
   position:absolute (not fixed) so it scrolls away with the page,
   matching index.php's real nav. No logo — the centered one below
   already carries that. */
.print-nav-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1.25rem 1.5rem;
}
@media (min-width: 760px) {
    .print-nav-bar { padding: 1.5rem 3rem; }
}

.print-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.print-back-link {
    display: block;
    width: fit-content;
    margin: 0 auto 1rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 50px;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.print-back-link:hover { background: rgba(201,168,76,0.1); border-color: var(--gold); color: var(--gold-light); }
.print-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 400;
    color: var(--cream);
    margin: 0.75rem 0 0.6rem;
}
.print-sub {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--ink-soft);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.55;
}
.print-optional {
    color: var(--ink-muted);
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Two-column desktop layout ── */
.print-columns {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2.5rem;
    align-items: start;
}
.print-form-col { display: flex; flex-direction: column; gap: 2.25rem; }

@media (max-width: 900px) {
    .print-columns { grid-template-columns: 1fr; }
    .preview-col { position: static; }
}

/* ── Mode toggle — same component as builder.css's, own instance ── */
.mode-toggle {
    display: flex;
    border: 1px solid rgba(245,237,216,0.15);
    border-radius: 6px;
    overflow: hidden;
}
.mode-toggle-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.85rem 0.9rem 0.95rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background .2s;
}
.mode-toggle-label {
    color: var(--ink-soft);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color .2s;
}
.mode-toggle-desc {
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 300;
    line-height: 1.4;
    text-align: center;
    max-width: 230px;
}
.mode-toggle-cap { font-size: 0.62rem; letter-spacing: 0.05em; margin-top: 2px; color: var(--ink-muted); }
.mode-toggle-btn.active { background: rgba(201,168,76,0.12); }
.mode-toggle-btn.active .mode-toggle-label,
.mode-toggle-btn.active .mode-toggle-cap { color: var(--gold); }
.mode-toggle-btn[data-mode="classic"].active { background: rgba(111,169,143,0.12); }
.mode-toggle-btn[data-mode="classic"].active .mode-toggle-label,
.mode-toggle-btn[data-mode="classic"].active .mode-toggle-cap { color: var(--emerald-light); }
.mode-toggle-btn:not(.active):hover { background: rgba(245,237,216,0.04); }

/* ── Field basics ── */
.field-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 0.5rem;
}
.field-input, .field-number {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(245,237,216,0.15);
    border-radius: 4px;
    padding: 0.65rem 0.8rem;
    color: var(--cream);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
}
.field-input:focus, .field-number:focus { outline: none; border-color: var(--gold); }
.field-hint { font-size: 0.72rem; color: var(--ink-muted); margin-top: 0.5rem; line-height: 1.5; }

/* ── Grid size — real range sliders, reusing category-picker.css's
   .count-slider styling verbatim (chat 2.14, direct feedback: native
   number-input spinners "the ugly grey" looked inconsistent with the
   rest of the site). Same proven, already-on-brand control the
   category picker's word-count step already uses, not a new one. ── */
.size-slider-row { display: flex; gap: 1.5rem; }
.size-slider-col { flex: 1; }
.size-slider-col .field-label { text-align: center; }
.size-slider-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--gold);
    text-align: center;
    margin: 0.3rem 0 0.6rem;
}
.count-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(201,168,76,0.2);
    outline: none;
    cursor: pointer;
}
.count-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: background .2s;
}
.count-slider::-webkit-slider-thumb:hover { background: var(--gold-light); }
.count-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: background .2s;
}
.count-slider::-moz-range-thumb:hover { background: var(--gold-light); }
.count-slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(201,168,76,0.2);
}
.size-cap-readout {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(201,168,76,0.08);
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--cream);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.size-cap-readout strong { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--gold); font-weight: 400; }

/* ── Word rows (Trivia) — same clue+answer card as builder.css ── */
.builder-section-head-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.75rem; }
.print-word-count { font-size: 0.75rem; color: var(--ink-soft); }
.word-rows { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.9rem; }
.word-row {
    background: var(--ink-mid);
    border: 1px solid rgba(245,237,216,0.1);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.word-row.has-duplicate { border-left-color: var(--error) !important; }
.word-row-num {
    font-family: 'Playfair Display', serif;
    font-size: 0.78rem;
    color: var(--gold);
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
    padding-top: 0.5rem;
}
.word-row.has-duplicate .word-row-num { color: var(--error) !important; }
.word-row-fields { flex: 1; display: grid; grid-template-columns: 1fr 160px; gap: 0.5rem; align-items: start; }
.word-row-fields input, .word-row-fields textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(245,237,216,0.15);
    border-radius: 4px;
    padding: 0.5rem 0.65rem;
    color: var(--cream);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    resize: vertical;
    scrollbar-width: thin;
    scrollbar-color: rgba(201,168,76,0.4) transparent;
}
.clue-input::-webkit-scrollbar { width: 6px; }
.clue-input::-webkit-scrollbar-track { background: transparent; }
.clue-input::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.4); border-radius: 3px; }
.word-row-fields input:focus, .word-row-fields textarea:focus { outline: none; border-color: var(--gold); }
.word-row-fields input::placeholder, .word-row-fields textarea::placeholder { color: var(--ink-muted); font-style: italic; }
.word-row-fields .answer-input { text-transform: uppercase; letter-spacing: 0.04em; }
.word-row-fields .answer-input.duplicate { border: 2px solid var(--error) !important; background: rgba(196,105,90,0.25) !important; }
.word-row-dup-warning { font-size: 0.65rem; color: var(--error); grid-column: 2; }

/* Same fix as builder.css's own @media(max-width:480px) for its
   equivalent word-row-fields — direct feedback (real mobile
   screenshot): the fixed 160px answer column squeezed the clue
   textarea down to a couple of characters wide on a phone screen.
   Reusing the identical breakpoint value, not a new one, so the two
   pages' "add word" cards behave consistently. Simpler than builder's
   version: print-builder's clue/answer fields carry no explicit
   grid-column/grid-row overrides to reset, so they just stack in
   natural DOM order (clue, then answer) once the grid drops to one
   column — no color-cycling row-accent system to preserve either,
   direct decision this page doesn't need it. */
@media (max-width: 480px) {
  .word-row-fields { grid-template-columns: 1fr; }
  .word-row-dup-warning { grid-column: 1; text-align: left; }
}
.word-row-remove {
    flex-shrink: 0;
    width: 26px; height: 26px;
    margin-top: 0.3rem;
    border: 1px solid rgba(196,105,90,0.3);
    border-radius: 4px;
    background: transparent;
    color: #E8A99C;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: all .2s;
}
.word-row-remove:hover { background: rgba(196,105,90,0.12); border-color: var(--error); color: var(--error); }
.print-add-word-btn { width: 100%; text-align: center; }
.print-add-word-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Classic — one plain textarea, no per-word cards at all. A
   clue+answer card made sense for Trivia (something genuinely needs
   pairing, always ≤12); Classic has no clue to pair and needs to
   comfortably handle up to 75 words at the 30x30 size cap, where
   per-row cards fall apart entirely. ── */
.classic-bulk-input {
    display: none;
    width: 100%;
    min-height: 220px;
    max-height: 420px;
    resize: vertical;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(245,237,216,0.15);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    color: var(--cream);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    line-height: 1.8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    scrollbar-width: thin;
    scrollbar-color: rgba(201,168,76,0.4) transparent;
}
.classic-bulk-input:focus { outline: none; border-color: var(--gold); }
.classic-bulk-input::placeholder { color: var(--ink-muted); font-style: italic; text-transform: none; letter-spacing: 0; }
.classic-bulk-input::-webkit-scrollbar { width: 6px; }
.classic-bulk-input::-webkit-scrollbar-track { background: transparent; }
.classic-bulk-input::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.4); border-radius: 3px; }

.cap-warning {
    margin: 0.6rem 0 0;
    padding: 0.6rem 0.8rem;
    background: rgba(196,105,90,0.12);
    border: 1px solid rgba(196,105,90,0.4);
    border-radius: 6px;
    color: #E8A99C;
    font-size: 0.76rem;
    line-height: 1.5;
}

/* ── Action buttons ── */
.print-actions { display: flex; gap: 0.75rem; }
.print-btn-primary {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.print-btn-primary:hover:not(:disabled) { background: var(--gold); color: var(--ink); }
.print-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
/* Visible "something is actually happening" state while Saving/
   Creating — direct feedback the button previously gave no visual cue
   beyond a text change, easy to miss. Deliberately not a new spinner:
   the site doesn't use one anywhere ("we do not use a spinner
   anywhere else on the site" — direct confirmation), but puzzle.css
   (already loaded on this page) already has gridLoadingPulse for
   exactly this purpose elsewhere (the grid's own loading badge) — so
   this reuses those same keyframes rather than adding a second,
   slightly different loading language. :disabled's opacity:0.4 above
   is overridden here specifically while .is-saving, so the pulse has
   real contrast to animate against instead of pulsing against an
   already-dimmed button. */
.print-btn-primary.is-saving { opacity: 1; animation: gridLoadingPulse 1.4s ease-in-out infinite; }

/* ── Right column: sticky print preview ── */
.preview-col { position: sticky; top: 2rem; }
.preview-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 0.75rem;
    text-align: center;
}
.stale-notice {
    font-size: 0.76rem;
    color: #E8A99C;
    background: rgba(196,105,90,0.1);
    border: 1px solid rgba(196,105,90,0.3);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.75rem;
    text-align: center;
    line-height: 1.5;
}
.preview-note { margin-top: 1rem; font-size: 0.74rem; color: var(--ink-soft); text-align: center; line-height: 1.6; }

/* Print preview — chat 2.14 rebuild: this is now the actual rendered
   PNG shown as a plain <img>, not a separate HTML/CSS approximation
   of the page (direct feedback: the two could visibly drift apart,
   and since this was never an editable/interactive preview anyway,
   there was no real reason for it not to just be the real file). See
   renderPuzzleCanvas() in js/print-builder.js — the one place this
   actually gets drawn now, for both the preview and the download. */
.print-page-sheet {
    background: #FFFFFF;
    box-shadow: 0 30px 70px rgba(0,0,0,0.55);
    padding: 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.print-preview-img { width: 100%; display: block; }
.print-preview-img[hidden] { display: none; }
.sheet-empty { color: #B8B2A2; font-size: 0.85rem; text-align: center; padding: 3rem 1.5rem; font-style: italic; }

/* ── print-puzzles.php — the list page ── */
.print-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}
.print-list-card {
    background: var(--ink-mid);
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 10px;
    padding: 1.25rem;
}
.print-list-mode {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.print-list-mode.is-classic { color: var(--emerald-light); }
.print-list-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--cream);
    margin: 0 0 0.4rem;
}
.print-list-meta { font-size: 0.75rem; color: var(--ink-soft); margin: 0 0 1rem; }
.print-list-actions { display: flex; gap: 0.6rem; }
.print-list-actions .win-btn { flex: 1; text-align: center; text-decoration: none; }

/* '+' empty-slot tiles in Your Printable Puzzles — one per remaining
   slot under the account cap, direct feedback: editing an existing
   puzzle left no way to start a new one, and a brand-new account with
   zero saved puzzles saw no section here at all. Reuses
   .dashboard-tile-card/.dashboard-tile-thumb (style.css) as the base
   shape rather than a new card design, only overriding what actually
   needs to differ: a dashed border instead of solid (visually "empty
   slot" rather than "real content"), and a centered '+' instead of a
   thumbnail. Real puzzle tiles are still <div>s inside a bulk-delete
   <form>; this one's a plain <a> instead — no checkbox, no delete
   plumbing, just a link. */
.dashboard-tile-empty {
    text-decoration: none;
    align-items: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.dashboard-tile-empty:hover {
    border-color: rgba(201,168,76,0.4);
    background: rgba(201,168,76,0.06);
}
.dashboard-tile-empty-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    border-color: rgba(245,237,216,0.2);
    background: transparent;
    color: rgba(201,168,76,0.6);
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 400;
}
.dashboard-tile-empty .dashboard-tile-title { text-align: center; color: var(--ink-soft); }

/* Page 1/Page 2 preview toggle — a lighter two-button tab than
   .mode-toggle (which carries its own description text under each
   option, not needed here). Only ever shown for a multi-page puzzle. */
.page-toggle {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
/* Real bug, found via a fresh-page screenshot: display:flex above
   overrides the browser's own [hidden]{display:none} rule, since an
   author stylesheet always wins over that default regardless of the
   hidden attribute's intent — this toggle had actually been visible
   on every page load, not just multi-page ones, until this line. */
.page-toggle[hidden] { display: none; }
.page-toggle-btn {
    padding: 0.35rem 1rem;
    background: transparent;
    border: 1px solid rgba(245,237,216,0.15);
    border-radius: 50px;
    color: var(--ink-soft);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.page-toggle-btn:hover { border-color: rgba(201,168,76,0.3); }
.page-toggle-btn.active {
    background: rgba(201,168,76,0.12);
    border-color: rgba(201,168,76,0.4);
    color: var(--gold);
}


/* ── Guest "Save to my account" panel (chat 2.28) — public page only,
   under Download PNG in the preview column. Reuses .win-btn for the
   main button; the sign-in option is a quiet text link so the primary
   action stays obvious. ── */
.print-guest-save {
  margin-top: 1.5rem;
  padding: 1.25rem 1rem;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 12px;
  background: rgba(201,168,76,0.05);
  text-align: center;
}
.print-guest-save-text {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.print-guest-save-btn {
  width: 100%;
}
.print-guest-save-link {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.print-guest-save-link:hover { color: var(--gold); }

/* ── Start Over (chat 2.28) — quiet secondary button beside Create
   Puzzle, same pill shape, muted so the primary action stays obvious. ── */
.print-btn-reset {
  flex: 0 0 auto;
  padding: 0.75rem 1.25rem;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid rgba(245,237,216,0.2);
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.print-btn-reset:hover { border-color: rgba(245,237,216,0.45); color: var(--cream); }


/* ============================================================
   Featured printable puzzle pages (chat 2.29) —
   /printable-word-search/{slug}. The "About this printable" text
   below the builder (readable content for search engines) and the
   members' one-click save under Download PNG.
   ============================================================ */
.featured-about {
    max-width: 760px;
    margin: 4rem auto 0;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(245,237,216,0.1);
    color: var(--ink-soft);
    line-height: 1.7;
}
.featured-about-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--cream);
    margin: 0 0 1rem;
}
.featured-about-desc { font-size: 0.95rem; color: var(--cream); margin: 0 0 0.75rem; }
.featured-about-meta { font-size: 0.82rem; margin: 0 0 2rem; }
.featured-about-sub {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--gold-light);
    margin: 0 0 0.75rem;
}
.featured-about-clues { margin: 0 0 2rem; padding-left: 1.4rem; font-size: 0.88rem; }
.featured-about-clues li { margin-bottom: 0.4rem; }
.featured-about-words {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    columns: 3 9rem;
    column-gap: 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}
.featured-about-words li { break-inside: avoid; padding: 0.15rem 0; }
.featured-about-more { font-size: 0.85rem; }
.featured-about-more a { color: var(--gold); }
.featured-member-save { margin-top: 1.5rem; text-align: center; }
.featured-member-save .print-guest-save-text { margin-top: 0.6rem; }

/* Create / Update / Save Changes beside Download PNG (chat 2.29) — the
   main action, highlighted like the admin page's Save. */
.print-btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.print-btn-row > .print-btn-primary { flex: 1 1 150px; width: auto; }
@media (max-width: 480px) {
    /* Keep each label on one line when the two buttons share a phone row. */
    .print-btn-row > .print-btn-primary { padding: .75rem .5rem; font-size: .76rem; letter-spacing: .06em; white-space: nowrap; }
}
.print-start-over { text-align: center; margin: .75rem 0 0; }
.print-link-btn { background: none; border: 0; padding: .25rem; color: var(--ink-soft); font: 400 .78rem 'DM Sans', sans-serif;
    letter-spacing: .04em; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.print-link-btn:hover { color: var(--gold); }
.print-btn-main {
    background: rgba(201,168,76,0.14);
    border-color: rgba(201,168,76,0.6);
    color: var(--gold-light);
}
.print-btn-main:hover:not(:disabled) { background: rgba(201,168,76,0.24); }
.print-btn-main:disabled { opacity: .45; cursor: not-allowed; }

/* ── Classroom header checkbox (chat 2.32) ── */
.classroom-check {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--cream);
}
.classroom-check input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--gold);
    cursor: pointer;
}
.classroom-check input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ── Puzzle settings card (chat 2.32) — the left column's layout from the
   owner's pick: title, words & clues, then this one card. Every rule is
   scoped under .print-settings, so the same controls elsewhere (builder.php
   has its own copy) are untouched. ── */
.print-settings-heading { text-align: left; margin-bottom: 0.75rem; }
.print-settings-card {
    border: 1px solid rgba(201,168,76,0.22);
    border-radius: 6px;
    background: rgba(28,26,22,0.6);
    padding: 0.25rem 1.1rem;
}
.print-settings-row {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(245,237,216,0.08);
}
.print-settings-row:last-child { border-bottom: none; }
.print-settings-key { font-size: 0.8rem; color: var(--ink-soft); }

/* Type: two even halves of one rounded switch */
.print-settings .mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid rgba(201,168,76,0.35);
    border-radius: 999px;
    padding: 3px;
    overflow: visible;
}
.print-settings .mode-toggle-btn {
    padding: 0.55rem 0.5rem;
    border-radius: 999px;
    gap: 0;
}
.print-settings .mode-toggle-label {
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    text-transform: none;
}
.print-settings .mode-toggle-btn.active { background: rgba(201,168,76,0.18); }
.print-settings .mode-toggle-btn.active .mode-toggle-label { color: var(--gold-light); }
.print-settings .mode-toggle-btn[data-mode="classic"].active { background: rgba(111,169,143,0.18); }
.print-settings .mode-toggle-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Grid size: small labels, number beside its slider */
.print-settings .size-slider-row { gap: 1.25rem; }
.print-settings .size-slider-col .field-label {
    text-align: left;
    font-size: 0.68rem;
    color: var(--ink-muted);
    margin-bottom: 0.2rem;
}
.print-settings .size-slider-pair { display: flex; align-items: center; gap: 0.7rem; }
.print-settings .size-slider-value {
    font-size: 1.15rem;
    margin: 0;
    min-width: 1.6rem;
    text-align: left;
}
.print-settings #size-hint { margin-top: 0.6rem; }
.print-settings #size-hint strong { color: var(--gold); font-weight: 500; }

/* On the page */
.print-settings .classroom-check { flex-wrap: wrap; row-gap: 0.2rem; }
.classroom-check-note { font-size: 0.75rem; color: var(--ink-muted); }

@media (max-width: 560px) {
    .print-settings-row { grid-template-columns: 1fr; gap: 0.5rem; }
    .print-settings .size-slider-row { flex-direction: column; gap: 0.75rem; }
}

/* Answer key link under the Create/Download row (chat 2.32) */
.print-answer-key { text-align: center; margin-top: 0.9rem; }
.print-answer-key .print-link-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Checkbox drawn on brand rather than the browser's white square (chat 2.32) */
.print-settings .classroom-check input {
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
    border: 1px solid rgba(245,237,216,0.45);
    border-radius: 3px;
    background: transparent;
    display: inline-grid;
    place-content: center;
    transition: background .15s, border-color .15s;
}
.print-settings .classroom-check input::after {
    content: '';
    width: 0.55rem;
    height: 0.3rem;
    border-left: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: rotate(-45deg) translate(1px, -1px);
    opacity: 0;
}
.print-settings .classroom-check input:checked { background: var(--gold); border-color: var(--gold); }
.print-settings .classroom-check input:checked::after { opacity: 1; }
.print-settings .classroom-check:hover input:not(:checked) { border-color: var(--gold); }

/* Mode switch without the jump (chat 2.32): Classic's word box starts about
   the height of one Trivia clue row plus its Add button, then grows with
   its words (autoSizeClassicInput() in js/print-builder.js). */
.print-form-col .classic-bulk-input { min-height: 8.5rem; resize: none; }
/* The stale notice now sits under the preview, above the buttons. */
.preview-col .stale-notice { margin: 0.75rem 0 0; }

/* PDF download (chat 2.32): "PNG image" sits beside the answer key link */
.print-answer-key-sep { color: var(--ink-muted); margin: 0 0.35rem; }
.print-answer-key #png-download-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Button layout (chat 2.32, owner's pick): build on top, take away below ── */
.print-btn-row + .print-download-label { margin-top: 1.1rem; }
.print-download-label {
    text-align: center;
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 0.55rem;
}
.print-download-row { margin-top: 0; }
.print-btn-dl {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.7rem 0.75rem;
}
.print-btn-dl-type {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--ink-soft);
}
.print-btn-dl:hover:not(:disabled) .print-btn-dl-type { color: inherit; opacity: 0.8; }
@media (max-width: 480px) {
    /* The two downloads stay side by side on phones. */
    .print-download-row > .print-btn-primary { flex: 1 1 0; }
}
.print-secondary-links { text-align: center; margin: 0.8rem 0 0; }
.print-secondary-sep { color: var(--ink-muted); margin: 0 0.35rem; }
.print-secondary-links #png-download-btn:disabled { opacity: 0.4; cursor: not-allowed; }

