/* Interest Optimizer — brand system */
:root {
  --ink: #0e1126;
  --text: #1b1f3b;
  --muted: #6b7091;
  --faint: #9aa0bd;
  --bg: #f5f6fb;
  --card: #ffffff;
  --line: #e6e8f2;
  --line-strong: #d6d9e8;
  --brand: #4f46e5;
  --brand-2: #06b6d4;
  --brand-deep: #1e1b4b;
  --brand-soft: #eef0ff;
  --brand-ink: #ffffff;
  --grad: linear-gradient(135deg, #4f46e5 0%, #6d5bff 45%, #06b6d4 100%);
  --danger: #e5484d;
  --danger-soft: #fff0f0;
  --ok: #12a150;
  --ok-soft: #e9f9ef;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 60, .06);
  --shadow: 0 1px 2px rgba(16, 20, 60, .05), 0 8px 24px -8px rgba(16, 20, 60, .12);
  --shadow-lg: 0 24px 60px -20px rgba(30, 27, 75, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 14px/1.55 var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(6, 182, 212, .08), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(79, 70, 229, .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 15px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: rgba(79, 70, 229, .18); }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -40px) scale(1.08); } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

.rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--d, 0) * 70ms); }

/* ---------- header ---------- */
header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(214, 217, 232, .7);
  animation: fade .4s ease both;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--ink); letter-spacing: -.02em; }
.logo small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: 1px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff;
  display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .4s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.logo-mark svg { width: 20px; height: 20px; }
.nav { display: flex; align-items: center; gap: 10px; }
.user-pill {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--ink);
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.nav-link { font-weight: 600; font-size: 13px; padding: 7px 12px; border-radius: 999px; color: var(--text); transition: background .2s; }
.nav-link:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------- layout ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
  animation: rise .6s var(--ease) both; animation-delay: calc(var(--d, 0) * 80ms);
}
.card-head { display: flex; align-items: center; gap: 10px; }
.card-icon {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--brand-soft); color: var(--brand);
}
.card-icon svg { width: 17px; height: 17px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.layout > aside { position: sticky; top: 78px; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } .layout > aside { position: static; } }

/* ---------- inputs & buttons ---------- */
input, select, button, textarea { font: inherit; }
input[type=text], input[type=password], input[type=number], select {
  height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder { color: var(--faint); }
input:hover, select:hover { border-color: #c3c7dc; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79, 70, 229, .14); }
input[readonly] { background: #f8f9fd; }
select { appearance: none; padding-right: 30px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7091' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }

button, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; font-weight: 600; font-size: 13.5px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s, opacity .2s;
}
button:hover, a.btn:hover { transform: translateY(-1px); border-color: #c3c7dc; box-shadow: 0 4px 12px -4px rgba(16, 20, 60, .15); }
button:active, a.btn:active { transform: translateY(0) scale(.98); }
button svg, a.btn svg { width: 16px; height: 16px; flex: none; }
button.primary, a.btn.primary {
  background: var(--grad); background-size: 160% 100%; border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px -8px rgba(79, 70, 229, .8), inset 0 1px 0 rgba(255, 255, 255, .2);
}
button.primary:hover, a.btn.primary:hover { background-position: 100% 0; box-shadow: 0 10px 24px -8px rgba(79, 70, 229, .8); }
button.ai {
  color: #fff; border-color: transparent; position: relative; overflow: hidden;
  background: linear-gradient(110deg, #1e1b4b 0%, #4338ca 35%, #0891b2 50%, #4338ca 65%, #1e1b4b 100%);
  background-size: 250% 100%; animation: gradientShift 5s linear infinite;
  box-shadow: 0 6px 18px -8px rgba(30, 27, 75, .9);
}
button.ai:hover { animation-duration: 1.6s; }
button.danger { color: var(--danger); }
button.danger:hover { background: var(--danger-soft); border-color: #f8c4c5; }
button.sm, a.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
button.ghost { background: transparent; box-shadow: none; border-color: transparent; }
button.ghost:hover { background: var(--brand-soft); color: var(--brand); }
button.link { border: 0; background: none; color: var(--brand); padding: 0; height: auto; box-shadow: none; font-weight: 600; }
button.link:hover { transform: none; box-shadow: none; text-decoration: underline; }
button:disabled, a.btn.disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }

/* ---------- search hero ---------- */
.search-card { padding: 22px; position: relative; overflow: hidden; }
.search-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad);
  background-size: 200% 100%; animation: gradientShift 4s linear infinite;
}
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; transition: color .2s; }
.search-box input { height: 48px; padding-left: 42px; font-size: 15px; border-radius: 12px; }
.search-box:focus-within svg { color: var(--brand); }
.search-card .row > button { height: 48px; border-radius: 12px; padding: 0 18px; }

.ai-box { background: linear-gradient(180deg, #f6f5ff, #f1fbfd); border: 1px solid #e3e1ff; border-radius: 12px; padding: 14px; animation: rise .45s var(--ease) both; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid #dcd9ff; font-weight: 600; font-size: 12.5px;
  background: #fff; color: var(--brand); box-shadow: none;
  animation: pop .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms);
}
.chip:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.done { background: var(--ok-soft); color: var(--ok); border-color: #b6ebc9; }
.chip.done::before { content: "✓"; font-weight: 800; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px; background: #f8f9fd; border: 1px solid var(--line); border-radius: 12px; }
.toolbar select { height: 32px; width: auto; font-size: 12.5px; font-weight: 600; border-radius: 8px; }
.toolbar .sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 2px; }
.count-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px; transition: transform .25s var(--ease); }
.count-pill.bump { transform: scale(1.12); }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #eef0f6; vertical-align: middle; }
th { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: #fafbfe; position: sticky; top: 0; z-index: 1; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #f8f8ff; }
tbody tr.anim { animation: rise .45s var(--ease) both; animation-delay: min(calc(var(--i, 0) * 22ms), 600ms); }
tbody tr.sel { background: #f4f3ff; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
td.path { color: var(--muted); font-size: 12px; max-width: 280px; }
.iname { font-weight: 700; color: var(--ink); }
.iid { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.check { width: 40px; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.aud { display: grid; gap: 5px; min-width: 120px; }
.aud-bar { height: 4px; border-radius: 4px; background: #eef0f6; overflow: hidden; }
.aud-bar span { display: block; height: 100%; background: var(--grad); border-radius: 4px; transform-origin: left; animation: growX .8s var(--ease) both; animation-delay: min(calc(var(--i, 0) * 22ms + 150ms), 750ms); }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.via { display: flex; flex-wrap: wrap; gap: 4px; }
.via span { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #f1f2f8; color: var(--muted); font-weight: 600; }
.copy-btn { opacity: .55; }
tr:hover .copy-btn { opacity: 1; }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-icon {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); animation: pop .5s var(--ease) both;
}
.empty-icon svg { width: 24px; height: 24px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.skel { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eef0f6 25%, #f8f9fd 50%, #eef0f6 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f1f2f8; color: var(--muted); }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--danger-soft); color: var(--danger); }
.badge.on::before, .badge.off::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.on::before { animation: pulse 2s infinite; }

/* ---------- lists panel ---------- */
.list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px;
  border-radius: 10px; cursor: pointer; border: 1px solid transparent; font-weight: 600; color: var(--ink);
  transition: background .2s, border-color .2s, transform .2s var(--ease);
  animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
}
.list-item:hover { background: #f6f6fd; transform: translateX(2px); }
.list-item.active { background: var(--brand-soft); border-color: #d9d6ff; color: var(--brand); }
.list-item .badge { background: #fff; }
.lists-box > * + * { margin-top: 4px; }
.list-detail { border-top: 1px solid var(--line); padding-top: 14px; animation: rise .4s var(--ease) both; }
.saved-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 2px; border-bottom: 1px solid #f0f1f7; animation: fade .3s ease both; }
.saved-row:last-child { border-bottom: 0; }
.scroll { max-height: 420px; overflow: auto; }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr; } }
.stat { padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.stat .card-icon { width: 42px; height: 42px; border-radius: 12px; }
.stat .card-icon svg { width: 20px; height: 20px; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
@media (max-width: 980px) { .grid-2 { grid-template-columns: 1fr; } }
.step { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.step-title { font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--ink); flex-wrap: wrap; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.step.done .step-num { background: var(--ok); }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#tokenForm { border-top: 0; padding-top: 0; }
.howto { border: 1px solid var(--line); border-radius: 10px; background: #fafbfe; }
.howto summary { cursor: pointer; padding: 9px 12px; font-weight: 700; font-size: 13px; color: var(--brand); list-style: none; display: flex; align-items: center; gap: 8px; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before { content: "›"; font-size: 16px; line-height: 1; transition: transform .25s var(--ease); }
.howto[open] summary::before { transform: rotate(90deg); }
.howto-body { padding: 0 14px 12px; font-size: 13px; color: var(--text); animation: rise .35s var(--ease) both; }
.howto-body ol { margin: 6px 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.howto-body a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.alert { padding: 11px 14px; border-radius: 10px; background: var(--danger-soft); color: #b42318; border: 1px solid #fecdca; font-weight: 600; font-size: 13px; animation: rise .35s var(--ease) both; }
.who { display: flex; align-items: center; gap: 10px; }
.who .avatar { width: 32px; height: 32px; font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-brand { display: none; } }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 120% at 0% 0%, #312e81 0%, #1e1b4b 45%, #0b0a24 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 14s ease-in-out infinite; }
.blob.b1 { width: 420px; height: 420px; background: #6d5bff; top: -120px; right: -80px; }
.blob.b2 { width: 360px; height: 360px; background: #06b6d4; bottom: -140px; left: -60px; animation-delay: -5s; animation-duration: 18s; }
.blob.b3 { width: 220px; height: 220px; background: #a855f7; top: 45%; left: 40%; opacity: .35; animation-delay: -9s; }
.grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); }
.auth-brand > :not(.blob):not(.grid-bg) { position: relative; }
.auth-brand .logo { color: #fff; }
.auth-brand .logo small { color: rgba(255, 255, 255, .6); }
.auth-brand h1 { color: #fff; font-size: 40px; line-height: 1.1; letter-spacing: -.03em; max-width: 520px; }
.auth-brand h1 em { font-style: normal; background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand p.lead { color: rgba(255, 255, 255, .72); font-size: 15.5px; max-width: 460px; margin: 16px 0 28px; }
.features { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.features li { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, .88); font-weight: 500; }
.features li span { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); flex: none; }
.features li svg { width: 15px; height: 15px; }
.mock {
  margin-top: 32px; max-width: 440px; border-radius: 14px; padding: 14px; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(8px); box-shadow: var(--shadow-lg);
}
.mock-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 13px; animation: rise .6s var(--ease) both; animation-delay: calc(.6s + var(--i) * 120ms); }
.mock-row:last-child { border-bottom: 0; }
.mock-row b { flex: 1; font-weight: 600; }
.mock-row i { font-style: normal; color: #a5f3fc; font-variant-numeric: tabular-nums; font-size: 12px; }
.mock-bar { width: 70px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.mock-bar span { display: block; height: 100%; background: linear-gradient(90deg, #818cf8, #22d3ee); transform-origin: left; animation: growX 1s var(--ease) both; animation-delay: calc(.9s + var(--i) * 120ms); }
.auth-foot { color: rgba(255, 255, 255, .5); font-size: 12px; }

.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: 100%; max-width: 400px; padding: 32px; border-radius: 20px; box-shadow: var(--shadow-lg); }
.login-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.field { display: grid; gap: 6px; }
.field span { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 28px; padding: 0 9px; font-size: 12px; box-shadow: none; border-color: transparent; background: transparent; color: var(--muted); }
.pw-toggle:hover { transform: translateY(-50%); background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.price {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #f3f2ff, #ecfbfe); border: 1px solid #e0defd;
}
.price b { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price .tag { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); background: #fff; padding: 3px 8px; border-radius: 999px; border: 1px solid #e0defd; }
.error { color: var(--danger); min-height: 20px; font-weight: 600; font-size: 13px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.mobile-logo { display: none; }
@media (max-width: 900px) { .mobile-logo { display: flex; margin-bottom: 4px; } }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 24px) scale(.96);
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 11px 16px 11px 12px; border-radius: 12px; opacity: 0;
  font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-lg);
  transition: opacity .25s, transform .35s var(--ease); pointer-events: none; z-index: 50; max-width: calc(100% - 32px);
}
#toast::before { content: "✓"; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); font-size: 12px; flex: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
#toast.err::before { content: "!"; background: var(--danger); }

@media (max-width: 640px) {
  main { padding: 16px; }
  header.top { padding: 10px 16px; }
  .logo small, .user-pill .name, .hide-sm { display: none; }
  .logo { font-size: 14.5px; white-space: nowrap; }
  .nav { gap: 4px; }
  .nav-link { white-space: nowrap; padding: 6px 8px; }
  .user-pill { display: none; }
  .search-card .row > button { flex: 1; }
}

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