/* ============================================================
   BuilderLab — Premium Glass + Neon theme
   Visual layer only. Every class name + CSS custom property
   here is also produced by app.js; do not rename them.
   ============================================================ */

:root {
  color-scheme: dark;

  /* Base canvas */
  --bg: #04050b;
  --bg-2: #070a16;

  /* Glass surfaces */
  --glass: rgba(20, 28, 48, 0.46);
  --glass-strong: rgba(24, 34, 58, 0.62);
  --glass-2: rgba(10, 16, 30, 0.55);
  --glass-grad: linear-gradient(165deg, rgba(40, 54, 92, 0.42), rgba(12, 18, 34, 0.5));
  --card-grad: var(--glass-grad);
  --card: var(--glass);
  --card-2: var(--glass-2);
  --card-top: var(--glass-strong);

  /* Hairlines */
  --border: rgba(140, 170, 230, 0.16);
  --border-soft: rgba(255, 255, 255, 0.06);
  --hair: rgba(255, 255, 255, 0.08);

  /* Text */
  --text: #eef3ff;
  --muted: #9db0d6;
  --faint: #6a7da6;

  /* Neon accent system (cyan -> indigo -> violet) */
  --neon-1: #22d3ee;
  --neon-2: #6366f1;
  --neon-3: #a855f7;
  --accent: #38bdf8;
  --accent-bright: #67e8f9;
  --red: #5fa8e6;          /* legacy alias used across the UI */
  --red-dark: #7c8df0;     /* legacy alias (now indigo-ish) */
  --red-soft: rgba(56, 189, 248, 0.14);
  --neon-grad: linear-gradient(120deg, var(--neon-1), var(--neon-2) 55%, var(--neon-3));

  --green: #34d399;
  --gold: #f5c451;

  /* Glow + depth */
  --glow: 0 0 0 1px rgba(56, 189, 248, 0.16), 0 0 22px -4px rgba(56, 189, 248, 0.35);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 44px -22px rgba(0, 0, 0, 0.85);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 60px -30px rgba(2, 6, 20, 0.95);
  --cat: var(--accent);

  --blur: saturate(150%) blur(20px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1100px 700px at 50% -10%, #0b1430, var(--bg) 70%), var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.1px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* App stays hidden until the login gate grants access. */
body:not(.authed) .app {
  display: none;
}

/* ===== Login gate ===== */

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(900px 600px at 50% -10%, rgba(11, 20, 48, 0.65), rgba(4, 5, 11, 0.82) 70%);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  backdrop-filter: saturate(140%) blur(6px);
  transition: opacity 320ms ease;
}

.login-screen.done {
  opacity: 0;
  pointer-events: none;
}

.login-card {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px 28px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--glass-grad);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-card), 0 0 50px -16px rgba(99, 102, 241, 0.55);
}

.login-card.shake {
  animation: login-shake 360ms ease;
}

@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-brand .logo {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.45));
}

.login-title {
  margin-top: 6px;
  font-family: "Sora", "Inter", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  text-transform: none;
  color: var(--text);
}

.login-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 4px;
}

.login-field {
  display: grid;
  gap: 6px;
}

.login-field span {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.login-field input {
  height: 44px;
}

.login-error {
  min-height: 16px;
  margin: -2px 0 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: #f47280;
}

.login-btn {
  margin-top: 4px;
  height: 46px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===== Animated gradient-mesh backdrop ===== */

.mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  mix-blend-mode: screen;
  will-change: transform;
}

.b1 {
  top: -22vw;
  left: -10vw;
  background: radial-gradient(circle, var(--neon-1), transparent 62%);
  animation: drift1 26s ease-in-out infinite;
}

.b2 {
  top: -16vw;
  right: -16vw;
  background: radial-gradient(circle, var(--neon-3), transparent 62%);
  animation: drift2 32s ease-in-out infinite;
}

.b3 {
  bottom: -30vw;
  left: 28vw;
  background: radial-gradient(circle, var(--neon-2), transparent 64%);
  opacity: 0.4;
  animation: drift3 38s ease-in-out infinite;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vw, 6vw) scale(1.12); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-7vw, 8vw) scale(0.92); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6vw, -7vw) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

/* ===== Glass primitive ===== */

.side-card,
.metric,
.category,
.build-card,
.plan-text,
.mini-card,
.bottom-explainer {
  background: var(--glass-grad);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-card);
}

/* ===== Navbar ===== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 12px 24px;
  background: rgba(6, 10, 22, 0.6);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  backdrop-filter: saturate(150%) blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.logo {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.4));
}

.wordmark {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.wordmark em {
  font-style: normal;
  background: var(--neon-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 10px;
  transition: color 140ms ease, background 140ms ease;
}

.nav-links a.active {
  color: var(--accent-bright);
  background: var(--red-soft);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.28);
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--neon-grad);
  color: #06080f;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 16px -3px rgba(99, 102, 241, 0.6);
}

/* ===== Page head + tab ===== */

.page-head {
  padding: 26px 24px 0;
}

h1,
h2,
p {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent-bright);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 8px 1px var(--accent-bright);
}

h1 {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: "Sora", "Inter", sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.head-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

.page-head p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 14px;
  max-width: 720px;
}

.tabbar {
  display: flex;
  align-items: flex-end;
  margin-top: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}

.tab {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 800;
  padding: 11px 15px;
  border-bottom: 2px solid transparent;
}

.tab.active {
  border-image: var(--neon-grad) 1;
  border-bottom: 2px solid transparent;
  background: linear-gradient(var(--neon-grad)) bottom / 100% 2px no-repeat;
}

/* ===== Layout ===== */

.layout {
  display: grid;
  grid-template-columns: 312px minmax(620px, 1fr) 380px;
  align-items: start;
  gap: 18px;
  padding: 20px 24px;
}

.panel {
  min-width: 0;
}

h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
}

h2.big {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 20px;
  text-transform: none;
  letter-spacing: -0.3px;
  color: var(--text);
  font-weight: 800;
}

.workspace-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 16px;
  flex-wrap: wrap;
}

.hint {
  color: var(--faint);
  font-size: 12px;
}

/* ===== Sidebar ===== */

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.spec {
  display: grid;
  gap: 8px;
}

.spec-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.spec-stepper {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 8px;
  align-items: center;
}

.arrow {
  height: 40px;
  border: 1px solid var(--border);
  background: var(--glass-2);
  color: var(--muted);
  border-radius: 11px;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.arrow:hover {
  color: var(--accent-bright);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: var(--glow);
}

.spec-value {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--glass-2);
  border-radius: 11px;
  font-size: 15px;
}

.spec-value strong {
  font-weight: 800;
}

.pos-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--neon-grad);
  color: #06080f;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 0 12px -2px rgba(56, 189, 248, 0.6);
}

.spec-range {
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}

/* ===== Inputs ===== */

select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--glass-2);
  color: var(--text);
  border-radius: 11px;
  padding: 10px 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  -webkit-appearance: none;
  appearance: none;
}

select option { background: #0a1020; color: var(--text); }

/* Themed dropdown arrow for every select (appearance:none strips the native one). */
select {
  cursor: pointer;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--faint) 50%),
    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 17px) center, calc(100% - 12px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
select:hover { border-color: rgba(103, 232, 249, 0.45); }

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

/* Autofill: keep the dark glass look instead of the browser's grey/yellow fill. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
  box-shadow: 0 0 0 1000px #0c1424 inset;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

/* Request textarea auto-grows with content — no internal scrollbar, no resize handle. */
#requestText {
  resize: none;
  overflow-y: hidden;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: var(--glow);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  background: transparent;
  cursor: pointer;
  --pct: 50%;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cat) var(--pct), rgba(255, 255, 255, 0.1) var(--pct));
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cat);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cat) 22%, transparent), 0 2px 6px rgba(0, 0, 0, 0.5);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--cat);
}

input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cat);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cat) 22%, transparent);
}

.spec input[type="range"] {
  --cat: var(--accent);
}

/* ===== Buttons ===== */

button {
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 11px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 700;
  background: var(--glass-2);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

button:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

button:active {
  transform: translateY(1px);
}

.primary {
  background: var(--neon-grad);
  color: #06080f;
  border-color: transparent;
  font-weight: 800;
  box-shadow: 0 0 18px -4px rgba(99, 102, 241, 0.6);
}

.primary:hover {
  box-shadow: 0 0 26px -2px rgba(56, 189, 248, 0.7);
}

.secondary {
  background: var(--glass-2);
}

.secondary.full,
.cta {
  width: 100%;
}

.cta {
  position: relative;
  background: var(--neon-grad);
  color: #06080f;
  border: 0;
  font-weight: 900;
  font-size: 15px;
  padding: 13px 14px;
  border-radius: 13px;
  box-shadow: 0 0 22px -6px rgba(99, 102, 241, 0.7);
}

.cta:hover {
  box-shadow: 0 0 30px -3px rgba(56, 189, 248, 0.8);
}

/* ===== Summary metrics ===== */

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  border-radius: 14px;
  padding: 13px 15px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-family: "Sora", "Inter", sans-serif;
  font-size: 22px;
  font-weight: 800;
}

/* ===== Attribute categories ===== */

.attrs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.category {
  position: relative;
  border-radius: 16px;
  border-top: 1px solid var(--border);
  padding: 15px;
  overflow: hidden;
}

.category::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--cat-accent, var(--accent));
  box-shadow: 0 0 16px -1px var(--cat-accent, var(--accent));
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.category-head h3 {
  margin: 0;
  font-family: "Sora", "Inter", sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 18px color-mix(in srgb, currentColor 45%, transparent);
}

.category-head span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.attr {
  padding: 8px 0 9px;
  border-top: 1px solid var(--border-soft);
}

.attr:first-of-type {
  border-top: 0;
}

.attr.bumped {
  animation: bump-flash 1.2s ease;
}

@keyframes bump-flash {
  0% { background: rgba(56, 189, 248, 0.18); box-shadow: inset 0 0 18px rgba(56, 189, 248, 0.25); }
  100% { background: transparent; box-shadow: none; }
}

.attr-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.attr-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lock-flag {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--accent-bright);
  background: var(--red-soft);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 5px;
  padding: 1px 5px;
}

.attr-stepper {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.step-btn {
  width: 19px;
  height: 19px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--glass-2);
  color: var(--muted);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.step-btn:hover {
  color: var(--accent-bright);
  border-color: rgba(56, 189, 248, 0.55);
}

.attr-val {
  min-width: 18px;
  text-align: right;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.attr-cap {
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.target-input {
  width: 34px;
  height: 22px;
  padding: 2px 3px;
  background: var(--glass-2);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  color: var(--text);
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  flex: none;
}

.target-input::placeholder {
  color: var(--faint);
}

.cb-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.gain-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(20px, 1fr));
  gap: 3px;
}

.gain-chip {
  height: 30px;
  padding: 2px 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1;
  border: 1px solid var(--border-soft);
  background: var(--glass-2);
  color: var(--faint);
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 90ms ease, border-color 90ms ease, background 90ms ease, box-shadow 90ms ease;
}

/* Top line = the cap-breaker gain; bottom line (smaller) = what the rating
   would become at that tier. Clicking applies it — it never moves the slider. */
.gain-chip .g-step {
  font-size: 9px;
  font-weight: 800;
}

.gain-chip .g-val {
  font-size: 8px;
  font-weight: 700;
  opacity: 0.7;
}

.gain-chip.active .g-val,
.gain-chip.has-gain .g-val {
  opacity: 0.9;
}

.gain-chip:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.gain-chip:disabled {
  cursor: default;
  opacity: 0.35;
}

.gain-chip.empty {
  opacity: 0.4;
}

.gain-chip.has-gain {
  color: var(--accent-bright);
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.32);
}

.gain-chip.active {
  color: #06080f;
  background: var(--neon-grad);
  border-color: transparent;
  opacity: 1;
  box-shadow: 0 0 12px -2px rgba(56, 189, 248, 0.7);
}

.cb-final {
  min-width: 22px;
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cb-final.on {
  color: var(--accent-bright);
}

/* Grey-out: maxed (at body cap) = nothing more to do; locked = at 99 budget. */
.attr.maxed {
  opacity: 0.45;
}

.attr.maxed .attr-stepper .step-btn {
  pointer-events: none;
}

.attr.locked .attr-name,
.attr.locked .attr-val {
  opacity: 0.7;
}

.lock-flag.cap {
  color: #06080f;
  background: var(--gold);
  border-color: transparent;
}

.step-btn:disabled,
input[type="range"]:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ===== Right rail ===== */

.result {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.results-wide {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  padding: 4px 24px 30px;
  align-items: start;
}

@media (max-width: 900px) {
  .results-wide {
    grid-template-columns: 1fr;
  }
}

.build-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 20px;
}

.build-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(440px 200px at 92% -30%, rgba(99, 102, 241, 0.32), transparent 60%),
    radial-gradient(360px 180px at 6% 120%, rgba(34, 211, 238, 0.2), transparent 60%);
  pointer-events: none;
}

.build-card div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.build-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.build-card strong {
  font-family: "Sora", "Inter", sans-serif;
  background: linear-gradient(160deg, var(--accent-bright), var(--neon-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 66px;
  line-height: 0.84;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.35));
}

.build-card p {
  color: var(--muted);
  margin-top: 14px;
  font-size: 13px;
  position: relative;
}

.budget-line {
  margin-top: 9px !important;
  font-size: 12px;
  font-weight: 700;
}

.budget-line::after {
  content: "";
  display: block;
  height: 7px;
  margin-top: 7px;
  border-radius: 99px;
  background:
    linear-gradient(90deg, var(--neon-1), var(--neon-2)) 0 / var(--budget-pct, 97%) 100% no-repeat,
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 14px -3px rgba(56, 189, 248, 0.6);
}

.budget-line.full {
  color: var(--accent-bright);
}

.plan-text {
  padding: 15px;
  border-radius: 14px;
  line-height: 1.55;
  font-size: 13.5px;
  margin-bottom: 12px;
}

.plan-text.ok { border-color: rgba(52, 211, 153, 0.4); }
.plan-text.warn { border-color: rgba(245, 196, 81, 0.4); }
.plan-text.bad { border-color: rgba(244, 114, 128, 0.45); }

.mini-card {
  border-radius: 14px;
  padding: 14px;
}

.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.mini-head h3 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.mini-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mini-head span.ok { color: var(--green); }
.mini-head span.bad { color: #f47280; }

.sim-grid {
  display: grid;
  gap: 6px;
}

.sim-row {
  display: grid;
  grid-template-columns: 1fr auto 50px;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
}

.sim-row:first-child {
  border-top: 0;
}

.sim-row span {
  color: var(--muted);
}

.sim-row strong {
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-bright);
  background: rgba(56, 189, 248, 0.14);
  border-radius: 6px;
  padding: 2px 7px;
}

.sim-row em {
  color: var(--accent-bright);
  font-style: normal;
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.muted-row em,
.muted-row strong {
  color: var(--muted);
  background: transparent;
}

/* ===== Badges ===== */

.badge-cat {
  margin-top: 12px;
}

.badge-cat:first-of-type {
  margin-top: 0;
}

.badge-cat h4 {
  margin: 0 0 7px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--glass-2);
  border-radius: 999px;
  padding: 4px 7px 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.badge-pill em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  border-radius: 999px;
  padding: 2px 7px;
  border: 1px solid transparent;
}

.badge-pill.none {
  color: var(--faint);
  border-style: dashed;
}

.badge-pill.none em {
  color: var(--faint);
  background: transparent;
  border-color: var(--border);
}

/* Neon tier colors with glow */
.lv-Bronze em { background: rgba(205, 130, 70, 0.22); color: #f0b886; border-color: rgba(205, 130, 70, 0.45); }
.lv-Silver em { background: rgba(170, 188, 210, 0.2); color: #dbe6f6; border-color: rgba(170, 188, 210, 0.45); }
.lv-Gold em { background: rgba(245, 196, 81, 0.18); color: #ffd766; border-color: rgba(245, 196, 81, 0.5); box-shadow: 0 0 12px -3px rgba(245, 196, 81, 0.7); }
.lv-HallOfFame em { background: rgba(168, 85, 247, 0.24); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.55); box-shadow: 0 0 14px -3px rgba(168, 85, 247, 0.8); }
.lv-Legend em { background: rgba(244, 114, 128, 0.22); color: #ff9aa6; border-color: rgba(244, 114, 128, 0.55); box-shadow: 0 0 16px -3px rgba(244, 114, 128, 0.85); }

/* ===== Takeovers ===== */

.takeover-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
}

.takeover-row:first-of-type {
  border-top: 0;
}

.takeover-row .check {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.07);
  color: var(--faint);
  flex: none;
}

.takeover-row.on .check {
  background: var(--neon-grad);
  color: #06080f;
  box-shadow: 0 0 12px -2px rgba(56, 189, 248, 0.7);
}

.takeover-row .t-name {
  flex: 1;
  font-weight: 600;
}

.takeover-row.on .t-name {
  color: var(--text);
}

.takeover-row:not(.on) .t-name {
  color: var(--faint);
}

.takeover-row .t-req {
  color: var(--muted);
  font-size: 11px;
}

/* ===== Plan lists / explainer ===== */

.plan-group h3 {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.plan-item {
  border: 1px solid var(--border);
  background: var(--glass-2);
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.plan-item.ok { border-left: 3px solid var(--green); }
.plan-item.warn { border-left: 3px solid var(--gold); }
.plan-item.bad { border-left: 3px solid #f47280; }

.bottom-explainer {
  margin: 0 24px 24px;
  border-radius: 16px;
  padding: 16px 18px;
}

.bottom-explainer h2 {
  margin-bottom: 8px;
}

#explanation {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

#explanation b,
#explanation strong {
  color: var(--text);
}

/* ===== Responsive ===== */

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .result {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .result > * {
    flex: 1 1 260px;
  }
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 14px;
  }
  .attrs {
    grid-template-columns: 1fr;
  }
  .summary {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Right rail stacks vertically again instead of the tablet flex-row. */
  .result {
    flex-direction: column;
  }
  .result > * {
    flex: 1 1 auto;
  }
  .results-wide {
    padding: 4px 14px 24px;
  }
  .page-head {
    padding: 20px 14px 0;
  }
  .tabbar {
    padding: 0 14px;
  }
}

/* ===== Phones: fold the navbar into two rows + condense type ===== */
@media (max-width: 640px) {
  .navbar {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 14px;
  }
  /* Full-width scrollable nav row so all tabs stay reachable in portrait */
  .nav-links {
    order: 2;
    width: 100%;
    flex: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    white-space: nowrap;
    font-size: 12.5px;
    padding: 7px 10px;
  }
  .top-actions {
    order: 3;
    width: 100%;
    gap: 8px;
  }
  .top-actions button {
    flex: 1;
    padding: 9px 8px;
    font-size: 13px;
  }
  /* Decorative on a phone toolbar; drop it to give the buttons room. */
  .avatar {
    display: none;
  }

  h1 {
    font-size: 24px;
  }
  .page-head p {
    font-size: 13px;
  }
  .workspace-head {
    margin-bottom: 12px;
  }
  .build-card strong {
    font-size: 54px;
  }
  .metric strong {
    font-size: 19px;
  }
  .login-card {
    padding: 26px 22px 24px;
  }
}

/* Extra-narrow: single-column summary so metric values never clip. */
@media (max-width: 420px) {
  .summary {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .metric {
    padding: 11px 12px;
  }
}

/* ===== Jump Shot Creator ===== */

[hidden] { display: none !important; }

.spec-label .opt {
  font-style: normal;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--faint);
  font-size: 10px;
  margin-left: 4px;
}

.js-field {
  display: grid;
  gap: 8px;
}

.js-field.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Searchable animation pickers */
.js-combo {
  position: relative;
}

.js-combo-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--glass-2);
  border-radius: 11px;
  color: var(--text);
  font-weight: 600;
  text-align: left;
}

.js-combo.filled .js-combo-btn {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: var(--glow);
}

.jc-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jc-caret {
  color: var(--accent-bright);
  flex: none;
}

.js-combo-pop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 8px;
  border: 1px solid var(--border);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: 13px;
  box-shadow: var(--shadow-card);
}

.js-combo-search {
  width: 100%;
  height: 38px;
  margin-bottom: 6px;
}

.js-combo-list {
  max-height: 280px;
  overflow-y: auto;
  display: grid;
  gap: 2px;
}

.js-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  color: var(--text);
  font-weight: 600;
  text-align: left;
}

.js-opt:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}

.jo-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jo-grades {
  display: flex;
  gap: 3px;
  flex: none;
}

.jc-chip {
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 1px 5px;
}

/* Release speed buttons */
.js-speed {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.js-speed-btn {
  padding: 9px 4px;
  border: 1px solid var(--border);
  background: var(--glass-2);
  border-radius: 9px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.15;
}

.js-speed-btn.active {
  background: var(--neon-grad);
  color: #06080f;
  border-color: transparent;
  box-shadow: 0 0 14px -3px rgba(56, 189, 248, 0.7);
}

/* Grade cards */
.js-grades {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.js-grade {
  border: 1px solid var(--border);
  background: var(--glass-grad);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.js-grade-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.js-grade-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.js-grade-letter {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.js-grade-bar {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 12px 0 6px;
}

.js-grade-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.js-grade-val {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.js-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--glass-2);
}

.js-card strong {
  font-size: 52px;
}

.js-sel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
}

.js-sel:first-of-type {
  border-top: 0;
}

.js-sel span {
  color: var(--muted);
}

.js-sel strong {
  font-weight: 700;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .js-layout .result {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .js-grades {
    grid-template-columns: 1fr;
  }
  .js-speed-btn {
    font-size: 9.5px;
  }
}

/* ===== Jump Shot — sub-tabs + generator ===== */

.tabbar .tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tabbar .tab.active {
  color: var(--text);
  border-bottom: 2px solid transparent;
  background: linear-gradient(var(--neon-grad)) bottom / 100% 2px no-repeat;
}


.js-gen-layout {
  grid-template-columns: 312px minmax(0, 1fr);
}

@media (max-width: 820px) {
  .js-gen-layout {
    grid-template-columns: 1fr;
  }
}

.js-gen-results {
  display: grid;
  gap: 10px;
}

.js-gen-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--glass-grad);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}

.jg-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--neon-grad);
  color: #06080f;
  font-weight: 900;
  font-size: 13px;
  flex: none;
}

.jg-main {
  min-width: 0;
}

.jg-combo {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jg-combo strong {
  font-weight: 800;
}

.jg-plus {
  color: var(--faint);
  margin: 0 2px;
}

.jg-blend {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-bright);
  background: rgba(56, 189, 248, 0.14);
  border-radius: 5px;
  padding: 1px 5px;
}

.jg-meta {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.jg-grades {
  display: flex;
  gap: 6px;
  flex: none;
}

.jg-chip {
  display: grid;
  justify-items: center;
  gap: 1px;
}

.jg-chip em {
  font-style: normal;
  font-size: 8px;
  font-weight: 800;
  color: var(--faint);
  text-transform: uppercase;
}

.jg-chip b {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.jg-load {
  flex: none;
  padding: 7px 11px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-bright);
  border-radius: 9px;
}

.jg-load:hover {
  box-shadow: var(--glow);
}

@media (max-width: 700px) {
  .js-gen-card {
    grid-template-columns: auto 1fr;
    grid-template-areas: "rank main" "grades load";
  }
  .jg-rank { grid-area: rank; }
  .jg-main { grid-area: main; }
  .jg-grades { grid-area: grades; }
  .jg-load { grid-area: load; justify-self: end; }
}

/* ===== Jump Shot — Visual Cue + Shot Timing ===== */

.js-cue-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

#jsCue {
  --cat: #a855f7;
}

.jt-cue {
  font-style: normal;
  color: var(--faint);
  font-size: 11px;
}

.jt-soon {
  color: var(--gold);
  font-weight: 800;
  font-size: 11.5px;
}


.jt-note {
  margin: 8px 0 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--faint);
  font-style: italic;
}

/* ===== Landing / auth / pricing pages ===== */

.nav-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid var(--border);
}

.landing {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 50px;
}

.hero { text-align: center; padding: 36px 0 26px; }
.hero-title {
  font-family: "Sora", "Inter", sans-serif;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.08;
  margin: 16px auto;
  max-width: 760px;
}
.hero-title em { font-style: normal; background: var(--neon-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 16px; max-width: 620px; margin: 0 auto; line-height: 1.6; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.hero-btn { width: auto !important; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; }
.ghost-btn { text-decoration: none; color: var(--muted); padding: 14px 22px; border: 1px solid var(--border); border-radius: 13px; font-weight: 700; }
.ghost-btn:hover { border-color: rgba(56, 189, 248, 0.5); color: var(--text); }
.hero-price { color: var(--faint); font-size: 13px; margin-top: 16px; font-weight: 600; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.feature-card { background: var(--glass-grad); border: 1px solid var(--border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-card); }
.feature-ic { font-size: 24px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--fc) 18%, transparent); border: 1px solid color-mix(in srgb, var(--fc) 40%, transparent); margin-bottom: 12px; }
.feature-card h3 { margin: 0 0 6px; font-family: "Sora", "Inter", sans-serif; font-size: 17px; font-weight: 800; }
.feature-card p { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0; }

.landing-foot { position: relative; z-index: 1; text-align: center; color: var(--faint); font-size: 12px; padding: 28px; }
.who { color: var(--muted); font-size: 13px; font-weight: 700; }

/* auth pages */
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.5px; margin: 2px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border: 1px solid var(--border); background: var(--glass-2); border-radius: 11px; color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; }
.google-btn:hover { border-color: rgba(56, 189, 248, 0.5); }
.auth-alt { text-align: center; color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.auth-alt a, .login-sub a { color: var(--accent-bright); }

/* pricing */
.pricing-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 24px; margin-top: 22px; align-items: start; }
.svc-list { display: grid; gap: 14px; }
.svc { display: flex; gap: 14px; align-items: flex-start; background: var(--glass-grad); border: 1px solid var(--border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-card); }
.svc-ic { font-size: 20px; width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--fc) 18%, transparent); border: 1px solid color-mix(in srgb, var(--fc) 40%, transparent); }
.svc h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
.svc p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.svc-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 4px; }
.shot-tile { aspect-ratio: 16 / 10; border-radius: 12px; background: linear-gradient(135deg, var(--c1), var(--c2)); display: grid; place-items: end; padding: 10px; box-shadow: var(--shadow-card); opacity: 0.92; }
.shot-tile span { font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }

.plan-card { position: sticky; top: 90px; background: var(--glass-grad); border: 1px solid rgba(56, 189, 248, 0.32); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-card), 0 0 50px -18px rgba(99, 102, 241, 0.5); }
.plan-head { display: flex; align-items: center; justify-content: space-between; }
.plan-head > span { font-weight: 800; font-size: 14px; }
.plan-price strong { font-family: "Sora", "Inter", sans-serif; font-size: 42px; font-weight: 800; }
.plan-price em { font-style: normal; color: var(--muted); font-size: 14px; }
.plan-perks { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 9px; }
.plan-perks li { position: relative; padding-left: 24px; font-size: 13.5px; color: var(--muted); }
.plan-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-bright); font-weight: 900; }
.plan-fine { text-align: center; color: var(--faint); font-size: 12px; margin: 12px 0 0; }
.plan-fine strong { color: var(--gold); }

@media (max-width: 820px) {
  .features { grid-template-columns: 1fr; }
  .pricing-wrap { grid-template-columns: 1fr; }
  .plan-card { position: static; }
}

/* ===== Accounts: brand link, user chip, PRO badge, profile ===== */

.brand { text-decoration: none; color: inherit; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass-2);
}
.user-chip:hover { border-color: rgba(56, 189, 248, 0.5); box-shadow: var(--glow); }
.uname { font-size: 13px; font-weight: 700; color: var(--text); }
.who { text-decoration: none; }
.who:hover { color: var(--text); }

/* Pink neon glowing PRO badge */
.pro-badge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff5fdd, #ff2fb0);
  border-radius: 6px;
  padding: 2px 7px;
  line-height: 1.4;
  box-shadow: 0 0 10px 1px rgba(255, 79, 216, 0.7), 0 0 22px -2px rgba(255, 47, 176, 0.6);
  animation: pro-glow 1.8s ease-in-out infinite;
}
@keyframes pro-glow {
  0%, 100% { box-shadow: 0 0 8px 0 rgba(255, 79, 216, 0.55), 0 0 18px -2px rgba(255, 47, 176, 0.5); }
  50% { box-shadow: 0 0 16px 2px rgba(255, 79, 216, 0.95), 0 0 32px 0 rgba(255, 47, 176, 0.8); }
}
@media (prefers-reduced-motion: reduce) { .pro-badge { animation: none; } }

/* Profile page */
.profile-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--glass-grad);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: 20px;
  padding: 26px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow-card);
}
.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.profile-name { display: flex; align-items: center; gap: 9px; }
.profile-name strong { font-family: "Sora", "Inter", sans-serif; font-size: 20px; font-weight: 800; }
.profile-plan { color: var(--muted); font-size: 13px; margin-top: 3px; }
.field-row { display: flex; gap: 8px; }
.field-row input { flex: 1; }
.profile-ok { color: var(--green); font-size: 12.5px; font-weight: 600; min-height: 14px; margin: 0; }
.profile-foot { margin-top: 2px; }

/* Billing section */
.billing-section {
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: 18px;
  padding-top: 16px;
}
.billing-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.billing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.billing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-amber  { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,.6); }
.dot-gray   { background: var(--muted); }
.billing-status-text { font-size: 13.5px; font-weight: 600; }
.billing-meta { font-size: 13px; color: var(--muted); }
.billing-actions { margin-top: 10px; }
.billing-link {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .15s;
}
.billing-link:hover { color: var(--fg); }
.billing-link-danger:hover { color: #f87171; }
.billing-canceled-msg { font-size: 12.5px; color: var(--green); font-weight: 500; }

/* ===== Service preview mini-renders ===== */
.shot-tile {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(20,28,48,.8), rgba(10,16,30,.92));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  position: relative;
}
.shot-tile::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--mc, var(--accent));
  box-shadow: 0 0 14px -1px var(--mc, var(--accent));
}
.ms-cap { font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.mockshot { display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: center; }

/* Build Creator: attribute bars */
.ms-bar { display: grid; grid-template-columns: 1fr 8px; align-items: center; gap: 7px; }
.ms-bar > span { grid-column: 1 / -1; font-size: 9.5px; color: var(--muted); display: flex; justify-content: space-between; }
.ms-bar > span b { color: var(--text); font-variant-numeric: tabular-nums; }
.ms-bar i { grid-column: 1 / -1; height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); position: relative; }
.ms-bar i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 99px; background: var(--c); }

/* Jump Shot: grade chips */
.ms-grades { flex-direction: row; gap: 8px; align-items: center; justify-content: space-around; }
.ms-g { display: grid; justify-items: center; gap: 2px; }
.ms-g em { font-style: normal; font-size: 8px; font-weight: 800; color: var(--faint); text-transform: uppercase; }
.ms-g b { font-family: "Sora","Inter",sans-serif; font-size: 22px; font-weight: 800; }

/* Generator: ranked rows */
.ms-gen { gap: 5px; }
.ms-row { display: flex; align-items: center; gap: 7px; font-size: 9.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-rank { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 5px; background: var(--neon-grad); color: #06080f; font-weight: 900; font-size: 9px; }
.ms-row span:last-child { overflow: hidden; text-overflow: ellipsis; }

/* ===== Saved builds ===== */
.layout.single { grid-template-columns: minmax(0, 720px); justify-content: center; }
.saved-card { max-width: 720px; width: 100%; }
.tab-count { font-style: normal; font-size: 9px; font-weight: 900; color: #06080f; background: var(--accent-bright); border-radius: 999px; padding: 1px 6px; margin-left: 5px; }
.tab-count:empty { display: none; }
.saved-new { display: flex; gap: 8px; }
.saved-new input { flex: 1; }
.saved-new .primary { flex: none; white-space: nowrap; }
.saved-list { display: grid; gap: 10px; margin-top: 6px; }
.saved-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); background: var(--glass-2); border-radius: 12px;
}
.saved-info { min-width: 0; }
.saved-info strong { display: block; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-info span { font-size: 12px; color: var(--muted); }
.saved-actions { display: flex; gap: 8px; flex: none; }
.saved-open { padding: 8px 13px; font-size: 12.5px; }
.saved-del { padding: 6px 11px; font-size: 16px; line-height: 1; }
.saved-empty { padding: 26px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; background: var(--glass-2); }
@media (max-width: 560px) {
  .saved-new { flex-direction: column; }
  .saved-item { flex-direction: column; align-items: stretch; }
  .saved-actions { justify-content: space-between; }
}

/* ===== Badges + Takeovers reference tabs ===== */
.ref-wrap { position: relative; z-index: 1; padding: 0 24px 32px; }
.ref-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
#badgeSearch, #takeoverSearch { max-width: 320px; }

/* Filter chips */
.ref-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ref-chip {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .2px;
  color: var(--muted); cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
}
.ref-chip:hover { color: var(--text); border-color: rgba(103,232,249,.5); background: rgba(56,189,248,.08); }
.ref-chip.on {
  color: #061018; border-color: transparent;
  background: linear-gradient(120deg, var(--neon-1), var(--neon-2));
  box-shadow: 0 0 18px -5px rgba(56,189,248,.8);
}

.ref-cat { margin-bottom: 26px; }
.ref-cat-title { font-family: "Sora", "Inter", sans-serif; font-size: 15px; font-weight: 800; color: var(--accent-bright); margin: 0 0 12px; text-shadow: 0 0 20px color-mix(in srgb, var(--accent) 55%, transparent); }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.ref-badge, .ref-takeover {
  border: 1px solid var(--border); background: var(--glass-grad);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: 16px; padding: 16px 16px 15px; box-shadow: var(--shadow-card);
  transition: border-color .16s, box-shadow .16s, transform .16s;
  min-width: 0; /* let the wide effect table scroll inside .eff-wrap, not stretch the card */
}
.eff-wrap { max-width: 100%; }
.ref-badge:hover, .ref-takeover:hover { border-color: rgba(103,232,249,.4); box-shadow: var(--shadow-card), 0 0 36px -16px rgba(56,189,248,.7); transform: translateY(-1px); }
.ref-badge-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ref-badge-head strong { font-size: 15px; font-weight: 800; }
.ref-height { font-size: 9.5px; font-weight: 800; color: var(--accent-bright); background: rgba(56,189,248,.16); border: 1px solid rgba(56,189,248,.4); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ref-tag { font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #c4b5fd; background: rgba(99,102,241,.2); border: 1px solid rgba(99,102,241,.5); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }

.ref-desc { font-size: 12px; color: var(--muted); margin: 0 0 11px; line-height: 1.45; }
.ref-sub { font-size: 9.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--accent); margin: 13px 0 7px; }
.ref-note { font-size: 11px; color: var(--gold); margin: 9px 0 0; font-weight: 700; text-shadow: 0 0 14px rgba(245,196,81,.4); }

/* Unlock requirement rows — vibrant tier chips, no gray bars */
.ref-tiers { display: grid; gap: 6px; }
.ref-tier-row { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 10px; font-size: 12px; }
.ref-tier { font-size: 9px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; text-align: center; border-radius: 6px; padding: 4px 0; border: 1px solid transparent; }
.ref-tier.lv-Bronze { color: #fff; background: linear-gradient(135deg, #d77f3a, #a55b28); border-color: rgba(255,180,120,.7); box-shadow: 0 0 12px -4px rgba(215,127,58,.9); }
.ref-tier.lv-Silver { color: #1a2233; background: linear-gradient(135deg, #e6eefc, #aebdd6); border-color: rgba(230,238,252,.8); box-shadow: 0 0 12px -4px rgba(200,215,235,.8); }
.ref-tier.lv-Gold { color: #3a2a00; background: linear-gradient(135deg, #ffd766, #e0a623); border-color: rgba(255,220,120,.8); box-shadow: 0 0 14px -4px rgba(245,196,81,1); }
.ref-tier.lv-HallOfFame { color: #fff; background: linear-gradient(135deg, #a855f7, #6d28d9); border-color: rgba(190,120,255,.8); box-shadow: 0 0 14px -4px rgba(168,85,247,1); }
.ref-tier.lv-Legend { color: #fff; background: linear-gradient(135deg, #f5455e, #c01f44); border-color: rgba(255,120,150,.85); box-shadow: 0 0 16px -3px rgba(244,80,110,1); }
.ref-req { color: var(--muted); font-variant-numeric: tabular-nums; }

.ref-treq { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-treq-pill { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent-bright); background: rgba(56,189,248,.16); border: 1px solid rgba(56,189,248,.45); border-radius: 999px; padding: 3px 10px; font-variant-numeric: tabular-nums; }
.ref-avail-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* Hydration Hero — special / custom-only takeover */
.ref-takeover-special { border-color: rgba(245,196,81,.3); }
.ref-takeover-special:hover { border-color: rgba(245,196,81,.6); box-shadow: var(--shadow-card), 0 0 36px -16px rgba(245,196,81,.35); }
.ref-tag-special { color: var(--gold); background: rgba(245,196,81,.13); border-color: rgba(245,196,81,.4); }
.ref-effect-notes { margin: 8px 0 2px; padding-left: 18px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.ref-effect-notes li { margin-bottom: 2px; }

/* Effect tables — tinted glass panel, no flat gray dividers */
.eff-wrap {
  overflow-x: auto; border-radius: 11px; padding: 3px 11px 5px;
  border: 1px solid rgba(99,102,241,.22);
  background: linear-gradient(165deg, rgba(56,189,248,.07), rgba(99,102,241,.06));
}
.eff-table { width: 100%; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.eff-table th { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: var(--accent-bright); text-align: right; padding: 6px 5px 5px; white-space: nowrap; }
.eff-table th:first-child, .eff-table td:first-child { text-align: left; }
.eff-table tr + tr td { border-top: 1px solid rgba(120,150,210,.1); }
.eff-table td { padding: 5px; color: var(--text); text-align: right; white-space: nowrap; font-weight: 600; }
.eff-table .eff-label { color: var(--muted); font-weight: 600; }
.eff-table .eff-active { color: #5ff0c0; font-weight: 800; text-shadow: 0 0 12px rgba(95,240,192,.45); }
/* Per-tier coloured headers on the 7-column badge effect table */
.eff-badge tr:first-child th:nth-child(3) { color: #f0b886; }
.eff-badge tr:first-child th:nth-child(4) { color: #e6eefc; }
.eff-badge tr:first-child th:nth-child(5) { color: #ffd766; }
.eff-badge tr:first-child th:nth-child(6) { color: #d8b4fe; }
.eff-badge tr:first-child th:nth-child(7) { color: #ff9aa6; }

/* ===== Admin Settings — Users panel ===== */
.admin-card {
  max-width: 920px;
  margin: 22px auto 0;
  background: var(--glass-grad);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.admin-title { font-family: "Sora", "Inter", sans-serif; font-size: 19px; font-weight: 800; margin: 0; }
.admin-desc { color: var(--muted); font-size: 13px; margin: 4px 0 0; max-width: 52ch; }
.admin-count { color: var(--faint); font-size: 12px; font-weight: 700; white-space: nowrap; padding-top: 4px; }
.admin-tools { margin: 16px 0 6px; }
.admin-tools input { width: 100%; max-width: 320px; }
.admin-table-wrap { overflow-x: auto; border-top: 1px solid var(--border-soft); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.u-name { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.u-email { color: var(--faint); font-size: 12px; margin-top: 2px; }
.u-you { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-bright); border: 1px solid rgba(103,232,249,.4); border-radius: 999px; padding: 1px 6px; }
.u-g { font-size: 9px; font-weight: 700; color: var(--faint); border: 1px solid var(--border); border-radius: 999px; padding: 1px 6px; }
.u-status { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.utag { font-size: 10px; font-weight: 800; letter-spacing: .3px; border-radius: 999px; padding: 2px 9px; border: 1px solid transparent; white-space: nowrap; }
.tag-owner { color: #ffd766; background: rgba(245,196,81,.16); border-color: rgba(245,196,81,.5); }
.tag-paid { color: #ff9ae0; background: rgba(255,95,221,.14); border-color: rgba(255,95,221,.45); }
.tag-comp { color: var(--accent-bright); background: rgba(56,189,248,.14); border-color: rgba(56,189,248,.45); }
.tag-free { color: var(--faint); background: rgba(255,255,255,.04); border-color: var(--border); }
.tag-admin { color: #c4b5fd; background: rgba(99,102,241,.18); border-color: rgba(99,102,241,.5); }
.u-pro { font-size: 11px; font-weight: 700; }
.u-pro.on { color: var(--green); }
.u-pro.off { color: var(--faint); }
.u-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.u-empty { text-align: center; color: var(--faint); padding: 22px 0; }
.admin-msg { font-size: 12.5px; font-weight: 600; color: var(--green); min-height: 16px; margin: 12px 0 0; }
.admin-msg.err { color: #ff9aa6; }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { position: relative; width: 38px; height: 21px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid var(--border); transition: background .18s, border-color .18s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #cbd5f0; transition: transform .18s, background .18s; }
.switch input:checked + .track { background: linear-gradient(120deg, var(--neon-1), var(--neon-2)); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(17px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .4; }
.switch:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.switch-lbl { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) { .u-actions { flex-direction: column; gap: 8px; align-items: flex-end; } }

/* ===== Optimize-from-prompt: preferred position + auto-fit + message ===== */
.opt-opts { display: grid; gap: 10px; margin: 12px 0 4px; }
.opt-field { display: grid; gap: 6px; }
.opt-field select { font-size: 13px; font-weight: 600; } /* base/arrow come from the global select rule */
.opt-check { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; line-height: 1.35; }

/* Custom checkbox — glass box, neon fill + drawn check when on (matches the theme). */
.check {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; margin: 1px 0 0; flex: none; cursor: pointer; position: relative;
  border: 1px solid var(--border); border-radius: 6px; background: var(--glass-2);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.check:hover { border-color: rgba(103, 232, 249, 0.55); }
.check:checked {
  background: linear-gradient(135deg, var(--neon-1), var(--neon-2));
  border-color: transparent; box-shadow: 0 0 14px -4px rgba(56, 189, 248, 0.85);
}
.check:checked::after {
  content: ""; position: absolute; left: 5px; top: 1px;
  width: 5px; height: 9px; border: solid #061018; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.check:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28); }

.autofit-msg {
  margin: 12px 0 0; padding: 11px 13px; border-radius: 11px;
  font-size: 12.5px; line-height: 1.5; border: 1px solid var(--border);
}
.autofit-msg strong { font-weight: 800; }
.autofit-msg em { font-style: normal; color: var(--accent-bright); font-weight: 700; }
.autofit-msg.ok { color: #d6ffe9; background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.45); box-shadow: 0 0 22px -10px rgba(52,211,153,.7); }
.autofit-msg.warn { color: #ffe6c2; background: rgba(245,196,81,.1); border-color: rgba(245,196,81,.5); }
.autofit-msg.bad { color: #ffd0d6; background: rgba(244,90,110,.1); border-color: rgba(244,90,110,.5); }
.link-btn {
  display: inline; font: inherit; font-size: 12px; font-weight: 800;
  color: var(--accent-bright); background: none; border: none; padding: 0 0 1px;
  border-bottom: 1px solid currentColor; cursor: pointer; margin-left: 2px;
}
.link-btn:hover { color: #fff; }

/* ===== Live feasibility line (above the prompt) ===== */
.feas-range {
  margin: 2px 0 12px; padding: 9px 12px; border-radius: 10px;
  font-size: 12px; line-height: 1.5; border: 1px solid var(--border);
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.feas-range strong { font-weight: 800; color: var(--text); white-space: nowrap; }
.feas-range .fr-tick { font-weight: 900; flex: none; }
.feas-range.ok { color: var(--muted); background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.4); }
.feas-range.ok .fr-tick { color: #34d399; }
.feas-range.ok strong { color: #d6ffe9; }
.feas-range.bad { color: #ffd0d6; background: rgba(244,90,110,.1); border-color: rgba(244,90,110,.5); }
.feas-range.bad .fr-tick { color: #ff8aa0; }

/* ===== Build Like NBA Player tab ===== */
.nba-section {
  padding: 0 24px 32px;
  max-width: 980px;
  margin: 0 auto;
}
.nba-intro { margin-bottom: 20px; }
.nba-intro h2 {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 20px; font-weight: 800; margin: 0 0 6px;
}
.nba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}
.nba-player-card {
  background: var(--glass-grad);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: 16px; padding: 16px 18px;
  cursor: pointer; text-align: left; font: inherit; color: var(--text);
  box-shadow: var(--shadow-card); width: 100%;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex; flex-direction: column; gap: 0;
}
.nba-player-card:hover:not(:disabled) {
  border-color: rgba(103,232,249,.4);
  box-shadow: var(--shadow-card), 0 0 36px -16px rgba(56,189,248,.6);
  transform: translateY(-2px);
}
.nba-player-card:active:not(:disabled) { transform: translateY(0); }
.nba-player-card:disabled { opacity: .5; cursor: default; }
.nba-card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  margin-bottom: 6px;
}
.nba-name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.nba-nickname { font-size: 12px; color: var(--accent-bright); font-weight: 700; margin-top: 3px; }
.nba-archetype { font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 2px; letter-spacing: .15px; text-transform: uppercase; }

/* ============================================================
   Animations Tab
   ============================================================ */
.anim-wrap { padding: 0 16px 60px; max-width: 1100px; margin: 0 auto; }
.anim-toolbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(4,5,11,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0 8px; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.anim-source-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.anim-source-label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
#animSource {
  background: var(--glass-strong); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 5px 10px;
  font-size: 13px; font-family: inherit; cursor: pointer;
  max-width: 260px;
}
.anim-build-info { font-size: 12px; color: var(--muted); }
.anim-build-tag { display: inline-flex; align-items: center; gap: 6px; }
.anim-saved-note { font-size: 11px; color: var(--faint); }
.anim-filters { display: flex; flex-wrap: wrap; gap: 6px; }
/* ---- Groups ---- */
.anim-group {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; margin-bottom: 16px;
}
.anim-group-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.anim-group-title { font-size: 15px; font-weight: 800; color: var(--accent-bright); margin: 0; flex: 1; }
.anim-group-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.anim-toggle-btn { font-size: 11px; padding: 4px 10px; border-radius: 8px; cursor: pointer; }
/* ---- Category ---- */
.anim-cats { display: flex; flex-direction: column; gap: 10px; }
.anim-cat { background: var(--glass-2); border-radius: 10px; overflow: hidden; }
.anim-cat-head {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-bottom: 1px solid var(--border-soft);
  background: rgba(255,255,255,.03);
}
.anim-cat-name { font-size: 12px; font-weight: 700; color: var(--text); flex: 1; }
.anim-cat-count { font-size: 11px; color: var(--muted); }
.anim-near-chip {
  font-size: 10px; font-weight: 700; color: var(--gold);
  background: rgba(245,196,81,.12); border: 1px solid rgba(245,196,81,.3);
  border-radius: 6px; padding: 1px 6px; margin-left: 4px;
}
/* ---- Animation rows ---- */
.anim-rows { display: flex; flex-direction: column; }
.anim-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 12px; font-size: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.anim-row:last-child { border-bottom: none; }
.anim-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--faint);
}
.anim-unlocked .anim-dot { background: var(--green); box-shadow: 0 0 6px rgba(52,211,153,.5); }
.anim-near .anim-dot { background: var(--gold); }
.anim-height .anim-dot { background: var(--faint); opacity: .5; }
.anim-name { flex: 1; font-weight: 600; color: var(--text); min-width: 120px; }
.anim-unlocked .anim-name { color: var(--text); }
.anim-near .anim-name { color: var(--text); }
.anim-locked .anim-name, .anim-height .anim-name { color: var(--faint); }
.anim-muted { color: var(--faint) !important; font-style: italic; }
.anim-reqs { font-size: 11px; color: var(--muted); white-space: nowrap; }
.anim-unlocked .anim-reqs { color: rgba(52,211,153,.7); }
.anim-miss { font-size: 11px; color: var(--gold); font-weight: 600; }
.anim-height-note { font-size: 11px; color: var(--faint); font-style: italic; }
.anim-summary { background: rgba(255,255,255,.02); }
.anim-show-all-link {
  background: none; border: none; color: var(--accent); font-size: 11px;
  font-family: inherit; cursor: pointer; text-decoration: underline; padding: 0;
}
.anim-cb-chip {
  font-size: 9px; font-weight: 800; letter-spacing: .3px;
  background: rgba(245,196,81,.13); border: 1px solid rgba(245,196,81,.35);
  color: var(--gold); border-radius: 5px; padding: 1px 5px;
  cursor: default; flex-shrink: 0;
}
.anim-empty {
  color: var(--muted); font-size: 14px; text-align: center;
  padding: 48px 24px;
}
@media (max-width: 600px) {
  .anim-wrap { padding: 0 10px 48px; }
  .anim-row { gap: 6px; padding: 5px 10px; }
  .anim-cat-head { padding: 6px 10px; }
  #animSource { max-width: 100%; }
}
.nba-pos-badge {
  font-size: 11px; font-weight: 900; letter-spacing: .5px;
  background: rgba(56,189,248,.14); border: 1px solid rgba(56,189,248,.35);
  color: var(--accent-bright); border-radius: 8px; padding: 4px 9px; flex: none;
}
.nba-body-spec { font-size: 12px; color: var(--muted); margin-top: 2px; }
.nba-tagline {
  font-size: 12px; color: var(--faint); margin-top: 7px;
  font-style: italic; line-height: 1.4;
}
.nba-sig {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px;
}
.nba-sig-pill {
  font-size: 10.5px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; border: 1px solid rgba(99,102,241,.38);
  color: #c4b5fd; background: rgba(99,102,241,.11); letter-spacing: .15px;
}
.nba-apply-hint {
  font-size: 11.5px; font-weight: 700; color: var(--accent-bright);
  margin-top: auto; padding-top: 12px; letter-spacing: .1px;
}
@media (max-width: 600px) {
  .nba-section { padding: 0 14px 24px; }
  .nba-grid { grid-template-columns: 1fr; }
}

/* ===== Build By Badges tab ===== */
.bdg-section { padding: 0 24px 32px; max-width: 980px; margin: 0 auto; }
.bdg-header { margin-bottom: 18px; }
.bdg-header h2 { font-family: "Sora","Inter",sans-serif; font-size: 20px; font-weight: 800; margin: 0 0 6px; }

.bdg-controls {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  padding: 4px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.bdg-controls > label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
}
.bdg-controls select, .bdg-cb-input {
  font: inherit; background: var(--glass-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px;
}
.bdg-controls select { padding-right: 28px; min-width: 64px; }
.bdg-cb-input { width: 64px; }
.bdg-height-select { min-width: 108px; }
.bdg-gen-wrap { display: flex; align-items: flex-end; gap: 8px; }
.bdg-clear-btn { padding: 8px 14px; font-size: 12.5px; }

/* Category sections */
.bdg-picker { display: flex; flex-direction: column; gap: 22px; padding-top: 16px; }
.bdg-cat-title {
  font-size: 11px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.bdg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 7px; }

/* Individual badge card */
.bdg-card {
  background: var(--glass-grad); border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: 10px; padding: 9px 11px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  transition: border-color .12s;
}
.bdg-card.has-tier { border-color: rgba(103,232,249,.38); }
.bdg-card-name {
  font-size: 12.5px; font-weight: 700; flex: 1; min-width: 100px;
  display: flex; align-items: baseline; gap: 6px; line-height: 1.3;
}
.bdg-h-note {
  font-size: 10px; font-weight: 600; color: var(--faint);
  background: rgba(255,255,255,.06); border-radius: 5px; padding: 2px 5px;
  font-style: normal; white-space: nowrap; flex-shrink: 0;
}
.bdg-tiers { display: flex; gap: 3px; flex-wrap: wrap; }
.bdg-tier-btn {
  font: inherit; font-size: 10.5px; font-weight: 800; letter-spacing: .1px;
  padding: 4px 8px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--faint);
  transition: border-color .1s, background .1s, color .1s;
}
.bdg-tier-btn:hover:not(:disabled) { border-color: rgba(103,232,249,.3); color: var(--text); }
.bdg-tier-btn.active {
  background: rgba(56,189,248,.18); border-color: rgba(56,189,248,.5);
  color: var(--accent-bright);
}
/* "Off" active = muted, not cyan */
.bdg-tier-btn[data-tier=""].active {
  background: rgba(255,255,255,.06); border-color: var(--border); color: var(--muted);
}

/* Right column: free chip sits beside the tier buttons */
.bdg-card-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bdg-free-chip {
  font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 6px;
  background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.32);
  color: rgb(134,239,172); white-space: nowrap; flex-shrink: 0; letter-spacing: .2px;
}

/* Unavailable badge (height-restricted at current height) */
.bdg-unavail .bdg-card-name,
.bdg-unavail .bdg-card-right { opacity: .3; pointer-events: none; }
.bdg-unavail-note {
  width: 100%; font-size: 10px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--faint); padding-top: 3px;
}

@media (max-width: 600px) {
  .bdg-section { padding: 0 14px 24px; }
  .bdg-cards { grid-template-columns: 1fr; }
  .bdg-controls { gap: 10px; }
  .bdg-gen-wrap { width: 100%; }
  #bdgGenerate { flex: 1; }
}

/* ===== Themed scrollbars (match the glass/neon UI on every scroll area) ===== */
* { scrollbar-width: thin; scrollbar-color: rgba(99, 102, 241, 0.55) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-1), var(--neon-2));
  border-radius: 999px; border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-bright), var(--neon-2));
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

/* ===== Mobile polish for recent features (badges/takeovers, optimize, admin) ===== */
@media (max-width: 640px) {
  /* Badges + Takeovers: single column, no edge clipping, full-width search */
  .ref-wrap { padding: 0 14px 26px; }
  .ref-grid { grid-template-columns: 1fr; gap: 12px; }
  .ref-toolbar { margin-bottom: 10px; }
  #badgeSearch, #takeoverSearch { max-width: none; }
  .ref-filters { gap: 6px; margin-bottom: 14px; }
  .ref-badge, .ref-takeover { padding: 14px; }

  /* Optimize-from-prompt controls go full width */
  .admin-tools input { max-width: none; }

  /* Admin Users panel: stack each user into a card instead of a wide table */
  .admin-card { padding: 18px 14px; border-radius: 16px; margin-top: 16px; }
  .admin-table-wrap { overflow-x: visible; border-top: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: auto; }
  .admin-table tr { border: 1px solid var(--border); border-radius: 12px; background: var(--glass-2); padding: 13px; margin-bottom: 10px; }
  .admin-table td { padding: 0; border: none; }
  .u-status { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; margin: 9px 0; }
  .u-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 14px 22px; }
}

/* ===== v13: Email verification banner + auth helpers ===== */

/* Dismissible banner shown to unverified users in the app */
.verify-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(245, 158, 11, .10);
  border-bottom: 1px solid rgba(245, 158, 11, .28);
  padding: 10px 18px; font-size: 13px; color: #fcd34d;
  position: relative; z-index: 90;
}
.verify-banner-msg {
  display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0;
  color: #fde68a; font-weight: 500;
}
.verify-banner-msg svg { flex-shrink: 0; opacity: .85; }
.verify-banner-btn {
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  background: rgba(245,158,11,.18); border: 1px solid rgba(245,158,11,.4);
  color: #fcd34d; border-radius: 7px; padding: 5px 12px;
  transition: background .15s, border-color .15s; white-space: nowrap;
}
.verify-banner-btn:hover:not(:disabled) { background: rgba(245,158,11,.28); border-color: rgba(245,158,11,.6); }
.verify-banner-btn:disabled { opacity: .55; cursor: default; }
.verify-banner-dismiss {
  font: inherit; font-size: 18px; line-height: 1; cursor: pointer;
  background: none; border: none; color: rgba(253,230,138,.5);
  padding: 2px 4px; border-radius: 5px; transition: color .12s;
  flex-shrink: 0; margin-left: auto;
}
.verify-banner-dismiss:hover { color: #fde68a; }

/* "Forgot password?" link on the login page */
.auth-forgot {
  font-size: 13px; color: var(--muted); text-decoration: none; transition: color .12s;
}
.auth-forgot:hover { color: var(--accent-bright); }

/* Success message on the login page (e.g. after password reset) */
.login-ok {
  font-size: 13.5px; color: #4ade80; font-weight: 500;
  min-height: 18px; text-align: center; margin: 0 0 2px;
}

/* Admin panel: email verification status tags */
.tag-verified { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.3); color: #86efac; }
.tag-unverified { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.28); color: #fcd34d; }

@media (max-width: 600px) {
  .verify-banner { padding: 9px 14px; gap: 8px; }
  .verify-banner-msg { font-size: 12.5px; }
}
