/* =============================================================
   THE THRONE ROOM. Member vault for The Marabha Method.
   Same design language as marabhamethod.com: dark, gold, glass.
   ============================================================= */

:root {
  --bg: #07090d;
  --bg-raised: #0c1016;
  --bg-panel: rgba(18, 23, 32, 0.72);
  --line: rgba(212, 175, 55, 0.16);
  --line-soft: rgba(255, 255, 255, 0.07);
  --ink: #f4f1e8;
  --ink-dim: #a8a89f;
  --ink-faint: #6d6e68;
  --gold: #d4af37;
  --gold-soft: #e8c97a;
  --red: #e06c5b;
  --green: #6fbf8f;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { background: var(--bg); color: var(--ink); }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#root { max-width: 860px; margin: 0 auto; padding: 28px 20px 80px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(30px, 6vw, 44px); }
h2 { font-size: 22px; margin-bottom: 10px; }
h3 { font-size: 17px; }

p { color: var(--ink-dim); }
a { color: var(--gold-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }
.gold { color: var(--gold); }
.dim { color: var(--ink-faint); }

/* ---------- Shell ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.brand span { color: var(--gold); }
.topbar .who { font-size: 13px; color: var(--ink-faint); }
.topbar button { margin-left: 12px; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}
.card.gold-edge { border-color: var(--line); }

/* ---------- Auth / gate screens ---------- */
.gatewrap { max-width: 460px; margin: 8vh auto 0; text-align: center; }
.gatewrap h1 { margin-bottom: 10px; }
.gatewrap p { margin-bottom: 18px; }
.gatewrap .card { text-align: left; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--ink-faint); margin-bottom: 5px; letter-spacing: 0.06em; text-transform: uppercase; }
input[type="email"], input[type="password"], input[type="date"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  color: var(--ink);
  font: inherit;
  padding: 11px 13px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 200px; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; resize: vertical; }

button {
  font: inherit; font-weight: 600;
  background: var(--gold);
  color: #14100a;
  border: 0; border-radius: 9px;
  padding: 11px 18px;
  cursor: pointer;
}
button:hover { background: var(--gold-soft); }
button.ghost {
  background: transparent; color: var(--ink-dim);
  border: 1px solid var(--line-soft);
}
button.ghost:hover { color: var(--ink); border-color: var(--line); background: transparent; }
button.wide { width: 100%; }
button:disabled { opacity: 0.5; cursor: default; }

.msg { font-size: 14px; margin-top: 10px; min-height: 20px; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }

.switchline { font-size: 13px; color: var(--ink-faint); margin-top: 14px; text-align: center; }
.switchline a { cursor: pointer; }

/* ---------- Sealed screen ---------- */
.sealed { text-align: center; padding: 48px 24px; }
.sealed .glyph { font-size: 52px; margin-bottom: 14px; }
.sealed h1 { margin-bottom: 12px; }
.sealed p { max-width: 420px; margin: 0 auto 22px; }

/* ---------- Day counter ---------- */
.daybox { display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap; }
.daynum { font-family: var(--font-display); font-size: 56px; font-weight: 700; color: var(--gold); line-height: 1; }
.daymeta { font-size: 14px; color: var(--ink-dim); }
.progress { height: 6px; background: var(--bg-raised); border-radius: 3px; margin-top: 16px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 3px; }

/* ---------- Unlock timeline ---------- */
.timeline { list-style: none; }
.timeline li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.timeline li:last-child { border-bottom: 0; }
.tl-day {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint);
  min-width: 62px;
}
.tl-name { flex: 1; font-weight: 600; font-size: 15px; }
.tl-file { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.tl-state { font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.05em; }
.tl-state.open { color: var(--green); }
.tl-state.locked { color: var(--ink-faint); }
.tl-state.done { color: var(--gold); }

/* ---------- Vault slots ---------- */
.slot { margin-bottom: 14px; }
.slot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.slot-head h3 { display: flex; gap: 10px; align-items: baseline; }
.slot-file { font-family: var(--font-mono); font-size: 12px; color: var(--gold); }
.slot-body { margin-top: 14px; }
.slot pre {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: 9px; padding: 14px; max-height: 420px; overflow: auto;
  color: var(--ink-dim);
}
.slot .actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.scorefield { display: flex; align-items: center; gap: 8px; }
.scorefield input { width: 84px; }
.scorefield label { font-size: 12px; color: var(--ink-faint); }

/* ---------- Score bars ---------- */
.bars { display: flex; gap: 14px; align-items: flex-end; height: 130px; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; max-width: 56px; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); border-radius: 6px 6px 0 0; min-height: 3px; }
.bar.empty i { background: var(--bg-raised); border: 1px dashed var(--line-soft); }
.bar b { font-family: var(--font-mono); font-size: 12px; color: var(--ink); font-weight: 500; }
.bar span { font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; text-align: center; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--ink-dim); border: 1px solid var(--line-soft); padding: 8px 16px; font-size: 14px; }
.tabs button.on { background: var(--gold); color: #14100a; border-color: var(--gold); }

/* ---------- Admin ---------- */
.radio-row { display: flex; gap: 18px; margin: 10px 0; font-size: 14px; color: var(--ink-dim); }
.radio-row label { display: flex; gap: 6px; align-items: center; cursor: pointer; }

@media (max-width: 560px) {
  .daynum { font-size: 44px; }
  .bars { height: 100px; }
}
