/* ============================================================
   Aby Store — Design System
   Brand: Vibrant Coral + Ink + Electric Lime
   Type: Space Grotesk (display) · Plus Jakarta Sans (UI/body)
   WCAG AA target, mobile-first, reduced-motion aware
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Ink / neutral (warm) */
  --ink-950: #17110D;
  --ink-900: #1F1813;
  --ink-800: #2E2620;
  --ink-700: #4B423B;   /* secondary text */
  --ink-500: #8C837B;   /* muted */
  --ink-300: #C9C2BB;
  --line: #ECE5DE;
  --line-strong: #DCD3C9;
  --paper: #FFFBF7;     /* page background */
  --surface: #FFFFFF;
  --surface-warm: #FFF6F0;

  /* Brand — Vibrant Coral (primary) */
  --brand-50:  #FFF1EC;
  --brand-100: #FFE0D4;
  --brand-200: #FFC2AB;
  --brand-300: #FF9C7A;
  --brand-400: #FF7A52;
  --brand-500: #FF5A1F;   /* vibrant primary */
  --brand-600: #F0410B;
  --brand-700: #C62F06;   /* deeper, white-text safe */
  --brand-ink: #1F1813;   /* text on bright brand */

  /* Accent — Electric Lime */
  --lime-300: #C9F25B;
  --lime-400: #B4E836;
  --lime-500: #9FD40E;

  /* Semantic */
  --ok: #1F9D55;
  --warn: #C9880B;
  --danger: #D63A2F;

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Spacing — 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgb(31 24 19 / 0.06), 0 1px 3px rgb(31 24 19 / 0.05);
  --sh-md: 0 6px 16px -4px rgb(31 24 19 / 0.12), 0 2px 6px -2px rgb(31 24 19 / 0.08);
  --sh-lg: 0 18px 40px -12px rgb(31 24 19 / 0.22), 0 6px 14px -6px rgb(31 24 19 / 0.12);
  --sh-brand: 0 10px 26px -8px rgb(255 90 31 / 0.45);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 140ms var(--ease-out);
  --t-med: 280ms var(--ease-out);
  --t-slow: 460ms var(--ease-out);

  /* Layout */
  --maxw: 1200px;
  --nav-h: 68px;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink-900);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink-950);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.section { padding-block: clamp(40px, 7vw, 80px); }
.stack > * + * { margin-top: var(--s-4); }

/* ---------- Brand wordmark ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--ink-950);
}
.brand .mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--brand-500);
  color: var(--brand-ink);
  box-shadow: var(--sh-brand);
  font-size: 1.1rem;
}
.brand .mark span { transform: translateY(-1px); }

/* ---------- Top Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s-4);
}
.nav__links { display: none; gap: var(--s-6); margin-left: var(--s-4); }
.nav__links a {
  font-weight: 600; font-size: 0.95rem; color: var(--ink-700);
  padding: 6px 2px; position: relative; transition: color var(--t-fast);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--brand-500); transition: width var(--t-med);
}
.nav__links a:hover { color: var(--ink-950); }
.nav__links a:hover::after { width: 100%; }
.nav__search {
  flex: 1; max-width: 460px; margin-inline: auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); padding: 10px 16px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.nav__search:focus-within {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px var(--brand-100);
}
.nav__search svg { flex: none; color: var(--ink-500); }
.nav__search input { border: none; outline: none; width: 100%; background: none; font-size: 0.95rem; }
.nav__actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  font-weight: 700; font-size: 0.95rem;
  border-radius: var(--r-pill);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary {
  background: var(--brand-500); color: var(--brand-ink);
  box-shadow: var(--sh-brand);
}
.btn--primary:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn--ghost { background: var(--surface); color: var(--ink-900); border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--brand-400); color: var(--brand-700); }
.btn--lime { background: var(--lime-400); color: var(--ink-950); }
.btn--lime:hover { background: var(--lime-500); transform: translateY(-1px); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 0.875rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- Chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; min-height: 38px;
  border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line-strong);
  font-weight: 600; font-size: 0.875rem; color: var(--ink-700);
  transition: all var(--t-fast);
}
.chip:hover { border-color: var(--brand-400); color: var(--ink-950); }
.chip--active {
  background: var(--brand-500); color: #fff; border-color: var(--brand-500);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 0.75rem; font-weight: 700; line-height: 1.6;
  background: var(--brand-50); color: var(--brand-700);
}
.tag--lime { background: color-mix(in srgb, var(--lime-400) 35%, #fff); color: #4d6100; }
.tag--ink { background: var(--ink-950); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 120% at 88% -10%, var(--brand-200) 0%, transparent 42%),
    radial-gradient(90% 120% at -5% 110%, var(--lime-300) 0%, transparent 38%),
    var(--surface-warm);
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  display: grid; gap: var(--s-8); align-items: center;
  padding-block: clamp(40px, 7vw, 84px);
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50); padding: 6px 12px; border-radius: var(--r-pill);
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-top: var(--s-4);
}
.hero h1 em { font-style: normal; color: var(--brand-500); }
.hero p.lead { font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--ink-700); max-width: 46ch; margin-top: var(--s-4); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s-6); }
.hero__stats { display: flex; gap: var(--s-8); margin-top: var(--s-8); flex-wrap: wrap; }
.hero__stats .num { font-family: "Space Grotesk"; font-weight: 700; font-size: 1.6rem; color: var(--ink-950); }
.hero__stats .lbl { font-size: 0.85rem; color: var(--ink-500); }

.hero__art { display: none; }
@media (min-width: 920px) {
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; }
  .hero__art { display: block; }
}

/* floating app tiles art */
.float-card {
  position: absolute; border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--sh-lg);
  padding: 12px; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
}
.float-card .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.2rem; }
.float-card .t { font-weight: 700; font-size: 0.85rem; }
.float-card .s { font-size: 0.7rem; color: var(--ink-500); }

/* ---------- Section heading ---------- */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: var(--s-6); flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.sec-head p { color: var(--ink-500); margin-top: 4px; }
.sec-head a.more { font-weight: 700; color: var(--brand-700); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- App grid & card ---------- */
.app-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card-app {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-fast);
}
.card-app:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--brand-200); }
.app-icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.7rem;
  color: #fff; box-shadow: var(--sh-sm); flex: none;
  overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.card-app h3 { font-size: 1.05rem; }
.card-app .dev { font-size: 0.85rem; color: var(--ink-500); margin-top: -2px; }
.card-app .meta { display: flex; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--ink-700); margin-top: auto; padding-top: var(--s-2); }
.card-app .meta .rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink-900); }
.card-app .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-300); }
.card-app .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-app .cat-tag { font-size: 0.72rem; }
.card-app .install { min-height: 38px; padding: 0 16px; }

/* ---------- App detail ---------- */
.detail-hero { padding-block: var(--s-8); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-700); margin-bottom: var(--s-5); }
.back-link:hover { color: var(--brand-700); }
.detail-top { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 760px) { .detail-top { grid-template-columns: auto 1fr auto; } }
.detail-icon {
  width: 104px; height: 104px; border-radius: 26px;
  display: grid; place-items: center; font-size: 3rem; color: #fff;
  box-shadow: var(--sh-lg); overflow: hidden;
}
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-top h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.detail-top .dev { color: var(--ink-500); font-weight: 600; }
.detail-meta { display: flex; gap: var(--s-8); flex-wrap: wrap; margin-top: var(--s-3); }
.detail-meta .item .v { font-family: "Space Grotesk"; font-weight: 700; font-size: 1.15rem; }
.detail-meta .item .k { font-size: 0.8rem; color: var(--ink-500); }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Screenshot phone mockups */
.shots { display: flex; gap: var(--s-5); overflow-x: auto; padding-bottom: var(--s-3); scroll-snap-type: x mandatory; }
.shot {
  flex: none; width: 220px; scroll-snap-align: start;
  border-radius: 28px; border: 7px solid var(--ink-950);
  aspect-ratio: 9 / 19; overflow: hidden; position: relative;
  box-shadow: var(--sh-lg);
  display: grid; place-items: center; color: #fff;
}
.shot::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; background: var(--ink-950); border-radius: 0 0 12px 12px;
}
.shot .label { font-family: "Space Grotesk"; font-weight: 700; font-size: 1rem; padding: 0 16px; text-align: center; text-shadow: 0 2px 8px rgb(0 0 0 / 0.25); }

/* Prose */
.prose h3 { font-size: 1.2rem; margin-bottom: var(--s-3); }
.prose p { color: var(--ink-700); margin-bottom: var(--s-4); max-width: 70ch; }
.prose ul.checks { display: grid; gap: 10px; }
.prose ul.checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-700); }
.prose ul.checks li::before { content: "✓"; color: var(--ok); font-weight: 800; }

.detail-grid { display: grid; gap: var(--s-8); }
@media (min-width: 920px) { .detail-grid { grid-template-columns: 1.5fr 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s-6);
}
.panel h3 { margin-bottom: var(--s-4); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; font-size: 0.92rem; }
.kv dt { color: var(--ink-500); }
.kv dd { font-weight: 600; text-align: right; }

/* ---------- Admin ---------- */
.admin { display: grid; gap: var(--s-6); }
@media (min-width: 980px) { .admin { grid-template-columns: 260px 1fr; align-items: start; } }
.admin-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
@media (min-width: 980px) {
  .admin-nav { flex-direction: column; position: sticky; top: calc(var(--nav-h) + 16px);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3); }
}
.admin-nav button {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  border-radius: var(--r-sm); font-weight: 700; color: var(--ink-700); white-space: nowrap;
  transition: all var(--t-fast);
}
.admin-nav button:hover { background: var(--surface-warm); color: var(--ink-950); }
.admin-nav button.active { background: var(--ink-950); color: #fff; }
.admin-nav button .n { margin-left: auto; font-size: 0.75rem; background: var(--brand-500); color: var(--brand-ink); padding: 1px 8px; border-radius: var(--r-pill); }
.admin-nav button.active .n { background: var(--lime-400); color: var(--ink-950); }

.stat-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 880px) { .stat-grid { grid-template-columns: repeat(5, 1fr); } }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-5); position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; background: var(--brand-50); }
.stat .k { font-size: 0.82rem; color: var(--ink-500); font-weight: 600; }
.stat .v { font-family: "Space Grotesk"; font-weight: 700; font-size: 1.9rem; color: var(--ink-950); position: relative; }
.stat .v small { font-size: 0.9rem; color: var(--ink-500); font-weight: 700; }
.stat.accent::after { background: color-mix(in srgb, var(--lime-400) 40%, #fff); }

.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--s-5); flex-wrap: wrap; }
.panel-title h2 { font-size: 1.3rem; }

/* Forms */
.form-grid { display: grid; gap: var(--s-4); }
@media (min-width: 680px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.875rem; color: var(--ink-900); }
.field .hint { font-size: 0.78rem; color: var(--ink-500); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); font-size: 0.95rem; color: var(--ink-900);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 4px var(--brand-100);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-picker button {
  width: 46px; height: 46px; border-radius: 12px; font-size: 1.4rem;
  border: 2px solid var(--line); background: var(--surface); transition: all var(--t-fast);
}
.icon-picker button:hover { border-color: var(--brand-300); }
.icon-picker button.sel { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.file-drop {
  border: 2px dashed var(--line-strong); border-radius: var(--r-md);
  padding: var(--s-6); text-align: center; color: var(--ink-500);
  transition: all var(--t-fast); cursor: pointer; background: var(--surface-warm);
}
.file-drop:hover, .file-drop.drag { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-700); }
.file-drop strong { color: var(--ink-900); }
.file-name { margin-top: 10px; font-weight: 700; color: var(--ink-900); font-size: 0.9rem; }

/* Upload progress */
.progress { margin-top: 12px; height: 10px; background: var(--ink-100); border-radius: 999px; overflow: hidden; }
.progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-500), var(--accent-500)); border-radius: 999px; transition: width 150ms ease; }

/* Email verify banner */
.verify-banner {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--warn-50, #fff7ed); border: 1px solid var(--warn-200, #fed7aa); color: var(--warn-700, #9a3412);
  font-size: 0.85rem;
}
.verify-banner span { flex: 1 1 200px; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
table.apps { width: 100%; border-collapse: collapse; min-width: 640px; }
table.apps th, table.apps td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.apps th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-500); background: var(--surface-warm); }
table.apps tr:last-child td { border-bottom: none; }
table.apps tbody tr:hover { background: var(--surface-warm); }
table.apps .name-cell { display: flex; align-items: center; gap: 12px; }
table.apps .name-cell .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 1.1rem; flex: none; }
table.apps .status { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
.status.live { background: color-mix(in srgb, var(--ok) 16%, #fff); color: var(--ok); }
.status.draft { background: var(--brand-50); color: var(--brand-700); }
.row-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--ink-700); transition: all var(--t-fast);
}
.icon-btn:hover { border-color: var(--brand-400); color: var(--brand-700); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* Empty state */
.empty {
  text-align: center; padding: var(--s-16) var(--s-4);
  border: 2px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--ink-500);
}
.empty .big { font-size: 2.4rem; margin-bottom: var(--s-3); }
.empty h3 { color: var(--ink-900); margin-bottom: 6px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface-warm); margin-top: var(--s-16); }
.footer__inner { padding-block: var(--s-10); display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer__inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); margin-bottom: var(--s-3); }
.footer a { display: block; color: var(--ink-700); padding: 4px 0; font-size: 0.92rem; }
.footer a:hover { color: var(--brand-700); }
.footer__bottom { border-top: 1px solid var(--line); padding-block: var(--s-5); text-align: center; color: var(--ink-500); font-size: 0.85rem; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 10px; width: min(92vw, 420px); }
.toast {
  background: var(--ink-950); color: #fff; padding: 14px 18px; border-radius: var(--r-md);
  display: flex; align-items: center; gap: 12px; box-shadow: var(--sh-lg);
  animation: toast-in var(--t-med) both;
}
.toast .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--lime-400); color: var(--ink-950); display: grid; place-items: center; flex: none; }
.toast .msg { font-weight: 600; font-size: 0.92rem; }
.toast .sub { font-size: 0.8rem; color: var(--ink-300); font-weight: 500; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Login gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-columns: 1fr;
  background: var(--paper);
}
@media (min-width: 880px) { .gate { grid-template-columns: 1.05fr 1fr; } }
.gate-card {
  display: flex; flex-direction: column; justify-content: center;
  width: 100%; max-width: 460px; margin-inline: auto;
  padding: clamp(24px, 6vw, 56px);
}
.gate-aside { display: none; }
@media (min-width: 880px) {
  .gate-aside {
    display: block; position: relative; overflow: hidden;
    background:
      radial-gradient(120% 120% at 80% 0%, var(--brand-200) 0%, transparent 45%),
      radial-gradient(90% 120% at 0% 100%, var(--lime-300) 0%, transparent 40%),
      var(--surface-warm);
  }
}
.login-error {
  color: var(--danger); font-size: .85rem; font-weight: 700;
  background: color-mix(in srgb, var(--danger) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, #fff);
  padding: 10px 12px; border-radius: var(--r-sm);
}
.gate code {
  background: var(--surface-warm); padding: 1px 6px; border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82em;
}

/* ---------- Ratings & reviews ---------- */
.rate-input { display: inline-flex; gap: 4px; }
.rate-input button {
  font-size: 1.9rem; line-height: 1; color: var(--ink-300);
  background: none; padding: 2px; transition: color var(--t-fast), transform var(--t-fast);
}
.rate-input button:hover { transform: scale(1.12); }
.rate-input button.on { color: var(--brand-500); }

.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: none; }
.review__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review__user { font-weight: 700; color: var(--ink-900); }
.review__stars { color: var(--brand-500); letter-spacing: 1px; font-size: 0.95rem; }
.review__text { margin-top: 6px; color: var(--ink-700); }

/* 详情页：登录/注册小部件 */
.review-auth {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--ink-200, #ece6df);
  border-radius: 12px;
  background: var(--paper-100, #fff7f1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-auth .field { gap: 6px; }
.review-auth .input { width: 100%; }

/* ---------- Utility ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-500); }
.center { text-align: center; }

/* ---------- Responsive nav links ---------- */
@media (min-width: 1040px) { .nav__links { display: flex; } }

/* ---------- Admin enhancements: icon / screenshots / categories ---------- */
.icon-mode input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand-500); }
#icon-preview {
  position: relative;
  width: 88px; height: 88px; margin-top: 12px; border-radius: var(--r-md);
  overflow: hidden; background: var(--surface-warm); border: 1px solid var(--line);
}
#icon-preview img { width: 100%; height: 100%; object-fit: cover; }
#icon-preview .remove-icon {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--ink-900); color: #fff; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.file-drop--sm { padding: 18px 14px; }
.shot-previews {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px; margin-top: 14px;
}
.shot-thumb {
  position: relative; aspect-ratio: 9/19; border-radius: var(--r-sm);
  overflow: hidden; background: var(--surface-warm); border: 1px solid var(--line);
}
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shot-thumb.pending::after {
  content: "待上传"; position: absolute; inset: auto 0 0 0;
  background: var(--brand-500); color: #fff; font-size: 0.7rem; font-weight: 700;
  text-align: center; padding: 4px 0;
}
.shot-thumb .remove-shot {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--ink-900); color: #fff; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
}
.name-cell .ic { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.name-cell .ic img { width: 100%; height: 100%; object-fit: cover; }
#categories-table td { vertical-align: middle; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .card-app:hover, .btn--primary:hover, .btn--lime:hover { transform: none; }
}
