:root {
  --bg: #0a1014;
  --panel: #121a20;
  --line: #243038;
  --text: #eef3f6;
  --muted: #9aadb8;
  --ember: #e07a3d;
  --ember-2: #f4b183;
  --ink: #081015;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--bg);
  font-family: Figtree, system-ui, sans-serif;
}
h1, h2, h3, .brand span, .sheet-title {
  font-family: Newsreader, Georgia, serif;
  font-weight: 600;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 52px;
  padding: 0 22px;
  background: rgba(8,16,21,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: transparent;
}
.brand span { font-size: 22px; letter-spacing: .02em; }
.top-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.top-nav a {
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
}
.top-nav a.is-active,
.top-nav a:hover { color: var(--text); background: #1a262e; }
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.top-discord, .top-user { color: var(--muted); text-decoration: none; font-size: 14px; }
.top-login {
  padding: 8px 14px;
  color: var(--ink);
  background: var(--ember);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}
.top-login:hover { background: var(--ember-2); }

.billboard {
  position: relative;
  height: 220px;
  min-height: 180px;
  max-height: 28vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8,16,21,.82) 8%, rgba(8,16,21,.25) 55%, transparent 80%),
    linear-gradient(180deg, rgba(8,16,21,.15), var(--bg) 96%);
}
.billboard-copy {
  position: relative;
  z-index: 1;
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 20px;
  max-width: 560px;
  margin-left: max(20px, calc((100% - 1140px) / 2));
}
.billboard-copy h1 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.1;
}
.billboard-copy p { margin: 0 0 12px; color: #d5e0e6; font-size: 15px; }
.billboard-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.shell {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 24px;
  flex: 1 0 auto;
}
.is-home .shell { padding: 16px 0 12px; }
.section-label {
  margin: 0 0 14px;
  color: var(--ember-2);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
}

.panel, .prose {
  margin: 0 0 14px;
  padding: 18px 22px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  line-height: 1.6;
}
.panel.center { text-align: left; }
.important {
  margin: 18px 0 6px;
  color: var(--ember-2);
  font-weight: 700;
  letter-spacing: .08em;
}
.kicker {
  margin: 0 0 8px;
  color: var(--ember-2);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
}
h1, h2, h3 { margin: 0 0 10px; }
h1 { font-size: 32px; }

.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.item-card {
  overflow: hidden;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.item-card:hover { border-color: #3d4c56; }
.item-art {
  display: grid;
  place-items: center;
  height: 130px;
  background: #0d151a;
}
.item-art img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}
.item-card h3, .item-card .price, .item-card .basket {
  margin-left: 14px;
  margin-right: 14px;
}
.item-card h3 { margin-top: 10px; font-size: 18px; }
.item-card h3 a { color: inherit; text-decoration: none; }
.item-card .basket { margin-bottom: 12px; min-height: 34px; }

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: start center;
  padding: 8vh 16px 32px;
  overflow: auto;
  background: rgba(6,12,16,.78);
}
.sheet-overlay[hidden] { display: none; }
.sheet, .page-sheet {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 36px 40px 20px;
  color: var(--text);
  background: #10181e;
  border: 1px solid var(--line);
  border-radius: 18px;
  line-height: 1.7;
}
.sheet-title {
  margin: 0 0 18px;
  font-size: 34px;
  text-align: left;
}
.sheet-body p { margin: 0 0 12px; color: var(--muted); }
.sheet-body h2 {
  margin: 26px 0 10px;
  font-size: 22px;
  text-align: left;
  color: var(--ember-2);
}
.sheet-body ul { margin: 0 0 12px 18px; color: var(--muted); }
.video-link, .docs-gold { color: var(--ember-2); font-weight: 600; }
.video-frame {
  aspect-ratio: 16 / 9;
  margin: 8px 0 18px;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.sheet-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.sheet-bar .basket { margin-left: auto; min-width: 160px; min-height: 42px; }
.sheet-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 22px;
  cursor: pointer;
}
.page-sheet .sheet-close { display: none; }

.admin-form { max-width: 720px; }
.admin-list { display: grid; gap: 12px; }
.admin-row {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.admin-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.admin-preview { max-width: 160px; max-height: 120px; object-fit: contain; margin-bottom: 8px; }
.fine { color: var(--muted); font-size: 13px; }
.price { margin: 0 0 12px; color: var(--ember-2); }
.price.xl { font-size: 26px; }
.basket, .btn, .btn.solid, .btn.ink, .btn.wax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  color: var(--ink);
  background: var(--ember);
  border: 0;
  border-radius: 10px;
  font: 700 13px Figtree, sans-serif;
  cursor: pointer;
  text-decoration: none;
}
.basket:hover, .btn:hover, .btn.solid:hover { background: var(--ember-2); color: var(--ink); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.product-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 16px;
}
.art-panel { display: grid; place-items: center; }
.art-panel img { max-width: 100%; max-height: 360px; object-fit: contain; }

.foot {
  margin-top: auto;
  padding: 12px 0 14px;
  border-top: 1px solid var(--line);
  background: #070c10;
  color: #7d8e98;
  font-size: 12px;
  flex-shrink: 0;
}
.foot-inner {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot a { color: #9aadb8; margin-right: 12px; text-decoration: none; }
.pay-marks {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.pay-marks svg { display: block; height: 22px; width: auto; }
.flash {
  padding: 10px 12px;
  border: 1px solid #3d4c56;
  border-radius: 10px;
  background: #10181e;
}
.empty { text-align: center; color: var(--muted); }
.cart-list { display: grid; gap: 10px; }
.cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}
.cart-total { display: flex; justify-content: space-between; margin: 12px 0; font-size: 20px; }
.checkout { display: grid; gap: 12px; max-width: 520px; }
.admin-form, .admin-login form { display: grid; gap: 12px; max-width: 720px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  color: #eee;
  background: #0d151a;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 15px Figtree, sans-serif;
}
fieldset { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--ember);
  cursor: pointer;
}

body.docs-body { background: var(--bg); }
.docs-search {
  flex: 1;
  max-width: 360px;
  margin: 0 auto;
  padding: 8px 14px;
  color: #eee;
  background: #121a20;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 14px Figtree, sans-serif;
}
.docs-frame {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 200px;
  flex: 1;
  width: 100%;
}
.docs-side, .docs-toc {
  padding: 22px 16px;
  border-color: var(--line);
  border-style: solid;
  background: #0c1318;
}
.docs-side { border-right-width: 1px; }
.docs-toc { border-left-width: 1px; }
.docs-side-label {
  margin: 0 0 10px;
  color: var(--ember-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.docs-side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: #d5e0e6;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
}
.docs-side-link.is-on,
.docs-side-link:hover { background: #1a262e; color: var(--ember-2); }
.docs-toc a {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.docs-toc a:hover { color: var(--ember-2); }
.docs-main {
  padding: 28px 36px 48px;
  max-width: 860px;
  color: var(--text);
  line-height: 1.7;
}
.docs-main h1 { font-size: 36px; margin: 0 0 12px; }
.docs-main h2 { margin: 32px 0 10px; font-size: 22px; color: var(--ember-2); }
.docs-lead { color: var(--muted); margin: 0 0 20px; }
.docs-preview {
  display: block;
  width: min(100%, 640px);
  max-height: 360px;
  object-fit: contain;
  margin: 8px 0 12px;
  background: #0d151a;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.docs-muted { color: #7d8e98; }
.docs-price { margin-left: 12px; color: var(--ember-2); font-weight: 700; }
.docs-main pre {
  overflow: auto;
  padding: 14px 16px;
  background: #0d151a;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.docs-main code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

.cart-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  background: #1a262e;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  color: var(--ink);
  background: var(--ember);
  border-radius: 999px;
  font: 700 11px Figtree, sans-serif;
  line-height: 18px;
  text-align: center;
}
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6,12,16,.62);
}
.cart-overlay[hidden] { display: none; }
.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  height: 100%;
  padding: 22px 20px 18px;
  background: #0e161c;
  border-left: 1px solid var(--line);
  overflow: auto;
}
.cart-x { position: absolute; top: 14px; right: 14px; }
.cart-who {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 36px 18px 0;
}
.cart-who img { width: 44px; height: 44px; object-fit: contain; }
.cart-who p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.cart-drawer-list { display: grid; gap: 10px; }
.drawer-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #121a20;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.drawer-row img { width: 52px; height: 52px; object-fit: contain; background: #0d151a; border-radius: 8px; }
.drawer-row strong { display: block; font-size: 14px; }
.qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.qty button {
  width: 26px;
  height: 26px;
  color: var(--text);
  background: #1a262e;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.drawer-row .trash {
  background: transparent;
  color: var(--muted);
  border: 0;
  font-size: 18px;
  cursor: pointer;
}
.cart-suggest { margin-top: 18px; }
.suggest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 8px;
  background: #121a20;
  border-radius: 10px;
}
.suggest-row img { width: 36px; height: 36px; object-fit: contain; }
.suggest-row span { flex: 1; font-size: 13px; }
.cart-foot { margin-top: auto; padding-top: 16px; }
.cart-go { width: 100%; min-height: 44px; }
.drawer-pay { max-width: none; margin-top: 12px; }

.recent { margin-top: 22px; }
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
}
.recent-list li {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}
.recent-list strong { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list em { color: var(--ember-2); font-style: normal; font-weight: 700; white-space: nowrap; }

@media (max-width: 980px) {
  .items, .product-layout { grid-template-columns: 1fr 1fr; }
  .sheet, .page-sheet { padding: 24px 18px 16px; }
  .admin-row { grid-template-columns: 56px 1fr; }
  .top-nav { display: none; }
  .docs-frame { grid-template-columns: 1fr; }
  .docs-toc, .docs-search { display: none; }
  .billboard-copy { margin-left: 20px; }
}
@media (max-width: 640px) {
  .items { grid-template-columns: 1fr; }
  .recent-list { grid-template-columns: 1fr; }
}
