/* =========================================================
   GUNPLA ARCHIVE — visual system
   ========================================================= */
:root {
  --bg: #070a0f;
  --bg-soft: #090e15;
  --panel: #0d141e;
  --panel-2: #111a26;
  --panel-3: #151f2d;
  --line: rgba(190, 210, 235, 0.1);
  --line-strong: rgba(190, 210, 235, 0.2);
  --text: #f1f5fa;
  --text-soft: #c6d1df;
  --muted: #7f90a6;
  --muted-2: #57677c;
  --accent: #ff4d3d;
  --accent-soft: #ff7a67;
  --blue: #4da6ff;
  --gold: #ffc857;
  --green: #41d69f;
  --violet: #a98bff;
  --radius: 16px;
  --radius-sm: 11px;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-display: "Bahnschrift", "Arial Narrow", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", "Consolas", monospace;
  --shadow: 0 34px 80px -34px rgba(0, 0, 0, 0.92);
  --header-h: 78px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.modal-open {
  overflow: hidden;
}

body.auth-pending .site-header,
body.auth-pending main,
body.auth-pending .site-footer,
body.auth-pending .skip-link {
  visibility: hidden;
}

body.auth-mode .site-header,
body.auth-mode main,
body.auth-mode .site-footer,
body.auth-mode .skip-link {
  display: none !important;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  background:
    radial-gradient(720px 480px at 50% 38%, rgba(255, 77, 61, 0.08), transparent 70%),
    var(--bg);
}

.auth-pending .boot-screen {
  display: flex;
}

.boot-screen .brand-mark {
  width: 54px;
  height: 54px;
  animation: signalPulse 1.8s ease-in-out infinite;
}

.boot-screen p {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 88% -12%, rgba(255, 77, 61, 0.13), transparent 64%),
    radial-gradient(820px 560px at -8% 12%, rgba(77, 166, 255, 0.09), transparent 62%),
    linear-gradient(180deg, #080c12 0%, #06090e 54%, #070a0f 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(170, 195, 225, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170, 195, 225, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.45) 52%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.45) 52%, transparent 92%);
}

::selection {
  color: #fff;
  background: rgba(255, 77, 61, 0.55);
}

h1, h2, h3, h4, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

svg {
  display: block;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.container {
  width: min(1240px, calc(100% - 64px));
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 200;
  padding: 9px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(7, 10, 15, 0.82);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 36px;
}

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

.brand-mark {
  display: inline-flex;
  width: 39px;
  height: 39px;
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(255, 77, 61, 0.3));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-mark.small {
  width: 31px;
  height: 31px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.brand-copy small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.17em;
  line-height: 1.4;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--text);
}

.main-nav a.is-active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.sync-status {
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.022);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  cursor: default;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sync-status.is-clickable {
  cursor: pointer;
}

.sync-status.is-clickable:hover {
  border-color: rgba(65, 214, 159, 0.38);
  background: rgba(65, 214, 159, 0.08);
}

.sync-status i {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

.sync-status[data-state="connecting"] i {
  animation: signalPulse 1.2s ease-in-out infinite;
}

.sync-status[data-state="shared"] {
  color: #6de5bb;
  border-color: rgba(65, 214, 159, 0.24);
  background: rgba(65, 214, 159, 0.055);
}

.sync-status[data-state="shared"] i {
  box-shadow: 0 0 8px rgba(65, 214, 159, 0.8);
}

.sync-status[data-state="local"] {
  color: var(--muted);
}

.sync-status[data-state="offline"] {
  color: #ffb36b;
  border-color: rgba(255, 179, 107, 0.24);
  background: rgba(255, 179, 107, 0.055);
}

.account-wrap {
  position: relative;
}

.account-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 9px);
  right: 0;
  width: 236px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(13, 20, 30, 0.98);
  box-shadow: 0 22px 55px -22px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  animation: cardIn 0.18s ease both;
}

.account-menu-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.account-avatar,
.footer-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(190, 210, 235, 0.2);
  border-radius: 50%;
  color: var(--text-soft);
  background: linear-gradient(145deg, rgba(77, 166, 255, 0.22), rgba(255, 90, 69, 0.16));
  font-family: var(--font-mono);
  font-weight: 600;
}

.account-avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.footer-avatar {
  width: 22px;
  height: 22px;
  font-size: 9px;
}

.account-avatar img,
.footer-avatar img,
.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-menu-copy {
  min-width: 0;
  flex: 1;
}

.account-menu-label {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.account-menu-name {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-settings {
  width: 100%;
  height: 32px;
  margin-top: 11px;
  border: 1px solid rgba(77, 166, 255, 0.2);
  border-radius: 7px;
  color: var(--blue);
  background: rgba(77, 166, 255, 0.05);
  font-size: 11px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.account-menu-settings:hover {
  border-color: rgba(77, 166, 255, 0.4);
  background: rgba(77, 166, 255, 0.1);
}

.account-menu-logout {
  width: 100%;
  height: 32px;
  margin-top: 6px;
  border: 1px solid rgba(255, 105, 89, 0.2);
  border-radius: 7px;
  color: #ff9385;
  background: rgba(255, 77, 61, 0.05);
  font-size: 11px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.account-menu-logout:hover {
  border-color: rgba(255, 105, 89, 0.4);
  background: rgba(255, 77, 61, 0.1);
}

.footer-account {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* ---------- profile settings ---------- */
.modal.profile-modal {
  width: min(760px, calc(100vw - 40px));
}

.profile-card {
  display: flex;
  max-height: calc(100vh - 40px);
  min-width: 0;
  flex-direction: column;
}

.profile-body {
  min-width: 0;
  padding: 20px 24px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(190, 210, 235, 0.2) transparent;
}

.profile-section {
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.profile-section + .profile-section {
  padding-top: 22px;
}

.profile-section-head h3 {
  margin-top: 5px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}

.profile-section-head > p:last-child {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.7;
}

.profile-section-head .section-kicker {
  font-size: 8px;
}

.profile-section-head .section-kicker span {
  width: auto;
  padding: 0 5px;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 15px;
}

.profile-avatar-preview {
  display: flex;
  width: 110px;
  height: 110px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(190, 210, 235, 0.22);
  border-radius: 50%;
  color: var(--text-soft);
  background: linear-gradient(145deg, rgba(77, 166, 255, 0.25), rgba(255, 90, 69, 0.18));
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 600;
}

.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.profile-status {
  width: 100%;
  min-height: 15px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.6;
}

.profile-password-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 16px;
}

.profile-password-form > .field:first-child,
.profile-password-form > .form-error,
.profile-password-form > .btn {
  grid-column: 1 / -1;
}

.profile-password-form > .btn {
  justify-self: start;
}

.profile-section.profile-account-note {
  padding-top: 18px;
  border-bottom: 0;
}

.profile-account-note p {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.7;
}

.profile-account-note p + p {
  margin-top: 4px;
}

.profile-account-note strong {
  color: var(--text-soft);
  font-weight: 500;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.icon-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-action svg {
  width: 17px;
  height: 17px;
}

.icon-action:hover {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  background: linear-gradient(135deg, #ff6a51 0%, #ef3d2c 56%, #d82d20 100%);
  box-shadow: 0 12px 26px -13px rgba(255, 77, 61, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff7d63 0%, #fa4936 56%, #e43527 100%);
  box-shadow: 0 17px 32px -14px rgba(255, 77, 61, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.028);
}

.btn-ghost:hover {
  border-color: rgba(190, 210, 235, 0.34);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.btn-danger {
  border-color: rgba(255, 112, 96, 0.25);
  color: #fff;
  background: linear-gradient(135deg, #d9483a, #b52d24);
  box-shadow: 0 10px 22px -14px rgba(219, 58, 46, 0.8);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #e45343, #c03228);
}

.btn-ghost-danger {
  border-color: rgba(255, 105, 89, 0.2);
  color: #ff897a;
  background: rgba(255, 77, 61, 0.045);
}

.btn-ghost-danger:hover {
  border-color: rgba(255, 105, 89, 0.4);
  color: #ffa294;
  background: rgba(255, 77, 61, 0.09);
}

.btn-sm {
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 11.5px;
}

.btn-sm svg {
  width: 15px;
  height: 15px;
}

.btn-lg {
  height: 50px;
  padding: 0 21px;
  border-radius: 11px;
  font-size: 14px;
}

.btn-add {
  height: 39px;
  margin-left: 4px;
  padding: 0 15px;
  border-radius: 9px;
  font-size: 13px;
}

.text-btn {
  color: var(--muted);
  font-size: 11.5px;
  transition: color 0.2s ease;
}

.text-btn:hover {
  color: var(--accent-soft);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.82fr);
  align-items: center;
  gap: clamp(38px, 6vw, 84px);
  padding-top: clamp(54px, 7vw, 88px);
  padding-bottom: clamp(40px, 5vw, 60px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  animation: heroIn 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow,
.section-kicker,
.modal-kicker {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-eyebrow b {
  color: var(--accent);
  font-weight: 400;
}

.signal-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(65, 214, 159, 0.1), 0 0 13px rgba(65, 214, 159, 0.7);
  animation: signalPulse 2.4s ease-in-out infinite;
}

.hero h1 {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: clamp(48px, 5.7vw, 84px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

.title-accent {
  position: relative;
  color: transparent;
  background: linear-gradient(104deg, #ffb09e 2%, #ff7a62 38%, #ff4d3d 68%, #ffb35f 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  max-width: 530px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 31px;
}

.hero-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.hero-footnote > span {
  width: 18px;
  height: 1px;
  background: var(--line-strong);
}

.hero-footnote i {
  color: rgba(190, 210, 235, 0.23);
  font-style: normal;
}

/* ---------- featured panel ---------- */
.featured-panel {
  position: relative;
  z-index: 1;
  padding: 14px;
  border: 1px solid rgba(190, 210, 235, 0.15);
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(18, 27, 40, 0.96), rgba(8, 13, 20, 0.985));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  isolation: isolate;
  animation: panelIn 0.9s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.featured-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 24px;
  right: -14px;
  bottom: -14px;
  left: 24px;
  border: 1px solid rgba(255, 77, 61, 0.2);
  border-radius: 22px;
  background: linear-gradient(140deg, rgba(255, 77, 61, 0.04), transparent 60%);
}

.featured-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -1px;
  right: 20%;
  width: 34%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.8;
}

.featured-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 13px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
}

.live-label .signal-dot {
  width: 5px;
  height: 5px;
  animation-duration: 2s;
}

.featured-art-wrap {
  position: relative;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  border: 1px solid rgba(190, 210, 235, 0.13);
  border-radius: 14px;
  background: #080d14;
}

.featured-art,
.featured-art svg {
  width: 100%;
  height: 100%;
}

.featured-art {
  position: absolute;
  inset: 0;
}

.featured-art svg {
  object-fit: cover;
}

.featured-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.7;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.018) 3px 4px);
}

.featured-scan::after {
  content: "";
  position: absolute;
  top: -25%;
  right: 0;
  left: 0;
  height: 20%;
  background: linear-gradient(180deg, transparent, rgba(190, 230, 255, 0.08), transparent);
  animation: scan 9s linear infinite;
}

.featured-watermark {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 13px;
  color: rgba(255, 255, 255, 0.27);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  writing-mode: vertical-rl;
  pointer-events: none;
}

.featured-rate {
  position: absolute;
  z-index: 3;
  bottom: 13px;
  left: 13px;
  min-width: 145px;
  padding: 10px 12px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(5, 9, 14, 0.68);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.featured-rate > span {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

.featured-rate strong {
  display: block;
  margin-top: 1px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.featured-rate small {
  margin-left: 1px;
  color: var(--accent-soft);
  font-size: 14px;
}

.rate-track {
  height: 2px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
}

.rate-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb066, var(--accent));
  box-shadow: 0 0 10px rgba(255, 77, 61, 0.8);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.featured-corner {
  position: absolute;
  z-index: 3;
  width: 13px;
  height: 13px;
  pointer-events: none;
}

.featured-corner.tl {
  top: 10px;
  left: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
}

.featured-corner.br {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.featured-info {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 5px 4px;
}

.featured-titles {
  min-width: 0;
}

.featured-titles h2 {
  overflow: hidden;
  margin-top: 8px;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-titles p {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.featured-info .btn {
  flex: 0 0 auto;
  margin-bottom: 2px;
}

/* ---------- status pill ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.status-completed {
  color: #64e8b8;
  border-color: rgba(65, 214, 159, 0.25);
  background: rgba(65, 214, 159, 0.08);
}

.status-building {
  color: #ffd578;
  border-color: rgba(255, 200, 87, 0.27);
  background: rgba(255, 200, 87, 0.08);
}

.status-backlog {
  color: #7dc1ff;
  border-color: rgba(77, 166, 255, 0.28);
  background: rgba(77, 166, 255, 0.08);
}

.status-wishlist {
  color: #c3adff;
  border-color: rgba(169, 139, 255, 0.3);
  background: rgba(169, 139, 255, 0.09);
}

.status-pill.on-image {
  height: 24px;
  padding-inline: 9px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(5, 9, 14, 0.7);
}

/* ---------- auth screen ---------- */
.auth-screen {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 30px 0 24px;
}

.auth-screen::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -18%;
  right: -12%;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 61, 0.11), transparent 68%);
  pointer-events: none;
}

.auth-shell {
  display: flex;
  min-height: calc(100vh - 54px);
  flex: 1;
  flex-direction: column;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-brand {
  cursor: default;
}

.auth-system {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.auth-system .signal-dot {
  width: 5px;
  height: 5px;
}

.auth-grid {
  display: grid;
  width: 100%;
  max-width: 1140px;
  flex: 1;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.82fr);
  align-items: center;
  gap: clamp(40px, 7vw, 105px);
  margin-inline: auto;
  padding: 46px 0 38px;
}

.auth-intro {
  animation: heroIn 0.7s ease both;
}

.auth-intro h1 {
  margin-top: 19px;
  font-family: var(--font-display);
  font-size: clamp(48px, 5.7vw, 82px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.auth-lead {
  max-width: 500px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.9;
}

.auth-points {
  display: flex;
  max-width: 500px;
  flex-direction: column;
  gap: 0;
  margin-top: 29px;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.auth-points li:last-child {
  border-bottom: 1px solid var(--line);
}

.auth-points li > span {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.auth-points b {
  display: block;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.auth-points p {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.auth-security {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted-2);
  font-size: 10px;
}

.auth-security .mini-mark {
  margin-top: 0;
}

.auth-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  padding: 23px 24px 20px;
  overflow: hidden;
  border: 1px solid rgba(190, 210, 235, 0.17);
  border-radius: 19px;
  background: linear-gradient(158deg, rgba(18, 27, 40, 0.97), rgba(8, 13, 20, 0.985));
  box-shadow: 0 38px 90px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  animation: panelIn 0.8s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18%;
  left: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 77, 61, 0.7), transparent);
}

.auth-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.auth-panel-head > span:first-child {
  color: var(--accent-soft);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-top: 18px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 9, 14, 0.45);
}

.auth-tab {
  height: 35px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-tab:hover {
  color: var(--text-soft);
}

.auth-tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.auth-field {
  gap: 6px;
}

.auth-field input {
  height: 43px;
  font-size: 13px;
}

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 4px;
}

.auth-error {
  padding: 8px 10px;
  border: 1px solid rgba(255, 88, 72, 0.25);
  border-radius: 6px;
  color: #ff9589;
  background: rgba(255, 77, 61, 0.06);
  font-size: 10.5px;
  line-height: 1.6;
}

.auth-first-note {
  padding: 9px 10px;
  border: 1px solid rgba(255, 200, 87, 0.22);
  border-radius: 7px;
  color: #e8c77d;
  background: rgba(255, 200, 87, 0.055);
  font-size: 10.5px;
  line-height: 1.65;
}

.auth-first-note b {
  color: var(--gold);
}

.auth-caption {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.7;
}

.auth-setup {
  padding: 22px 10px 10px;
  text-align: center;
}

.auth-setup-mark {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 200, 87, 0.25);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 200, 87, 0.06);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.auth-setup h3 {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 600;
}

.auth-setup p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.auth-setup b {
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 500;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.footer-account {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
}

.footer-account strong {
  overflow: hidden;
  max-width: 140px;
  color: var(--text-soft);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-account .text-btn {
  font-size: 9.5px;
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  padding-bottom: 32px;
}

.stat-card {
  position: relative;
  min-width: 0;
  padding: 19px 19px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(17, 26, 38, 0.88), rgba(9, 14, 21, 0.93));
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 19px;
  width: 34px;
  height: 2px;
  background: var(--stat-color);
  box-shadow: 0 0 12px var(--stat-color);
}

.stat-card::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -60px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--stat-color), transparent 68%);
  opacity: 0.07;
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(190, 210, 235, 0.17);
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

.stat-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--stat-color);
  background: rgba(255, 255, 255, 0.025);
}

.stat-icon svg {
  width: 15px;
  height: 15px;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 13px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  white-space: nowrap;
}

.stat-value small {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.stat-currency {
  color: var(--gold);
  font-size: 34px;
}

.stat-currency i {
  color: rgba(255, 200, 87, 0.55);
  font-family: var(--font-sans);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
}

.stat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.01em;
}

.micro-line {
  flex: 0 0 18%;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.stat-progress-wrap {
  display: block;
}

.stat-progress {
  display: block;
  height: 2px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
}

.stat-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--stat-color);
  box-shadow: 0 0 9px var(--stat-color);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mini-stars {
  display: inline-flex;
  gap: 3px;
  color: rgba(255, 255, 255, 0.13);
  font-size: 11px;
  letter-spacing: 0;
}

.mini-stars i {
  font-style: normal;
}

.mini-stars i.on {
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 200, 87, 0.3);
}

/* ---------- sections ---------- */
.section {
  padding-top: clamp(52px, 6vw, 78px);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-kicker span {
  display: inline-flex;
  width: 24px;
  height: 19px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 77, 61, 0.3);
  border-radius: 3px;
  color: var(--accent-soft);
  font-size: 9px;
  letter-spacing: 0;
}

.section-heading h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(29px, 3.2vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.result-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.result-meta b {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.result-divider {
  width: 1px;
  height: 11px;
  background: var(--line-strong);
}

#filterSummary {
  color: var(--muted-2);
}

.section-note {
  max-width: 300px;
  padding-bottom: 4px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.7;
  text-align: right;
}

/* ---------- toolbar ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 19px;
}

.search-field {
  display: flex;
  flex: 1 1 310px;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(12, 18, 27, 0.8);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.search-field:focus-within {
  border-color: rgba(77, 166, 255, 0.5);
  background: rgba(13, 20, 30, 0.92);
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.08);
}

.search-field > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted-2);
}

.search-field:focus-within > svg {
  color: var(--blue);
}

.search-field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.search-field kbd {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 4px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.filter-group {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.select-wrap {
  position: relative;
  display: flex;
  min-width: 124px;
  height: 48px;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted-2);
  background: rgba(12, 18, 27, 0.8);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.select-wrap:hover,
.select-wrap:focus-within {
  border-color: var(--line-strong);
  background: rgba(16, 25, 37, 0.9);
}

.select-wrap > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  pointer-events: none;
}

.select-wrap select {
  width: 100%;
  height: 100%;
  padding: 0 31px 0 2px;
  border: 0;
  outline: none;
  color: var(--text-soft);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.select-wrap select option {
  color: var(--text);
  background: #0d141e;
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.select-sort {
  min-width: 111px;
}

/* ---------- cards ---------- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.kit-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 24, 36, 0.94), rgba(9, 14, 21, 0.97));
  cursor: pointer;
  animation: cardIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}

.kit-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.23), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kit-card:hover,
.kit-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(255, 77, 61, 0.32);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 77, 61, 0.055);
}

.kit-card:hover::after,
.kit-card:focus-visible::after {
  opacity: 1;
}

.kit-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #080d14;
}

.kit-media::after {
  content: "";
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 55%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(4, 7, 11, 0.72));
}

.cover-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.cover-art svg {
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kit-card:hover .cover-art svg {
  transform: scale(1.035);
}

.cover-img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kit-card:hover .cover-img {
  transform: scale(1.035);
}

.cover-img.is-broken {
  display: none;
}

.grade-badge {
  position: absolute;
  z-index: 3;
  top: 11px;
  left: 11px;
  display: inline-flex;
  height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: 5px;
  color: var(--grade-color, var(--blue));
  background: rgba(5, 9, 14, 0.66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
}

.grade-badge::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

.media-status {
  position: absolute;
  z-index: 3;
  top: 11px;
  right: 11px;
}

.media-caption {
  position: absolute;
  z-index: 3;
  right: 13px;
  bottom: 11px;
  left: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.11em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.media-caption span:last-child {
  color: rgba(255, 255, 255, 0.43);
}

.kit-body {
  padding: 15px 16px 15px;
}

.kit-series {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kit-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.8em;
  margin-top: 5px;
  color: var(--text);
  font-size: 17.5px;
  font-weight: 650;
  letter-spacing: 0.005em;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.kit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
}

.stars {
  display: inline-flex;
  gap: 2px;
  color: rgba(255, 255, 255, 0.13);
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1;
}

.stars i {
  font-style: normal;
}

.stars i.on {
  color: var(--gold);
  text-shadow: 0 0 9px rgba(255, 200, 87, 0.22);
}

.rating-empty {
  color: var(--muted-2);
  font-size: 10.5px;
}

.kit-date {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.kit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(190, 210, 235, 0.075);
}

.kit-price {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.kit-price.is-empty {
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 400;
}

.kit-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-2);
  font-size: 10.5px;
  transition: color 0.22s ease;
}

.kit-open svg {
  width: 13px;
  height: 13px;
  transition: transform 0.22s ease;
}

.kit-card:hover .kit-open {
  color: var(--accent-soft);
}

.kit-card:hover .kit-open svg {
  transform: translate(1px, -1px);
}

/* ---------- empty state ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 62px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(400px 220px at 50% 0%, rgba(77, 166, 255, 0.05), transparent 70%),
    rgba(10, 15, 22, 0.65);
  text-align: center;
}

.empty-orbit {
  width: 76px;
  height: 76px;
  margin-bottom: 17px;
  color: var(--muted-2);
}

.empty-orbit svg {
  width: 100%;
  height: 100%;
}

.empty-state h3 {
  font-size: 19px;
  font-weight: 600;
}

.empty-state p {
  max-width: 360px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 21px;
}

/* ---------- analytics ---------- */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1fr;
  gap: 15px;
}

.analytics-panel {
  min-width: 0;
  padding: 20px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(16, 24, 36, 0.86), rgba(9, 14, 21, 0.92));
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.panel-head > span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.grade-chart {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 21px;
}

.grade-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
}

.grade-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 10.5px;
  white-space: nowrap;
}

.grade-label i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 1.5px;
  background: var(--bar-color);
  box-shadow: 0 0 8px var(--bar-color);
}

.grade-label b {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.grade-label span {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9.5px;
  text-overflow: ellipsis;
}

.grade-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.055);
}

.grade-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bar-color), rgba(255, 255, 255, 0.26));
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.06);
  animation: barGrow 0.9s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.grade-count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: right;
}

.panel-empty {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  font-size: 11.5px;
  text-align: center;
}

.status-chart-wrap {
  display: flex;
  align-items: center;
  gap: 19px;
  margin-top: 23px;
}

.donut {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(rgba(255, 255, 255, 0.07) 0 100%);
  transition: background 0.5s ease;
}

.donut::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #0b1119;
}

.donut-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
}

.donut-center strong {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.donut-center span {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.legend {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.legend li {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
}

.legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-color);
  box-shadow: 0 0 7px var(--dot-color);
}

.legend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend b {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
}

.recent-list {
  display: flex;
  flex-direction: column;
  margin-top: 13px;
}

.recent-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  text-align: left;
  border-top: 1px solid rgba(190, 210, 235, 0.07);
}

.recent-list li:first-child .recent-item {
  border-top: 0;
}

.recent-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 47px;
  height: 37px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #080d14;
}

.recent-thumb svg,
.recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-thumb img {
  position: absolute;
  inset: 0;
}

.recent-main {
  min-width: 0;
  flex: 1 1 auto;
}

.recent-main strong {
  display: block;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.recent-item:hover .recent-main strong {
  color: var(--accent-soft);
}

.recent-main span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-arrow {
  flex: 0 0 auto;
  color: var(--muted-2);
  transition: color 0.2s ease, transform 0.2s ease;
}

.recent-arrow svg {
  width: 14px;
  height: 14px;
}

.recent-item:hover .recent-arrow {
  color: var(--accent-soft);
  transform: translate(1px, -1px);
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 72px;
  padding: 35px 0 25px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 15, 22, 0.3), rgba(5, 8, 12, 0.8));
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
  padding-bottom: 23px;
  border-bottom: 1px solid rgba(190, 210, 235, 0.07);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-brand strong {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.footer-brand p {
  max-width: 520px;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.75;
}

.footer-meta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 11px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.disclaimer {
  padding-top: 16px;
  color: rgba(87, 103, 124, 0.7);
  font-size: 9.5px;
  letter-spacing: 0.01em;
}

/* ---------- purchase import ---------- */
.purchase-import-trigger {
  flex: 0 0 auto;
  height: 48px;
  padding: 0 14px;
  border-radius: 11px;
  color: var(--text-soft);
  font-size: 12px;
}

.purchase-import-trigger svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.modal.purchase-modal {
  width: min(1200px, calc(100vw - 40px));
}

.purchase-card {
  display: flex;
  max-height: calc(100vh - 40px);
  min-width: 0;
  flex-direction: column;
}

.purchase-body {
  min-width: 0;
  padding: 17px 25px 23px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(190, 210, 235, 0.2) transparent;
}

.purchase-source,
.purchase-preview {
  min-width: 0;
}

.purchase-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 9, 14, 0.4);
}

.purchase-tab {
  height: 34px;
  padding: 0 19px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11.5px;
  transition: color 0.2s ease, background 0.2s ease;
}

.purchase-tab:hover {
  color: var(--text-soft);
}

.purchase-tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.purchase-source {
  margin-top: 17px;
}

.purchase-dropzone {
  display: flex;
  min-height: 176px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 22px;
  border: 1px dashed rgba(190, 210, 235, 0.24);
  border-radius: 13px;
  background:
    radial-gradient(360px 160px at 50% 0%, rgba(77, 166, 255, 0.06), transparent 72%),
    rgba(255, 255, 255, 0.012);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.purchase-dropzone:hover,
.purchase-dropzone.is-dragging {
  border-color: rgba(77, 166, 255, 0.5);
  background:
    radial-gradient(360px 160px at 50% 0%, rgba(77, 166, 255, 0.1), transparent 72%),
    rgba(77, 166, 255, 0.025);
}

.purchase-dropzone.compact {
  min-height: 126px;
}

.purchase-drop-icon {
  display: inline-flex;
  width: 43px;
  height: 43px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(77, 166, 255, 0.25);
  border-radius: 10px;
  color: var(--blue);
  background: rgba(77, 166, 255, 0.055);
}

.purchase-drop-icon.small {
  width: 34px;
  height: 34px;
}

.purchase-drop-icon svg {
  width: 21px;
  height: 21px;
}

.purchase-dropzone strong {
  margin-top: 11px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.purchase-dropzone p {
  max-width: 440px;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}

.purchase-dropzone .btn {
  margin-top: 11px;
  pointer-events: none;
}

.purchase-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(77, 166, 255, 0.2);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(77, 166, 255, 0.045);
  font-size: 10.5px;
}

.purchase-spinner {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 1.5px solid rgba(77, 166, 255, 0.25);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.purchase-hint {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.7;
}

.purchase-error {
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 88, 72, 0.25);
  border-radius: 7px;
  color: #ff9589;
  background: rgba(255, 77, 61, 0.06);
  font-size: 10.5px;
  line-height: 1.7;
}

.purchase-template-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 11px 0 15px;
}

.purchase-template-row > span {
  color: var(--muted-2);
  font-size: 9.5px;
}

.purchase-template-row .text-btn {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.purchase-source > .field textarea {
  min-height: 122px;
}

.purchase-parse-btn {
  margin-top: 11px;
}

.purchase-preview {
  margin-top: 19px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.purchase-preview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.purchase-preview-head .section-kicker {
  font-size: 8px;
}

.purchase-preview-head .section-kicker span {
  width: auto;
  padding: 0 5px;
}

.purchase-preview-head h3 {
  margin-top: 6px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.purchase-preview-head h3 b {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.purchase-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  scrollbar-width: thin;
}

.purchase-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 11px;
}

.purchase-table th {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.02);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
}

.purchase-table td {
  padding: 7px 8px;
  border-top: 1px solid rgba(190, 210, 235, 0.065);
  vertical-align: top;
}

.purchase-table tbody tr:first-child td {
  border-top: 0;
}

.purchase-table tr.is-duplicate {
  background: rgba(255, 200, 87, 0.025);
}

.purchase-col-check {
  width: 34px;
  text-align: center !important;
}

.purchase-col-cover {
  width: 58px;
  padding-top: 9px !important;
}

.purchase-cover-thumb,
.purchase-cover-empty {
  display: flex;
  width: 44px;
  height: 48px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(190, 210, 235, 0.12);
  border-radius: 5px;
  color: var(--muted-2);
  background: rgba(5, 9, 14, 0.45);
  font-size: 8px;
}

.purchase-cover-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.purchase-cover-empty {
  border-style: dashed;
}

.purchase-table .purchase-series-input {
  min-width: 138px;
}

.purchase-col-remove {
  width: 32px;
}

.purchase-table input[type="text"],
.purchase-table input[type="number"],
.purchase-table input[type="date"],
.purchase-table select {
  width: 100%;
  height: 31px;
  min-width: 0;
  padding: 0 7px;
  border: 1px solid rgba(190, 210, 235, 0.11);
  border-radius: 5px;
  outline: none;
  color: var(--text-soft);
  background: rgba(5, 9, 14, 0.45);
  font-size: 10.5px;
}

.purchase-table input[type="date"] {
  color-scheme: dark;
}

.purchase-table select {
  padding-right: 20px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' fill='none' stroke='%237f90a6' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  cursor: pointer;
}

.purchase-table input:focus,
.purchase-table select:focus {
  border-color: rgba(77, 166, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(77, 166, 255, 0.07);
}

.purchase-table input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}

.purchase-table .purchase-name-input {
  min-width: 250px;
}

.purchase-dup {
  display: inline-flex;
  align-items: center;
  margin: 4px 0 0 2px;
  color: var(--gold);
  font-size: 8.5px;
}

.purchase-remove {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: var(--muted-2);
}

.purchase-remove:hover {
  color: var(--accent-soft);
  background: rgba(255, 77, 61, 0.08);
}

.purchase-remove svg {
  width: 13px;
  height: 13px;
}

.purchase-summary {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.purchase-foot {
  flex-wrap: wrap;
}

.purchase-foot .btn {
  flex: 0 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- dialogs ---------- */
.modal {
  width: min(1010px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--text);
  background: transparent;
}

.modal::backdrop {
  background: rgba(2, 5, 9, 0.78);
  -webkit-backdrop-filter: blur(10px) saturate(0.8);
  backdrop-filter: blur(10px) saturate(0.8);
}

.modal[open] {
  animation: modalIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(190, 210, 235, 0.16);
  border-radius: 19px;
  background: linear-gradient(160deg, #111a26 0%, #0b1119 62%, #090e15 100%);
  box-shadow: 0 45px 110px -28px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 120, 96, 0.55), transparent);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 25px 17px;
  border-bottom: 1px solid var(--line);
}

.modal-kicker {
  color: var(--accent-soft);
  font-size: 9px;
}

.modal-head h2 {
  margin-top: 5px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.modal-close {
  display: inline-flex;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.modal-close svg {
  width: 17px;
  height: 17px;
}

.modal-close:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.editor-card {
  display: flex;
  max-height: calc(100vh - 40px);
  flex-direction: column;
}

.editor-body {
  display: grid;
  grid-template-columns: 315px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 25px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(190, 210, 235, 0.2) transparent;
}

.editor-body::-webkit-scrollbar {
  width: 8px;
}

.editor-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(190, 210, 235, 0.18);
  background-clip: padding-box;
}

.cover-editor {
  position: sticky;
  top: 0;
  align-self: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.018);
}

.cover-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10.5px;
}

.cover-editor-head .mono {
  color: var(--muted-2);
  font-size: 8px;
}

.cover-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #080d14;
}

.cover-preview svg,
.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-preview img {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cover-preview img.is-broken {
  display: none;
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.cover-actions .btn {
  flex: 1 1 auto;
}

.upload-label {
  cursor: pointer;
}

.field-hint {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.6;
}

.cover-feedback {
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(65, 214, 159, 0.2);
  border-radius: 6px;
  color: #86ebc7;
  background: rgba(65, 214, 159, 0.055);
  font-size: 9.5px;
  line-height: 1.55;
}

.cover-feedback.is-error {
  border-color: rgba(255, 95, 80, 0.25);
  color: #ff9d91;
  background: rgba(255, 77, 61, 0.06);
}

.cover-url-field {
  margin-top: 13px;
}

.cover-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(190, 210, 235, 0.075);
}

.mini-mark {
  display: block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(255, 77, 61, 0.6);
}

.cover-note p {
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.65;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px 14px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.field-full {
  grid-column: 1 / -1;
}

.field > span,
.field-label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.field > span em {
  color: var(--accent);
  font-style: normal;
}

.field > span small,
.field-label small {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 400;
}

.field-label {
  justify-content: flex-start;
}

.field-label small {
  margin-left: auto;
  color: var(--muted-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: rgba(5, 9, 14, 0.45);
  font-size: 12.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field select {
  padding-right: 31px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237f90a6' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.field select option {
  color: var(--text);
  background: #0d141e;
}

.field textarea {
  height: auto;
  min-height: 76px;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.65;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(77, 166, 255, 0.52);
  background: rgba(9, 15, 23, 0.8);
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.07);
}

.field input.is-invalid,
.field textarea.is-invalid {
  border-color: rgba(255, 88, 72, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 77, 61, 0.08);
}

.field input[type="date"] {
  color-scheme: dark;
}

.field input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
}

.field input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.85;
}

.field textarea::-webkit-scrollbar {
  width: 7px;
}

.field textarea::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(190, 210, 235, 0.16);
}

.char-count {
  align-self: flex-end;
  margin-top: -3px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.rating-picker {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 9, 14, 0.45);
}

.rating-star {
  padding: 0 2px;
  color: rgba(255, 255, 255, 0.15);
  font-size: 24px;
  line-height: 1;
  transition: color 0.16s ease, transform 0.16s ease, text-shadow 0.16s ease;
}

.rating-star:hover,
.rating-star.is-preview {
  color: rgba(255, 200, 87, 0.6);
  transform: translateY(-1px);
}

.rating-star.is-active {
  color: var(--gold);
  text-shadow: 0 0 15px rgba(255, 200, 87, 0.32);
}

.rating-tip {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 9px;
  white-space: nowrap;
}

.form-error {
  grid-column: 1 / -1;
  padding: 9px 11px;
  border: 1px solid rgba(255, 88, 72, 0.25);
  border-radius: 7px;
  color: #ff9589;
  background: rgba(255, 77, 61, 0.06);
  font-size: 11px;
}

.modal-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px 25px;
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 12, 0.25);
}

.foot-spacer {
  flex: 1 1 auto;
}

/* ---------- detail dialog ---------- */
.detail-modal {
  width: min(960px, calc(100vw - 40px));
}

.detail-card {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.detail-close {
  position: absolute;
  z-index: 8;
  top: 15px;
  right: 15px;
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  background: rgba(5, 9, 14, 0.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr);
  min-height: 490px;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #080d14;
}

.detail-cover .cover-art,
.detail-cover .cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-cover .cover-img {
  object-fit: cover;
}

.detail-cover::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(4, 7, 11, 0.82));
  pointer-events: none;
}

.detail-cover-meta {
  position: absolute;
  z-index: 3;
  right: 19px;
  bottom: 17px;
  left: 19px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

.detail-cover-meta span:last-child {
  color: rgba(255, 255, 255, 0.36);
  writing-mode: vertical-rl;
  letter-spacing: 0.2em;
}

.detail-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 36px 29px 25px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.grade-pill {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid currentColor;
  border-radius: 5px;
  color: var(--grade-color, var(--blue));
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.detail-body h2 {
  margin-top: 16px;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.28;
}

.detail-series {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}

.detail-rating .stars {
  font-size: 15px;
  gap: 3px;
}

.detail-rating > span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 12px;
  margin-top: 22px;
  padding: 19px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec-item span {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.spec-item strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-item strong.price {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 17px;
}

.detail-notes {
  margin-top: 19px;
}

.detail-notes h4 {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.detail-notes p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-notes p.is-empty {
  color: var(--muted-2);
  font-style: italic;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 23px;
}

.detail-actions .btn:last-child {
  margin-left: auto;
}

/* ---------- confirm ---------- */
.confirm-modal {
  width: min(410px, calc(100vw - 36px));
}

.confirm-card {
  padding: 28px 28px 22px;
  text-align: center;
}

.confirm-mark {
  display: inline-flex;
  width: 43px;
  height: 43px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 77, 61, 0.3);
  border-radius: 50%;
  color: var(--accent-soft);
  background: rgba(255, 77, 61, 0.075);
  font-family: var(--font-display);
  font-size: 21px;
}

.confirm-card h2 {
  font-size: 19px;
  font-weight: 600;
}

.confirm-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
}

.confirm-actions {
  display: flex;
  gap: 9px;
  margin-top: 22px;
}

.confirm-actions .btn {
  flex: 1;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  z-index: 120;
  bottom: 24px;
  left: 50%;
  display: flex;
  max-width: min(500px, calc(100vw - 32px));
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(190, 210, 235, 0.18);
  border-radius: 11px;
  background: rgba(16, 24, 35, 0.96);
  box-shadow: 0 18px 48px -18px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform: translate(-50%, 12px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast-mark {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(65, 214, 159, 0.6);
}

.toast.is-error .toast-mark {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 77, 61, 0.6);
}

.toast-message {
  overflow: hidden;
  flex: 1 1 auto;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-action {
  flex: 0 0 auto;
  padding: 2px 5px;
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 600;
}

.toast-action:hover {
  color: #ffb4a7;
}

.toast-close {
  display: inline-flex;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: var(--muted-2);
}

.toast-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.toast-close svg {
  width: 13px;
  height: 13px;
}

/* generated artwork helper */
.generated-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- motion ---------- */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(20px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes signalPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes scan {
  0% { transform: translateY(0); }
  65%, 100% { transform: translateY(650%); }
}

@keyframes barGrow {
  from { width: 0; }
}

@keyframes toastIn {
  from { transform: translate(-50%, 14px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.82fr);
    gap: 45px;
  }

  .hero h1 {
    font-size: clamp(46px, 5.6vw, 70px);
  }

  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recent-panel {
    grid-column: 1 / -1;
  }

  .recent-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 22px;
  }

  .recent-list li:nth-child(2) .recent-item,
  .recent-list li:nth-child(3) .recent-item {
    border-top: 0;
  }

  .recent-list li:nth-child(n+4) {
    display: none;
  }
}

@media (max-width: 1020px) {
  .header-inner {
    gap: 24px;
  }

  .main-nav {
    gap: 20px;
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .icon-action span {
    display: none;
  }

  .sync-status {
    width: 28px;
    justify-content: center;
    padding: 0;
  }

  .sync-status span {
    display: none;
  }

  .icon-action {
    width: 36px;
    justify-content: center;
    padding: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
    padding-top: 46px;
  }

  .hero-copy {
    max-width: 690px;
  }

  .hero h1 {
    font-size: clamp(46px, 8.8vw, 76px);
  }

  .featured-panel {
    width: min(100%, 650px);
    justify-self: center;
  }

  .hero-lead {
    max-width: 560px;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 68px;
  }

  .container {
    width: min(1240px, calc(100% - 34px));
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy small {
    font-size: 7.5px;
  }

  .header-actions {
    gap: 3px;
  }

  .btn-add {
    width: 38px;
    padding: 0;
  }

  .btn-add span {
    display: none;
  }

  .btn-add svg {
    width: 18px;
    height: 18px;
  }

  .hero {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .hero h1 {
    margin-top: 16px;
    font-size: clamp(41px, 12vw, 60px);
  }

  .hero-lead {
    margin-top: 17px;
    font-size: 13.5px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-footnote {
    margin-top: 21px;
    font-size: 8.5px;
  }

  .featured-info {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .featured-info .btn {
    margin-bottom: 0;
  }

  .featured-art-wrap {
    aspect-ratio: 16 / 10;
  }

  .section {
    padding-top: 45px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 20px;
  }

  .section-note {
    padding-bottom: 0;
    text-align: left;
  }

  .result-meta {
    padding-bottom: 0;
  }

  .toolbar {
    gap: 8px;
  }

  .purchase-import-trigger {
    flex: 1 1 100%;
    height: 44px;
  }

  .modal.profile-modal {
    width: calc(100vw - 24px);
  }

  .profile-body {
    padding: 17px 17px 19px;
  }

  .profile-avatar-row {
    align-items: flex-start;
    gap: 16px;
  }

  .profile-avatar-preview {
    width: 84px;
    height: 84px;
    font-size: 28px;
  }

  .profile-password-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-password-form > .field,
  .profile-password-form > .form-error,
  .profile-password-form > .btn {
    grid-column: 1;
  }

  .purchase-modal {
    width: calc(100vw - 24px);
  }

  .modal.purchase-modal {
    width: calc(100vw - 24px);
  }

  .purchase-card {
    max-height: calc(100vh - 24px);
  }

  .purchase-body {
    padding: 15px 17px 19px;
  }

  .purchase-tabs {
    width: 100%;
  }

  .purchase-tab {
    flex: 1;
  }

  .purchase-dropzone {
    min-height: 158px;
    padding: 18px 14px;
  }

  .purchase-dropzone.compact {
    min-height: 112px;
  }

  .purchase-preview-head {
    align-items: flex-start;
  }

  .purchase-foot {
    gap: 8px;
  }

  .purchase-summary {
    order: 3;
    width: 100%;
    margin-top: 2px;
  }

  .purchase-foot .foot-spacer {
    display: none;
  }

  .purchase-foot .btn-primary {
    margin-left: auto;
  }

  .search-field {
    flex-basis: 100%;
    height: 45px;
  }

  .filter-group {
    width: 100%;
  }

  .select-wrap {
    flex: 1 1 0;
    min-width: 0;
    height: 44px;
  }

  .select-wrap select {
    width: 100%;
  }

  .collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .kit-title {
    min-height: 0;
  }

  .analytics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .recent-panel {
    grid-column: auto;
  }

  .recent-list {
    display: flex;
    flex-direction: column;
  }

  .recent-list li:nth-child(2) .recent-item,
  .recent-list li:nth-child(3) .recent-item {
    border-top: 1px solid rgba(190, 210, 235, 0.07);
  }

  .site-footer {
    margin-top: 52px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
  }

  .footer-meta {
    align-items: flex-start;
  }

  .modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .detail-modal {
    width: calc(100vw - 24px);
  }

  .editor-card {
    max-height: calc(100vh - 24px);
  }

  .editor-body {
    grid-template-columns: minmax(0, 1fr);
    padding: 17px;
  }

  .cover-editor {
    position: static;
  }

  .cover-preview {
    max-height: 215px;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-head {
    padding: 17px 17px 14px;
  }

  .modal-foot {
    flex-wrap: wrap;
    padding: 13px 17px;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .detail-cover {
    min-height: 255px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-body {
    padding: 23px 20px 20px;
  }

  .detail-body h2 {
    margin-top: 13px;
  }

  .detail-actions .btn:last-child {
    margin-left: 0;
  }

  .detail-specs {
    gap: 13px 10px;
    margin-top: 18px;
    padding: 16px 0;
  }

  .confirm-card {
    padding: 24px 20px 18px;
  }
}

@media (max-width: 520px) {
  .container {
    width: calc(100% - 28px);
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy small {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .featured-panel {
    padding: 10px;
    border-radius: 17px;
  }

  .featured-panel::before {
    top: 18px;
    right: -8px;
    bottom: -8px;
    left: 18px;
    border-radius: 17px;
  }

  .featured-topline {
    padding-bottom: 10px;
    font-size: 8px;
  }

  .featured-rate {
    min-width: 125px;
    padding: 8px 10px 9px;
  }

  .featured-rate strong {
    font-size: 28px;
  }

  .featured-titles h2 {
    font-size: 17px;
  }

  .stats {
    gap: 9px;
  }

  .stat-card {
    padding: 15px 13px 13px;
  }

  .stat-card::before {
    left: 13px;
  }

  .stat-value {
    font-size: 32px;
  }

  .stat-currency {
    font-size: 27px;
  }

  .stat-icon {
    width: 24px;
    height: 24px;
  }

  .stat-icon svg {
    width: 13px;
    height: 13px;
  }

  .stat-head {
    font-size: 10.5px;
  }

  .stat-foot {
    font-size: 9px;
  }

  .micro-line {
    display: none;
  }

  .search-field kbd {
    display: none;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rating-tip {
    display: none;
  }

  .detail-specs {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-rating {
    flex-wrap: wrap;
  }

  .modal-head h2 {
    font-size: 19px;
  }

  .toast {
    bottom: 14px;
  }
}

@media (max-width: 380px) {
  .header-inner {
    gap: 12px;
  }

  .sync-status {
    display: none;
  }

  .brand-copy strong {
    font-size: 14px;
  }
}

@media (max-width: 980px) {
  .auth-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding: 38px 0 30px;
  }

  .auth-intro {
    max-width: 680px;
  }

  .auth-intro h1 {
    font-size: clamp(44px, 8vw, 68px);
  }

  .auth-lead {
    max-width: 620px;
  }

  .auth-points {
    max-width: 620px;
  }

  .auth-panel {
    max-width: 560px;
    justify-self: start;
  }

  .account-menu {
    right: 0;
  }
}

@media (max-width: 680px) {
  .auth-screen {
    padding: 20px 0 18px;
  }

  .auth-shell {
    min-height: calc(100vh - 38px);
  }

  .auth-top {
    align-items: flex-start;
  }

  .auth-system {
    display: none;
  }

  .auth-grid {
    gap: 27px;
    padding: 30px 0 25px;
  }

  .auth-intro h1 {
    margin-top: 15px;
    font-size: clamp(39px, 11.5vw, 56px);
  }

  .auth-lead {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.8;
  }

  .auth-points {
    margin-top: 20px;
  }

  .auth-points li {
    padding: 10px 0;
  }

  .auth-security {
    margin-top: 16px;
    font-size: 9px;
  }

  .auth-panel {
    max-width: none;
    padding: 18px 17px 16px;
    border-radius: 15px;
  }

  .auth-tabs {
    margin-top: 14px;
  }

  .auth-form {
    margin-top: 15px;
  }

  .auth-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 7.5px;
  }

  .account-menu {
    width: 204px;
  }

  .footer-account {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
