/* ============================================================
   AetherSync · style.css
   Glassmorphic, dark-mode-first design system.
   ============================================================ */

/* ---- custom properties ---- */
:root {
  --bg-0: #04060b;
  --bg-1: #080d16;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-0: #eef3fb;
  --text-1: #aab4c6;
  --text-2: #6b7689;
  --cyan: #39d6ff;
  --cyan-soft: #7ae6ff;
  --green: #3dffb0;
  --gold: #ffd166;
  --danger: #ff6b81;
  --hue-strong: #c58cff;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow-card: 0 24px 70px rgba(0, 0, 0, 0.6);
  --font: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ---- base ---- */
body {
  font-family: var(--font);
  color: var(--text-0);
  background:
    radial-gradient(1200px 800px at 85% -8%,  rgba(57, 214, 255, 0.13), transparent 60%),
    radial-gradient(1100px 900px at -10% 25%,  rgba(197, 140, 255, 0.10), transparent 55%),
    radial-gradient(900px 700px at 30% 115%,  rgba(61, 255, 176, 0.07), transparent 55%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.56;
  -webkit-font-smoothing: antialiased;
}

/* ambient grid */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 78%);
  z-index: 0;
}

/* hero canvas overlay */
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}

#app { position: relative; z-index: 1; }
::selection { background: rgba(57, 214, 255, 0.28); }
a { color: var(--cyan-soft); text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
img { display: block; }

/* ---- glass ---- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* ---- frosted label ---- */
.frost-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan-soft);
}

/* ---- badges ---- */
.badge-cyan, .badge-green, .badge-gold, .badge-dim {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-cyan  { color: var(--cyan-soft);   border-color: rgba(57,214,255,0.35); background: rgba(57,214,255,0.09); }
.badge-green { color: var(--green);        border-color: rgba(61,255,176,0.35); background: rgba(61,255,176,0.09); }
.badge-gold  { color: var(--gold);         border-color: rgba(255,209,102,0.4); background: rgba(255,209,102,0.09); }
.badge-dim   { color: var(--text-1);       border-color: var(--glass-border);   background: rgba(255,255,255,0.04); }

/* ---- buttons ---- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 14px;
  border: 1px solid transparent;
  font-size: 15.5px; font-weight: 700; letter-spacing: 0.01em;
  cursor: pointer; color: #04111a;
  background: linear-gradient(120deg, var(--cyan), var(--green));
  background-size: 180% 180%;
  box-shadow: 0 8px 28px rgba(57,214,255,0.28), 0 4px 16px rgba(61,255,176,0.18);
  transition: transform .18s ease, box-shadow .25s ease, background-position .55s ease;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px) scale(1.015); background-position: 100% 50%; box-shadow: 0 16px 44px rgba(57,214,255,0.4), 0 8px 24px rgba(61,255,176,0.25); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn .icon { font-size: 1.05em; }

.btn--ghost {
  background: rgba(255,255,255,0.05); border-color: var(--glass-border);
  color: var(--text-0); box-shadow: none;
}
.btn--ghost:hover { background: rgba(255,255,255,0.10); box-shadow: none; }
.btn--sm { padding: 9px 15px; font-size: 13px; border-radius: 11px; }
.btn--block { width: 100%; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 12px; z-index: 50;
  margin: 14px auto 0; width: min(1200px, 94%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; border-radius: 18px;
}
.nav .brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(57,214,255,.22), rgba(61,255,176,.16));
  border: 1px solid rgba(57,214,255,.4); color: var(--cyan-soft);
  font-size: 16px; box-shadow: 0 0 24px rgba(57,214,255,.35);
}
.brand-sub { font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--text-2); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* ---- hero ---- */
.hero {
  position: relative; overflow: hidden;
  padding: 90px 24px 64px; text-align: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid rgba(57,214,255,.3); background: rgba(57,214,255,.07);
  color: var(--cyan-soft); font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600;
  box-shadow: 0 0 30px rgba(57,214,255,.12) inset;
}
.hero h1 {
  margin: 26px auto 18px;
  font-size: clamp(40px, 7.2vw, 78px); line-height: 1.01; letter-spacing: -.03em;
  max-width: 15ch;
  background: linear-gradient(120deg, #ffffff 15%, var(--cyan-soft) 52%, var(--green) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 40px rgba(57,214,255,.22));
}
.hero .lede {
  margin: 0 auto 36px; max-width: 58ch;
  color: var(--text-1); font-size: clamp(16px, 2vw, 19px); line-height: 1.68;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .trust { margin-top: 26px; display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; color: var(--text-2); font-size: 13px; }
.hero .trust i { color: var(--green); margin-right: 6px; }
.hero .sync-squiggle { margin: 36px auto 0; max-width: 780px; display: block; }

/* ---- card ---- */
.card { padding: 30px; border-radius: var(--radius); }

/* ---- wizard ---- */
.ignite-nav { margin-top: 48px; text-align: center; }
.wizard {
  max-width: 560px; margin: 22px auto 0;
  padding: 36px 36px 30px; text-align: left;
  position: relative; overflow: hidden;
}
.wizard::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(600px 240px at 50% -14%, rgba(57,214,255,.15), transparent 70%);
}
.wizard-step { position: relative; z-index: 2; }
.wizard-step h2 { font-size: 24px; letter-spacing: -.01em; margin-bottom: 8px; }
.wizard-step .step-hint { color: var(--text-2); font-size: 13.5px; margin-bottom: 24px; }
.wiz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.wiz-counter { color: var(--text-2); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* progress dots */
.wiz-dots { display: flex; gap: 7px; justify-content: center; margin-bottom: 22px; position: relative; z-index: 2; }
.wdot { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.12); transition: background .3s, width .35s cubic-bezier(.34,1.56,.64,1); }
.wdot.on { background: var(--cyan); width: 26px; box-shadow: 0 0 12px rgba(57,214,255,.8); }

/* legacy wiz-pills (kept for compat) */
.wiz-pills { display: flex; gap: 6px; }
.wiz-pills span { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.12); transition: background .3s, width .3s; }
.wiz-pills span.on { background: var(--cyan); width: 22px; box-shadow: 0 0 10px rgba(57,214,255,.8); }

/* ---- form fields ---- */
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 9px; font-weight: 600;
}
.input, .select {
  width: 100%; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(8,12,20,0.6);
  color: var(--text-0); font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--text-2); }
.input:focus, .select:focus {
  border-color: rgba(57,214,255,.65);
  box-shadow: 0 0 0 3px rgba(57,214,255,.14);
  background: rgba(10,14,24,.85);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aab4c6' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px;
}
.select option { background: #0b1019; color: var(--text-0); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 12px; margin-top: 26px; }
.form-actions .btn { flex: 1; }

.range-hint { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.range-hint .frost-tag { font-size: 11.5px; letter-spacing: .06em; text-transform: none; }

/* result state */
.gen-result { text-align: center; padding: 6px 0 0; }
.result-link-box {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 6px;
  padding: 13px 14px; border-radius: 12px;
  background: rgba(6,10,16,.7); border: 1px solid var(--glass-border);
}
.result-link-box .link-val {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--cyan-soft); font-size: 13.5px; font-weight: 600;
}
.result-link-box .btn { padding: 10px 14px; font-size: 13px; border-radius: 10px; }
.copy-ok { color: var(--green); font-size: 12.5px; min-height: 18px; margin-top: 4px; }
.qr-wrap {
  margin: 18px auto 6px; width: 172px; height: 172px;
  padding: 10px; border-radius: 16px; background: #ffffff;
}
.qr-wrap img { width: 100%; height: 100%; border-radius: 8px; }
.gen-meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 20px; }

/* quick join */
.quick-join {
  max-width: 640px; margin: 28px auto 0; padding: 22px 28px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.quick-join .qj-label { color: var(--text-2); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.quick-join .input { flex: 1; min-width: 200px; }

/* ---- features ---- */
.features {
  max-width: 1180px; margin: 90px auto 0; padding: 0 22px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px;
}
.feat { padding: 26px; opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.feat.visible { opacity: 1; transform: none; }
.feat .fi {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; font-size: 20px; margin-bottom: 16px;
  background: rgba(57,214,255,.10); border: 1px solid rgba(57,214,255,.25); color: var(--cyan-soft);
}
.feat h3 { font-size: 17px; margin-bottom: 8px; letter-spacing: -.01em; }
.feat p { color: var(--text-1); font-size: 14px; }

/* ---- band + footer ---- */
.band { max-width: 1180px; margin: 84px auto 0; padding: 0 22px; }
.band .card { text-align: center; padding: 52px 30px; }
.band h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; margin-bottom: 12px; }
.band p { color: var(--text-1); margin-bottom: 26px; }
.lede { font-size: clamp(16px, 2vw, 18px); line-height: 1.65; }

footer { margin-top: 80px; padding: 30px 22px 50px; text-align: center; color: var(--text-2); font-size: 13px; }
footer .f-line { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* how it works steps */
.steps { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 22px; font-size: 13px; color: var(--text-1); }
.step  { display: flex; align-items: center; gap: 8px; }
.step .num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; border: 1px solid var(--glass-border);
  color: var(--text-1); background: rgba(255,255,255,.05);
}
.step.on .num { background: linear-gradient(135deg, var(--cyan), var(--green)); color: #04111a; border-color: transparent; }
.step.on { color: var(--text-0); }

/* ============================================================
   SESSION WORKSPACE
   ============================================================ */
.sesh-wrap { max-width: 1260px; margin: 28px auto 0; padding: 0 20px 90px; }

/* header */
.sesh-head {
  padding: 22px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.sesh-title h1 { font-size: clamp(19px, 3vw, 27px); letter-spacing: -.015em; }
.sesh-title .slugline { color: var(--text-2); font-size: 13px; margin-top: 4px; word-break: break-all; }
.sesh-title .slugline code { color: var(--cyan-soft); font-size: 12px; }
.sesh-head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* live pulse chip */
.live-pulse {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(61,255,176,.35); background: rgba(61,255,176,.07);
  color: var(--green); font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.live-pulse.is-visible { opacity: 1; transform: none; }

/* session body grid */
.sesh-body { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
@media (min-width: 1080px) { .sesh-body { grid-template-columns: 1fr 360px; } }
.col-left, .col-right { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* identity card */
.ident { padding: 22px 24px; }
.ident .field { margin-bottom: 0; }
.ident-hint { color: var(--text-2); font-size: 12.5px; margin-top: 10px; }

/* matrix card */
.matrix-card { overflow: hidden; }
.mtx-toolbar { padding: 18px 22px 0; }
.mtx-controls { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mtx-controls .field { margin-bottom: 0; }
.mtx-legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend-scale { display: flex; align-items: center; gap: 6px; margin-left: 4px; }
.legend-scale i { width: 16px; height: 10px; border-radius: 4px; display: block; }
.lg-0 { background: rgba(255,255,255,.07); }
.lg-1 { background: rgba(122,230,255,.28); }
.lg-2 { background: rgba(122,230,255,.52); }
.lg-3 { background: rgba(61,255,176,.55); }
.lg-4 { background: rgba(255,209,102,.68); }

/* matrix scroll + grid */
.matrix-scroll { overflow: auto; padding: 16px 18px 20px; }
.mtx { min-width: 640px; user-select: none; }
.mtx-row { display: flex; align-items: stretch; gap: 2px; margin-bottom: 2px; }

.mtx-slot {
  flex: 1; min-width: 56px; height: 38px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .22s ease, background-color .18s ease, border-color .18s ease;
  touch-action: none; position: relative;
}
.mtx-slot:hover:not(.mtx-blank) { border-color: rgba(57,214,255,.42); background: rgba(57,214,255,.1); }
.mtx-blank { cursor: default; background: transparent !important; border-color: transparent !important; }

/* heat classes */
.heat-0 { /* default */ }
.heat-1 { background-color: rgba(122,230,255,.28); border-color: rgba(122,230,255,.35); }
.heat-2 { background-color: rgba(122,230,255,.52); border-color: rgba(122,230,255,.6);  box-shadow: 0 0 12px rgba(57,214,255,.25); }
.heat-3 { background-color: rgba(61,255,176,.55);  border-color: rgba(61,255,176,.7);   box-shadow: 0 0 16px rgba(61,255,176,.30); }
.heat-4 { background-color: rgba(255,209,102,.68); border-color: rgba(255,209,102,.85); box-shadow: 0 0 20px rgba(255,209,102,.45); }

/* mine ring */
.mtx-slot.mine {
  box-shadow: inset 0 0 0 2px var(--cyan), 0 0 18px rgba(57,214,255,.32);
}

/* apex highlight */
.mtx-slot.apex-slot {
  animation: apexPulseSlot 2.2s ease-in-out infinite;
}
@keyframes apexPulseSlot {
  0%, 100% { box-shadow: 0 0 10px rgba(255,209,102,.5), inset 0 0 0 1px rgba(255,209,102,.8); }
  50%       { box-shadow: 0 0 26px rgba(255,209,102,.85), inset 0 0 0 2px var(--gold); }
}

.mtx-slot.dragging { transform: scale(0.9); opacity: .8; }
.mtx-slot .amt {
  position: absolute; right: 4px; top: 3px;
  font-size: 9px; font-weight: 700; color: rgba(5,10,16,.9);
  opacity: 0; transition: opacity .18s;
}
.mtx-slot:hover .amt, .heat-3 .amt, .heat-4 .amt { opacity: 1; }

/* locked overlay */
.mtx.locked .mtx-slot:not(.mtx-blank) { cursor: not-allowed; opacity: .55; }

/* column headers */
.mtx-labels { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.mtx-labels .day-label {
  flex: 1; min-width: 56px; text-align: center;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-1);
}
.mtx-col-time {
  width: 80px; flex: 0 0 80px;
  display: flex; align-items: center; font-size: 11px; color: var(--text-2);
  padding-right: 8px; justify-content: flex-end; white-space: nowrap;
}

/* apex banner */
.apex-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 20px; margin: 0 18px 16px;
  border: 1px solid rgba(255,209,102,.42);
  background: linear-gradient(105deg, rgba(255,209,102,.14), rgba(61,255,176,.07));
  border-radius: 14px;
  transition: opacity .4s ease, transform .4s ease;
}
.apex-banner.hidden { opacity: 0; transform: translateY(-6px); pointer-events: none; position: absolute; }
.apex-ico {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: rgba(255,209,102,.16); border: 1px solid rgba(255,209,102,.5);
  color: var(--gold); font-size: 18px;
  animation: apexGlow 2.6s ease-in-out infinite;
}
@keyframes apexGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(255,209,102,.25); }
  50%       { box-shadow: 0 0 28px rgba(255,209,102,.65); }
}
.apex-txt { flex: 1; min-width: 180px; }
.apex-txt .apex-when { font-weight: 700; font-size: 16px; color: var(--gold); }
.apex-txt .apex-meta { font-size: 12.5px; color: var(--text-1); margin-top: 2px; }

/* finalized card */
.finalized-card { padding: 28px; text-align: center; position: relative; overflow: hidden; }
.finalized-card::before {
  content: ''; position: absolute; inset: -40%;
  background: radial-gradient(600px 200px at 50% -22%, rgba(61,255,176,.18), transparent 60%);
  pointer-events: none;
}
.finalized-ico {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(61,255,176,.14); border: 1px solid rgba(61,255,176,.5);
  color: var(--green); font-size: 26px;
  animation: apexGlow 2.8s ease-in-out infinite;
}
.finalized-card h2 { font-size: 22px; letter-spacing: -.01em; margin-bottom: 6px; position: relative; }
.finalized-when { color: var(--green); font-size: 18px; font-weight: 700; margin: 8px 0 4px; position: relative; }
.finalized-sub { color: var(--text-1); font-size: 13.5px; margin-bottom: 4px; position: relative; }
.export-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; max-width: 420px; margin-left: auto; margin-right: auto; position: relative; }
.export-row { display: flex; gap: 10px; }
.export-row .btn { flex: 1; }
.export-hint { color: var(--text-2); font-size: 12px; margin-top: 12px; }

/* consensus activity list */
.pulse-list { padding: 20px 22px; }
.consensus-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,.07);
  font-size: 13.5px;
}
.consensus-item:last-child { border-bottom: none; }
.avatars { display: flex; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #04111a;
  border: 2px solid rgba(10,14,22,.9); margin-left: -8px; flex: 0 0 auto;
}
.avatar:first-child { margin-left: 0; }
.avatar.a0 { background: linear-gradient(135deg, var(--cyan),       #5ec8ff); }
.avatar.a1 { background: linear-gradient(135deg, var(--green),      #b8ff7a); }
.avatar.a2 { background: linear-gradient(135deg, var(--gold),       #ffb15e); }
.avatar.a3 { background: linear-gradient(135deg, var(--hue-strong), #d7a6ff); }
.avatar.a4 { background: linear-gradient(135deg, #6ee7f5,           #4db8ff); }
.avatar.a5 { background: linear-gradient(135deg, #f49bff,           #ff7ab0); }
.c-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.c-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-meta { font-size: 11.5px; color: var(--text-2); }
.c-pct  { font-size: 11.5px; color: var(--cyan-soft); font-weight: 700; white-space: nowrap; }
.win-chip { color: var(--green); }

/* roster */
.roster-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: 14px;
  border-bottom: 1px dashed rgba(255,255,255,.06);
}
.roster-item:last-child { border-bottom: none; }
.roster-item .you { color: var(--cyan-soft); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }

/* tips */
.tip-card { padding: 18px 22px; }
.tip-card h4 { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-1); margin-bottom: 10px; }
.tip-card ul { list-style: none; }
.tip-card li { font-size: 13px; color: var(--text-1); padding: 5px 0; display: flex; gap: 8px; }
.tip-card li i { color: var(--cyan-soft); }

/* loaders */
.sesh-loader, .sesh-missing {
  max-width: 560px; margin: 90px auto; padding: 40px; text-align: center;
}
.spinner {
  width: 34px; height: 34px; margin: 0 auto 18px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12); border-top-color: var(--cyan);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sesh-missing h2 { margin-bottom: 8px; }

/* hint */
.hint { color: var(--text-2); font-size: 12.5px; margin-top: 10px; }

/* ---- Finalize modal ---- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
.modal-wrap.open { opacity: 1; pointer-events: auto; }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(4, 6, 11, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal-box {
  position: relative; z-index: 1;
  background: rgba(10, 14, 24, 0.92);
  border: 1px solid rgba(255,209,102,.35);
  border-radius: 22px;
  padding: 34px;
  max-width: 460px; width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 60px rgba(255,209,102,.12);
  transform: scale(0.94) translateY(10px);
  transition: transform .28s cubic-bezier(.34,1.4,.64,1);
}
.modal-wrap.open .modal-box { transform: none; }
.modal-box h3 { font-size: 21px; letter-spacing: -.01em; margin-bottom: 16px; }
.modal-apex-info {
  padding: 14px 16px; border-radius: 12px;
  background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.3);
  margin-bottom: 20px;
}
.modal-apex-time { font-size: 18px; font-weight: 700; color: var(--gold); }
.modal-apex-sub  { font-size: 12.5px; color: var(--text-1); margin-top: 4px; }
.modal-actions   { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }

/* interactive states */
body.grabbing, body.grabbing * { cursor: grabbing !important; user-select: none !important; }
body.busy .btn { pointer-events: none; }

/* ---- toasts ---- */
#as-toast-layer {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 14px;
  background: rgba(14, 20, 32, 0.92); border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  padding: 12px 20px; border-radius: 14px;
  font-size: 13.5px; color: var(--text-0);
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(14px) scale(0.97);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: auto; position: relative; overflow: hidden;
}
.toast--in  { opacity: 1; transform: none; }
.toast--out { opacity: 0; transform: translateY(8px) scale(0.97); }
.toast--ok  { border-color: rgba(61,255,176,.5); }
.toast--err { border-color: rgba(255,107,129,.55); }
.toast-msg { position: relative; }
.toast-msg::before { content: '✦'; color: var(--cyan-soft); margin-right: 10px; }
.toast-prog {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transform-origin: left;
  animation: toastProg 2.4s linear forwards;
}
.toast--sticky .toast-prog { animation-duration: 4.2s; }
@keyframes toastProg { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---- rise animations ---- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.rise   { animation: riseIn .7s cubic-bezier(.22,.8,.34,1) both; }
.rise-1 { animation-delay: .06s; }
.rise-2 { animation-delay: .14s; }
.rise-3 { animation-delay: .22s; }

/* ---- responsive ---- */
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .hero { padding-top: 60px; }
  .nav .brand-sub { display: none; }
  .sesh-head { padding: 16px 18px; }
  .matrix-scroll { padding: 10px 12px 14px; }
  .mtx-slot { min-width: 46px; height: 34px; }
  .mtx-col-time { width: 66px; flex-basis: 66px; font-size: 10px; }
  .apex-banner { margin: 0 12px 12px; }
  .modal-box { padding: 24px; }
  .wizard { padding: 26px 22px 22px; }
}

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