/* ============================================================
   Dating Copilot — design system
   Brand identity (2026-10-08 reskin): near-black with indigo→violet
   gradient wash, electric violet #7C5CFF single accent, clean white
   typography. Matches the Dating Copilot Facebook Page brand.
   No external fonts (offline-safe).
   ============================================================ */

:root {
  --bg: #080810;
  --bg-grad-1: #14121f;
  --bg-grad-2: #080810;
  --surface: #12101a;
  --surface-2: #1a1626;
  --surface-3: #231d36;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --violet: #7c5cff;
  --violet-deep: #5a3df5;
  --violet-soft: rgba(124, 92, 255, 0.14);
  --rose: #e0788a;
  --rose-soft: rgba(224, 120, 138, 0.12);
  --text: #f8f8fc;
  --muted: #a5a3b8;
  --muted-2: #7d7a90;
  --success: #7fc98f;
  --warn: #e5b45b;
  --danger: #e0788a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --topbar-h: 58px;
  --bottomnav-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(124, 92, 255, 0.12), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(90, 61, 245, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 40%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
#view {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 18px) 18px 40px;
  min-height: 100vh;
}
#view.wide { max-width: 880px; }
body.has-bottomnav #view { padding-bottom: calc(var(--bottomnav-h) + 32px); }

/* ---------- api banner ---------- */
.api-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: rgba(224, 120, 138, 0.12);
  border-bottom: 1px solid rgba(224, 120, 138, 0.35);
  color: #f3c9cf;
  font-size: 13px;
  text-align: center;
}
.api-banner-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rose); flex: 0 0 auto;
  box-shadow: 0 0 10px var(--rose);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- topbar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: rgba(14, 12, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
body.has-topbar { padding-top: 0; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: block; object-fit: cover;
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.45);
}
.brand-name {
  font-weight: 800; letter-spacing: 0.2px; color: var(--text); font-size: 16px;
}
.topbar-nav { display: flex; gap: 8px; align-items: center; }
.topbar-nav a, .topbar-nav button {
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  padding: 8px 12px; border-radius: 999px;
  background: transparent; border: 0; cursor: pointer; font-family: var(--font);
  text-decoration: none;
}
.topbar-nav a:hover, .topbar-nav button:hover { color: var(--text); background: var(--surface-2); }
.topbar-nav .cta-gold {
  color: #ffffff; background: linear-gradient(135deg, var(--violet), var(--violet-deep));
}

/* ---------- typography ---------- */
h1, h2, h3 { line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.3px; }
h1 { font-size: 34px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 750; }
h3 { font-size: 18px; font-weight: 700; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--violet);
  margin-bottom: 10px;
}
.lede { color: var(--muted); font-size: 16px; margin: 0 0 22px; }
.section { margin: 34px 0; }
.section-title { font-size: 20px; margin-bottom: 6px; }
.section-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.grad-text {
  background: linear-gradient(120deg, #c4b5fd, var(--violet) 45%, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 16px;
  padding: 15px 24px; border-radius: 16px; border: 0; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  text-decoration: none; line-height: 1.2;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-deep) 100%);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.32);
  width: 100%;
}
.btn-primary:hover { box-shadow: 0 12px 34px rgba(124, 92, 255, 0.45); }
.btn-ghost {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-strong); width: 100%;
}
.btn-rose {
  background: linear-gradient(135deg, #e8949f, var(--rose));
  color: #2a0e13; width: 100%;
  box-shadow: 0 10px 28px rgba(224, 120, 138, 0.3);
}
.btn-sm { font-size: 14px; padding: 10px 16px; border-radius: 12px; width: auto; }
.btn:disabled, .btn.disabled {
  opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none;
}
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-gold { border: 1px solid rgba(124, 92, 255, 0.45); position: relative; }
.card-gold::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: radial-gradient(600px 120px at 50% -20%, rgba(124, 92, 255, 0.14), transparent 70%);
  pointer-events: none;
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); margin: 6px 0; font-size: 14.5px; }

/* ---------- chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.chip {
  padding: 10px 16px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--violet); }
.chip.active {
  background: var(--violet-soft); border-color: var(--violet); color: var(--violet);
}
.chip.disabled-chip {
  opacity: 0.55; cursor: not-allowed;
}
.chip.disabled-chip:hover { border-color: var(--border-strong); }
.chip .soon {
  display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 1px; color: var(--violet); text-transform: uppercase;
}

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.input, .textarea {
  width: 100%; font-family: var(--font); font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 14px 16px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}
.textarea { min-height: 150px; resize: vertical; }
.form-error {
  background: var(--rose-soft); border: 1px solid rgba(224, 120, 138, 0.4);
  color: #f3c9cf; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14px; margin-bottom: 16px;
}
.form-note { font-size: 13px; color: var(--muted-2); margin-top: 12px; text-align: center; }

/* ---------- hero (landing) ---------- */
.hero { text-align: center; padding: 26px 0 8px; }
.hero h1 { font-size: 40px; margin-bottom: 12px; }
.hero .tagline { font-size: 19px; font-weight: 600; color: var(--violet); margin: 0 0 14px; }
.hero p.body { color: var(--muted); font-size: 16px; max-width: 480px; margin: 0 auto 26px; }
.hero-ctas { display: flex; flex-direction: column; gap: 12px; max-width: 420px; margin: 0 auto 34px; }

/* mock chat demo */
.mockwrap { margin: 10px 0 26px; }
.mock-panels { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .mock-panels { grid-template-columns: 1fr 1fr; } }
.mock {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); overflow: hidden; text-align: left;
  box-shadow: var(--shadow);
}
.mock-header {
  padding: 12px 16px; font-weight: 700; font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.mock-header .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }
.mock-body { padding: 14px 16px; }
.bubble {
  max-width: 85%; padding: 10px 14px; border-radius: 16px;
  font-size: 14px; margin-bottom: 10px; line-height: 1.45;
}
.bubble.them { background: var(--surface-3); border-bottom-left-radius: 5px; align-self: flex-start; }
.bubble.you { background: linear-gradient(135deg, #5a3df5, var(--violet-deep)); color: #ffffff; border-bottom-right-radius: 5px; margin-left: auto; }
.analysis-snippet { padding: 14px 16px; font-size: 14px; color: var(--muted); }
.analysis-snippet .quote {
  border-left: 3px solid var(--violet); padding-left: 12px; margin-bottom: 12px;
  color: var(--text); font-style: italic;
}
.suggest-row {
  background: var(--violet-soft); border: 1px dashed rgba(124, 92, 255, 0.6);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px;
  margin-bottom: 12px; color: var(--text);
}

/* ---------- feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.feature-card { padding: 20px; }
.feature-card .ficon { font-size: 26px; margin-bottom: 10px; display: block; }
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { font-size: 13.5px; margin: 0; }

/* ---------- pricing teaser / pricing page ---------- */
.plans { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .plans { grid-template-columns: 1fr 1fr 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; }
.plan .plan-name { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.plan .plan-price { font-size: 38px; font-weight: 800; margin: 8px 0 2px; }
.plan .plan-price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan .plan-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #ffffff; font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.plan ul { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; }
.plan li { font-size: 14px; color: var(--muted); padding: 7px 0 7px 26px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 4px; color: var(--violet); font-weight: 700; }
.plan .btn { margin-top: auto; }

/* ---------- footer ---------- */
.footer { margin-top: 48px; padding: 28px 0 10px; border-top: 1px solid var(--border); text-align: center; }
.footer-links { display: flex; gap: 22px; justify-content: center; margin-bottom: 14px; }
.footer-links a { color: var(--muted); font-size: 13.5px; }
.footer p { color: var(--muted-2); font-size: 12.5px; margin: 6px 0; }

/* ---------- bottom nav ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 50;
  display: flex;
  background: rgba(18, 15, 23, 0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted-2); text-decoration: none; font-size: 11px; font-weight: 600;
}
.bottomnav a.active { color: var(--violet); }
.bottomnav .bn-icon { font-size: 21px; }

/* ---------- stepper ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.step-dot {
  flex: 1; height: 5px; border-radius: 99px; background: var(--surface-3);
}
.step-dot.done { background: var(--violet); }
.step-dot.now { background: linear-gradient(90deg, var(--violet), var(--violet-deep)); box-shadow: 0 0 10px rgba(217,164,91,0.5); }

/* ---------- need cards ---------- */
.need-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.need-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 14px; text-align: center;
  cursor: pointer; font-family: var(--font); color: var(--text);
  transition: border-color 0.15s, transform 0.12s;
}
.need-card:hover:not(:disabled) { border-color: var(--violet); }
.need-card:active:not(:disabled) { transform: scale(0.97); }
.need-card .nicon { font-size: 30px; display: block; margin-bottom: 10px; }
.need-card .nlabel { font-size: 14px; font-weight: 700; display: block; }
.need-card .nsoon {
  display: inline-block; margin-top: 8px; font-size: 10px; font-weight: 800;
  letter-spacing: 1.2px; color: var(--violet);
  background: var(--violet-soft); border: 1px solid rgba(217,164,91,0.4);
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}
.need-card:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- upload ---------- */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 38px 20px; text-align: center; cursor: pointer;
  background: var(--surface); transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--violet); background: var(--surface-2); }
.dropzone .dz-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.dropzone p { margin: 4px 0; color: var(--muted); font-size: 14.5px; }
.dropzone p strong { color: var(--text); }
.preview-wrap { margin: 14px 0; text-align: center; }
.preview-wrap img {
  max-height: 320px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); margin: 0 auto;
}
.preview-actions { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.or-divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0;
  color: var(--muted-2); font-size: 13px; font-weight: 600;
}
.or-divider::before, .or-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* ---------- loading ---------- */
.loading-block { text-align: center; padding: 50px 20px; }
.spinner {
  width: 52px; height: 52px; margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid var(--surface-3);
  border-top-color: var(--violet);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block h3 { margin-bottom: 8px; }
.loading-block p { color: var(--muted); font-size: 14px; }
.loading-phrases { min-height: 24px; color: var(--violet); font-size: 14px; font-weight: 600; margin-top: 10px; }

/* ---------- score ring ---------- */
.score-hero { display: flex; align-items: center; gap: 22px; margin: 6px 0 20px; }
.ring {
  --pct: 0; --ring: var(--violet);
  width: 132px; height: 132px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), var(--surface-3) 0);
}
.ring::after {
  content: ""; position: absolute; inset: 12px; border-radius: 50%;
  background: var(--surface);
}
.ring-inner { position: relative; z-index: 1; text-align: center; }
.ring-num { font-size: 38px; font-weight: 800; line-height: 1; }
.ring-label { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.score-verdict h2 { margin-bottom: 4px; font-size: 22px; }
.score-verdict p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---------- metric bars ---------- */
.metric { margin-bottom: 14px; }
.metric-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.metric-top .mname { font-weight: 600; }
.metric-top .mval { color: var(--violet); font-weight: 700; }
.bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > span {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--violet-deep), var(--violet));
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- lists ---------- */
.list-check, .list-warn { list-style: none; padding: 0; margin: 10px 0; }
.list-check li, .list-warn li {
  font-size: 14.5px; padding: 9px 0 9px 30px; position: relative;
  border-bottom: 1px solid var(--border);
}
.list-check li:last-child, .list-warn li:last-child { border-bottom: 0; }
.list-check li::before { content: "✓"; position: absolute; left: 2px; color: var(--success); font-weight: 800; }
.list-warn li::before { content: "⚠"; position: absolute; left: 0; color: var(--warn); }

/* ---------- signal cards ---------- */
.signal {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px; background: var(--surface);
}
.signal .slabel { font-weight: 700; font-size: 14px; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.signal .stext { font-size: 13.5px; color: var(--muted); margin: 0; }
.tone-positive { color: var(--success); }
.tone-caution { color: var(--warn); }
.tone-negative { color: var(--danger); }
.tone-neutral { color: var(--muted); }

/* ---------- reply cards ---------- */
.reply-card { margin-bottom: 14px; }
.reply-text {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 15px 16px; font-size: 15px;
  margin-bottom: 10px;
}
.reply-actions { display: flex; gap: 10px; }
.reply-actions .btn { flex: 1; }
.why-box {
  margin-top: 10px; font-size: 13.5px; color: var(--muted);
  background: var(--violet-soft); border: 1px solid rgba(217,164,91,0.3);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.why-box strong { color: var(--violet); }

.disclaimer {
  font-size: 12.5px; color: var(--muted-2); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-top: 18px; line-height: 1.5;
}

.recommendation { font-size: 15px; color: var(--text); }
.recommendation strong { color: var(--violet); }

/* ---------- upsell card ---------- */
.upsell {
  border: 1px solid rgba(124, 92, 255, 0.5);
  background: linear-gradient(160deg, rgba(217,164,91,0.12), var(--surface-2) 60%);
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
  margin-top: 24px; box-shadow: var(--shadow);
}
.upsell h3 { font-size: 20px; margin-bottom: 8px; }
.upsell p { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 6, 10, 0.75);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadein 0.2s ease;
}
@media (min-width: 560px) { .modal-backdrop { align-items: center; padding: 24px; } }
@keyframes fadein { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 440px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 22px 22px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow); animation: slideup 0.28s cubic-bezier(0.22,1,0.36,1);
}
@media (min-width: 560px) { .modal { border-radius: 22px; } }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } }
.modal h3 { font-size: 22px; text-align: center; margin-bottom: 8px; }
.modal .modal-sub { text-align: center; color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer;
}
.modal-wrap { position: relative; }

/* ---------- toast ---------- */
#toast-root { position: fixed; bottom: calc(var(--bottomnav-h) + 16px); left: 0; right: 0; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--surface-3); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 14px; font-weight: 600;
  padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow);
  animation: slideup 0.25s ease; max-width: 90vw; text-align: center;
}
.toast.success { border-color: rgba(127, 201, 143, 0.5); }
.toast.error { border-color: rgba(224, 120, 138, 0.5); }

/* ---------- dashboard ---------- */
.greet h1 { font-size: 30px; margin-bottom: 4px; }
.greet p { color: var(--muted); margin: 0 0 20px; font-size: 15.5px; }
.usage-meter { margin-bottom: 20px; }
.usage-top { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.usage-top strong { color: var(--text); }
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
.tool-card {
  display: block; text-align: left; font-family: var(--font);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; cursor: pointer; color: var(--text);
  transition: border-color 0.15s, transform 0.12s;
  width: 100%;
}
a.tool-card:hover, button.tool-card:hover { border-color: var(--violet); text-decoration: none; }
a.tool-card:active, button.tool-card:active { transform: scale(0.98); }
.tool-card .ticon { font-size: 32px; display: block; margin-bottom: 12px; }
.tool-card h3 { font-size: 17px; margin-bottom: 6px; }
.tool-card p { font-size: 13.5px; color: var(--muted); margin: 0; }
.soon-strip {
  margin-top: 26px; padding: 20px; border: 1px dashed var(--border-strong);
  border-radius: var(--radius); background: rgba(255,255,255,0.015);
}
.soon-strip h3 { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.soon-list { display: flex; flex-wrap: wrap; gap: 8px; }
.soon-item {
  font-size: 12.5px; font-weight: 600; color: var(--muted-2);
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px 13px; border-radius: 999px;
}

/* ---------- history ---------- */
.history-item {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  cursor: pointer; font-family: var(--font); width: 100%; text-align: left; color: var(--text);
  transition: border-color 0.15s;
}
.history-item:hover { border-color: var(--violet); }
.hist-score {
  width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800; font-size: 19px;
  background: conic-gradient(var(--violet) calc(var(--pct, 0) * 1%), var(--surface-3) 0);
  position: relative;
}
.hist-score::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface-2); }
.hist-score span { position: relative; z-index: 1; }
.hist-main { flex: 1; min-width: 0; }
.hist-title { font-weight: 700; font-size: 15px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-date { font-size: 12.5px; color: var(--muted-2); }
.hist-delete {
  background: none; border: 0; color: var(--muted-2); font-size: 19px;
  cursor: pointer; padding: 8px; border-radius: 10px;
}
.hist-delete:hover { color: var(--danger); background: var(--rose-soft); }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .eicon { font-size: 52px; display: block; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }

/* ---------- profile ---------- */
.profile-hero { text-align: center; margin-bottom: 24px; }
.avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; font-size: 32px; font-weight: 800;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep)); color: #ffffff;
}
.pro-badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  color: #ffffff; background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  padding: 5px 14px; border-radius: 999px; text-transform: uppercase;
}
.free-badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  color: var(--muted); background: var(--surface-3);
  padding: 5px 14px; border-radius: 999px; text-transform: uppercase;
}
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.stat-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-align: center;
}
.stat-box .snum { font-size: 26px; font-weight: 800; color: var(--violet); }
.stat-box .slab { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.danger-zone { margin-top: 30px; border-top: 1px solid var(--border); padding-top: 22px; }
.danger-zone .btn { width: 100%; margin-bottom: 10px; }

/* ---------- legal pages ---------- */
.legal h2 { margin-top: 28px; font-size: 19px; }
.legal p, .legal li { color: var(--muted); font-size: 14.5px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }

/* ---------- misc ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 18px;
}
.back-link:hover { color: var(--text); text-decoration: none; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 30px; }
.skeleton { background: var(--surface-3); border-radius: var(--radius-sm); animation: pulse 1.4s ease-in-out infinite; }
.expander { margin-top: 8px; }
.expander summary { cursor: pointer; color: var(--violet); font-size: 13.5px; font-weight: 600; }
.expander summary:hover { text-decoration: underline; }
.vibe-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 20px; }
.inline-note {
  font-size: 13.5px; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-top: 14px;
}
.inline-note strong { color: var(--violet); }
