/* ============================================================
   RARA v2 — Apple-grade design system.
   Light-first, dark toggle. System fonts only. Zero dependencies.
   See DESIGN.md for tokens and rationale.
   ============================================================ */

:root {
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .3, 1);

  --bg: #fbfbfd;
  --bg2: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --dim: #6e6e73;
  --faint: #aeaeb2;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, .12);
  --gold: #8a6d1f;
  --gold-soft: #f7f0dd;
  --gold-line: #e4d5ac;
  --saved: #e5486f;
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, .12);
  --header-bg: rgba(251, 251, 253, .8);
  --dbar-bg: rgba(255, 255, 255, .85);
}

[data-theme="dark"] {
  --bg: #000000;
  --bg2: #0a0a0c;
  --card: #161617;
  --ink: #f5f5f7;
  --dim: #a1a1a6;
  --faint: #6e6e73;
  --line: #2c2c2e;
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, .18);
  --gold: #d4af6a;
  --gold-soft: #241c0c;
  --gold-line: #4a3a18;
  --shadow: 0 2px 12px rgba(0, 0, 0, .4);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, .55);
  --header-bg: rgba(0, 0, 0, .72);
  --dbar-bg: rgba(22, 22, 23, .88);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .25s var(--ease), color .25s var(--ease);
}
::selection { background: var(--gold); color: #fff; }
img { display: block; max-width: 100%; }
button { font-family: var(--sans); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px;
  font-size: 14px; text-decoration: none;
}
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 28px;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.logo {
  width: 34px; height: 34px; display: grid; place-items: center;
  font-size: 17px; color: #fff; background: var(--ink); border-radius: 50%;
}
.brandtext strong { display: block; font-size: 17px; font-weight: 700; letter-spacing: 3px; line-height: 1.1; }
.brandtext small { display: block; font-size: 10.5px; color: var(--dim); letter-spacing: 1.4px; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 8px; }

.exa {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--dim); letter-spacing: .4px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); margin-right: 2px; white-space: nowrap;
}
.exa i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.exa.live { color: var(--ink); }
.exa.live i { background: #30d158; box-shadow: 0 0 6px #30d158; }

.iconbtn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 16px; cursor: pointer; transition: all .22s var(--ease);
}
.iconbtn:hover { border-color: var(--faint); transform: translateY(-1px); }

/* ---------- buttons ---------- */
.btn {
  font-size: 14px; font-weight: 500; letter-spacing: -.01em;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  transition: all .22s var(--ease); white-space: nowrap;
}
.btn:hover { border-color: var(--faint); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 8px 20px var(--accent-soft); }
.btn.big { padding: 14px 28px; font-size: 15px; }
.btn.ghost.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost b { font-weight: 700; }

/* ---------- hero ---------- */
.hero { max-width: 900px; margin: 0 auto; padding: 88px 24px 8px; text-align: center; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -.025em;
  line-height: 1.06; margin: 0 0 18px;
}
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--gold); }
.hero .sub { color: var(--dim); font-size: 17px; max-width: 620px; margin: 0 auto 34px; line-height: 1.6; }

.searchrow { display: flex; gap: 12px; max-width: 660px; margin: 0 auto; }
.searchwrap {
  position: relative; flex: 1; display: flex; align-items: center;
}
.sicon {
  position: absolute; left: 20px; font-size: 20px; color: var(--faint); pointer-events: none;
}
#search {
  width: 100%; font-size: 17px; padding: 16px 48px 16px 52px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); transition: border-color .22s var(--ease), box-shadow .22s var(--ease);
  -webkit-appearance: none; appearance: none;
}
#search::placeholder { color: var(--faint); }
#search:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sclear {
  position: absolute; right: 8px; width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg2); color: var(--dim); font-size: 17px;
  cursor: pointer; display: grid; place-items: center; transition: all .2s var(--ease);
}
.sclear[hidden] { display: none; }
.sclear:hover { background: var(--line); color: var(--ink); }

.hint { font-size: 13px; color: var(--faint); margin: 14px 0 0; }
.hint kbd {
  font-family: var(--sans); font-size: 12px; background: var(--bg2);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px;
}

.controls {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  max-width: 1060px; margin: 34px auto 0; flex-wrap: wrap;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 14px; font-weight: 500; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--dim);
  transition: all .22s var(--ease);
}
.chip i { font-style: normal; opacity: .55; margin-left: 5px; font-size: 12.5px; }
.chip:hover { color: var(--ink); background: var(--bg2); }
.chip.active { background: var(--ink); color: var(--bg); font-weight: 600; }
.chip.active i { opacity: .65; }
.sort { font-size: 14px; color: var(--dim); display: flex; gap: 10px; align-items: center; }
.sort select {
  font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; cursor: pointer; transition: border-color .2s;
}
.sort select:hover { border-color: var(--faint); }

/* ---------- grid ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 30px 24px 80px; }
.count {
  font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); margin: 4px 2px 18px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}
.card:hover, .card:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.card .frame { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg2); }
.card .frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .frame img { transform: scale(1.045); }
.art-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.art-fallback span { font-family: var(--serif); font-size: 110px; color: rgba(255,255,255,.22); }

.rarity {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  min-width: 56px; height: 56px; padding: 0 8px;
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
  background: rgba(10, 10, 12, .55); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1.5px solid var(--gold); border-radius: 50%;
  font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rarity small { font-size: 10px; font-weight: 500; opacity: .8; }

.heart {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .75); border: none; cursor: pointer; padding: 0;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .18s var(--ease);
}
[data-theme="dark"] .heart { background: rgba(10, 10, 12, .55); }
.heart:hover { transform: scale(1.12); }
.heart:active { transform: scale(.94); }
.heart svg path { fill: none; stroke: #1d1d1f; stroke-width: 1.8; transition: all .18s var(--ease); }
[data-theme="dark"] .heart svg path { stroke: #f5f5f7; }
.heart.on svg path { fill: var(--saved); stroke: var(--saved); }
.heart.pop svg { animation: pop .3s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }

.cat {
  position: absolute; bottom: 14px; left: 14px; z-index: 2;
  font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
  color: #fff; background: rgba(10, 10, 12, .5); padding: 7px 13px; border-radius: 999px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .25);
}
.card .cardbody { padding: 20px 22px 22px; }
.card h3 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; margin: 0 0 6px; }
.card .tagline {
  color: var(--dim); font-size: 14px; margin: 0 0 16px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta { display: flex; justify-content: space-between; align-items: center; }
.price { font-size: 16px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.viewlink { font-size: 14px; font-weight: 500; color: var(--accent); }
.card:hover .viewlink { text-decoration: underline; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 90px 24px; }
.empty-title { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; }
.empty .dim { color: var(--dim); font-size: 15px; margin: 0 0 26px; line-height: 1.6; }
.empty .br { display: none; }
@media (min-width: 560px) { .empty .br { display: initial; } }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 24px 48px; text-align: center; }
.fbrand { font-size: 14px; font-weight: 700; letter-spacing: 2px; margin: 0 0 10px; color: var(--ink); }
footer .dim { color: var(--dim); font-size: 13px; margin: 6px auto; max-width: 560px; }
footer code { font-size: 12.5px; color: var(--gold); background: var(--gold-soft); padding: 2px 7px; border-radius: 6px; }

/* ---------- overlays / sheets ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 4vh 20px; overflow-y: auto;
  animation: fade .2s var(--ease);
}
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }

.sheet {
  background: var(--bg); border-radius: 22px; width: 100%; max-width: 860px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3); overflow: hidden;
  animation: rise .28s var(--ease); position: relative;
}
.sheet.narrow { max-width: 560px; }
@keyframes rise { from { transform: translateY(22px); opacity: 0; } }

.dbar-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; position: sticky; top: 0; z-index: 5;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.backlink {
  background: none; border: none; color: var(--accent); font-size: 15px; font-weight: 500;
  cursor: pointer; padding: 8px 4px;
}
.backlink:hover { text-decoration: underline; }

/* ---------- detail ---------- */
.dhero { position: relative; aspect-ratio: 16/8; overflow: hidden; background: var(--bg2); }
.dhero img { width: 100%; height: 100%; object-fit: cover; }
.dbody { max-width: 700px; margin: 0 auto; padding: 36px 28px 8px; }
.deyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--gold); margin: 0 0 12px;
}
.dbody h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; margin: 0 0 10px; }
.dtag { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--dim); margin: 0 0 26px; line-height: 1.5; }

.specs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 20px 0; margin: 0 0 34px;
}
.spec .k { font-size: 11px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.spec .v { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.spec .v.gold { color: var(--gold); }
.meter { height: 6px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin: -22px 0 34px; }
.meter div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), #e8c876); }

.dbody section { margin: 0 0 30px; }
.dbody h2.sec { font-size: 22px; font-weight: 700; letter-spacing: -.015em; margin: 0 0 10px; }
.dbody section p { margin: 0; font-size: 16.5px; line-height: 1.7; color: var(--ink); opacity: .92; }

.callout {
  background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 16px;
  padding: 20px 22px; margin: 0 0 30px;
}
.callout .k { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.callout p { margin: 0; font-size: 15px; line-height: 1.65; }

.dfoot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 8px 0 40px; }
.dfoot .pnote { color: var(--dim); font-size: 13px; flex: 1; min-width: 150px; }

/* sticky mobile save bar */
.dbar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--dbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.dbar[hidden] { display: none; }
.dbar-price { font-size: 17px; font-weight: 700; color: var(--gold); }
.dbar-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- contribute ---------- */
.cbody { padding: 8px 34px 38px; }
.cbody h2 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
.cbody > .dim { font-size: 15px; color: var(--dim); margin: 0 0 24px; }
#contribForm { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.finline { font-weight: 400; color: var(--faint); }
.field input, .field textarea, .field select {
  font-size: 15px; font-weight: 400; padding: 12px 15px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-family: var(--sans); width: 100%; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- bulk import ---------- */
.bulkrow { font-size: 14px; margin: 18px 0 0; }
.dim.small { font-size: 13px; margin: 14px 0 0; }
.linklike { background: none; border: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linklike:hover { filter: brightness(1.1); }
#bulkPane:not([hidden]) { display: grid; gap: 16px; margin-top: 4px; }
#bulkJson { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; min-height: 180px; }
.bulk-errors { padding: 12px 14px; border-radius: 12px; background: rgba(214, 69, 65, 0.09); color: #b3261e; font-size: 13px; line-height: 1.55; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 16px); z-index: 100;
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500;
  padding: 12px 22px; border-radius: 999px; box-shadow: var(--shadow-hover);
  opacity: 0; pointer-events: none; transition: all .25s var(--ease); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- noscript ---------- */
.noscript {
  max-width: 560px; margin: 80px auto; padding: 34px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .topbar { padding: 10px 16px; }
  .exa { display: none; }
  .brandtext small { display: none; }
  #savedBtn { padding: 8px 14px; }
  #addBtn { padding: 8px 13px; }
  #addBtn .addlabel { display: none; }
  .hero { padding: 56px 20px 4px; }
  .searchrow { flex-direction: column; }
  .btn.big { width: 100%; }
  .controls { flex-direction: column; align-items: stretch; margin-top: 26px; }
  .chips { justify-content: center; }
  .sort { justify-content: center; }
  main { padding: 24px 16px 64px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .specs { grid-template-columns: 1fr 1fr; }
  .spec:last-child { grid-column: 1 / -1; }
  .dbody { padding: 28px 20px 4px; }
  .dhero { aspect-ratio: 16/10; }
  .cbody { padding: 4px 22px 30px; }
  .row2 { grid-template-columns: 1fr; }
  .overlay { padding: 0; align-items: flex-end; }
  .sheet { border-radius: 22px 22px 0 0; max-height: 94vh; overflow-y: auto; }
  .sheet.narrow { max-height: 94vh; overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RARA v3 — the magic layer.
   Night surfaces for the oracle moments; everything else keeps
   the Apple-grade v2 system untouched.
   ============================================================ */

/* ---------- view tabs ---------- */
.viewtabs { display: flex; gap: 4px; background: var(--bg2); border-radius: 999px; padding: 4px; }
.vtab {
  font-size: 13.5px; font-weight: 500; padding: 8px 16px; border-radius: 999px;
  border: none; background: transparent; color: var(--dim); cursor: pointer;
  transition: all .22s var(--ease); white-space: nowrap;
}
.vtab:hover { color: var(--ink); }
.vtab.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.vtab[aria-pressed="true"] { color: var(--ink); }

/* ---------- night surfaces ---------- */
.night {
  background: radial-gradient(120% 100% at 50% 0%, #101426 0%, #05070f 55%, #020308 100%) !important;
  color: #f5f5f7 !important;
  position: relative;
}
/* film grain over night surfaces — barely-there texture */
.night::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/></filter><rect width="140" height="140" filter="url(%23n)"/></svg>');
}
.night > * { position: relative; z-index: 1; }
.nightov .dailysheet::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/></filter><rect width="140" height="140" filter="url(%23n)"/></svg>');
}
.night .eyebrow.light, .eyebrow.light { color: #d4af6a; }
.night h2, .night .dim.light { color: #f5f5f7; }
.night .dim.light { color: #a1a1a6; opacity: .9; }
.nightov { background: rgba(2, 3, 8, .72); }
.nightbar { background: rgba(5, 7, 15, .8); border-bottom: 1px solid rgba(255,255,255,.08); }
.nightbar .iconbtn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #f5f5f7; }

/* ---------- hero links ---------- */
.herolinks { display: flex; gap: 14px; justify-content: center; align-items: center; margin: 20px 0 0; }
.herolinks .dot { color: var(--faint); }
.linklike.big { font-size: 15px; font-weight: 500; }

/* ---------- deep scan ---------- */
.deepscanrow { display: flex; justify-content: center; margin: 34px 0 8px; }
.deepscanrow[hidden], #deepScanBtn[hidden] { display: none; }
#liveSection { margin-bottom: 8px; }
.livehead { display: flex; justify-content: space-between; align-items: center; margin: 6px 2px 16px; }
.livehead .eyebrow { margin: 0; }
.iconbtn.sm { width: 32px; height: 32px; font-size: 15px; }
.livebadge {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: #06281a; background: #7dffa8; padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25); white-space: nowrap;
}
.curatebtn {
  margin-top: 12px; width: 100%; font-size: 13.5px; font-weight: 600;
  padding: 10px 14px; border-radius: 12px; cursor: pointer;
  border: 1px dashed var(--gold-line); background: var(--gold-soft); color: var(--gold);
  transition: all .2s var(--ease);
}
.curatebtn:hover { background: var(--gold); color: #fff; border-style: solid; }
.scanbar { text-align: center; padding: 44px 20px; }
.scanbar p { color: var(--dim); font-size: 15px; margin: 18px 0 0; }
.scanbar b { color: var(--gold); }
.scanline {
  height: 3px; max-width: 420px; margin: 0 auto; border-radius: 99px;
  background: var(--bg2); overflow: hidden; position: relative;
}
.scanline span {
  position: absolute; inset: 0; width: 40%; border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: scan 1.2s var(--ease) infinite;
}
@keyframes scan { from { left: -40%; } to { left: 100%; } }
.shimmer { position: relative; overflow: hidden; }
.shimmer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(212,175,106,.18) 50%, transparent 70%);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- fingerprint ---------- */
.fp {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 26px 28px; margin: 4px 0 26px; box-shadow: var(--shadow);
}
.fp .eyebrow { margin-bottom: 6px; }
.fp h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.015em; }
.fp .taste { font-family: var(--serif); font-style: italic; color: var(--dim); font-size: 16px; margin: 0 0 18px; }
.fpbar { display: grid; grid-template-columns: 110px 1fr 44px; gap: 12px; align-items: center; margin: 8px 0; font-size: 13px; }
.fpbar .lbl { color: var(--dim); font-weight: 500; }
.fpbar .track { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.fpbar .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), #e8c876); transition: width .8s var(--ease); }
.fpbar .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--dim); }
.fptags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.fptag { font-size: 12.5px; padding: 6px 13px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold-line); }

/* ---------- constellation ---------- */
.starshead { text-align: center; padding: 72px 24px 30px; }
.starshead h2 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: -.025em; margin: 0 0 12px; }
.starshead p { font-size: 16px; line-height: 1.6; margin: 0 auto; max-width: 560px; }
.starswrap { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 24px 8px; }
#stars { width: 100%; height: 560px; display: block; border-radius: 24px; cursor: crosshair; background: #020308; }
.startip {
  position: absolute; pointer-events: none; z-index: 5;
  background: rgba(10, 12, 22, .92); color: #f5f5f7;
  border: 1px solid rgba(212, 175, 106, .4); border-radius: 12px;
  padding: 10px 14px; font-size: 13.5px; max-width: 260px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  transform: translate(-50%, calc(-100% - 14px)); white-space: nowrap;
}
.startip b { color: #d4af6a; }
.startip .tiprar { color: #a1a1a6; font-size: 12px; }
.starslegend { text-align: center; font-size: 13px; padding: 6px 0 60px; }
.starslegend .lg { font-size: 11px; margin: 0 2px 0 10px; }
.lg.textile { color: #d4af6a; } .lg.food { color: #7dffa8; } .lg.experience { color: #7ab8ff; }

/* ---------- oracle ---------- */
.oraclehead { text-align: center; padding: 72px 24px 40px; }
.oraclehead h2 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: -.025em; margin: 0 0 12px; }
.oraclehead p { font-size: 16px; margin: 0; }
.oraclebody { max-width: 680px; margin: 0 auto; padding: 10px 24px 90px; }
.ofield { margin: 0 0 30px; }
.olabel { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  font-size: 14px; font-weight: 500; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--dim);
  transition: all .22s var(--ease);
}
.pill:hover { color: var(--ink); border-color: var(--faint); }
.pill.active { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
#oracleWho {
  width: 100%; font-size: 16px; padding: 16px 18px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-family: var(--sans); resize: vertical; transition: border-color .2s, box-shadow .2s;
}
#oracleWho:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
#consultBtn { width: 100%; margin-top: 6px; }
.oracleout { margin-top: 36px; display: grid; gap: 18px; }
.oraclereading { text-align: center; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--dim); margin: 0 0 6px; line-height: 1.6; }
.orow {
  display: grid; grid-template-columns: 120px 1fr; gap: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 18px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease);
  text-align: left; width: 100%; color: inherit; font: inherit;
}
.orow:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.orow .oframe { border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--bg2); position: relative; }
.orow .oframe img { width: 100%; height: 100%; object-fit: cover; }
.orow h4 { margin: 2px 0 6px; font-size: 18px; letter-spacing: -.01em; }
.orow .why { font-size: 14px; color: var(--dim); line-height: 1.55; margin: 0 0 10px; }
.orow .onote { font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--gold); margin: 0 0 12px; line-height: 1.55; }
.copybtn {
  font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg2); color: var(--ink);
  transition: all .2s var(--ease);
}
.copybtn:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- daily ---------- */
.nightov .dailysheet {
  position: relative; width: 100%; max-width: 520px; border-radius: 26px; overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, #101426 0%, #05070f 60%, #020308 100%);
  border: 1px solid rgba(212, 175, 106, .25);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  animation: rise .4s var(--ease);
  max-height: 92vh; overflow-y: auto;
}
#dailyStars { position: absolute; inset: 0; width: 100%; height: 100%; }
.dailyinner { position: relative; padding: 44px 36px 36px; text-align: center; color: #f5f5f7; }
.streak { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: #d4af6a; margin: 0 0 20px; }
#dailyCard .card { text-align: left; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
#dailyCard .card .cardbody h3 { color: #f5f5f7; }
#dailyCard .card .tagline { color: #a1a1a6; }
#dailyCard .viewlink { color: #7ab8ff; }
.dailyactions { display: grid; gap: 10px; margin-top: 24px; }
.btn.ghostlight {
  background: transparent; border: 1px solid rgba(255,255,255,.2); color: #f5f5f7;
  font-size: 14px; font-weight: 500; padding: 12px 24px; border-radius: 999px; cursor: pointer;
  transition: all .22s var(--ease);
}
.btn.ghostlight:hover { border-color: rgba(255,255,255,.45); }

/* ---------- vibe ---------- */
.sheet.night { border: 1px solid rgba(212, 175, 106, .22); }
.vibebody { padding: 10px 34px 38px; color: #f5f5f7; }
.vh { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 18px; color: #f5f5f7; }
.vibebody .searchwrap input {
  width: 100%; font-size: 17px; padding: 16px 20px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #f5f5f7;
  font-family: var(--serif); font-style: italic;
}
.vibebody .searchwrap input::placeholder { color: #6e6e73; }
.vibebody .searchwrap input:focus { border-color: #d4af6a; box-shadow: 0 0 0 4px rgba(212,175,106,.15); }
.vibechips { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 20px; }
.vibechip {
  font-size: 13px; font-style: italic; font-family: var(--serif);
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.14); background: transparent; color: #a1a1a6;
  transition: all .2s var(--ease);
}
.vibechip:hover { color: #d4af6a; border-color: rgba(212,175,106,.5); }
#vibeGo { width: 100%; margin-top: 4px; }
.vibeout { margin-top: 26px; }
.reading {
  font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.65;
  color: #d4af6a; text-align: center; margin: 0 0 20px; min-height: 60px;
}
.reading .caret { display: inline-block; width: 2px; height: 1.1em; background: #d4af6a; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#vibeCard .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); text-align: left; }
#vibeCard .card .cardbody h3 { color: #f5f5f7; }
#vibeCard .card .tagline { color: #a1a1a6; }
#vibeCard .viewlink { color: #7ab8ff; }
.vibeactions { display: flex; gap: 10px; margin-top: 18px; }
.vibeactions .btn { flex: 1; }

/* ---------- settings ---------- */
#exaStatus { margin-top: 14px; }
#exaStatus.ok { color: #1a7f37; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .viewtabs { order: 3; width: 100%; justify-content: center; }
  .vtab { padding: 7px 13px; font-size: 12.5px; }
}
@media (max-width: 720px) {
  #stars { height: 440px; }
  .orow { grid-template-columns: 92px 1fr; gap: 14px; }
  .vibebody { padding: 6px 22px 30px; }
  .fpbar { grid-template-columns: 86px 1fr 36px; }
}

/* Quiet decision context beside the story. */
.fact-note { margin: 28px 0; padding: 20px 24px; border-left: 2px solid var(--gold); background: var(--gold-soft); border-radius: 0 12px 12px 0; }
.fact-note strong { font-family: var(--serif); font-size: 21px; font-weight: 400; }
.fact-note p { margin: 8px 0; }
.fact-note small { color: var(--dim); }
.orow .copybtn { background: transparent; font: inherit; cursor: pointer; }
.orow h4 .linklike { text-align: left; font: inherit; color: inherit; }
footer a { color: var(--dim); text-underline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.card-title { border: 0; padding: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
