/* NumisOne — "museum gallery" theme */
:root {
  --bg: #0b1426;
  --bg-2: #101b33;
  --panel: #15213c;
  --panel-2: #1a2847;
  --line: rgba(201, 169, 106, .18);
  --line-strong: rgba(201, 169, 106, .38);
  --gold: #c9a96a;
  --gold-hi: #e6cf9a;
  --gold-deep: #9d7d45;
  --ivory: #f3ece0;
  --ivory-2: #e9e0cf;
  --text: #ece5d8;
  --muted: #a39d8f;
  --sold: #b5483b;
  --radius: 12px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(201, 169, 106, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-hi); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.wrap { width: min(1240px, 100% - clamp(32px, 6vw, 96px)); margin-inline: auto; }

.eyebrow {
  margin: 0 0 10px; color: var(--gold); text-transform: uppercase;
  letter-spacing: .22em; font-size: 11.5px; font-weight: 600;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 22px; font-weight: 600; font-size: 14.5px;
  text-decoration: none; border: 1px solid transparent; transition: all .18s ease;
  letter-spacing: .02em;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-deep));
  color: #1b1a14; box-shadow: 0 6px 18px rgba(201, 169, 106, .22), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-gold:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 20, 38,.82);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ivory); margin-right: auto; }
.emblem { width: 72px; height: 72px; color: var(--gold); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 23px; font-weight: 700; letter-spacing: .3px; }
.brand-sub { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.main-nav { display: flex; gap: 26px; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 14px; letter-spacing: .04em; position: relative; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transition: transform .2s ease;
}
.main-nav a:hover { color: var(--ivory); }
.main-nav a:hover::after { transform: scaleX(1); }
.cart-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ivory);
  display: grid; place-items: center; transition: border-color .2s;
}
.cart-btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.cart-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--gold); color: #1b1a14; font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center;
}
.cart-count.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg {
  position: absolute; inset: -20px; background-size: cover; background-position: center;
  filter: blur(26px) saturate(.75) brightness(.32); transform: scale(1.1); opacity: .9;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 20, 38,.96) 0%, rgba(11, 20, 38,.7) 50%, rgba(11, 20, 38,.35) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.hero-inner {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px);
  align-items: center; padding: clamp(56px, 9vw, 120px) 0 clamp(56px, 8vw, 104px);
}
.hero h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.04; margin: 0 0 18px; color: var(--ivory); }
.hero h1 em { font-style: italic; color: var(--gold-hi); font-weight: 500; }
.lede { color: var(--muted); font-size: 17px; max-width: 520px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-feature { margin: 0; justify-self: end; width: min(560px, 100%); }
.hero-frame {
  width: 100%; padding: 18px; border: 0; border-radius: 6px;
  background: linear-gradient(145deg, #3a2f1d, #1c160d);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(230, 207, 154, .35), inset 0 0 0 7px #2a2216, inset 0 0 0 8px rgba(230, 207, 154, .25);
  transform: rotate(-1.5deg); transition: transform .35s ease;
}
.hero-frame:hover { transform: rotate(0) scale(1.01); }
.hero-frame img { width: 100%; border-radius: 2px; background: var(--ivory-2); }
.hero-feature figcaption {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 18px;
  color: var(--muted); font-size: 14px;
}
.feature-label { color: var(--gold); text-transform: uppercase; letter-spacing: .2em; font-size: 11px; font-weight: 600; }
.hero-feature strong { color: var(--gold-hi); font-family: var(--serif); font-size: 22px; margin-left: auto; }

/* ---------- Trust strip ---------- */
.trust { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-inner > div {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
  padding: 22px 20px; border-left: 1px solid var(--line);
}
.trust-inner > div:first-child { border-left: 0; padding-left: 0; }
.t-icon { grid-row: span 2; color: var(--gold); font-size: 22px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; }
.trust strong { font-size: 14px; color: var(--ivory); font-weight: 600; }
.trust span:not(.t-icon) { font-size: 12.5px; color: var(--muted); }

/* ---------- Sections ---------- */
section.countries, section.collection, section.about { padding: clamp(56px, 8vw, 96px) 0 0; }
.section-head { display: flex; flex-direction: column; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 0; color: var(--ivory); line-height: 1.1; }
.section-head h2::after {
  content: ""; display: block; width: 56px; height: 1px; margin-top: 16px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* Country tiles */
.country-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.country-tile {
  position: relative; overflow: hidden; border-radius: var(--radius); min-height: 200px;
  border: 1px solid var(--line); background: var(--panel); text-align: left; padding: 0; color: var(--ivory);
  isolation: isolate;
}
.country-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .6s ease; filter: saturate(.85);
}
.country-tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(7, 14, 28,.95) 8%, rgba(7, 14, 28,.25) 70%);
}
.country-tile:hover img { transform: scale(1.06); }
.country-tile:hover { border-color: var(--line-strong); }
.country-tile .ct-body { position: absolute; left: 20px; right: 20px; bottom: 18px; }
.country-tile .ct-name { font-family: var(--serif); font-size: 28px; font-weight: 600; display: block; line-height: 1.1; }
.country-tile .ct-count { color: var(--gold-hi); font-size: 13px; letter-spacing: .06em; }
.country-tile .ct-arrow { position: absolute; right: 0; bottom: 4px; color: var(--gold); font-size: 20px; transition: transform .2s; }
.country-tile:hover .ct-arrow { transform: translateX(4px); }
.country-tile.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }

/* ---------- Toolbar ---------- */
.toolbar {
  position: sticky; top: 97px; z-index: 20;
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; margin: 0 -16px 8px; border-radius: var(--radius);
  background: rgba(16, 27, 51, .92); backdrop-filter: blur(8px);
  border: 1px solid var(--line);
}
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); align-self: center; }
.seg-btn {
  border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: all .15s;
}
.seg-btn:hover { color: var(--ivory); }
.seg-btn.is-active { background: var(--gold); color: #1b1a14; font-weight: 600; }
.filters-panel { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; flex: 1; }
.ctl { display: grid; gap: 5px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.ctl select, .ctl input {
  appearance: none; -webkit-appearance: none;
  min-width: 160px; padding: 9px 34px 9px 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background-color: var(--bg); color: var(--ivory);
  font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 400;
}
.ctl select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c9a96a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.ctl input { padding-right: 12px; }
.ctl select:focus, .ctl input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 169, 106, .18); }
.ctl-search { flex: 1; min-width: 200px; }
.ctl-search input { width: 100%; }
.ctl input::placeholder { color: #6f6a5f; }
.switch { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding-bottom: 8px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 38px; height: 22px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-strong); position: relative; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: all .2s; }
.switch input:checked + .switch-ui { background: rgba(201, 169, 106, .25); border-color: var(--gold); }
.switch input:checked + .switch-ui::after { left: 18px; background: var(--gold-hi); }
.switch input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px rgba(201, 169, 106, .25); }
.filter-toggle { display: none; }

.result-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 22px; min-height: 32px; }
.result-bar p { margin: 0; color: var(--muted); font-size: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong);
  background: rgba(201, 169, 106, .08); color: var(--gold-hi); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px;
}
.chip button { border: 0; background: rgba(201, 169, 106, .18); color: var(--ivory); width: 20px; height: 20px; border-radius: 50%; line-height: 1; font-size: 14px; }
.chip-clear { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 13px; }

/* ---------- Grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: rise .45s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-media {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; width: 100%;
  border: 0; padding: 22px;
  background:
    radial-gradient(circle at 50% 40%, #fbf6ec, var(--ivory-2) 75%);
  box-shadow: inset 0 -1px 0 var(--line);
}
.card-media img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  box-shadow: 0 8px 18px rgba(40, 30, 10, .28); transition: transform .45s ease;
}
.card-media img.round { border-radius: 50%; }
.card:hover .card-media img { transform: scale(1.04); }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(11, 20, 38,.82); color: var(--gold-hi); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.badge.grade { left: auto; right: 12px; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1b1a14; }
.ribbon {
  position: absolute; top: 20px; right: -38px; transform: rotate(45deg); z-index: 2;
  background: var(--sold); color: #fff; padding: 5px 44px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
}
.card.is-sold .card-media img { filter: grayscale(.6) brightness(.85); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-meta { margin: 0; color: var(--gold); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.card-title { margin: 0; font-size: 22px; line-height: 1.18; color: var(--ivory); }
.card-title button { all: unset; cursor: pointer; }
.card-title button:hover { color: var(--gold-hi); }
.card-sub { margin: 0; color: var(--muted); font-size: 13.5px; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); }
.price { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--gold-hi); }
.price.sold { color: var(--sold); font-size: 20px; }
.add-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: transparent; color: var(--gold-hi); font-size: 22px; line-height: 1; display: grid; place-items: center; transition: all .18s;
}
.add-btn:hover:not(:disabled) { background: var(--gold); color: #1b1a14; border-color: var(--gold); }
.add-btn:disabled { opacity: .4; cursor: default; }
.add-btn.in-cart { background: rgba(201, 169, 106, .18); font-size: 17px; }

.empty-state { text-align: center; padding: 60px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 6vw, 80px); padding-bottom: clamp(56px, 8vw, 96px); }
.about h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 0 0 14px; color: var(--ivory); line-height: 1.1; }
.about p { color: var(--muted); }
.facts { margin: 0; display: grid; gap: 0; }
.facts > div { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 130px 1fr; gap: 16px; }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--serif); font-size: 21px; color: var(--gold-hi); }
.facts dd { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Footer ---------- */
.site-footer { background: #070e1c; border-top: 1px solid var(--line); padding: 44px 0 24px; color: var(--muted); font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.footer-brand .brand-name { color: var(--ivory); }
.site-footer strong { color: var(--ivory); font-weight: 600; }
.site-footer p { margin: 6px 0 0; }
.pay-marks { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-marks span { border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 8px; font-size: 12px; color: var(--ivory-2); }
.copyright { padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--text); background: var(--panel); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(3, 6, 14,.75); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.close {
  position: absolute; top: 12px; right: 14px; z-index: 3; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(11, 20, 38,.7); color: var(--ivory); font-size: 22px; line-height: 1;
}
.close:hover { border-color: var(--gold); color: var(--gold-hi); }

.product-dialog { width: min(1100px, 95vw); max-height: 92vh; overflow: hidden; border: 1px solid var(--line); }
.pd { display: grid; grid-template-columns: 1.3fr 1fr; max-height: 92vh; }
.pd-gallery { background: radial-gradient(circle at 50% 40%, #fbf6ec, var(--ivory-2) 80%); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.pd-stage { position: relative; flex: 1; min-height: 300px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; cursor: zoom-in; }
.pd-stage:hover .zoom-hint { background: #fff; color: #3a2f1d; }
.pd-stage img { max-width: 100%; max-height: 62vh; object-fit: contain; box-shadow: 0 12px 28px rgba(40, 30, 10, .3); transition: transform .15s ease-out; transform-origin: center; }
.zoom-hint { position: absolute; bottom: 8px; right: 10px; font-size: 11.5px; color: #7b7362; background: rgba(255, 255, 255, .7); padding: 3px 8px; border-radius: 999px; pointer-events: none; }

/* Full-screen photo viewer */
.viewer { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; background: rgba(3, 6, 14, .96); box-shadow: none; overflow: hidden; }
.viewer::backdrop { background: rgba(3, 6, 14, .9); }
.vw-scroll { position: absolute; inset: 0; overflow: auto; display: flex; padding: 72px 24px 24px; cursor: zoom-out; }
.vw-stage { position: relative; margin: auto; flex: none; cursor: zoom-in; }
.vw-scroll img { position: absolute; max-width: none; background: #f3ece0; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); cursor: zoom-in; user-select: none; -webkit-user-drag: none; transform-origin: center; transition: transform .2s ease; }
.viewer.is-actual .vw-scroll img, .viewer.is-actual .vw-stage { cursor: zoom-out; }
.viewer.no-toggle .vw-scroll img, .viewer.no-toggle .vw-stage { cursor: default; }
.vw-rotate { display: flex; gap: 6px; }
.vw-rot { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(11, 20, 38, .7); color: var(--ivory); font-size: 18px; line-height: 1; display: grid; place-items: center; }
.vw-rot:hover { border-color: var(--gold); color: var(--gold-hi); }
.viewer.is-actual.is-dragging .vw-scroll, .viewer.is-actual.is-dragging .vw-scroll img { cursor: grabbing; }
.vw-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: linear-gradient(180deg, rgba(3, 6, 14, .9), rgba(3, 6, 14, 0)); pointer-events: none; }
.vw-bar > * { pointer-events: auto; }
.vw-count { border: 1px solid var(--line-strong); background: rgba(11, 20, 38, .7); color: var(--ivory); border-radius: 999px; padding: 6px 16px; font-size: 13.5px; white-space: nowrap; }
.vw-count[hidden] { display: none; }
/* enlarged photo: previous / next photo of the same item */
.vw-nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(11, 20, 38, .75); color: var(--ivory); font-size: 32px; line-height: 1; display: grid; place-items: center; padding: 0 0 4px; cursor: pointer; }
.vw-nav:hover { border-color: var(--gold); color: var(--gold-hi); }
.vw-nav[hidden] { display: none; }
.vw-prev { left: 18px; }
.vw-next { right: 18px; }
@media (max-width: 560px) {
  .vw-nav { width: 42px; height: 42px; font-size: 26px; }
  .vw-prev { left: 8px; }
  .vw-next { right: 8px; }
}
.vw-mode { color: var(--muted); font-size: 13px; letter-spacing: .03em; margin-left: auto; }
.viewer .vw-close { position: static; flex: none; }
@media (max-width: 720px) {
  .vw-bar { flex-wrap: wrap; gap: 8px 12px; }
  .vw-mode { order: 3; flex-basis: 100%; margin: 0; }
  .vw-scroll { padding: 104px 12px 12px; }
}
.pd-thumbs { display: flex; gap: 10px; justify-content: center; }
.pd-thumbs button { width: 76px; height: 58px; padding: 3px; border-radius: 6px; border: 2px solid transparent; background: rgba(255, 255, 255, .5); }
.pd-thumbs button.is-active { border-color: var(--gold-deep); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.pd-info { padding: 34px 32px 28px; overflow: auto; }
.pd-info h2 { font-size: 32px; line-height: 1.1; margin: 0 0 14px; color: var(--ivory); }
.pd-price-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pd-price { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--gold-hi); }
.grade-badge { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1b1a14; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .05em; }
.pd-desc { color: var(--muted); margin: 0 0 18px; }
.spec { width: 100%; border-collapse: collapse; margin-bottom: 22px; font-size: 14px; }
.spec th, .spec td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--muted); font-weight: 500; width: 40%; }
.spec td { color: var(--ivory); }
.pd-assure { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.pd-more { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; }
.pd-more summary { cursor: pointer; color: var(--gold-hi); }
.pd-more ul { color: var(--muted); padding-left: 18px; }

.done-dialog { width: min(460px, 92vw); padding: 36px 32px; text-align: center; border: 1px solid var(--line-strong); }
.done-seal { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: #1b1a14; background: linear-gradient(180deg, var(--gold-hi), var(--gold-deep)); }
.done-dialog h2 { font-size: 30px; margin: 0 0 8px; color: var(--ivory); }
.done-dialog p { color: var(--muted); }

/* ---------- Cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(3, 6, 14,.6); z-index: 40; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(430px, 100vw);
  background: var(--panel); border-left: 1px solid var(--line-strong);
  transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility .28s;
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: none; visibility: visible; box-shadow: -20px 0 60px rgba(0, 0, 0, .5); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 28px; color: var(--ivory); }
.drawer-head .close { position: static; }
.drawer-body { padding: 16px 24px 30px; overflow: auto; flex: 1; }
.cart-items { list-style: none; margin: 0; padding: 0; }
.cart-items li { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-items .ci-img { width: 72px; height: 56px; border-radius: 6px; background: var(--ivory-2); display: grid; place-items: center; padding: 4px; }
.cart-items img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ci-title { font-size: 14px; line-height: 1.35; color: var(--ivory); }
.ci-price { font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--gold-hi); }
.remove { border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 0; margin-top: 4px; text-decoration: underline; }
.remove:hover { color: var(--sold); }
.cart-empty { text-align: center; padding: 40px 0; color: var(--muted); }
#checkout .ctl { margin: 20px 0 6px; }
#checkout .ctl select { width: 100%; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 0; margin: 16px 0 20px; font-size: 15px; }
.totals dt, .totals dd { margin: 0; }
/* delivery address in the cart */
.deliver { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.deliver legend { padding: 0; margin: 0 0 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.deliver .dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 10px; }
.deliver .dgrid[hidden], .deliver #ship-addr-wrap[hidden] { display: none; }
.deliver .dgrid .ctl-wide { grid-column: 1 / -1; }
.deliver .ctl input, .deliver .ctl select { width: 100%; }
.deliver .ctl.is-bad input, .deliver .ctl.is-bad select { border-color: #e08a7e; }
.deliver .check { margin-top: 10px; }
.deliver-note { margin: 8px 0 0; }
.deliver-gate { margin: 4px 0 10px; }
#paypal-buttons.is-locked { opacity: .35; pointer-events: none; filter: grayscale(.6); }
.totals .t-cpn { color: #9fd3a8; }
.totals [hidden] { display: none; }
/* coupon box in the cart */
.coupon { margin: 14px 0 0; }
.cpn-form { display: flex; gap: 8px; margin-top: 8px; }
.cpn-form[hidden], .cpn-on[hidden] { display: none; }
.cpn-form input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .06em; }
.cpn-on { margin: 8px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.cpn-tag { border: 1px dashed #9fd3a8; color: #9fd3a8; border-radius: 8px; padding: 4px 10px; }
#cpn-msg { margin: 8px 0 0; }
.cpn-top { margin: 6px 0 10px; }
.cust-table tr.is-off td { opacity: .55; }
.cust-table td.cpn-actions { display: flex; gap: 6px; }
.totals dt { color: var(--muted); }
.totals .total { color: var(--ivory); font-weight: 600; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line-strong); }
.totals dd.total { font-family: var(--serif); font-size: 26px; color: var(--gold-hi); }
#paypal-buttons { background: var(--ivory); border-radius: 10px; padding: 14px 14px 4px; }
#paypal-buttons:empty { display: none; }
.notice { background: rgba(201, 169, 106, .1); border: 1px solid var(--line-strong); color: var(--ivory-2); padding: 11px 13px; border-radius: 8px; font-size: 14px; }
.notice.error { background: rgba(181, 72, 59, .14); border-color: rgba(181, 72, 59, .5); }
.fine { color: var(--muted); font-size: 12.5px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-feature { justify-self: start; }
  .trust-inner { grid-template-columns: repeat(2, 1fr); }
  .trust-inner > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .trust-inner > div { border-top: 1px solid var(--line); }
  .trust-inner > div:nth-child(-n+2) { border-top: 0; }
  .about-inner { grid-template-columns: 1fr; }
  .pd { grid-template-columns: 1fr; overflow: auto; }
  .pd-stage img { max-height: 46vh; }
}
@media (max-width: 720px) {
  .brand-name { font-size: 19px; }
  .brand-sub { display: none; }
  .emblem { width: 52px; height: 52px; }
  .toolbar { top: 77px; }
  .filter-toggle { display: inline-flex; padding: 9px 16px; margin-left: auto; align-self: center; }
  .filters-panel { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; }
  .filters-panel.is-open { display: flex; }
  .ctl select, .ctl input { width: 100%; }
  .trust-inner { grid-template-columns: 1fr; }
  .trust-inner > div { border-left: 0 !important; padding-left: 0; border-top: 1px solid var(--line) !important; }
  .trust-inner > div:first-child { border-top: 0 !important; }
  .footer-inner { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .pd-info { padding: 24px 20px; }
  .pd-gallery { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* fixes */
.site-footer .copyright { margin: 32px auto 0; }
section[id] { scroll-margin-top: 106px; }
#collection { scroll-margin-top: 98px; }
.card-media img {
  position: absolute; inset: 22px; margin: auto;
  max-width: calc(100% - 44px); max-height: calc(100% - 44px);
}

/* ===== Large-catalogue additions ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Featured frames (one coin + one banknote) */
.hero-features { display: grid; gap: 22px; grid-template-columns: repeat(var(--feat-cols, 1), minmax(0, 1fr)); justify-self: end; width: min(600px, 100%); }
.feature { margin: 0; }
/* Thin dark/gold frame hugging the photo (no cream mat); both photos share one height */
.feature .hero-frame { display: block; width: fit-content; max-width: 100%; padding: 8px; line-height: 0; background: #1c160d; box-shadow: var(--shadow), inset 0 0 0 1px rgba(230,207,154,.35), inset 0 0 0 7px #2a2216, inset 0 0 0 8px rgba(230,207,154,.25); }
/* Photo 164px tall + 4px off-white border; width and height always scale together,
   so the border stays exactly 4px on every side */
.feature .hero-frame img { width: auto; height: auto; max-height: 172px; max-width: 100%; border: 4px solid #fbf6ec; background: #fbf6ec; border-radius: 1px; }
/* Coin + banknote side by side: the wide banknote gets a wider column and both frames share
   one height, so the round coin and the long note look similar in size. */
.hero-features.pair { grid-template-columns: auto auto; gap: 22px 40px; justify-content: end; width: min(640px, 100%); }
.hero-features.pair .feature figcaption { width: 0; min-width: 100%; }   /* caption as wide as its frame */
.feature:nth-child(2) .hero-frame { transform: rotate(1.5deg); }
.feature:nth-child(2) .hero-frame:hover { transform: rotate(0) scale(1.01); }
.feature figcaption { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.feature figcaption .feature-label { grid-column: 1 / -1; }
.feature figcaption strong { margin: 0; font-size: 21px; }
.hero-stats { margin: 26px 0 0; color: var(--muted); font-size: 13.5px; letter-spacing: .04em; }
.hero-stats b { color: var(--gold-hi); font-family: var(--serif); font-size: 20px; font-weight: 700; margin-right: 4px; }

.section-head-row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; }

/* Toolbar: two rows */
.toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
.toolbar-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.toolbar-row .ctl-search { flex: 1; min-width: 220px; }
.ctl-inline { grid-auto-flow: column; align-items: center; gap: 10px; }
.filters-panel { padding-top: 12px; border-top: 1px solid var(--line); }
.filters-panel .ctl select { min-width: 150px; max-width: 220px; }
.price-range { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.price-range input { width: 82px; min-width: 0 !important; padding-right: 8px !important; }
.price-range input::-webkit-inner-spin-button { opacity: .4; }

/* Load more */
.load-more { text-align: center; margin: 34px 0 0; }
.load-more p { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }

/* Missing photo placeholder (before photos are downloaded) */
.no-photo { display: grid; place-items: center; width: 70%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed #c9b994; color: #8a7f68; font-family: var(--serif); font-size: 15px; text-align: center; padding: 10px; }
img.broken { display: none; }

.card-sub .lot { color: var(--gold); }

@media (max-width: 980px) {
  .hero-features { justify-self: start; }
}
@media (max-width: 720px) {
  .toolbar-row .ctl-search { order: 3; flex-basis: 100%; }
  .ctl-inline span { display: none; }
  .filters-panel .ctl select { max-width: none; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .hero-features { --feat-cols: 1 !important; }
  .hero-features.pair { grid-template-columns: minmax(0, 1fr); justify-content: start; }
}
[hidden] { display: none !important; }
.feature figcaption strong { color: var(--gold-hi); font-family: var(--serif); }
.pd-gallery { overflow: auto; max-height: 92vh; }
.pd-stage { min-height: 260px; }
.pd-stage img { max-height: 54vh; }
@media (max-width: 980px) { .pd-gallery { max-height: none; } }
.country-tile .no-photo { display: none; }

/* ===== Admin mode ===== */
.admin-link { color: var(--muted); margin-left: 10px; text-decoration: none; opacity: .6; }
.admin-link:hover { opacity: 1; color: var(--gold-hi); }
.admin-bar { position: sticky; top: 97px; z-index: 25; background: #3a2a12; border-bottom: 1px solid var(--gold); color: var(--ivory); font-size: 14px; }
.admin-bar-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 8px 0; }
.admin-bar strong { color: var(--gold-hi); letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.admin-bar #admin-stats { color: var(--ivory-2); }
.admin-bar .ctl select { min-width: 140px; padding-top: 6px; padding-bottom: 6px; }
.admin-bar #admin-logout { margin-left: auto; }
body.is-admin .toolbar { top: 146px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.badge.state { left: auto; right: 12px; top: 44px; background: #5a2c24; color: #fff; }
.badge.state.hidden-b { background: #3b3f46; }
.badge.state.edited-b { background: #2f4a3a; top: 76px; }
.badge.state.deleted-b { background: #6b2d26; top: 108px; }
.card.is-deleted .card-media img { filter: grayscale(1) brightness(.55); }
.card.is-deleted { border-color: rgba(181, 72, 59, .5); border-style: dashed; }
.card.is-hidden .card-media img { filter: grayscale(1) brightness(.7); }
.card.is-hidden { border-style: dashed; }
.pd-admin { margin-top: 18px; padding: 14px; border: 1px dashed var(--gold); border-radius: 10px; background: rgba(201,169,106,.06); }
.pd-admin-status { margin: 0 0 10px; color: var(--gold-hi); font-size: 14px; }
.pd-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-dialog { width: min(440px, 94vw); padding: 26px 28px; border: 1px solid var(--line-strong); }
.admin-dialog h2 { font-family: var(--serif); font-size: 28px; margin: 0 0 12px; color: var(--ivory); }
.admin-dialog .ctl input, .admin-dialog .ctl select, .admin-dialog textarea {
  width: 100%; min-width: 0; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--ivory); font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 400; font-family: var(--sans);
}
.admin-dialog textarea { resize: vertical; }
.admin-dialog .ctl small { color: #8d877a; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; }
.edit-dialog { width: min(860px, 96vw); max-height: 94vh; overflow: auto; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; margin: 14px 0; }
.edit-grid .ctl-wide, .ctl-wide { grid-column: 1 / -1; display: grid; gap: 5px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.edit-grid .changed input, .edit-grid .changed textarea, .edit-grid .changed select { border-color: var(--gold); }
.edit-flags { display: flex; gap: 24px; flex-wrap: wrap; margin: 16px 0 6px; }
/* Admin: photos in the add / edit window */
.photo-box { border-top: 1px solid var(--line); padding-top: 14px; }
.photo-box-h { margin: 0 0 10px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.photo-box-h small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-strip:empty::before { content: "No photos yet."; color: var(--muted); font-size: 14px; }
.ph-item { width: 132px; display: grid; gap: 6px; }
.ph-img { width: 132px; height: 132px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.04) center / contain no-repeat; display: grid; place-items: center; overflow: hidden; }
.ph-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ph-item.is-loading .ph-img { border-style: dashed; color: var(--muted); font-size: 13px; }
.ph-label { font-size: 12px; color: var(--gold-hi); text-align: center; }
.ph-btns { display: flex; justify-content: center; gap: 6px; }
.ph-btns button { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--ivory); cursor: pointer; font-size: 14px; }
.ph-btns button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-hi); }
.ph-btns button:disabled { opacity: .3; cursor: default; }
.ph-btns .ph-del:hover { border-color: #e08a7e; color: #f0b3a9; }
.photo-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.photo-paths { margin-top: 10px; font-size: 13px; color: var(--muted); }
.photo-paths summary { cursor: pointer; }
.photo-paths textarea { width: 100%; margin-top: 8px; }
.badge.state.added-b { background: #2c3f63; top: 140px; }
/* Admin only: CoinSnap's own value */
.pd-cs { margin: -4px 0 10px; font-size: 14px; color: var(--gold-hi); }
.card-cs { margin: 6px 0 0; font-size: 12.5px; color: var(--gold-hi); }
/* Admin: country / issuer / collection picker */
.edit-grid { align-items: start; }
.pick { display: grid; gap: 6px; }
.pick input[hidden] { display: none; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--ivory); font-size: 14.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.check small { color: var(--muted); }
.dlg-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.dlg-actions .spacer { flex: 1; }
.dlg-actions:not(:has(.spacer)) { justify-content: flex-end; }
@media (max-width: 720px) { .admin-bar { top: 77px; } body.is-admin .toolbar { top: 164px; } }
.pd-admin { margin: 0 44px 18px 0; }
.pd-thumbs .no-photo { display: none; }

/* ---------- Separate pages: home browse cards, category page head ---------- */
.main-nav a.is-current { color: var(--gold-hi); }
.main-nav a.is-current::after { transform: scaleX(1); }

.browse { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.browse-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(18px, 3vw, 32px); }
.browse-card {
  position: relative; display: block; overflow: hidden; min-height: 330px; container-type: inline-size;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: radial-gradient(120% 120% at 75% 45%, #1b2a4a 0%, #0f1a31 55%, #0a1222 100%);
  text-decoration: none; color: var(--text); isolation: isolate;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.browse-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
/* the picture: real items for sale (coins fanned out / banknotes scattered), right side of the card */
.browse-card .bc-media {
  position: absolute; z-index: -1; right: 1.5%; top: 50%; width: 60cqw; aspect-ratio: 480 / 370;
  transform: translateY(-50%); transition: transform .5s ease;
}
.browse-card:hover .bc-media { transform: translateY(-50%) scale(1.04); }
.bc-coin, .bc-note { position: absolute; display: block; }
.bc-coin { aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 10px 22px rgba(0, 0, 0, .6), 0 2px 4px rgba(0, 0, 0, .5); }
.bc-coin img { width: 104%; height: 104%; margin: -2%; object-fit: cover; display: block; }
.bc-coin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 -6px 12px rgba(0, 0, 0, .35); }
.bc-note { border-radius: 3px; overflow: hidden; box-shadow: 0 12px 26px rgba(0, 0, 0, .6), 0 2px 5px rgba(0, 0, 0, .5); }
.bc-note img { display: block; width: 100%; height: auto; }
.browse-card .bc-body {
  position: absolute; left: 28px; top: 0; bottom: 0; width: 40%;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px;
}
.browse-card .eyebrow { margin: 0; }
.bc-title { font-family: var(--serif); font-size: clamp(34px, 3.6vw, 50px); font-weight: 600; line-height: 1; color: var(--ivory); }
@media (max-width: 560px) {
  /* phones: the picture on top, the text underneath */
  .browse-card { min-height: 0; padding-top: calc(88cqw * 370 / 480 + 8px); }
  .browse-card .bc-media { right: auto; left: 6cqw; top: 10px; width: 88cqw; transform: none; }
  .browse-card:hover .bc-media { transform: scale(1.03); }
  .browse-card .bc-body { position: relative; left: auto; top: auto; bottom: auto; width: auto; padding: 0 22px 24px; }
}
.bc-count { color: var(--gold-hi); font-size: 14px; letter-spacing: .05em; margin-bottom: 14px; }
.bc-btn { pointer-events: none; }

.page-head { border-bottom: 1px solid var(--line); background: var(--bg-2); padding: clamp(30px, 5vw, 52px) 0 clamp(22px, 3vw, 32px); }
.page-head h1 { font-size: clamp(40px, 5vw, 60px); line-height: 1.05; margin: 2px 0 6px; color: var(--ivory); }
.page-head .hero-stats { margin: 0; }
.crumbs { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.crumbs a { color: var(--gold); text-decoration: none; }
.crumbs a:hover { color: var(--gold-hi); }

@media (max-width: 980px) {
  .main-nav { display: flex; gap: 16px; }
  .main-nav a { font-size: 13px; }
}
@media (max-width: 560px) {
  .brand-sub { display: none; }
  .main-nav { gap: 12px; }
  .main-nav a:first-child { display: none; }
  .browse-card { min-height: 240px; }
}

/* ---------- Customer accounts ---------- */
.acct { position: relative; }
.acct + .cart-btn { margin-left: -16px; }
.acct-btn.is-in { border-color: var(--gold); color: var(--gold-hi); background: rgba(201, 169, 106, .1); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 210px; padding: 8px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow);
  display: grid;
}
.acct-menu[hidden] { display: none; }
.acct-menu a, .acct-menu button {
  all: unset; cursor: pointer; padding: 9px 12px; border-radius: 8px; color: var(--ivory); font-size: 14.5px;
}
.acct-menu a:hover, .acct-menu button:hover, .acct-menu a:focus-visible, .acct-menu button:focus-visible { background: rgba(201, 169, 106, .12); color: var(--gold-hi); }
.acct-hello { margin: 4px 12px 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--gold); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }

.link-btn { all: unset; cursor: pointer; color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.link-btn:hover { color: var(--ivory); }
.link-btn.danger { color: #e08a7e; }
.link-btn:disabled { opacity: .5; cursor: default; }

/* log in / sign up dialog */
.auth-dialog { position: relative; }
.auth-dialog form { display: grid; gap: 12px; }
.auth-dialog .close { top: 10px; right: 10px; width: 34px; height: 34px; font-size: 20px; }
.auth-tabs { display: flex; gap: 6px; margin: 0 40px 16px 0; padding: 4px; border: 1px solid var(--line); border-radius: 999px; width: fit-content; }
.auth-tabs[hidden] { display: none; }
.auth-tabs button { border: 0; background: transparent; color: var(--muted); padding: 7px 16px; border-radius: 999px; font-size: 14px; }
.auth-tabs button.is-active { background: var(--gold); color: #1b1a14; font-weight: 600; }
.auth-why { margin: -4px 0 12px; color: var(--gold-hi); font-size: 14px; }
.auth-dialog .dlg-actions { margin-top: 4px; font-size: 14px; }

/* account page */
.account { padding: clamp(28px, 4vw, 48px) 0 70px; min-height: 50vh; }
.acct-guest { max-width: 560px; }
.acct-guest > p:first-child { font-size: 17px; color: var(--ivory-2); }
.acct-guest-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.acct-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px;
  display: grid; gap: 12px; max-width: 640px;
}
.acct-card h2 { font-family: var(--serif); font-size: 26px; margin: 0; color: var(--ivory); }
.acct-card .ctl input, .acct-card .ctl select { width: 100%; min-width: 0; }
.acct-card .ctl small { color: #8d877a; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; }
.acct-card > .btn { justify-self: start; }
.acct-card.danger { border-color: rgba(181, 72, 59, .45); }
.btn-danger { border-color: rgba(181, 72, 59, .6); color: #f0b3a9; }
.btn-danger:hover { border-color: #e08a7e; color: #fff; background: rgba(181, 72, 59, .3); }
.acct-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.acct-tabs button {
  border: 0; background: transparent; color: var(--muted); padding: 10px 16px; font-size: 15px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.acct-tabs button:hover { color: var(--ivory); }
.acct-tabs button.is-active { color: var(--gold-hi); border-bottom-color: var(--gold); font-weight: 600; }
.acct-panel > .notice { max-width: 640px; margin: 0 0 18px; }
.empty-note { color: var(--muted); padding: 26px 0; }

.addr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.addr-list .empty-note { grid-column: 1 / -1; }
.acct-card.addr { gap: 3px; margin: 0; position: relative; font-size: 14.5px; color: var(--ivory-2); align-content: start; }
.acct-card.addr strong { color: var(--ivory); font-size: 15.5px; }
.addr-default { position: absolute; top: 14px; right: 14px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.addr-actions { display: flex; gap: 16px; margin-top: 12px; font-size: 13.5px; }
#addr-form { margin-top: 18px; max-width: 760px; }
.addr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }

.acct-card.order { max-width: 760px; gap: 10px; }
.order-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.order-head strong { font-family: var(--serif); font-size: 22px; color: var(--ivory); }
.order-status { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #9fd3a7; border: 1px solid rgba(159, 211, 167, .4); border-radius: 999px; padding: 2px 10px; }
.order-status.pending { color: var(--gold-hi); border-color: var(--line-strong); }
.order-head .fine { margin-left: auto; }
.order-items { list-style: none; margin: 0; padding: 0; }
.order-items li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-items .ci-img { width: 64px; height: 50px; border-radius: 6px; background: var(--ivory-2); display: grid; place-items: center; padding: 4px; }
.order-items img { max-width: 100%; max-height: 100%; object-fit: contain; }
.order .totals { margin: 6px 0 0; }

/* wishlist hearts */
.wish-btn {
  margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: transparent; color: var(--gold-hi); font-size: 19px; line-height: 1; display: grid; place-items: center; transition: all .18s;
}
.wish-btn:hover { border-color: var(--gold); }
.wish-btn.is-on { color: #e8a598; border-color: rgba(232, 165, 152, .55); background: rgba(232, 165, 152, .1); }
.pd-wish { margin-top: 10px; }
.pd-wish.is-on { color: #e8a598; border-color: rgba(232, 165, 152, .55); }

/* admin: customers */
.cust-dialog { width: min(980px, 96vw); max-height: 92vh; overflow: auto; }
.cust-wrap { overflow-x: auto; }
.cust-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cust-table th { text-align: left; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
.cust-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--ivory-2); white-space: nowrap; }
.cust-table tr.is-disabled td { opacity: .55; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; max-width: min(560px, calc(100vw - 32px));
  background: var(--panel-2); color: var(--ivory); border: 1px solid var(--gold); border-radius: 12px; padding: 12px 18px;
  box-shadow: var(--shadow); font-size: 14.5px;
}
.toast.error { border-color: rgba(181, 72, 59, .8); }

@media (max-width: 720px) {
  .acct + .cart-btn { margin-left: -18px; }
  .addr-grid { grid-template-columns: minmax(0, 1fr); }
  .acct-card { padding: 18px; }
  .acct-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .acct-tabs button { white-space: nowrap; padding: 10px 12px; }
}
/* small phones: make room for the account button next to the cart */
@media (max-width: 560px) {
  .header-inner { gap: 10px; }
  .acct + .cart-btn { margin-left: -4px; }
  .cart-btn { width: 40px; height: 40px; }
  .cart-btn svg { width: 20px; height: 20px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 16px; }
  .emblem { width: 52px; height: 52px; }
  .main-nav { gap: 10px; }
  .main-nav a { font-size: 12.5px; letter-spacing: 0; }
}

/* Privacy notice */
.legal { padding: clamp(28px, 4vw, 48px) 0 70px; }
.legal-inner { max-width: 760px; color: var(--ivory-2); font-size: 16px; line-height: 1.7; }
.legal h2 { font-family: var(--serif); font-size: 28px; color: var(--ivory); margin: 36px 0 8px; }
.legal ul { padding-left: 22px; margin: 8px 0 14px; }
.legal li { margin: 4px 0; }
.legal strong { color: var(--ivory); }
.footer-link { color: var(--muted); margin-left: 10px; }
.footer-link:hover { color: var(--gold-hi); }
.auth-dialog .fine a { color: var(--gold-hi); }

/* Item window: Add to cart + wishlist right under the price */
.pd-actions { display: flex; gap: 10px; margin: 4px 0 24px; }
.pd-actions .btn-block { width: auto; }
.pd-actions #pd-add { flex: 1 1 auto; white-space: nowrap; }
.pd-actions .pd-wish { flex: 0 0 auto; margin-top: 0; white-space: nowrap; }
@media (max-width: 560px) {
  .pd-actions { flex-direction: column; }
}

/* Item window: the details panel scrolls on its own, with a visible scrollbar */
.product-dialog .pd-info {
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--gold-deep) rgba(255, 255, 255, .06);
}
.product-dialog .pd-info::-webkit-scrollbar { width: 10px; }
.product-dialog .pd-info::-webkit-scrollbar-track { background: rgba(255, 255, 255, .06); }
.product-dialog .pd-info::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 10px; border: 2px solid var(--panel); }
@media (max-width: 980px) {
  /* narrow screens: photo and details stacked, the whole window scrolls as one */
  .product-dialog .pd-info { max-height: none; overflow: visible; }
  .pd { overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--gold-deep) rgba(255, 255, 255, .06); }
}
/* the page behind stays still while a window (item, photo, login, cart…) is open */
html:has(dialog[open]), html:has(.drawer.is-open) { overflow: hidden; }

/* Cart: photo and title open the item's window */
button.ci-open { cursor: pointer; font: inherit; }
button.ci-img.ci-open { border: 1px solid transparent; transition: border-color .15s; }
button.ci-img.ci-open:hover, button.ci-img.ci-open:focus-visible { border-color: var(--gold); }
button.ci-title.ci-open { all: unset; cursor: pointer; display: block; font-size: 14px; line-height: 1.35; color: var(--ivory); }
button.ci-title.ci-open:hover, button.ci-title.ci-open:focus-visible { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
/* Item window: "Remove from cart" */
#pd-add.is-remove { border-color: rgba(224, 138, 126, .55); color: #f0b3a9; }
#pd-add.is-remove:hover { border-color: #e08a7e; color: #fff; background: rgba(181, 72, 59, .25); }

/* Shipping rule note in the cart + admin settings */
.ship-rule { margin: -8px 0 16px; }
.settings-h { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 6px 0 10px; font-weight: 600; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#set-example { color: var(--gold-hi); }

/* Cart: shipping method choice */
.ship-methods { border: 0; padding: 0; margin: 4px 0 6px; }
.ship-methods legend { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-weight: 600; margin-bottom: 8px; padding: 0; }
.ship-opt {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; cursor: pointer;
  padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; margin-bottom: 8px; transition: border-color .15s, background .15s;
}
.ship-opt:hover { border-color: var(--gold); }
.ship-opt.is-on { border-color: var(--gold); background: rgba(201, 169, 106, .1); }
.ship-opt input { width: 18px; height: 18px; accent-color: var(--gold); margin: 0; }
.ship-opt-text { display: grid; line-height: 1.3; }
.ship-opt-text strong { color: var(--ivory); font-size: 14.5px; font-weight: 600; }
.ship-opt-text small { color: var(--muted); font-size: 12.5px; }
.ship-opt-price { font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--gold-hi); }
.ship-warn { color: var(--gold-hi); margin: 2px 0 0; }
.ship-rule { margin: -8px 0 16px; }
.settings-h small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.set-example { color: var(--gold-hi); margin: 6px 0 4px; }
#settings-form { display: grid; gap: 6px; }

/* admin: orders */
.ord-top { gap: 8px; margin: 6px 0 10px; }
.ord-top input[type=search] { flex: 1; min-width: 0; }
.cust-table tr.ord-det td { white-space: normal; background: rgba(255,255,255,.03); }
.cust-table tr.ord-cancelled td { opacity: .6; }
.ord-det dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.ord-det dt { color: var(--muted); font-size: 12px; }
.ord-det dd { margin: 0; }
.order-status.cancelled { color: #e59a9a; border-color: rgba(229, 154, 154, .45); }

/* admin: import */
.imp-wrap { max-height: 46vh; overflow: auto; }
.cust-table td.imp-t { white-space: normal; min-width: 220px; }
.cust-table tr.imp-attn td { background: rgba(214, 170, 80, .07); }
.cust-table input.imp-price { width: 84px; }
.cust-table input.imp-price.is-bad { border-color: #e08a7e; }
.imp-tag { display: inline-block; font-size: 11px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; margin: 2px 4px 0 0; color: var(--gold-hi); }
.imp-log { max-height: 30vh; overflow: auto; margin: 10px 0; padding-left: 18px; font-size: 13px; color: var(--ivory-2); }

/* NumisOne logo */
.emblem { border-radius: 50%; object-fit: cover; }
.admin-logo { width: 26px; height: 26px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.login-logo { display: block; width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 10px; }
.footer-logo { display: block; width: 110px; height: 110px; border-radius: 50%; margin-bottom: 10px; }

/* Private collection page + admin fields */
.edit-vault { margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.edit-vault textarea { width: 100%; }
.vault-actions { margin: 0 0 6px; justify-content: flex-start; gap: 8px; }
.vault-main { padding-top: 36px; padding-bottom: 60px; min-height: 60vh; }
.vault-lock { max-width: 420px; margin: 40px auto; text-align: center; }
.vault-lock h1, .vault-head h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; margin: 0 0 8px; }
.vault-lock form { display: grid; gap: 12px; margin-top: 18px; text-align: left; }
.vault-lock .btn { justify-self: center; }
.vault-intro { color: var(--ivory-2); margin: 0 0 6px; }
.vault-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.vault-toolbar { margin-bottom: 0; }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.vault-card { background: var(--ink-2, #111c36); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.vault-photo { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; cursor: zoom-in;
  background: radial-gradient(circle at 50% 40%, #f6efde, #e3d8bd); }
.vault-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vault-pcount { position: absolute; right: 8px; bottom: 8px; font-size: 11px; background: rgba(10, 16, 36, .78); color: var(--ivory); padding: 3px 9px; border-radius: 999px; }
.vault-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.vault-body h3 { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; line-height: 1.2; }
.vault-tag { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.vault-facts { margin: 0; font-size: 13px; color: var(--ivory-2); }
.vault-note { margin: 4px 0 0; font-size: 14px; font-style: italic; color: var(--ivory); border-left: 2px solid var(--gold); padding-left: 10px; white-space: pre-line; }
.vault-more { text-align: center; margin: 26px 0 0; }
.vault-nfs { justify-self: start; font-size: 11px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 10px; color: var(--ivory-2); margin-top: 4px; }
.vault-view { border: 0; padding: 0; background: rgba(5, 9, 22, .96); max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; color: var(--ivory); }
.vault-view[open] { display: grid; place-items: center; }
.vault-view img { max-width: 92vw; max-height: 82vh; object-fit: contain; }
.vv-close { position: absolute; top: 12px; right: 16px; font-size: 34px; background: none; border: 0; color: var(--ivory); cursor: pointer; line-height: 1; }
.vv-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 44px; line-height: 1; width: 52px; height: 72px; background: rgba(255,255,255,.08); border: 0; color: var(--ivory); cursor: pointer; border-radius: 10px; }
.vv-prev { left: 10px; } .vv-next { right: 10px; }
.vv-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; margin: 0; padding: 0 60px; font-size: 14px; }

/* checkout closed by the admin */
.checkout-closed { border: 1px solid var(--gold); background: rgba(201, 169, 106, .10); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.checkout-closed p { margin: 6px 0 0; white-space: pre-line; }
.settings-sep { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
#settings-dialog textarea { width: 100%; }

/* Contact page */
.contact-grid { max-width: 980px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.contact-form { display: grid; gap: 16px; }
.contact-form .ctl input, .contact-form .ctl textarea { width: 100%; box-sizing: border-box; }
.contact-form .ctl textarea { background: var(--bg-2); color: var(--ivory); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; text-transform: none; letter-spacing: 0; resize: vertical; }
.contact-form .btn { justify-self: start; }
.contact-side h2 { margin-top: 0; }
.ct-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 560px) { .main-nav { gap: 8px; } .main-nav a { font-size: 12px; } }
@media (max-width: 400px) { .main-nav { gap: 6px; } .main-nav a { font-size: 11.5px; } .brand-sub { display: none; } }
@media (max-width: 400px) { .header-inner { gap: 8px; } .brand-name { font-size: 20px; } .acct-btn, .cart-btn { width: 38px; height: 38px; } }
@media (max-width: 420px) { .header-inner { gap: 6px; } .emblem { width: 44px; height: 44px; } .brand-name { font-size: 15px; } .brand { gap: 6px; } }
@media (max-width: 370px) { .main-nav { gap: 5px; } .main-nav a { font-size: 11px; } .brand-name { font-size: 13.5px; } .emblem { width: 40px; height: 40px; } .acct + .cart-btn { margin-left: -6px; } }

/* Returns */
.rt-reasons { display: grid; gap: 8px; margin: 10px 0; }
.rt-reason { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
.rt-reason select { background: var(--bg-2); color: var(--ivory); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; }
#settings-form .settings-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.policy-table { border-collapse: collapse; width: 100%; margin: 10px 0 14px; font-size: 15px; }
.policy-table th, .policy-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.policy-table th { background: var(--bg-2); color: var(--ivory); font-weight: 600; }
.legal ol { padding-left: 22px; margin: 8px 0 14px; }
.ret-box { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); display: grid; gap: 8px; }
.ret-box p { margin: 0; }
.ret-address { white-space: pre-line; color: var(--ivory); padding: 8px 12px; border-left: 2px solid var(--gold); }
.ret-form { display: grid; gap: 10px; }
.ret-form input:not([type=checkbox]):not([type=file]), .ret-form select, .ret-form textarea { background: var(--bg); color: var(--ivory); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px; width: 100%; box-sizing: border-box; }
.ret-form .btn { justify-self: start; }
.ret-photos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ret-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ret-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0; font-size: 14px; }
.ret-dl dt { color: var(--muted); } .ret-dl dd { margin: 0; color: var(--ivory); }
.ret-history { font-size: 12.5px; color: var(--muted); padding-left: 18px; }
#ord-return textarea, #ord-return input:not([type=checkbox]), #ord-return select { background: var(--bg-2); color: var(--ivory); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px; width: 100%; box-sizing: border-box; }
#ord-return .dlg-actions { flex-wrap: wrap; }
#ord-return .ctl-wide { display: grid; gap: 5px; margin: 10px 0; font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .rt-reason { grid-template-columns: 1fr; } .ret-dl { grid-template-columns: 1fr; } }
#or-body > .btn, #or-body > .dlg-actions { margin-top: 12px; }

/* Countries we don't ship to */
.ns-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.ns-add input { flex: 1 1 200px; background: var(--bg-2); color: var(--ivory); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px; }
.ns-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.ns-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; color: var(--ivory); }
.ns-chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 6px; }
.ns-chip button:hover { color: var(--ivory); }
.noship-note { margin-top: 10px; }

/* Admin users */
#admin-admins, #admin-mypw, #admin-smtp { display: none; }
body.role-owner #admin-admins, body.role-owner #admin-smtp { display: inline-flex; }
body.role-full #admin-mypw, body.role-limited #admin-mypw { display: inline-flex; }
body.role-limited #admin-vault, body.role-limited #admin-import, body.role-limited #admin-coupons,
body.role-limited #admin-customers, body.role-limited #admin-settings { display: none; }
body.role-limited .edit-vault { display: none; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th, .adm-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table td .btn { margin: 2px 4px 2px 0; }
.adm-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.adm-log { list-style: none; padding: 0; margin: 10px 0 0; max-height: 240px; overflow: auto; font-size: 13px; color: var(--muted); }
.adm-log li { padding: 4px 0; border-bottom: 1px solid var(--line); }
#adm-dialog select, #adm-dialog input[type=text], #adm-dialog input[type=email] { background: var(--bg-2); color: var(--ivory); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px; width: 100%; box-sizing: border-box; }
.adm-temp-pw { font-family: ui-monospace, Consolas, monospace; font-size: 16px; color: var(--ivory); user-select: all; }
#smtp-dialog input:not([type=checkbox]), #smtp-dialog select { background: var(--bg-2); color: var(--ivory); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px; width: 100%; box-sizing: border-box; }

/* Admin pop-up windows: vertical scrollbar stays, no horizontal scrollbar */
dialog.admin-dialog, dialog.admin-dialog * { scrollbar-width: auto; -ms-overflow-style: auto; }
dialog.admin-dialog::-webkit-scrollbar, dialog.admin-dialog *::-webkit-scrollbar { display: initial; }
dialog.admin-dialog { overflow-x: hidden; overscroll-behavior: contain; }

/* Admin pop-ups: wide enough that no horizontal scrollbar is needed (vertical one stays) */
#adm-dialog { width: min(780px, 94vw); max-width: 94vw; }
.adm-table td, .adm-table th { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .adm-table, .adm-table thead, .adm-table tbody, .adm-table tr, .adm-table td { display: block; width: 100%; box-sizing: border-box; }
  .adm-table thead { display: none; }
  .adm-table tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .adm-table td { border-bottom: 0; padding: 3px 4px; }
}
#vault-dialog input { box-sizing: border-box; max-width: 100%; }

/* Admin tables: wrap instead of running off the right edge, so every button stays visible */
.cust-table td { white-space: normal; overflow-wrap: anywhere; }
.cust-table td.cpn-actions { flex-wrap: wrap; min-width: 150px; align-items: flex-start; }
.cust-table td.cpn-actions .btn { white-space: nowrap; }
.cust-table td:first-child, .cust-table td:nth-child(2), .cust-table td:nth-child(5) { white-space: nowrap; }
@media (max-width: 640px) {
  .cust-table, .cust-table tbody { display: block; width: 100%; }
  .cust-table tr:first-child:has(th) { display: none; }
  .cust-table tr { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .cust-table td { border-bottom: 0; padding: 2px 4px; }
  .cust-table td.cpn-actions { flex-basis: 100%; }
  .cust-table tr.ord-det { display: block; }
  .cust-table tr.ord-det td { display: block; }
}

.ord-email { font-size: 12px; color: var(--muted); user-select: all; }

