/* ============================================================
   WILD ONEZ DAILY — STYLES  (black & gold, mobile-first)
   ============================================================ */
:root {
  --bg: #0d0b07;
  --bg-2: #141009;
  --panel: #1b160d;
  --panel-2: #221b10;
  --line: rgba(212,175,55,0.16);
  --line-soft: rgba(255,255,255,0.06);
  --gold: #d4af37;
  --gold-bright: #f0d36b;
  --ink: #e7e1d2;
  --ink-dim: #b6ad98;
  --ink-faint: #847c69;
  --green: #6bbf8a;
  --red: #d98a6b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.5;
  min-height: 100vh;
}
/* The journal's actual page texture (dark grain) + a warm gold glow from above */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: url("../assets/bg-grain.jpg") center/cover no-repeat;
  opacity: 0.55;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(1100px 520px at 50% -12%, rgba(212,175,55,0.16) 0%, rgba(13,11,7,0) 60%);
}
h1,h2,h3,h4 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; letter-spacing: 0.3px; margin: 0 0 .3em; }
a { color: var(--gold); }
button { font-family: inherit; cursor: pointer; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 8px; }
.boot-mark { font-family: "Cormorant Garamond", serif; font-size: 34px; letter-spacing: 6px; color: var(--gold); }
.boot-sub { color: var(--ink-faint); font-size: 13px; letter-spacing: 1px; }

/* ---------- layout shells ---------- */
.shell { max-width: 940px; margin: 0 auto; padding: 0 16px 120px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(13,11,7,0.92), rgba(13,11,7,0.7));
  border-bottom: 1px solid var(--line-soft);
}
.wordmark { font-family: "Cormorant Garamond", serif; font-size: 22px; letter-spacing: 4px; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.wordmark .flame { font-size: 18px; filter: saturate(1.2); }
.topbar .who { font-size: 12px; color: var(--ink-faint); text-align: right; }
.topbar .who b { color: var(--ink-dim); display: block; font-weight: 600; }

/* ---------- demo banner ---------- */
.demobar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  background: linear-gradient(90deg, rgba(212,175,55,0.10), rgba(212,175,55,0.04));
  border-bottom: 1px solid var(--line);
  padding: 8px 12px; font-size: 12.5px; color: var(--ink-dim);
}
.demobar b { color: var(--gold); }
.demobar button { margin-left: 4px; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card.glow { border-color: var(--line); position: relative; overflow: hidden; }
/* faint gold-glitter wash in the corner of hero cards */
.card.glow::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 160px; z-index: 0; pointer-events: none;
  background: url("../assets/gold-glitter.jpg") center/cover no-repeat; opacity: 0.10;
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at top right, #000 10%, transparent 70%);
}
.card.glow > * { position: relative; z-index: 1; }
.card h2 { font-size: 24px; }
.card .sub { color: var(--ink-faint); font-size: 13px; margin-top: -4px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- section heading ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: 2.5px; font-size: 11px; color: var(--gold); font-weight: 600; }
.muted { color: var(--ink-faint); }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  transition: transform .06s ease, border-color .2s, background .2s;
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #2a2007; border: none; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn.block { width: 100%; display: block; }
.btn.danger { color: var(--red); border-color: rgba(217,138,107,0.4); }

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field .lab { font-size: 13px; color: var(--ink-dim); font-weight: 600; margin-bottom: 6px; display: block; }
label.field .hint { font-size: 11.5px; color: var(--ink-faint); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; background: #0f0c07; border: 1px solid var(--line-soft); color: var(--ink);
  padding: 12px 14px; border-radius: 12px; font-size: 15px; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { resize: vertical; min-height: 70px; }

/* ---------- daily practice toggles ---------- */
.practice {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--bg-2); margin-bottom: 10px; cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s;
}
.practice:hover { border-color: var(--line); }
.practice.on { border-color: var(--gold); background: linear-gradient(90deg, rgba(212,175,55,0.10), rgba(212,175,55,0.02)); }
.practice .box {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink-faint);
  display: grid; place-content: center; flex: 0 0 auto; font-size: 15px; color: #2a2007;
}
.practice.on .box { background: var(--gold); border-color: var(--gold); }
.practice .txt b { display: block; font-size: 14.5px; }
.practice .txt span { font-size: 12px; color: var(--ink-faint); }

/* ---------- sliders ---------- */
.slider { margin-bottom: 16px; }
.slider .row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.slider .name { font-weight: 600; font-size: 14.5px; }
.slider .name small { color: var(--ink-faint); font-weight: 400; font-size: 11.5px; margin-left: 6px; }
.slider .val { font-family: "Cormorant Garamond", serif; font-size: 22px; color: var(--gold); min-width: 28px; text-align: right; }
.slider .desc { font-size: 12px; color: var(--ink-faint); margin-bottom: 8px; }
input[type=range] { width: 100%; -webkit-appearance: none; height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) var(--p,50%), #2a230f var(--p,50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold-bright); border: 3px solid #1b160d; box-shadow: 0 2px 6px rgba(0,0,0,.5); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--gold-bright); border: 3px solid #1b160d; cursor: pointer; }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px; text-align: center; }
.stat .n { font-family: "Cormorant Garamond", serif; font-size: 30px; color: var(--gold); line-height: 1; }
.stat .l { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
.stat .trend { font-size: 12px; margin-top: 4px; }
.trend.up { color: var(--green); } .trend.down { color: var(--red); } .trend.flat { color: var(--ink-faint); }

/* ---------- score ring ---------- */
.score-wrap { display: flex; align-items: center; gap: 18px; }
.ring { --val: 0; width: 96px; height: 96px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(var(--gold) calc(var(--val)*1%), #2a230f 0);
  display: grid; place-content: center; position: relative; }
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--panel); }
.ring .num { position: relative; font-family: "Cormorant Garamond", serif; font-size: 30px; color: var(--gold); }

/* ---------- chart frames ---------- */
.chartbox { position: relative; height: 240px; }
.chartbox.tall { height: 300px; }
.chartbox.short { height: 180px; }

/* ---------- roster (operator) ---------- */
.roster { display: grid; gap: 12px; }
.client-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px; cursor: pointer;
  transition: border-color .15s; }
.client-row:hover { border-color: var(--gold); }
.client-row .nm { font-weight: 600; font-size: 15.5px; }
.client-row .meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.client-row .right { text-align: right; }
.pill { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-soft); color: var(--ink-dim); }
.pill.live { color: var(--green); border-color: rgba(107,191,138,0.4); }
.pill.quiet { color: var(--red); border-color: rgba(217,138,107,0.4); }
.miniscore { font-family: "Cormorant Garamond", serif; font-size: 26px; color: var(--gold); }

/* ---------- bottom nav (client, mobile) ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex;
  background: rgba(13,11,7,0.95); backdrop-filter: blur(12px); border-top: 1px solid var(--line-soft); }
.tabbar a { flex: 1; text-align: center; padding: 10px 4px 14px; color: var(--ink-faint); text-decoration: none; font-size: 11px; }
.tabbar a .ic { display: block; font-size: 20px; margin-bottom: 2px; }
.tabbar a.active { color: var(--gold); }

/* ---------- auth ---------- */
.auth-wrap { max-width: 420px; margin: 6vh auto; padding: 0 18px; }
.auth-mark { text-align: center; margin-bottom: 22px; position: relative; padding-top: 8px; }
.auth-mark .m { font-family: "Cormorant Garamond", serif; font-size: 40px; line-height: 1.05; letter-spacing: 7px; color: var(--gold); position: relative; z-index: 1;
  text-shadow: 0 2px 18px rgba(212,175,55,0.35); }
.auth-mark .t { color: var(--ink-faint); letter-spacing: 3px; font-size: 11px; text-transform: uppercase; position: relative; z-index: 1; margin-top: 6px; }
/* the journal's gold-glitter, shimmering behind the wordmark */
.auth-mark::after {
  content: ""; display: block; height: 70px; margin: 10px auto 0; max-width: 340px;
  background: url("../assets/gold-glitter.jpg") center/cover no-repeat; opacity: 0.85;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 22%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 22%, transparent 70%);
}
.toggle-line { text-align: center; margin-top: 14px; font-size: 13px; color: var(--ink-faint); }
.toggle-line a { cursor: pointer; }
.err { color: var(--red); font-size: 13px; margin: 8px 0; min-height: 18px; }

/* ---------- misc ---------- */
.reflection { border-left: 2px solid var(--line); padding: 8px 0 8px 14px; margin: 10px 0; }
.reflection .when { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 1px; }
.reflection .q { font-size: 12px; color: var(--gold); margin-top: 6px; }
.reflection p { margin: 2px 0 0; font-size: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.saved-flash { color: var(--green); font-size: 13px; opacity: 0; transition: opacity .3s; }
.saved-flash.show { opacity: 1; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.back-link { background: none; border: none; color: var(--gold); font-size: 13px; padding: 0; margin-bottom: 12px; }
.tag-quote { font-family: "Cormorant Garamond", serif; font-size: 17px; color: var(--ink-dim); font-style: italic; }

/* ---------- journal-specific ---------- */
.commit-line { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  font-family: "Cormorant Garamond", serif; font-size: 18px; line-height: 1.5; color: var(--ink); margin-bottom: 10px; }
.commit-line b { color: var(--gold); }

.idchips { display: flex; flex-wrap: wrap; gap: 10px; }
.idchip { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim);
  padding: 10px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; font-family: "Cormorant Garamond", serif; letter-spacing: .5px; }
.idchip.on { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #2a2007; border-color: transparent; }

.action-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.action-row input { flex: 1; }
.action-row .num { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-content: center; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--gold); font-size: 13px; font-weight: 700; }
.abox { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; border: 2px solid var(--ink-faint);
  background: transparent; color: #2a2007; font-size: 16px; display: grid; place-content: center; }
.abox.on { background: var(--gold); border-color: var(--gold); }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { background: var(--panel-2); color: var(--ink-dim); border: none; padding: 11px 24px; font-weight: 600; font-size: 14px; }
.seg button.on { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #2a2007; }
.seg button + button { border-left: 1px solid var(--line); }

.thermo { position: relative; height: 26px; background: #2a230f; border-radius: 999px; overflow: hidden; border: 1px solid var(--line-soft); }
.thermo .fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); border-radius: 999px; transition: width .5s; }
.thermo .thermo-lbl { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: #2a2007; mix-blend-mode: luminosity; }

.affirm { text-align: center; font-family: "Cormorant Garamond", serif; font-size: 18px; font-style: italic;
  color: var(--gold); background: linear-gradient(90deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02));
  border-radius: 12px; padding: 16px; margin: 18px 0; line-height: 1.5; }
