/* Majlis — shared theme. "Warm faded family album": deep espresso ink, cream
 * paper, brass gold, a muted teal that nods to the book's cover. Literary serif
 * display (system fonts only — nothing to fetch, works on spotty venue wifi). */

:root {
  --ink:        #14110d;   /* base background */
  --ink-2:      #1d1813;   /* raised surface */
  --ink-3:      #2a2219;   /* card / border-ish */
  --paper:      #f4ead6;   /* primary warm cream text */
  --paper-dim:  #cdbda2;   /* secondary text */
  --paper-faint:#9c8b73;   /* tertiary / captions */
  --gold:       #e0b354;   /* brass accent */
  --gold-deep:  #c9922f;
  --rose:       #c9704f;   /* terracotta accent */
  --teal:       #4f8f83;   /* cover-green nod (spectrum pole B, accents) */
  --line:       rgba(224,179,84,0.18);
  --line-soft:  rgba(244,234,214,0.10);
  --shadow:     0 18px 50px rgba(0,0,0,0.5);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, Cambria, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--paper);
  background:
    radial-gradient(1200px 800px at 50% -10%, rgba(224,179,84,0.10), transparent 60%),
    radial-gradient(900px 700px at 90% 110%, rgba(79,143,131,0.08), transparent 60%),
    var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* faint paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: 0.01em; }
a { color: var(--gold); }

.eyebrow {
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--gold); font-weight: 600;
}
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  color: var(--ink); background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border: none; border-radius: 14px; padding: 15px 22px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(201,146,47,0.28); transition: transform .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px) scale(0.995); }
.btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.btn.ghost {
  background: transparent; color: var(--paper); border: 1px solid var(--line);
  box-shadow: none; font-weight: 500;
}
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ── Quote block ─────────────────────────────────────────────────────── */
.quote {
  position: relative; font-family: var(--serif); color: var(--paper);
  line-height: 1.4; font-style: italic;
}
.quote::before {
  content: "\201C"; position: absolute; font-size: 3.2em; line-height: 1;
  color: var(--gold); opacity: 0.5; left: -0.06em; top: -0.34em;
}

/* ── Polaroid photo frame ────────────────────────────────────────────── */
.polaroid {
  background: #efe6d5; padding: 12px 12px 16px; border-radius: 4px;
  box-shadow: var(--shadow); transform: rotate(-1.4deg);
}
.polaroid img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.polaroid.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 18px;
  background: linear-gradient(160deg, #2a2219, #1a1510);
  color: var(--paper-faint); font-family: var(--serif); font-style: italic; font-size: 1.05rem;
  border: 1px dashed var(--line);
}
.polaroid.empty .ph-glyph { display: block; font-size: 1.8rem; opacity: 0.6; margin-bottom: 8px; font-style: normal; }

/* ── Result bars (choice distribution) ───────────────────────────────── */
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; margin: 10px 0; }
.bar-label { font-family: var(--serif); font-size: 1.05rem; grid-column: 1 / -1; }
.bar-track { grid-column: 1 / 2; height: 12px; border-radius: 999px; background: rgba(244,234,214,0.08); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.bar-pct { grid-column: 2 / 3; grid-row: 2; font-variant-numeric: tabular-nums; color: var(--paper-dim); font-size: 0.95rem; }
.bar-row.correct .bar-fill { background: linear-gradient(90deg, var(--teal), #6fb3a3); }
.bar-row.correct .bar-label::after { content: " ✓"; color: var(--teal); }

/* utility */
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.muted { color: var(--paper-dim); }
.faint { color: var(--paper-faint); }
.hidden { display: none !important; }
