/* vibe/vibe spotlight, shared by the public page and the admin page. Tokens are
   vibevibe.fun's html[data-theme=dark] set (checked 2026-10-20): #dff902 is the
   only accent, greys carry everything else, green is the site's progress and
   "up" colour, and red only ever means something failed. */

@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/instrumentsans-latin.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../assets/fonts/jetbrainsmono-latin.woff2') format('woff2'); }
@font-face { font-family: 'Clash Display'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/clashdisplay-500-latin.woff2') format('woff2'); }
@font-face { font-family: 'Clash Display'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/clashdisplay-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'Clash Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/clashdisplay-700-latin.woff2') format('woff2'); }

:root {
  --font-ui: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: "Clash Display", "Instrument Sans", -apple-system, sans-serif;

  --bg: #0c0e10;
  --bar: #101214;
  --panel: #0e1013;
  --card: #101214;
  --card-hi: #16191c;
  --well: #111417;
  --track: #22262b;
  --hairline: #24282c;
  --hairline-subtle: #1f2327;
  --input-border: #2a2f34;
  --button-border: #363c42;
  --stroke: #3a4046;
  --badge: #22262b;

  --ink: #f2f4f3;
  --body: #b7bdc0;
  --faint: #8a939b;
  --badge-ink: #9aa1a6;

  --yellow: #dff902;
  --yellow-hover: #ecff52;
  --on-yellow: #0c0f08;
  --yellow-tint: rgba(223, 249, 2, .10);
  --yellow-line: rgba(223, 249, 2, .38);
  --green: #5bd08a;
  --progress: #36bd6c;
  --green-tint: #16241b;
  --iris: #8b87d9;
  --amber: #e0b04e;
  --amber-tint: #2a2418;
  --err: #e07856;
  --err-tint: #2b1d18;

  --r-card: 12px;
  --r-control: 9px;
  --r-tag: 5px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-pop: 0 6px 24px rgba(0, 0, 0, .5);
  --maxw: 1240px;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(60% 40% at 80% -5%, rgba(223, 249, 2, .05), transparent 70%),
    radial-gradient(40% 30% at 5% 10%, rgba(223, 249, 2, .025), transparent 70%),
    var(--bg);
  color: var(--body);
  font: 400 14px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(223, 249, 2, .28); color: var(--ink); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar, as on vibevibe.fun ---------- */
.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 16px;
  background: rgba(16, 18, 20, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.bar-brand { display: inline-flex; align-items: center; flex: none; }
.bar-brand img { width: 100px; height: 27px; }
.bar-slash { font: 600 17px/1 var(--font-display); color: var(--yellow); letter-spacing: -.01em; flex: none; }
.bar-nav { display: flex; align-self: stretch; gap: 2px; margin-left: 10px; min-width: 0; overflow: hidden; }
.bar-nav a, .bar-nav button {
  display: inline-flex; align-items: center; padding: 0 12px; border: 0; background: none; cursor: pointer;
  font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--body); text-decoration: none; white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.bar-nav a:hover, .bar-nav button:hover { color: var(--ink); background: var(--card-hi); }
.bar-nav [aria-current="page"], .bar-nav [aria-selected="true"] { color: var(--ink); background: var(--badge); box-shadow: inset 0 -2px 0 var(--yellow); }
.bar-spacer { flex: 1; }
.bar-right { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 900px) { .bar-nav { display: none; } }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--r-control); border: 1px solid var(--button-border); background: var(--card);
  color: var(--ink); font: 600 12.5px/1 var(--font-ui); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, transform .12s;
}
.btn:hover { border-color: var(--stroke); background: var(--card-hi); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.hi { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); }
.btn.hi:hover { background: var(--yellow-hover); border-color: var(--yellow-hover); }
.btn.line { border-color: var(--yellow); }
.btn.mono { font: 600 11.5px/1 var(--font-mono); letter-spacing: .04em; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--body); }
.btn.ghost:hover { color: var(--ink); background: var(--card-hi); }
.btn.danger:hover { border-color: var(--err); color: var(--err); }

.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: var(--r-control);
  font: 500 11px/1 var(--font-mono); letter-spacing: .03em; color: var(--badge-ink);
  background: var(--well); border: 1px solid var(--hairline); white-space: nowrap;
}
.chip b { color: var(--ink); font-weight: 600; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 8px var(--yellow); animation: ping 2.2s var(--ease) infinite; }
.chip.off .dot { background: var(--faint); box-shadow: none; animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(223, 249, 2, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(223, 249, 2, 0); } }

.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--r-tag);
  border: 1px solid var(--hairline); background: var(--well);
  font: 600 10px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--badge-ink); white-space: nowrap;
}
.tag.hi { border-color: var(--yellow-line); background: var(--yellow-tint); color: var(--ink); }
.tag.ok { border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-tint); color: var(--green); }
.tag.warn { border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: var(--amber-tint); color: var(--amber); }
.tag.bad { border-color: color-mix(in srgb, var(--err) 45%, transparent); background: var(--err-tint); color: var(--err); }

.kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 10.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--yellow); }

.card { position: relative; min-width: 0; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 18px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { margin: 0; font: 600 15px/1.25 var(--font-ui); color: var(--ink); }
.card-sub { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--faint); }
.label { font: 600 10px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }

.nothing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px; padding: 18px; border: 1px dashed var(--hairline); border-radius: 10px; text-align: center; color: var(--faint); font-size: 13px; }
.nothing b { color: var(--body); font-size: 14px; }

.thumb { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--hairline-subtle); background: var(--well) center / cover no-repeat; object-fit: cover; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 22px; z-index: 90; display: grid; gap: 8px; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 11px 14px; border-radius: 10px; background: #272b31; border: 1px solid var(--stroke); color: var(--ink); font-size: 13px; box-shadow: var(--shadow-pop); animation: toast-in .3s var(--ease-out); pointer-events: auto; }
.toast.bad { border-color: color-mix(in srgb, var(--err) 55%, transparent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* sheets (dialogs) */
.sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(6, 8, 10, .68); backdrop-filter: blur(3px); animation: fade .2s ease; }
.sheet-box { width: min(440px, 100%); padding: 22px; border-radius: 14px; background: var(--card); border: 1px solid var(--hairline); box-shadow: var(--shadow-pop); animation: rise .28s var(--ease-out); }
.sheet-box h2 { margin: 0 0 6px; font: 600 22px/1.15 var(--font-display); color: var(--ink); }
.sheet-box p { margin: 0 0 14px; font-size: 13.5px; color: var(--body); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.sheet-box .sheet-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--hairline); border-left: 3px solid var(--yellow); background: var(--well); font-size: 13px; line-height: 1.45; color: var(--ink); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
