/* ============================================================
   lunar Journal · components
   ============================================================ */

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: auto;
  background: rgba(10, 8, 14, 0.88);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 44px);
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--gold);
}

.brand-text { display: grid; gap: 1px; line-height: 1; }

.brand-cn {
  font-size: 18.4px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--paper);
}

.brand-en {
  font-family: var(--sans);
  font-size: 8.1px;
  letter-spacing: 0.24em;
  color: var(--gold-3);
  text-transform: none;
}

.nav-bar {
  background: linear-gradient(90deg, #b78b4d 0%, #d5b980 26%, #e2cb96 50%, #d5b980 74%, #b78b4d 100%);
  border-top: 1px solid rgba(255,255,255,.16);
  border-bottom: 1px solid rgba(23,16,32,.22);
}
.nav-bar-inner { height: 48px; display: flex; align-items: center; }
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.8vw, 28px);
  width: 100%;
  margin-inline: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav .nav-link {
  flex: 0 0 auto;
  padding: 12px 2px 10px;
  color: #1b1224;
  font-size: 15.1px;
  font-weight: 600;
  letter-spacing: .1em;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav .nav-link:hover { color: #0a080e; border-color: rgba(23,16,32,.35); background: rgba(23,16,32,.06); }
.main-nav .nav-link.is-active { color: #0a080e; border-color: #0a080e; }

.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  font-family: var(--sans);
  font-size: 11.9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-3);
  border-bottom: 1px solid transparent;
}
.nav-link:hover { color: var(--paper); border-color: var(--line-2); }
.nav-link.is-active, .nav-item.is-active > .nav-link { color: var(--gold); border-color: var(--gold); }
.nav-link .chev { width: 8px; height: 8px; opacity: 0.6; }

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  min-width: 190px;
  padding: 8px;
  background: rgba(18, 13, 25, 0.97);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: all var(--t-fast) var(--ease);
}
.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.nav-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--paper-2);
  letter-spacing: 0.05em;
}
.nav-menu a:hover { background: var(--bg-soft); color: var(--gold-2); }
.nav-menu a span { font-family: var(--mono); font-size: 9.7px; color: var(--muted); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chip-credits {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.8px;
  color: var(--gold-2);
  letter-spacing: 0.04em;
}
.chip-credits svg { width: 13px; height: 13px; color: var(--gold); }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--paper-2);
  transition: all var(--t-fast) var(--ease);
}
.icon-btn:hover { color: var(--gold-2); border-color: var(--line); background: var(--bg-soft); }
.icon-btn svg { width: 19px; height: 19px; }

.cart-count {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9.7px;
  font-weight: 700;
  border-radius: 8px;
}
.cart-count[data-empty="true"] { display: none; }

.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  overflow: hidden;
  background: var(--ink-3);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 15.1px;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.menu-toggle { display: none; }

/* ---------------- mobile nav ---------------- */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  pointer-events: none;
}
.nav-drawer.is-open { pointer-events: auto; }
.nav-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 8, 0.7);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
  backdrop-filter: blur(4px);
}
.nav-drawer.is-open .nav-drawer-overlay { opacity: 1; }

.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 380px);
  height: 100%;
  background: var(--ink-2);
  border-left: 1px solid var(--line-2);
  padding: 26px 26px 40px;
  transform: translateX(100%);
  transition: transform var(--t-base) var(--ease);
  overflow-y: auto;
}
.nav-drawer.is-open .nav-drawer-panel { transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.drawer-nav { display: grid; gap: 4px; }
.drawer-nav > a,
.drawer-nav-group > button {
  width: 100%;
  display: flex;
  gap: 12px;
  white-space: nowrap;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font-family: var(--serif);
  font-size: 19.4px;
  color: var(--paper);
}
.drawer-nav-group > button svg { width: 14px; height: 14px; flex: 0 0 14px; }
.drawer-nav-group .sub {
  display: grid;
  gap: 2px;
  padding: 6px 0 10px 14px;
}
.drawer-nav-group .sub a {
  padding: 7px 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.drawer-nav-group .sub a:hover { color: var(--gold); }

/* ---------------- footer ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
  margin-top: var(--section);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-brand p {
  max-width: 300px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.footer-col h4 {
  margin-bottom: 12px;
  font-family: var(--sans);
  font-size: 10.8px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.footer-col a {
  display: block;
  padding: 4px 0;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--paper-3);
}
.footer-col a:hover { color: var(--gold-2); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11.3px;
  color: var(--muted-2);
  letter-spacing: 0.05em;
}
.footer-bottom .demo-note { color: var(--gold-3); }

/* ---------------- buttons ---------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-bd: var(--line-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--sans);
  font-size: 11.9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
  border-radius: var(--radius);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; }
.btn[disabled], .btn.is-disabled {
  opacity: 0.42;
  pointer-events: none;
}

.btn-primary {
  --btn-bg: linear-gradient(135deg, #d8b77a, #c3a05e 55%, #a98645);
  --btn-fg: #17101f;
  --btn-bd: transparent;
  box-shadow: 0 8px 24px rgba(195, 160, 94, 0.16);
}
.btn-primary:hover {
  --btn-bg: linear-gradient(135deg, #e4c78c, #cfae6d 55%, #b8934d);
  color: #120c19;
  box-shadow: 0 12px 30px rgba(195, 160, 94, 0.24);
}

.btn-ghost { --btn-bd: var(--line-2); }
.btn-ghost:hover { --btn-bd: var(--gold); color: var(--gold-2); background: var(--bg-soft); }

.btn-quiet {
  min-height: 36px;
  padding: 6px 0;
  border: 0;
  color: var(--paper-3);
  font-size: 10.8px;
}
.btn-quiet:hover { color: var(--gold-2); }

.btn-paper {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bd: transparent;
}
.btn-paper:hover { --btn-bg: #f2e8d4; color: var(--ink); }

.btn-sm { min-height: 36px; padding: 8px 15px; font-size: 10.3px; letter-spacing: 0.14em; }
.btn-lg { min-height: 54px; padding: 15px 32px; font-size: 12.4px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11.9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.link-arrow svg { width: 14px; height: 14px; transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------------- badges / tags ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 9px;
  border: 1px solid var(--line-2);
  font-family: var(--sans);
  font-size: 9.7px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-2);
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge-gold { border-color: rgba(195,160,94,.45); background: rgba(195,160,94,.10); color: var(--gold-2); }
.badge-rose { border-color: rgba(176,138,132,.40); background: rgba(176,138,132,.10); color: var(--rose); }
.badge-sage { border-color: rgba(124,138,117,.40); background: rgba(124,138,117,.10); color: var(--sage); }
.badge-muted { border-color: var(--line); color: var(--muted); }
.badge-solid { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 10.3px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------------- panels / frames ---------------- */
.panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-pad { padding: clamp(20px, 3vw, 34px); }

.frame {
  position: relative;
  border: 1px solid var(--line-2);
  background: var(--bg-card);
}
.frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.frame-pad { padding: clamp(24px, 4vw, 46px); }

.paper-panel {
  background:
    linear-gradient(145deg, rgba(232,221,198,.98), rgba(217,203,178,.96));
  color: var(--ink);
  border: 1px solid rgba(94, 71, 32, 0.35);
}
.paper-panel p, .paper-panel h1, .paper-panel h2, .paper-panel h3 { color: var(--ink); }
.paper-panel .muted { color: #6d6252; }

/* ---------------- section head ---------------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head h2 { margin-top: 10px; }
.section-head p { max-width: 480px; margin-top: 8px; font-size: 15.1px; color: var(--muted); }
.section-head .head-side { flex-shrink: 0; padding-bottom: 4px; }

/* ---------------- tarot card ---------------- */
.tarot-card {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3.5;
  background: #0c0910;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-soft);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  overflow: hidden;
  isolation: isolate;
}
.tarot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.10), transparent 34%, transparent 68%, rgba(0,0,0,.20));
  pointer-events: none;
}
.tarot-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--t-slow) var(--ease);
}
.tarot-card.is-reversed img { transform: rotate(180deg); }
.tarot-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-3);
  box-shadow: 0 28px 60px rgba(0,0,0,.5);
}
.tarot-card .rev-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 6px;
  background: rgba(10,8,14,.78);
  border: 1px solid var(--line-2);
  color: var(--rose);
  font-family: var(--sans);
  font-size: 8.6px;
  letter-spacing: .1em;
}
.tarot-card .card-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 18px 10px 9px;
  background: linear-gradient(transparent, rgba(8,6,11,.88));
  font-family: var(--serif);
  font-size: 11.9px;
  letter-spacing: .12em;
  color: var(--paper);
  text-align: center;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.tarot-card:hover .card-name { opacity: 1; }

.tarot-card.is-selectable { cursor: pointer; }
.tarot-card.is-selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 20px 50px rgba(195,160,94,.18); }
.tarot-card.is-dim { opacity: .35; filter: saturate(.5); }

/* ---------------- card backs / deck ---------------- */
.card-back {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3.5;
  background:
    radial-gradient(circle at 50% 50%, rgba(195,160,94,.12), transparent 50%),
    linear-gradient(150deg, #161021, #0a080f 70%);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.card-back::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(195,160,94,.65);
  background:
    radial-gradient(circle at 50% 50%, transparent 0 16%, rgba(195,160,94,.55) 16.5% 17.2%, transparent 17.8% 27%, rgba(195,160,94,.32) 27.5% 28.2%, transparent 28.8%),
    repeating-linear-gradient(45deg, rgba(195,160,94,.10) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(-45deg, rgba(195,160,94,.10) 0 1px, transparent 1px 13px),
    radial-gradient(circle at 12% 12%, rgba(195,160,94,.5) 0 1.5px, transparent 2px),
    radial-gradient(circle at 88% 12%, rgba(195,160,94,.5) 0 1.5px, transparent 2px),
    radial-gradient(circle at 12% 88%, rgba(195,160,94,.5) 0 1.5px, transparent 2px),
    radial-gradient(circle at 88% 88%, rgba(195,160,94,.5) 0 1.5px, transparent 2px);
  opacity: .95;
}
.card-back::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 34%; aspect-ratio: 1; height: auto;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(195,160,94,.75);
  border-radius: 50%;
  background: radial-gradient(circle at 66% 50%, #0f0b16 0 53%, rgba(15,11,22,.85) 54%, transparent 55%);
  box-shadow: 0 0 24px rgba(195,160,94,.12);
}


/* ---------------- product card ---------------- */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
  overflow: hidden;
}
.product-card:hover { border-color: var(--line-2); transform: translateY(-4px); background: var(--bg-card-2); }
.product-media {
  position: relative;
  aspect-ratio: 4 / 3.2;
  background:
    radial-gradient(circle at 50% 48%, rgba(195,160,94,.13), transparent 60%),
    linear-gradient(160deg, #171120, #0d0a13);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 14%;
  overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: contain; transition: transform var(--t-slow) var(--ease); }
.product-card:hover .product-media img { transform: scale(1.035) rotate(-1deg); }
.product-media .badge { position: absolute; top: 12px; left: 12px; }
.product-body { padding: 16px 16px 18px; display: grid; gap: 7px; flex: 1; }
.product-title { font-size: 17.3px; line-height: 1.4; }
.product-sub { font-size: 12.4px; color: var(--muted); font-family: var(--sans); }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.price { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--mono); color: var(--gold-2); }
.price .cur { font-size: 11.9px; opacity: .8; }
.price .num { font-size: 21.6px; letter-spacing: -.02em; }
.price .was { font-size: 11.9px; color: var(--muted); text-decoration: line-through; }
.price-sm .num { font-size: 16.2px; }

/* ---------------- master card ---------------- */
.master-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 22px;
  min-height: 156px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  transition: all var(--t-base) var(--ease);
}
.master-card:hover { border-color: var(--line-2); background: var(--bg-card-2); transform: translateY(-3px); }
.master-sigil {
  width: 92px; height: 92px;
  border: 1px solid var(--line-2);
  background: radial-gradient(circle at 50% 45%, rgba(195,160,94,.16), transparent 70%), var(--ink-3);
  display: grid; place-items: center;
  overflow: hidden;
}
.master-sigil img { width: 100%; height: 100%; }
.master-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.master-name h3 { font-size: 19.4px; }
.master-style { margin-top: 3px; font-family: var(--sans); font-size: 10.8px; letter-spacing: .14em; color: var(--gold-3); text-transform: uppercase; }
.master-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-family: var(--sans); font-size: 11.3px; color: var(--muted); }
.master-meta strong { color: var(--paper-2); font-weight: 500; }
.master-price { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.master-bio { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: 13px; line-height: 1.65; color: var(--muted); }

/* ---------------- post card ---------------- */
.post-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  transition: all var(--t-base) var(--ease);
}
.post-card:hover { border-color: var(--line-2); background: var(--bg-card-2); }
.post-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--sans); font-size: 11.3px; color: var(--muted); }
.post-author { display: inline-flex; align-items: center; gap: 8px; color: var(--paper-2); }
.post-avatar { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--serif); font-size: 10.8px; color: var(--gold); background: var(--ink-3); }
.post-q { font-size: 18.4px; line-height: 1.6; color: var(--paper); }
.post-excerpt { font-size: 14px; color: var(--muted); }
.post-cards { display: flex; gap: 6px; }
.post-cards .mini-card {
  display: block;
  position: relative;
  background: var(--ink-3);
  border: 1px solid var(--line);
  overflow: hidden; width: 34px; aspect-ratio: 2/3.5; border: 1px solid var(--line); overflow: hidden; background: var(--ink-3); }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--sans); font-size: 11.3px; color: var(--muted); }

/* ---------------- forms ---------------- */
.field { display: grid; gap: 7px; }
.field > label, .field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--sans);
  font-size: 10.8px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.field-label .opt { color: var(--muted-2); letter-spacing: .02em; font-weight: 400; text-transform: none; }
.input, .textarea, .select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  background: rgba(10, 8, 14, 0.55);
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 15.1px;
  line-height: 1.6;
  border-radius: var(--radius);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--gold-3);
  background: rgba(10, 8, 14, 0.75);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.help { font-family: var(--sans); font-size: 11.3px; color: var(--muted); line-height: 1.6; }
.error-text { font-family: var(--sans); font-size: 11.3px; color: var(--danger); }

.checkbox, .radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--paper-2);
  line-height: 1.6;
  cursor: pointer;
}
.checkbox input, .radio input { accent-color: var(--gold); margin-top: 3px; flex-shrink: 0; }
.checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border: 1px solid var(--line-2);
  background: rgba(10,8,14,.45);
  position: relative;
  cursor: pointer;
}
.checkbox input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}
.checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox input[type="checkbox"]:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.checkbox a, .radio a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.option-grid { display: grid; gap: 10px; }
.option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(10,8,14,.35);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.option-card:hover { border-color: var(--line-2); }
.option-card.is-active { border-color: var(--gold-3); background: rgba(195,160,94,.06); }
.option-card input { accent-color: var(--gold); margin-top: 4px; }
.option-card .t { font-size: 15.1px; color: var(--paper); }
.option-card .d { font-family: var(--sans); font-size: 11.3px; color: var(--muted); margin-top: 2px; }
.option-card .p { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--gold-2); white-space: nowrap; }

/* ---------------- tabs ---------------- */
.tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  padding: 12px 0;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 11.9px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.tab:hover { color: var(--paper-2); }
.tab.is-active { color: var(--gold); }
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--gold);
}
.tab .count { font-family: var(--mono); font-size: 9.7px; opacity: .7; margin-left: 5px; }

/* ---------------- stepper ---------------- */
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 10.8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.step { display: flex; align-items: center; gap: 8px; }
.step-num {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 9.7px;
  color: var(--muted);
}
.step.is-active { color: var(--gold); }
.step.is-active .step-num { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.step.is-done .step-num { border-color: var(--gold-3); color: var(--gold); }
.step-sep { flex: 1; height: 1px; background: var(--line); min-width: 20px; }

/* ---------------- modal / drawer ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
}
.modal.is-open { pointer-events: auto; }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(4, 3, 7, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}
.modal.is-open .modal-overlay { opacity: 1; }
.modal-card {
  position: relative;
  width: min(92vw, 560px);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px);
  opacity: 0;
  transform: translateY(10px) scale(.99);
  transition: all var(--t-base) var(--ease);
}
.modal.is-open .modal-card { opacity: 1; transform: none; }
.modal-wide .modal-card { width: min(92vw, 760px); }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; background: transparent; color: var(--muted);
}
.modal-close:hover { color: var(--gold-2); }
.modal-head { margin-bottom: 18px; }
.modal-head h3 { margin-top: 6px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); pointer-events: none; }
.drawer.is-open { pointer-events: auto; }
.drawer-overlay { position: absolute; inset: 0; background: rgba(4,3,7,.7); opacity: 0; transition: opacity var(--t-base) var(--ease); }
.drawer.is-open .drawer-overlay { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0;
  width: min(92vw, 520px);
  height: 100%;
  background: var(--ink-2);
  border-left: 1px solid var(--line-2);
  padding: 28px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--t-base) var(--ease);
}
.drawer.is-open .drawer-panel { transform: none; }

/* ---------------- toast ---------------- */
.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: var(--z-toast);
  display: grid;
  gap: 8px;
  width: min(92vw, 360px);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(20, 14, 28, 0.97);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--gold);
  box-shadow: var(--shadow-soft);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--paper-2);
  animation: toastIn 280ms var(--ease) both;
}
.toast.is-error { border-left-color: var(--danger); }
.toast.is-success { border-left-color: var(--sage); }
.toast svg { width: 15px; height: 15px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.toast.is-error svg { color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- misc ---------------- */
.empty-state {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: clamp(40px, 7vw, 80px) 20px;
  border: 1px dashed var(--line-2);
  text-align: center;
}
.empty-state .icon { width: 42px; height: 42px; color: var(--gold-3); opacity: .8; }
.empty-state h3 { font-size: 20.5px; }
.empty-state p { max-width: 380px; font-size: 14px; color: var(--muted); }

.skeleton {
  background: linear-gradient(90deg, rgba(232,221,198,.05) 25%, rgba(232,221,198,.10) 50%, rgba(232,221,198,.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border: 1px solid var(--line);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.timeline { position: relative; display: grid; gap: 0; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 22px 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -22px; top: 5px;
  width: 9px; height: 9px;
  border: 1px solid var(--line-2);
  background: var(--ink);
  transform: rotate(45deg);
}
.timeline-item.is-done::before { background: var(--gold); border-color: var(--gold); }
.timeline-item.is-current::before { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(195,160,94,.12); }
.timeline-item h4 { font-family: var(--sans); font-size: 11.9px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-2); }
.timeline-item p { margin-top: 3px; font-size: 13px; color: var(--muted); }

.accordion { border-top: 1px solid var(--line); }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: var(--serif);
  font-size: 17.3px;
  color: var(--paper);
}
.accordion-trigger svg { width: 14px; height: 14px; color: var(--gold); transition: transform var(--t-fast) var(--ease); }
.accordion-item.is-open .accordion-trigger svg { transform: rotate(45deg); }
.accordion-panel { display: none; padding: 0 0 20px; max-width: 720px; }
.accordion-item.is-open .accordion-panel { display: block; }
.accordion-panel p { font-size: 14.6px; color: var(--muted); line-height: 1.8; }

/* ---------------- page header ---------------- */
.page-head {
  padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-head .eyebrow { margin-bottom: 14px; }
.page-head h1 { max-width: 900px; }
.page-head .lead { max-width: 680px; margin-top: 14px; }
.page-head .head-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--sans);
  font-size: 10.3px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { opacity: .4; }

/* ---------------- tables ---------------- */
.data-table { font-family: var(--sans); font-size: 13px; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { font-size: 9.7px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-3); font-weight: 600; }
.data-table td { color: var(--paper-2); }
.data-table tr:last-child td { border-bottom: 0; }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .header-actions .chip-credits { display: none; }
  .main-nav { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .master-card { grid-template-columns: 62px 1fr; padding: 14px; }
  .master-sigil { width: 62px; height: 62px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .toast-stack { right: 12px; bottom: 12px; }
}

@media (max-width: 640px) {
  .header-inner { height: 58px; }
  .nav-bar-inner { height: 42px; }
  .main-nav { gap: 18px; }
  .main-nav .nav-link { font-size: 14px; padding: 10px 1px 9px; }
}

/* refined product cards */
.product-card { background: linear-gradient(180deg, #14101c, #0e0b15); }
.product-card::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; pointer-events: none; transition: border-color var(--t-base) var(--ease); }
.product-card:hover::after { border-color: rgba(195,160,94,.38); }
.product-media { padding: 7%; background: radial-gradient(circle at 50% 42%, rgba(195,160,94,.10), transparent 64%), #0d0a12; }
.product-media img { filter: drop-shadow(0 16px 22px rgba(0,0,0,.35)); }
.product-no { position: absolute; top: 12px; right: 14px; z-index: 3; font-family: var(--mono); font-size: 8.6px; letter-spacing: .16em; color: rgba(195,160,94,.78); }
.product-kicker { font-family: var(--sans); font-size: 8.6px; font-weight: 500; letter-spacing: .16em; color: var(--muted-2); text-transform: uppercase; }
.product-title { font-size: 18.4px; letter-spacing: .02em; }
.product-sub { line-height: 1.65; }
.product-foot { border-top: 1px dashed var(--line); }
.product-card.is-virtual .product-media { background: radial-gradient(circle at 50% 42%, rgba(124,138,117,.10), transparent 64%), #0d0a12; }
.product-card:hover .product-media img { transform: scale(1.045) rotate(-.6deg); }
