:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --ink: #16181d;
  --ink-soft: #5a6070;
  --ink-faint: #9aa0ae;
  --line: #e4e6eb;
  --accent: #16181d;
  --accent-ink: #ffffff;
  --price: #0a7d43;
  --price-soft: #f2faf6;
  --danger: #c0392b;
  --thumb-bg: #ececf0;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 28, 0.06), 0 8px 24px -18px rgba(20, 22, 28, 0.35);
  --shadow-hover: 0 2px 4px rgba(20, 22, 28, 0.07), 0 16px 32px -18px rgba(20, 22, 28, 0.45);
}

html[data-theme="dark"] {
  --bg: #101216;
  --surface: #1a1d24;
  --surface-2: #14161c;
  --ink: #e8eaef;
  --ink-soft: #a4aab8;
  --ink-faint: #6b7180;
  --line: #2a2e38;
  --accent: #e8eaef;
  --accent-ink: #14161c;
  --price: #3ecf8e;
  --price-soft: #16241d;
  --danger: #e06456;
  --thumb-bg: #23262e;
  --topbar-bg: rgba(16, 18, 22, 0.92);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px -18px rgba(0, 0, 0, 0.8);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 32px -18px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}
img { display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--price);
  box-shadow: 0 0 0 4px rgba(10, 125, 67, 0.15);
}
.brand .muted { color: var(--ink-faint); font-weight: 600; font-size: 13px; }

.search {
  flex: 1;
  min-width: 180px;
  max-width: 480px;
  position: relative;
}
.search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 14px;
  outline: none;
}
.search input:focus { border-color: var(--ink-soft); background: var(--surface); }
.search .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  translate: 0 -50%;
  color: var(--ink-faint);
  pointer-events: none;
}

.top-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-soft); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--danger); border-color: #eccfcb; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- filter bar ---------- */
.filters {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 20px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.chip:hover { border-color: var(--ink-soft); color: var(--ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .n { opacity: 0.55; font-weight: 500; margin-left: 4px; font-size: 12px; }
.row-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-faint);
  min-width: 72px;
}
.result-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-soft);
  padding-top: 2px;
}
.result-meta select {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--ink);
}

/* ---------- grid ---------- */
.wrap { max-width: 1400px; margin: 0 auto; padding: 16px 20px 60px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: translate 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { translate: 0 -3px; box-shadow: var(--shadow-hover); }
.card .thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--thumb-bg);
  overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(16, 18, 24, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.card .body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .cat {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.card .title {
  font-size: 13.5px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.card .price { margin-top: auto; font-size: 15px; font-weight: 800; color: var(--price); }
.card .price.ask { color: var(--ink-faint); font-weight: 600; font-size: 13px; }

.empty {
  text-align: center;
  color: var(--ink-faint);
  padding: 80px 20px;
  font-size: 15px;
}

/* ---------- landing (brand cards) ---------- */
.hero { padding: 22px 4px 20px; }
.hero h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: 0.2px; }
.hero p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.brand-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: translate 0.15s ease, box-shadow 0.15s ease;
}
.brand-card:hover { translate: 0 -3px; box-shadow: var(--shadow-hover); }
.brand-card .thumb { aspect-ratio: 16 / 10; background: var(--thumb-bg); overflow: hidden; }
.brand-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.25s ease; }
.brand-card:hover .thumb img { scale: 1.05; }
.brand-card .body {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.brand-card .name { font-size: 17px; font-weight: 800; }
.brand-card .meta { font-size: 13px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }

/* ---------- album page ---------- */
.album-head { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; align-items: flex-start; }
.album-info {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  flex: 1;
  min-width: 280px;
}
.crumb { font-size: 13px; color: var(--ink-faint); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumb a { text-decoration: none; color: var(--ink-soft); font-weight: 600; }
.crumb a:hover { color: var(--ink); }
.album-info h1 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
.album-price { font-size: 26px; font-weight: 800; color: var(--price); margin: 8px 0 2px; }
.album-sub { color: var(--ink-soft); font-size: 13.5px; }
.fit-note {
  margin-top: 10px;
  display: inline-block;
  background: #fdf6e3;
  border: 1px solid #f1e3b5;
  color: #7a5d0e;
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 8px;
}
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 3px 9px;
  border-radius: 999px;
}
.contact-hint { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }

.admin-box {
  background: #101218;
  color: #d6d9e0;
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13px;
  min-width: 260px;
  max-width: 360px;
}
.admin-box h3 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8a92a6;
}
.admin-box .kv { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.admin-box .kv span:first-child { color: #8a92a6; }
.admin-box a { color: #7fb3ff; word-break: break-all; }
.admin-box .links { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.g-tile { position: relative; }
.g-img {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: var(--thumb-bg);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow);
}
.g-img img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.2s ease; }
.g-img:hover img { scale: 1.04; }
.g-tile.is-hidden .g-img { opacity: 0.35; }
.g-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(16, 18, 24, 0.78);
  color: #fff;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.12s ease;
}
.g-tile:hover .g-toggle, .g-tile.is-hidden .g-toggle { opacity: 1; }
.g-toggle:hover { background: rgba(16, 18, 24, 0.95); }
.g-reason {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: #b3541e;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 11, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 6px;
}
.lb-btn {
  position: fixed;
  top: 50%;
  translate: 0 -50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-close { position: fixed; top: 16px; right: 18px; translate: none; }
.lb-counter {
  position: fixed;
  bottom: 18px;
  left: 50%;
  translate: -50% 0;
  color: #cfd3dc;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ---------- upload page ---------- */
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  max-width: 720px;
  margin: 0 auto;
}
.panel h1 { margin: 0 0 4px; font-size: 22px; }
.panel .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink-soft); }
.field input[type="text"], .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: var(--bg);
  outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--ink-soft); background: var(--surface); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dropzone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.drag { border-color: var(--price); background: var(--price-soft); }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 14px; }
.previews img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; }
.form-msg { margin-top: 12px; font-size: 13.5px; font-weight: 600; }
.form-msg.err { color: var(--danger); }
.form-msg.ok { color: var(--price); }

/* ---------- admin page ---------- */
.admin-section { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.admin-section h2 { margin: 0 0 6px; font-size: 16px; }
.hint { color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; margin: 4px 0 10px; }
.checkbox-field { display: flex; flex-direction: column; justify-content: flex-end; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--price); }

@media (max-width: 640px) {
  .topbar-inner { padding: 10px 12px; }
  .wrap, .filters { padding-left: 12px; padding-right: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .card .title { font-size: 12.5px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .row-label { display: none; }
}

/* ---------- icon buttons + badges ---------- */
.icon-btn { position: relative; padding: 8px 12px; font-size: 15px; line-height: 1; text-decoration: none; }
.badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 800;
  min-width: 17px; height: 17px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.badge.show { display: flex; }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.page-title { font-size: 24px; margin: 10px 0 16px; }
.muted-count { color: var(--ink-faint); font-weight: 600; font-size: 16px; }
.wrap.narrow { max-width: 860px; }
.mini-h { font-size: 15px; margin: 20px 0 10px; }
.field select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; background: var(--bg); color: var(--ink); outline: none;
}

/* ---------- size guide ---------- */
.size-guide {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 20px;
}
.size-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.size-guide-head h3 { margin: 0; font-size: 16px; }
.size-table-wrap { overflow-x: auto; margin-top: 10px; }
.size-table-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-faint); margin-bottom: 4px; }
.size-table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 420px; }
.size-table th, .size-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.size-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-faint); }
.size-table th .unit { font-weight: 400; opacity: 0.7; text-transform: none; }
.size-table tr.rec td { background: var(--price-soft); }
.rec-tag {
  background: var(--price); color: #fff; font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px; margin-left: 6px; text-transform: uppercase; letter-spacing: 0.4px;
}
.fit { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.fit.tight { background: rgba(192, 57, 43, 0.12); color: var(--danger); }
.fit.slim { background: rgba(230, 145, 20, 0.14); color: #b3721e; }
.fit.good { background: var(--price-soft); color: var(--price); }
.fit.relaxed { background: rgba(58, 199, 142, 0.12); color: var(--price); }
.fit.oversized { background: var(--bg); color: var(--ink-faint); }
.size-basis { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.model-hint { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); }

/* ---------- order block on album ---------- */
.order-block { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.size-pick { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.size-pick select, .size-pick input {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  font: inherit; background: var(--bg); color: var(--ink); min-width: 110px; outline: none;
}
#addCartBtn.added { background: var(--price); border-color: var(--price); color: #fff; }

/* ---------- cart ---------- */
.cart-line { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.cart-line-body { flex: 1; min-width: 0; }
.cart-title { font-weight: 700; font-size: 14px; }
.cart-sub { color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; }
.cart-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 14px; line-height: 1;
}
.qty { font-weight: 700; min-width: 18px; text-align: center; }
.cart-price { font-weight: 800; color: var(--price); white-space: nowrap; }
.cart-total { display: flex; justify-content: space-between; padding: 14px 0 2px; font-size: 16px; }
.order-done {
  background: var(--price-soft); border: 1px solid var(--price); color: var(--price);
  border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; font-weight: 600;
}

/* ---------- orders ---------- */
.orders-list { display: flex; flex-direction: column; gap: 14px; }
.order-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.order-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-date { color: var(--ink-faint); font-size: 12.5px; margin-left: auto; }
.status { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 9px; border-radius: 999px; }
.s-new { background: rgba(230, 145, 20, 0.15); color: #b3721e; }
.s-quoted { background: rgba(52, 120, 246, 0.13); color: #3a6fd8; }
.s-confirmed { background: var(--price-soft); color: var(--price); }
.s-done { background: var(--price-soft); color: var(--price); }
.s-cancelled { background: rgba(192, 57, 43, 0.12); color: var(--danger); }
.order-who { margin-top: 8px; font-size: 13.5px; }
.order-note { margin-top: 6px; color: var(--ink-soft); font-size: 13px; font-style: italic; }
.order-items { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.order-item { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.order-item a { font-weight: 600; text-decoration: none; }
.order-item a:hover { text-decoration: underline; }
.order-item span { color: var(--ink-soft); white-space: nowrap; }
.order-est { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); }
.order-reply {
  margin-top: 12px; background: var(--bg); border-radius: 10px; padding: 12px 14px;
  font-size: 13.5px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.order-total { font-size: 15px; }
.reply-form { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.reply-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.reply-actions select {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  font-size: 13px; background: var(--bg); color: var(--ink);
}

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  .topbar-inner { padding: 10px 12px; gap: 10px; }
  .brand { font-size: 17px; }
  .search { order: 3; min-width: 100%; max-width: none; }
  .top-actions { gap: 6px; }
  .btn { padding: 7px 11px; font-size: 12.5px; }
  .hide-sm { display: none; }
  .hero h1 { font-size: 24px; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .album-head { flex-direction: column; }
  .admin-box { max-width: none; width: 100%; }
  .album-info h1 { font-size: 19px; }
  .order-block { align-items: stretch; flex-direction: column; }
  .order-block .btn { width: 100%; padding: 12px; }
  .size-pick select, .size-pick input { width: 100%; }
  .cart-line { align-items: flex-start; }
  .cart-price { font-size: 14px; }
  .g-toggle { opacity: 1; }
  .lb-btn { width: 40px; height: 40px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ---------- order-complete screen ---------- */
.receipt-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(10, 11, 14, 0.75);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.receipt {
  position: relative;
  background: var(--surface);
  color: var(--ink);
  border-radius: 22px;
  padding: 34px 30px 26px;
  width: min(94vw, 460px);
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  text-align: center;
}
.r-close {
  position: absolute; top: 14px; right: 14px;
  border: 0; background: var(--bg); color: var(--ink-soft);
  width: 32px; height: 32px; border-radius: 50%; font-size: 14px;
}
.r-check {
  width: 74px; height: 74px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--price); color: #fff;
  font-size: 40px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px var(--price-soft);
  animation: r-pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes r-pop { from { scale: 0.3; opacity: 0; } to { scale: 1; opacity: 1; } }
.receipt h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: 0.3px; }
.r-sub { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 18px; }
.r-items { text-align: left; display: flex; flex-direction: column; }
.r-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.r-item:first-child { border-top: 1px solid var(--line); }
.r-thumb img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }
.r-item-body { flex: 1; min-width: 0; }
.r-item-title { font-weight: 700; font-size: 13.5px; }
.r-item-sub { color: var(--ink-soft); font-size: 12px; margin-top: 1px; }
.r-item-price { font-weight: 800; color: var(--price); font-size: 13.5px; white-space: nowrap; }
.r-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0 4px; font-size: 16px;
}
.r-total b { font-size: 20px; color: var(--price); }
.r-foot { margin-top: 14px; color: var(--ink-faint); font-size: 12.5px; }

/* ---------- album edit (owner panel) ---------- */
.ab-hidden-note {
  background: rgba(224, 100, 86, 0.15); color: #ff9d92;
  font-size: 12px; font-weight: 700; padding: 6px 10px;
  border-radius: 8px; margin-bottom: 10px;
}
.ab-edit { border-top: 1px solid #2a2e38; margin-top: 14px; padding-top: 12px; }
.ab-edit h3 { margin-bottom: 8px; }
.ab-edit label {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: #8a92a6; margin-bottom: 8px;
}
.ab-edit input {
  display: block; width: 100%; margin-top: 4px;
  background: #0c0e13; border: 1px solid #2a2e38; border-radius: 8px;
  color: #e8eaef; padding: 8px 10px; font: inherit; font-size: 13px; outline: none;
}
.ab-edit input:focus { border-color: #5a6070; }
.ab-orig { font-size: 11.5px; color: #8a92a6; margin: -4px 0 8px; }
.ab-reset {
  border: 0; background: none; color: #7fb3ff; font-size: 11.5px;
  text-decoration: underline; padding: 0; margin-left: 4px;
}
.ab-edit-actions { display: flex; gap: 8px; margin-top: 4px; }
.card.album-hidden .thumb img { opacity: 0.35; }
.card.album-hidden .title { color: var(--ink-faint); }
.hidden-flag {
  position: absolute; left: 8px; top: 8px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 999px;
}

/* ---------- per-catalogue markup rows ---------- */
.per-cat { margin-top: 16px; }
.per-cat-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.per-cat-name { flex: 1; font-size: 14px; font-weight: 600; }
.per-cat-name .n { color: var(--ink-faint); font-weight: 500; font-size: 12px; }
.per-cat-row input {
  width: 90px; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; font: inherit; background: var(--bg); color: var(--ink);
  text-align: right; outline: none;
}
.per-cat-row input:focus { border-color: var(--ink-soft); }
.per-cat-pct { color: var(--ink-faint); font-size: 13px; }
