:root {
  --ink: #1f2430;
  --paper: #fcfbf7;
  --accent: #ff5a5f;
  --accent2: #2b8aef;
  --line: #e6e2d8;
  --muted: #8b8678;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: #f3f1ea;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--ink);
  color: #fff;
}
.brand { font-weight: 800; font-size: 18px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.easy-toggle {
  border: none; border-radius: 999px; padding: 7px 14px; cursor: pointer;
  background: #ffd166; color: var(--ink); font-weight: 800; font-size: 14px;
}

/* ---- Easy mode: dead-simple, icon-first ---- */
#easy-view {
  max-width: 1150px; margin: 0 auto; padding: 16px;
  display: flex; flex-direction: column; gap: 16px;
}

/* While the doodle plays: hide every control, the board takes the screen
   (RSA-Animate style). Tap the board to pause and bring the buttons back. */
#easy-view.immersive { max-width: none; padding: 0; gap: 0; }
.immersive .easy-top, .immersive .easy-buttons, .immersive .easy-controls,
.immersive .easy-ask, .immersive .easy-feedback, .immersive .easy-hint,
.immersive .plus-card, .immersive .plus-manage { display: none !important; }
/* progress words stay visible at the bottom of the fullscreen board */
.immersive .easy-status { position: fixed; left: 0; right: 0; bottom: 12px; z-index: 60; }
/* The board takes over the ENTIRE screen — including where the buttons were. */
.immersive .easy-stage-wrap {
  position: fixed; inset: 0; margin: 0; min-height: 0;
  border: none; border-radius: 0;
}
.immersive #easy-stage { cursor: pointer; width: 100%; height: 100%; }
.easy-top { display: flex; justify-content: space-between; align-items: center; }
#easy-lang {
  font-size: 16px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
}
.easy-link {
  background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer;
}
.easy-stage-wrap {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; min-height: 220px;
  /* plain whiteboard — no ruled lines */
}
#easy-stage { width: 100%; height: auto; display: block; }
.easy-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Caveat', cursive; font-size: 30px; color: var(--muted); text-align: center;
}
.easy-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; font-size: 60px; background: rgba(252,251,247,0.9);
}
.easy-loading .spin {
  width: 42px; height: 42px; border: 5px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.easy-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.easy-big {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 10px; border: 3px solid var(--ink); border-radius: 20px;
  background: #fff; cursor: pointer; font-size: 18px; font-weight: 700; color: var(--ink);
}
.easy-big span { font-size: 52px; line-height: 1; }
.easy-big:active { transform: scale(0.97); }
#easy-camera { background: #eef5ff; border-color: var(--accent2); }
#easy-file { background: #fff3f3; border-color: var(--accent); }
#easy-paste { background: #f3e8ff; border-color: #8a5cf6; }

/* Laptop webcam view ("Take a photo" on computers) */
#cam-view {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 18, 28, 0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 18px;
}
#cam-video { max-width: 92vw; max-height: 70vh; border-radius: 16px; background: #000; }
.cam-buttons { display: flex; gap: 14px; }
.cam-buttons button {
  padding: 16px 30px; border-radius: 999px; border: none;
  font-size: 20px; font-weight: 800; cursor: pointer;
}
#cam-snap { background: var(--accent); color: #fff; }
#cam-cancel { background: #fff; color: var(--ink); }

.easy-controls { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.easy-replay {
  padding: 14px 26px; border-radius: 999px; border: none; background: var(--accent);
  color: #fff; font-size: 18px; font-weight: 800; cursor: pointer;
}
.easy-voice { font-size: 26px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.easy-voice input { width: 22px; height: 22px; }
.easy-status {
  text-align: center; font-family: 'Caveat', cursive; font-size: 27px; color: var(--ink); min-height: 34px;
}
.easy-ask { display: flex; gap: 10px; }
#ask-input {
  flex: 1; font-size: 18px; padding: 14px 16px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; font-family: inherit;
}
#ask-btn {
  padding: 14px 28px; border-radius: 999px; border: none; background: #8a5cf6;
  color: #fff; font-size: 18px; font-weight: 800; cursor: pointer;
}

/* Feedback row: thumbs + note box — the app learns from these */
.easy-feedback { display: flex; gap: 8px; align-items: stretch; }
.easy-feedback button {
  border: 2px solid var(--line); background: #fff; border-radius: 14px;
  font-size: 22px; padding: 8px 14px; cursor: pointer;
}
.easy-feedback button.sel { border-color: #8a5cf6; background: #f3e8ff; }
#fb-note {
  flex: 1; min-width: 0; font-size: 16px; padding: 10px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; font-family: inherit;
}
#fb-send {
  border: none; background: #22a06b; color: #fff;
  font-size: 16px; font-weight: 800; padding: 8px 22px;
}
@media (max-width: 520px) {
  .easy-big span { font-size: 44px; }
  .easy-big { font-size: 16px; padding: 22px 8px; }
}
.mode {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

main {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
  padding: 18px;
  max-width: 1320px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

h1 { font-size: 22px; margin: 0 0 6px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.drag { border-color: var(--accent2); background: #eef5ff; }
.dz-icon { font-size: 34px; }
.dz-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }

.file-list { list-style: none; margin: 12px 0 0; padding: 0; text-align: left; }
.file-list li {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 6px 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; margin-top: 6px;
}
.file-list button {
  border: none; background: none; cursor: pointer; color: var(--accent); font-size: 16px;
}

.or { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 8px; }

textarea {
  width: 100%; resize: vertical; font-family: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  background: #fff;
}

.field-label {
  display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 600;
}
select#lang-select {
  width: 100%; padding: 10px; font-family: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.lang-note { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 14px; }

button.primary {
  width: 100%; margin-top: 14px; padding: 12px;
  background: var(--accent); color: #fff; border: none; border-radius: 12px;
  font-weight: 700; font-size: 15px; cursor: pointer;
}
button.primary:disabled { opacity: 0.6; cursor: default; }

.status { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 18px; }
.status.error { color: var(--accent); }

.upgrade-note {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.5; color: var(--ink);
}
.upgrade-note strong { color: var(--accent2); }
.upgrade-note a { color: var(--accent2); font-weight: 600; }
.upgrade-note.claude-on { background: #eefaf2; border-color: #bfe6cd; }

.usage-line { font-size: 12.5px; color: var(--muted); margin-top: 8px; min-height: 16px; }

.limit-panel {
  margin-top: 12px; padding: 14px; border-radius: 12px;
  background: #fff7ed; border: 1px solid #f4d3a8; font-size: 13px; line-height: 1.5;
}
.limit-panel strong { color: var(--accent); }
.limit-panel .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.limit-panel button {
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--ink);
  background: #fff; font-weight: 600; cursor: pointer; font-size: 13px;
}
.limit-panel button.soon { opacity: 0.55; cursor: default; border-style: dashed; }

.byok { margin-top: 12px; }
.link-btn {
  background: none; border: none; padding: 0; color: var(--accent2);
  font: inherit; font-weight: 600; cursor: pointer; font-size: 13px;
}
.byok-body { margin-top: 10px; }
.byok-help { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0 0 8px; }
.byok-help a { color: var(--accent2); }
.byok-row { display: flex; gap: 8px; }
.byok-row input {
  flex: 1; padding: 9px 10px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.byok-row button {
  padding: 9px 14px; border-radius: 9px; border: none; background: var(--accent2);
  color: #fff; font-weight: 600; cursor: pointer;
}
.byok-status { font-size: 12.5px; margin-top: 8px; color: var(--ink); }
.byok-status.active { color: #22a06b; font-weight: 600; }

.stage-panel { display: flex; flex-direction: column; }
.stage-wrap {
  position: relative; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  /* plain whiteboard — no ruled lines */
}
#stage { width: 100%; height: auto; display: block; }
.stage-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-family: 'Caveat', cursive; font-size: 26px;
}

.controls {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap;
}
.controls button {
  padding: 8px 16px; border: 1px solid var(--ink); background: #fff;
  border-radius: 10px; font-weight: 600; cursor: pointer;
}
.controls button:disabled { opacity: 0.5; cursor: default; }
.toggle { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.scene-counter { margin-left: auto; color: var(--muted); font-size: 13px; }

.narration-strip {
  margin-top: 14px; min-height: 60px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  font-family: 'Caveat', cursive; font-size: 22px; line-height: 1.3; color: var(--ink);
}

/* SVG handwriting. Caveat covers Latin; other scripts fall back per-glyph to
   a system font so CJK / Arabic / Devanagari etc. still render. */
.doodle-text { font-family: 'Caveat', 'Segoe Print', system-ui, sans-serif; fill: var(--ink); font-weight: 700; }
.doodle-title { font-family: 'Caveat', 'Segoe Print', system-ui, sans-serif; font-weight: 700; fill: var(--ink); }
.doodle-accent { fill: var(--accent); }

/* ============================================================================
   Native feel (Testers Community rec #3)
   Small touches that remove the "website in a frame" feeling: instant taps
   (no double-tap zoom wait), no blue tap flash, no rubber-band pull at the
   top of the page, and no accidental text-selection when tapping buttons.
   ========================================================================== */
html { overscroll-behavior-y: none; }
button, select, label, a.sheet-row {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.easy-big, .easy-replay, .easy-icon-btn, .easy-toggle, .tour-btns button,
.sheet-row, .sheet-close, .easy-voice {
  user-select: none;
  -webkit-user-select: none;
}

/* Clear keyboard focus for accessibility — without touching the tap look. */
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent2);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Gentler spinner for people who asked their phone for less motion. */
@media (prefers-reduced-motion: reduce) {
  .easy-loading .spin { animation-duration: 2.2s; }
}

/* ---- Top-row round icon buttons (🌙 dark mode, ❓ help) -------------------- */
.easy-top-right { display: flex; align-items: center; gap: 10px; }
.easy-icon-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--line); background: #fff;
  font-size: 21px; line-height: 1; cursor: pointer;
}
.easy-icon-btn:active { transform: scale(0.94); }

/* ============================================================================
   🎓 First-time walkthrough (Testers Community rec #2)
   ========================================================================== */
#tour-scrim {
  position: fixed; inset: 0; z-index: 220;
  background: rgba(10, 13, 22, 0.62);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 18px;
}
.tour-card {
  width: 100%; max-width: 430px;
  background: var(--paper); border: 2px solid var(--line); border-radius: 22px;
  padding: 22px 22px 18px; text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  margin-bottom: 6vh;
}
#tour-icon { font-size: 54px; line-height: 1; }
#tour-text {
  font-size: 19px; line-height: 1.45; font-weight: 600; margin: 12px 0 4px;
  min-height: 84px;
}
#tour-dots { display: flex; gap: 7px; justify-content: center; margin: 10px 0 14px; }
.tdot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line); display: inline-block;
}
.tdot.on { background: var(--accent); }
.tour-btns { display: flex; gap: 12px; }
#tour-skip {
  flex: 0 0 auto; padding: 13px 20px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: transparent; color: var(--muted);
  font-size: 16px; font-weight: 700;
}
#tour-next {
  flex: 1; padding: 13px 20px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 18px; font-weight: 800;
}
/* The element the current step talks about glows ABOVE the dark screen. */
.tour-glow {
  position: relative; z-index: 221;
  outline: 4px solid #ffd166; outline-offset: 4px; border-radius: 16px;
  animation: tourpulse 1.3s ease-in-out infinite;
}
@keyframes tourpulse {
  0%, 100% { outline-color: #ffd166; }
  50% { outline-color: #ff5a5f; }
}
@media (prefers-reduced-motion: reduce) { .tour-glow { animation: none; } }

/* ============================================================================
   ❓ Help sheet
   ========================================================================== */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(10, 13, 22, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 14px;
}
.sheet-card {
  width: 100%; max-width: 460px;
  background: var(--paper); border: 2px solid var(--line);
  border-radius: 22px; padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  margin-bottom: 4vh; max-height: 86vh; overflow: auto;
}
.sheet-title { margin: 0 0 4px; font-size: 20px; }
.sheet-row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--line); background: #fff; color: var(--ink);
  font-size: 17px; font-weight: 700; text-align: left; text-decoration: none;
  font-family: inherit;
}
.sheet-row:active { transform: scale(0.98); }
.sr-icon { font-size: 26px; line-height: 1; }
.sheet-close {
  margin-top: 4px; padding: 12px; border-radius: 999px; cursor: pointer;
  border: none; background: var(--ink); color: #fff; font-size: 16px; font-weight: 800;
}
.sheet-note { font-size: 13px; color: var(--muted); margin: 2px 4px; line-height: 1.5; }
#whats-new {
  margin: 0; padding: 6px 12px 6px 30px;
  background: #fff7e2; border: 2px dashed #f2c14e; border-radius: 14px;
  font-size: 15.5px; line-height: 1.7;
}

/* ============================================================================
   🌙 Dark mode (Testers Community rec #4) — owner chose: the board goes dark
   too, like a chalkboard. The board is flipped with a color filter, so the
   same drawings stay readable; PDFs and shared pictures stay white for print.
   ========================================================================== */
:root[data-theme='dark'] { color-scheme: dark; }
[data-theme='dark'] body { background: #12141d; color: #e9ecf5; }

/* The whiteboard becomes a chalkboard (colors keep their hue). */
[data-theme='dark'] .easy-stage-wrap,
[data-theme='dark'] .stage-wrap {
  filter: invert(0.93) hue-rotate(180deg);
}

/* Top row */
[data-theme='dark'] #easy-lang,
[data-theme='dark'] select,
[data-theme='dark'] textarea,
[data-theme='dark'] #ask-input,
[data-theme='dark'] #fb-note,
[data-theme='dark'] input[type='text'],
[data-theme='dark'] input[type='email'],
[data-theme='dark'] input[type='password'] {
  background: #1c2130; color: #e9ecf5; border-color: #3a4158;
}
[data-theme='dark'] ::placeholder { color: #8a92ac; }
[data-theme='dark'] .easy-icon-btn { background: #1c2130; border-color: #3a4158; }
[data-theme='dark'] .easy-link { color: #9aa3c0; }

/* Big input buttons keep their bright borders — nice pop on dark. */
[data-theme='dark'] .easy-big { background: #1c2130; color: #e9ecf5; }
[data-theme='dark'] #easy-camera { background: #14202f; }
[data-theme='dark'] #easy-file { background: #2a191d; }
[data-theme='dark'] #easy-paste { background: #221a33; }

[data-theme='dark'] .easy-status { color: #e9ecf5; }
[data-theme='dark'] .easy-feedback button { background: #1c2130; border-color: #3a4158; color: #e9ecf5; }
[data-theme='dark'] .easy-feedback button.sel { background: #2b2444; border-color: #8a5cf6; }

/* Sheets, tour & what's-new on dark */
[data-theme='dark'] .tour-card,
[data-theme='dark'] .sheet-card { background: #171b28; border-color: #3a4158; }
[data-theme='dark'] .sheet-row { background: #1c2130; border-color: #3a4158; color: #e9ecf5; }
[data-theme='dark'] .sheet-close { background: #e9ecf5; color: #12141d; }
[data-theme='dark'] #tour-skip { border-color: #3a4158; color: #9aa3c0; }
[data-theme='dark'] .tdot { background: #3a4158; }
[data-theme='dark'] #whats-new { background: #241f10; border-color: #7a6224; }

/* Advanced view on dark */
[data-theme='dark'] .panel { background: #171b28; border-color: #262d42; }
[data-theme='dark'] .sub, [data-theme='dark'] .dz-hint, [data-theme='dark'] .or,
[data-theme='dark'] .lang-note, [data-theme='dark'] .status,
[data-theme='dark'] .usage-line, [data-theme='dark'] .byok-help,
[data-theme='dark'] .sheet-note { color: #9aa3c0; }
[data-theme='dark'] .dropzone { border-color: #3a4158; }
[data-theme='dark'] .dropzone.drag { background: #14202f; }
[data-theme='dark'] .file-list li { background: #1c2130; border-color: #3a4158; }
[data-theme='dark'] .upgrade-note { background: #1c2130; border-color: #3a4158; color: #e9ecf5; }
[data-theme='dark'] .upgrade-note.claude-on { background: #142519; border-color: #2b5c3c; }
[data-theme='dark'] .limit-panel { background: #241d10; border-color: #6b5426; color: #e9ecf5; }
[data-theme='dark'] .controls button { background: #1c2130; border-color: #8b93ad; color: #e9ecf5; }
[data-theme='dark'] .narration-strip { background: #1c2130; border-color: #3a4158; color: #e9ecf5; }
[data-theme='dark'] .byok-status { color: #e9ecf5; }

/* ==========================================================================
   📖 Whole-book albums (album.js) — its own overlay beside the Easy flow.
   ========================================================================== */
#album-root { position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: #fcfbf7; padding: 14px 14px 40px; }
body.alb-open { overflow: hidden; }
.alb-wrap { max-width: 860px; margin: 0 auto; }
.alb-bar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  gap: 8px; margin-bottom: 10px; }
.alb-title { text-align: center; font-weight: 800; font-size: 18px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alb-x { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--ink);
  background: #fff; font-size: 18px; cursor: pointer; color: var(--ink); }
.alb-blurb { color: var(--ink); font-size: 15.5px; line-height: 1.6; }
.alb-primary { display: block; width: 100%; margin: 14px 0; padding: 18px;
  border: 3px solid var(--ink); border-radius: 18px; background: #ffd166;
  color: #1f2430; font-size: 18px; font-weight: 800; cursor: pointer; }
.alb-primary[disabled] { opacity: 0.45; cursor: not-allowed; }
.alb-ok, .alb-lock, .alb-err, .alb-note { border: 2px dashed var(--ink);
  border-radius: 14px; padding: 10px 14px; font-size: 14.5px; color: var(--ink);
  margin: 10px 0; }
.alb-err { border-style: solid; }
.alb-link { background: none; border: none; color: #2b6cb0; font-size: 14.5px;
  cursor: pointer; padding: 4px 0; text-decoration: underline; }
.alb-keyrow { display: flex; gap: 8px; margin-top: 8px; }
.alb-keyrow input { flex: 1; padding: 10px 12px; border: 2px solid var(--ink);
  border-radius: 10px; font-size: 14px; }
.alb-keyrow button { padding: 10px 16px; border-radius: 10px; border: none;
  background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; }
.alb-sub { font-weight: 800; margin: 16px 0 8px; color: var(--ink); }
.alb-mine { display: grid; gap: 8px; }
.alb-book { text-align: left; border: 2px solid var(--ink); background: #fff;
  border-radius: 14px; padding: 10px 14px; cursor: pointer; display: grid; gap: 2px; }
.alb-book-t { font-weight: 800; color: var(--ink); }
.alb-book-m { font-size: 12.5px; color: #555f77; }
.alb-phase { font-family: 'Caveat', cursive; font-size: 22px; color: var(--ink);
  margin: 6px 0; min-height: 28px; }
.alb-barbg { height: 12px; border: 2px solid var(--ink); border-radius: 8px;
  overflow: hidden; background: #fff; margin-bottom: 14px; }
.alb-barfill { height: 100%; background: #22a06b; transition: width 0.6s; }
.alb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px; margin-top: 10px; }
.alb-card { text-align: left; border: 2px solid var(--ink); border-radius: 14px;
  background: #fff; padding: 12px; display: grid; gap: 4px; cursor: pointer;
  min-height: 92px; align-content: start; }
.alb-card[disabled] { opacity: 0.55; cursor: default; }
.alb-card.alb-cover { background: #ffd166; }
.alb-card.alb-cover .alb-card-t, .alb-card.alb-cover .alb-card-m { color: #1f2430; }
.alb-card-ico { font-size: 22px; }
.alb-card-t { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.alb-card-m { font-size: 12px; color: #555f77; }
.alb-pager { display: flex; justify-content: center; align-items: center; gap: 14px;
  margin: 16px 0; color: var(--ink); font-weight: 700; }
.alb-pager button { padding: 10px 18px; border-radius: 12px; border: 2px solid var(--ink);
  background: #fff; font-weight: 800; cursor: pointer; color: var(--ink); }
.alb-pager button[disabled] { opacity: 0.4; }
.alb-playwrap { position: fixed; inset: 0; z-index: 70; background: #fcfbf7;
  padding: 12px; overflow-y: auto; }
.alb-stagewrap { border: 3px solid var(--ink); border-radius: 16px;
  background: #fcfbf7; overflow: hidden; max-width: 960px; margin: 0 auto; }
.alb-stagewrap svg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.alb-ctl { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.alb-ctl button { padding: 12px 20px; border-radius: 12px; border: 2px solid var(--ink);
  background: #fff; font-weight: 800; font-size: 15px; cursor: pointer; color: var(--ink); }
.alb-voice { justify-self: end; font-size: 18px; color: var(--ink); }
.alb-narr { text-align: center; font-family: 'Caveat', cursive; font-size: 24px;
  color: var(--ink); min-height: 32px; padding: 4px 8px; }

/* Dark mode: same chalkboard trick as the main stage. */
[data-theme='dark'] #album-root, [data-theme='dark'] .alb-playwrap { background: #12141d; }
[data-theme='dark'] .alb-stagewrap { filter: invert(0.93) hue-rotate(180deg); border-color: #3a4158; }
[data-theme='dark'] .alb-x, [data-theme='dark'] .alb-book, [data-theme='dark'] .alb-card,
[data-theme='dark'] .alb-pager button, [data-theme='dark'] .alb-ctl button,
[data-theme='dark'] .alb-barbg { background: #1c2130; color: #e9ecf5; border-color: #3a4158; }
[data-theme='dark'] .alb-title, [data-theme='dark'] .alb-blurb, [data-theme='dark'] .alb-sub,
[data-theme='dark'] .alb-phase, [data-theme='dark'] .alb-narr, [data-theme='dark'] .alb-book-t,
[data-theme='dark'] .alb-card-t, [data-theme='dark'] .alb-ok, [data-theme='dark'] .alb-lock,
[data-theme='dark'] .alb-err, [data-theme='dark'] .alb-note,
[data-theme='dark'] .alb-pager, [data-theme='dark'] .alb-voice { color: #e9ecf5; border-color: #3a4158; }
[data-theme='dark'] .alb-book-m, [data-theme='dark'] .alb-card-m { color: #9aa3c0; }
[data-theme='dark'] .alb-card.alb-cover { background: #ffd166; }

/* ---- ⭐ Plus plan card (always-visible upsell) ---- */
.plus-card {
  border: 2px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fff8f8 100%);
  padding: 18px 20px; max-width: 560px; margin: 0 auto; width: 100%;
  box-shadow: 0 2px 0 var(--line);
}
.plus-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.plus-title { font-weight: 800; font-size: 22px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.plus-title span { color: var(--accent); }
.plus-price { font-size: 15px; font-weight: 700; color: var(--ink); }
.plus-perks { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 8px; }
.plus-perks li { position: relative; padding-left: 27px; font-size: 14.5px; color: var(--ink); line-height: 1.45; }
.plus-perks li::before {
  content: '\2713'; position: absolute; left: 0; top: 1px;
  color: #fff; background: var(--accent2); width: 18px; height: 18px;
  border-radius: 50%; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.plus-cta {
  width: 100%; padding: 13px 20px; border: none; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 800; cursor: pointer;
}
.plus-cta:active { transform: scale(0.98); }
.plus-soon { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.plus-sub { display: flex; gap: 8px; margin-top: 10px; }
.plus-sub input {
  flex: 1; padding: 11px 12px; border: 2px solid var(--line); border-radius: 12px;
  background: #fff; font-family: inherit; font-size: 15px; color: var(--ink);
}
.plus-sub button {
  padding: 11px 18px; border: none; border-radius: 12px; background: var(--accent2);
  color: #fff; font-weight: 800; font-size: 15px; cursor: pointer;
}
.plus-status { text-align: center; font-size: 12.5px; color: var(--accent2); margin-top: 8px; min-height: 16px; }
.plus-status.error { color: var(--accent); }

/* ⭐ Shown to subscribers in place of the Plus card. */
.plus-manage {
  max-width: 560px; margin: 12px auto 0; width: 100%;
  padding: 12px 16px; border-radius: 16px;
  border: 1px dashed var(--line); background: #fffdfd;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.plus-manage-txt { font-size: 14px; color: var(--ink); }
.plus-manage-btn {
  border: 0; background: transparent; color: var(--accent2);
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 6px 2px; text-decoration: underline;
}
.plus-manage-btn:active { transform: scale(0.98); }
[data-theme='dark'] .plus-manage { background: #171b28; border-color: #3a4158; }
[data-theme='dark'] .plus-manage-txt { color: #e9ecf5; }
[data-theme='dark'] .plus-card {
  background: linear-gradient(180deg, #171b28 0%, #1c1720 100%);
  border-color: #3a4158; box-shadow: 0 2px 0 #262d42;
}
[data-theme='dark'] .plus-title { color: #e9ecf5; }
[data-theme='dark'] .plus-price { color: #e9ecf5; }
[data-theme='dark'] .plus-perks li { color: #e9ecf5; }
[data-theme='dark'] .plus-soon { color: #9aa3c0; }
[data-theme='dark'] .plus-sub input { background: #1c2130; border-color: #3a4158; color: #e9ecf5; }
