/* The puzzle owns the screen. Supporting detail opens only when requested. */
:root {
  --bg: #f6f5f0;
  --surface: #ffffff;
  --surface-2: #efeee8;
  --surface-3: #e8e8e0;
  --ink: #242c27;
  --ink-soft: #657067;
  --line: #d9ddd5;
  --accent: #25634c;
  --accent-strong: #174b37;
  --accent-soft: #e6f0e8;
  --shadow-sm: 0 4px 18px rgb(37 53 42 / 4%);
  --shadow-md: 0 12px 40px rgb(37 53 42 / 5%);
  --shadow-accent: none;
  --header-height: 60px;
}
html[data-theme="dark"] {
  --bg: #18201c;
  --surface: #202a24;
  --surface-2: #28342b;
  --surface-3: #303c33;
  --ink: #edf1ea;
  --ink-soft: #b0bcaf;
  --line: #435046;
  --accent: #95d4ae;
  --accent-strong: #b7e5c7;
  --accent-soft: #2a4133;
  --shadow-accent: none;
}
body { background: var(--bg); }
.brand-mark, .primary-button { background: var(--accent); box-shadow: none; }
html[data-theme="dark"] .primary-button { color: #17271c; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-size: 1.2rem; }
.main-nav { gap: 22px; }
.header-score { display: none; }
.site-header { background: var(--bg); backdrop-filter: none; }
.play-page .hero { width: min(calc(100% - 32px), 740px); padding: 20px 0 0; }
.play-page .hero-copy { display: block; text-align: center; margin-bottom: 2px; }
.play-page .hero-copy .eyebrow { display: none; }
.play-page .hero-copy h1 { margin: 0; max-width: none; font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.2; letter-spacing: -.6px; }
.play-page .hero-copy > p:last-child { display: block; max-width: none; margin: 6px 0 0; font-size: .85rem; }
.quick-guide { text-align: center; margin: 0 auto 12px; }
.quick-guide summary { margin: auto; padding: 6px; min-height: 32px; }
.quick-guide-body { text-align: left; }
.game-layout { display: block; }
.game-card { padding: 18px 28px; border-radius: 18px; box-shadow: var(--shadow-sm); }
.game-card::before { display: none; }
.game-toolbar { justify-content: center; margin-bottom: 6px; flex-wrap: wrap; }
.mode-switch { padding: 3px; background: var(--surface-2); box-shadow: none; border: none; }
.mode-button { min-height: 40px; padding: 8px 20px; }
.mode-button.is-active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 4px rgb(30 50 35 / 8%); }
.daily-track { margin: 0 auto 5px; gap: 0; width: fit-content; }
.daily-dot { width: 36px; height: 36px; border: none; border-radius: 8px; background: transparent; box-shadow: none; }
.daily-dot.is-current { background: var(--accent-soft); box-shadow: none; }
.daily-line { width: 24px; }
.puzzle-meta { margin: 0; align-items: center; }
.puzzle-number { display: none; }
.mode-label { font-size: .72rem; color: var(--ink-soft); }
.meta-badges { flex-direction: row; align-items: center; }
.points-badge { display: none; }
.difficulty-badge { padding: 3px 8px; font-size: .65rem; }
.puzzle-stage { min-height: 0; height: 250px; margin: 0; border: 0; border-radius: 0; background: var(--surface); }
.puzzle-stage .puzzle-canvas { width: min(100%, 500px); max-width: 500px; }
.answer-shape { flex-wrap: wrap; gap: 8px 15px; margin: 0 0 12px; min-height: 24px; }
.answer-word { gap: 4px; }
.answer-word i.answer-slot { width: 16px; height: 20px; border-radius: 0; background: none; border-bottom: 2px solid var(--ink-soft); }
.answer-form { margin: 0; }
.answer-form label { font-size: .8rem; margin-bottom: 6px; }
.answer-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.answer-row input { height: 48px; font-size: 16px; background: var(--surface); border-radius: 9px; }
.answer-row .primary-button { min-height: 48px; border-radius: 9px; padding: 0 24px; }
.feedback { min-height: 0; margin: 8px 0 0; font-size: .8rem; }
.feedback:empty { margin: 0; }
.game-actions { display: flex; justify-content: center; gap: 16px; margin-top: 10px; min-height: 44px; }
.game-actions #assist-panel, .game-actions #skip-button { margin: 0; width: auto; }
.game-actions .secondary-button, .game-actions .text-button { min-height: 44px; padding: 8px 12px; font-size: .8rem; background: transparent; border: none; box-shadow: none; }
.game-actions small { font-weight: 500; color: var(--ink-soft); font-size: .67rem; }
.game-actions .next-button { min-width: 200px; }
.scoring-note { margin: 0; font-size: .69rem; }
.keyboard-tip { display: none; }
.progress-drawer { margin: 14px 0 0; border-bottom: 1px solid var(--line); }
.progress-drawer > summary { cursor: pointer; padding: 10px 2px 15px; min-height: 44px; font-size: .8rem; color: var(--ink-soft); }
.progress-drawer > summary span { float: right; }
.progress-drawer .side-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 16px; }
.progress-drawer .stats-card { grid-column: 1 / -1; padding: 16px; box-shadow: none; }
.progress-drawer .stats-grid { margin: 12px 0; }
.progress-drawer .streak-flame { display: none; }
.progress-drawer .stats-heading h2 { font-size: 1.1rem; }
.proof-strip { margin-top: 48px; box-shadow: none; background: transparent; }
.library-card { box-shadow: none; }
.library-preview { background: var(--surface); }
.library-preview::before, .library-preview::after { display: none; }
.library-card-copy h2 { font-size: 1rem; }
.library-card-copy p { font-size: .8rem; }
@media (min-width: 761px) and (max-height: 800px) {
  .play-page .hero { padding-top: 12px; }
  .game-card { padding: 12px 26px; }
  .puzzle-stage { height: 220px; }
  .puzzle-stage .puzzle-canvas { max-width: 440px; }
  .answer-shape { margin-bottom: 10px; }
  .game-actions { margin-top: 6px; }
}
@media (max-width: 760px) {
  .play-page .hero { padding-top: 15px; }
  .main-nav { display: none; }
}
@media (max-width: 560px) {
  :root { --header-height: 54px; }
  .play-page .hero { width: calc(100% - 20px); padding-top: 14px; }
  .play-page .hero-copy h1 { font-size: 1.35rem; }
  .play-page .hero-copy > p:last-child { font-size: .75rem; margin: 5px auto 0; max-width: 310px; }
  .quick-guide { margin-bottom: 8px; font-size: .74rem; }
  .game-card { padding: 12px 14px; border-radius: 14px; }
  .mode-button { padding-inline: 18px; }
  .daily-dot { width: 40px; height: 40px; }
  .daily-line { width: 16px; }
  .puzzle-meta { margin-top: 2px; }
  .puzzle-stage { height: 200px; }
  .puzzle-stage .puzzle-canvas { width: 100%; }
  .answer-shape { gap: 8px 12px; margin-bottom: 12px; }
  .answer-word { gap: 3px; }
  .answer-word i.answer-slot { width: 12px; height: 18px; }
  .answer-row .primary-button { padding-inline: 18px; font-size: .85rem; }
  .game-actions { display: flex; gap: 0; justify-content: space-between; }
  .game-actions > *, .game-actions button { width: auto; }
  .game-actions .secondary-button, .game-actions .text-button { font-size: .75rem; padding: 7px 8px; }
  .game-actions small { display: block; font-size: .64rem; }
  .game-actions .next-button { flex: 1; min-width: 0; }
  .scoring-note { font-size: .64rem; }
  .progress-drawer .side-panel { display: block; }
  .progress-drawer .tip-card, .progress-drawer .quick-play-card { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.puzzle-art { width: 1em; height: 1em; display: inline-block; vertical-align: -.12em; object-fit: contain; }
.mobile-library { display: none; }
.progress-track > span { background: var(--accent); }
.final-cta { background: var(--accent); }
@media (max-width: 760px) { .mobile-library { display: inline-flex; min-height: 44px; align-items: center; font-size: .75rem; font-weight: 600; margin-right: 4px; } }
@media (max-width: 560px) {
  .library-main { padding-top: 18px; }
  .library-hero { gap: 12px; margin-bottom: 18px; }
  .library-hero h1 { font-size: 1.9rem; line-height: 1.1; }
  .library-hero p { font-size: .82rem; line-height: 1.5; }
  .library-summary { display: none; }
  .library-toolbar { position: static; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
  .library-search { grid-column: 1 / -1; }
  .library-toolbar select { min-width: 0; width: 100%; }
}
/* Images inside one authored element stay in a row, just like the source text. */
.puzzle-element { display: block; }
/* Color is puzzle information: dark mode must not turn BLACK into white. */
.puzzle-stage, .library-preview {
  background: #fff;
  --puzzle-ink: #171622;
  --puzzle-muted: #777386;
  --puzzle-accent: #25634c;
  --puzzle-red: #d94343;
  --puzzle-blue: #2475c7;
  --puzzle-green: #268455;
  --puzzle-gold: #c98b00;
  --puzzle-brown: #845734;
  --puzzle-gray: #707582;
  --puzzle-silver: #a9afbb;
  --puzzle-white: #fff;
  --puzzle-blue-soft: #dceeff;
  --puzzle-green-soft: #e2f4e8;
  --puzzle-gold-soft: #fff0b8;
  --puzzle-gray-soft: #e6e7eb;
  --puzzle-sand: #f4dfa7;
}
html[data-theme="dark"] .puzzle-element[data-style="darkEmoji"] { filter: grayscale(1) brightness(.22); }
html[data-theme="dark"] .puzzle-stage { border-radius: 12px; margin: 10px 0; }
