:root {
  color-scheme: dark;
  --bg: #070a0d;
  --bg-elevated: #0b1015;
  --surface: #10161d;
  --surface-2: #151d26;
  --surface-3: #1a2530;
  --border: #25313d;
  --border-bright: #3b4d5d;
  --ink: #f4f7f9;
  --ink-soft: #c8d1d9;
  --ink-dim: #8795a3;
  --accent: #b7f34a;
  --accent-strong: #d0ff78;
  --accent-ink: #111906;
  --cyan: #68dce8;
  --warn: #f1bb55;
  --danger: #ff6b68;
  --success: #79e2a8;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  --page: 1180px;
  --font-display: "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% -10%, rgba(104, 220, 232, .12), transparent 27rem),
    radial-gradient(circle at 88% 2%, rgba(183, 243, 74, .1), transparent 30rem),
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 40px 40px, 40px 40px, auto;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 40;
  background: linear-gradient(90deg, transparent, var(--cyan) 24%, var(--accent) 72%, transparent);
  opacity: .9;
  pointer-events: none;
}

::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
img { display: block; max-width: 100%; }
.image-failed { opacity: 0; }

h1, h2, h3 {
  margin: 0 0 .55em;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.025em;
}

h1 { font-size: clamp(2.35rem, 6vw, 4.75rem); text-transform: uppercase; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); text-transform: uppercase; }
h3 { font-size: 1.25rem; line-height: 1.1; }
p { margin: 0 0 1em; }
ul { line-height: 1.65; }
strong { color: var(--ink); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  box-shadow: 6px 0 0 rgba(183, 243, 74, .25);
}

.lede {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

button,
.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--surface-3);
}

button:active,
.btn:active { transform: translateY(0); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px rgba(183, 243, 74, .14);
}

.btn-primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: 0 14px 34px rgba(183, 243, 74, .22);
}

.btn-danger { border-color: rgba(255, 107, 104, .45); background: rgba(255, 107, 104, .08); color: #ff9694; }
.btn-danger:hover { border-color: var(--danger); background: rgba(255, 107, 104, .14); }
.btn-small { min-height: 34px; padding: 7px 11px; font-size: .78rem; }
.auth-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.link-button {
  min-height: auto;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}
.link-button:hover { transform: none; border-color: transparent; background: transparent; color: var(--accent-strong); }
.security-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #0b1117;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea { min-height: 120px; resize: vertical; }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: #667380; }

input:hover,
textarea:hover,
select:hover { border-color: var(--border-bright); }

input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(183, 243, 74, .14);
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field { margin-bottom: 20px; }
.hint { margin-top: 6px; color: var(--ink-dim); font-size: .82rem; line-height: 1.5; }

.badge {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 800;
}

/* Navigation */
.nav {
  width: 100%;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px max(24px, calc((100vw - var(--page)) / 2));
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(92, 112, 129, .28);
  background: rgba(7, 10, 13, .82);
  backdrop-filter: blur(18px) saturate(130%);
}

.nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(183, 243, 74, .62);
  border-radius: 10px 4px 10px 4px;
  background: linear-gradient(145deg, rgba(183, 243, 74, .18), rgba(104, 220, 232, .08));
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: -.08em;
  box-shadow: inset 0 0 20px rgba(183, 243, 74, .05);
}

.brand-mark::after {
  content: "";
  width: 5px;
  height: 5px;
  position: absolute;
  right: 4px;
  top: 4px;
  border-radius: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(104, 220, 232, .85);
}

.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy small {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.nav-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink-dim);
  font-size: .86rem;
  font-weight: 720;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, .035); }
.nav-links a.is-current { border-color: var(--border); background: var(--surface); color: var(--accent); }
.nav-links a[href="/post.html"] { margin-left: 7px; border-color: rgba(183, 243, 74, .34); color: var(--ink); }
.nav-links a[href="/post.html"]:hover { border-color: var(--accent); background: rgba(183, 243, 74, .08); }

.global-announcements {
  display: grid;
  gap: 1px;
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(241, 187, 85, .4);
  background: #1d160a;
}
.global-announcement {
  width: min(100%, var(--page));
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  padding: 10px 24px;
  color: #f8d894;
  font-size: .86rem;
}
.announcement-label {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(241, 187, 85, .5);
  border-radius: 5px;
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-toggle {
  width: 44px;
  min-width: 44px;
  height: 42px;
  display: none;
  padding: 0;
  margin-left: auto;
}

.nav-toggle-lines { width: 18px; display: grid; gap: 4px; }
.nav-toggle-lines span { height: 2px; border-radius: 999px; background: currentColor; transition: transform .16s ease, opacity .16s ease; }
.nav.menu-open .nav-toggle-lines span:first-child { transform: translateY(6px) rotate(45deg); }
.nav.menu-open .nav-toggle-lines span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-toggle-lines span:last-child { transform: translateY(-6px) rotate(-45deg); }

/* Layout */
.page {
  width: 100%;
  max-width: var(--page);
  flex: 1;
  margin: 0 auto;
  padding: 48px 24px 84px;
}

.page-narrow { max-width: 760px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.section-head { margin-bottom: 22px; }
.section-head h1, .section-head h2 { margin-bottom: 10px; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 { margin: 0; }
.page-header-copy { max-width: 650px; }

/* Homepage */
.shop-hero {
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
  align-items: stretch;
  gap: 18px;
  margin-bottom: 34px;
}

.hero-panel,
.control-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(13, 19, 25, .92);
  box-shadow: var(--shadow);
}

.hero-panel {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 5vw, 54px);
}

.hero-panel::before {
  content: "";
  width: 310px;
  height: 310px;
  position: absolute;
  right: -84px;
  top: -102px;
  border: 1px solid rgba(104, 220, 232, .24);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(104, 220, 232, .035), 0 0 0 76px rgba(183, 243, 74, .025);
}

.hero-panel::after {
  content: "06 / 06";
  position: absolute;
  right: 26px;
  bottom: 22px;
  color: rgba(255, 255, 255, .1);
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -.1em;
  writing-mode: vertical-rl;
}

.hero-panel h1 { max-width: 650px; margin: 0 0 18px; font-size: clamp(3rem, 7vw, 6rem); }
.hero-panel h1 em { display: block; color: var(--accent); font-style: normal; }
.hero-panel .lede { max-width: 560px; padding-right: 40px; }

.control-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  background: linear-gradient(145deg, rgba(104, 220, 232, .07), transparent 55%), var(--surface);
}

.control-panel::after {
  content: "";
  height: 3px;
  position: absolute;
  inset: auto 28px 0;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
}

.search-label { margin-bottom: 9px; }
.search-wrap { position: relative; }
.search-wrap::before {
  content: "/";
  position: absolute;
  left: 15px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 900;
}
.search-wrap input { min-height: 54px; padding-left: 34px; border-color: var(--border-bright); background: rgba(4, 8, 12, .62); font-size: 1rem; }

.tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex-shrink: 0; border-color: transparent; background: transparent; color: var(--ink-dim); }
.tabs button.active { border-color: rgba(183, 243, 74, .38); background: rgba(183, 243, 74, .1); color: var(--accent); }

.control-panel .tabs { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--border); }
.market-meta { display: flex; gap: 18px; margin-top: 24px; }
.market-stat { min-width: 92px; }
.market-stat strong { display: block; font-family: var(--font-display); font-size: 1.65rem; letter-spacing: -.02em; }
.market-stat span { color: var(--ink-dim); font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }

.results-head { margin-bottom: 18px; }
.results-head h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.25rem); }
.results-count { color: var(--ink-dim); font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 18px; }
.card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(16, 22, 29, .94); }
.card-body { padding: 17px; }

.listing-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  color: inherit;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .16);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.listing-card:hover {
  transform: translateY(-5px);
  border-color: rgba(183, 243, 74, .56);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .34), 0 0 0 1px rgba(183, 243, 74, .06);
}

.listing-media {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(104, 220, 232, .12), transparent 42%), repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 16px), #090e13;
}

.listing-media::before {
  content: "IMAGE OFFLINE";
  position: absolute;
  color: #5f6f7d;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.listing-media img { width: 100%; height: 100%; position: relative; z-index: 1; object-fit: contain; }
.listing-media-badge { position: absolute; right: 12px; bottom: 12px; z-index: 2; }

.listing-card .card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; }
.listing-card h3 { margin: 0; font-family: var(--font-body); font-size: 1.03rem; line-height: 1.3; letter-spacing: -.01em; text-transform: none; }
.listing-card .shop { overflow: hidden; color: var(--ink-dim); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.listing-card .tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.listing-card .price-tag { width: 100%; margin-top: auto; }

.price-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .02em;
}
.price-free { border-color: rgba(121, 226, 168, .24); background: rgba(121, 226, 168, .1); color: var(--success); }
.price-credits { border-color: rgba(241, 187, 85, .24); background: rgba(241, 187, 85, .1); color: var(--warn); }
.price-trade { border-color: rgba(104, 220, 232, .25); background: rgba(104, 220, 232, .1); color: var(--cyan); }

.pill,
.stock-ok,
.stock-low,
.stock-out,
.rating-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: .67rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.stock-low, .rating-mid, .status-pending { border-color: rgba(241, 187, 85, .28); background: rgba(241, 187, 85, .1); color: var(--warn); }
.stock-out, .rating-bad, .status-disputed { border-color: rgba(255, 107, 104, .26); background: rgba(255, 107, 104, .1); color: #ff918e; }
.rating-good, .status-completed { border-color: rgba(121, 226, 168, .28); background: rgba(121, 226, 168, .1); color: var(--success); }
.status-delivered { border-color: rgba(104, 220, 232, .28); background: rgba(104, 220, 232, .1); color: var(--cyan); }
.status-cancelled { color: var(--ink-dim); }

/* Forms and content surfaces */
form:not(#msgForm) {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(13, 19, 25, .9);
  box-shadow: var(--shadow);
}

#loggedOut,
#loggedIn { position: relative; }

#loggedOut {
  max-width: 620px;
  margin: 22px auto 0;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(104, 220, 232, .06), transparent 40%), var(--surface);
  box-shadow: var(--shadow);
}

#loggedOut form { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#loggedOut > .row { gap: 6px !important; padding: 5px; border: 1px solid var(--border); border-radius: 11px; background: #090e13; }
#loggedOut > .row button { flex: 1; border-color: transparent; background: transparent; color: var(--ink-dim); }
#loggedOut > .row button.active { background: var(--surface-3); color: var(--accent); }

.form-intro { margin-bottom: 26px; }
.form-intro h1 { margin-bottom: 12px; }
.form-intro p { color: var(--ink-dim); }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input { width: 18px; min-width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--accent); }
.checkbox-row label { margin: 0; color: var(--ink-soft); font-family: var(--font-body); font-size: .9rem; font-weight: 600; letter-spacing: 0; line-height: 1.45; text-transform: none; }

.warning-box,
.error-box,
.success-box {
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 10px;
  font-size: .86rem;
  line-height: 1.55;
}
.warning-box { border-color: rgba(241, 187, 85, .34); background: rgba(241, 187, 85, .08); color: #f4cb7b; }
.error-box { border-color: rgba(255, 107, 104, .4); background: rgba(255, 107, 104, .09); color: #ffaaa7; }
.success-box { border-color: rgba(121, 226, 168, .38); background: rgba(121, 226, 168, .09); color: #a8ebc4; }

.empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 72px 24px;
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius);
  background: rgba(10, 15, 20, .64);
  color: var(--ink-dim);
  text-align: center;
}

.empty::before {
  content: "[  ]";
  display: block;
  margin-bottom: 10px;
  color: var(--border-bright);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  letter-spacing: .16em;
}

.order-card,
.review-item,
.notif-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 22, 29, .9);
}

.order-card {
  display: block;
  margin-bottom: 12px;
  padding: 16px;
  color: inherit;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.order-card[href]:hover { transform: translateY(-2px); border-color: rgba(183, 243, 74, .45); background: var(--surface-2); }
.order-header { display: flex; align-items: center; gap: 14px; }
.order-header img { width: 64px; height: 64px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); object-fit: contain; }

.review-item { margin-bottom: 9px; padding: 13px 14px; }
.review-item .thumb { margin-right: 6px; font-weight: 800; }
.review-item .thumb.positive { color: var(--success); }
.review-item .thumb.negative { color: var(--danger); }

.notification-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.notification-toolbar .hint { margin-right: 4px; }
.notif-item { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding: 12px 14px; color: inherit; }
.notif-item:hover { border-color: var(--border-bright); background: var(--surface-2); }
.notif-item.unread { border-color: rgba(183, 243, 74, .38); background: rgba(183, 243, 74, .05); }
.notif-link { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; color: inherit; }
.notif-copy { overflow-wrap: anywhere; }
.notif-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 34px; }
.owner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 34px; }
.settings-card { height: 100%; }
.owner-user-controls { min-width: 290px; display: grid; grid-template-columns: repeat(2, minmax(100px, 1fr)); gap: 7px; }
.owner-user-controls button { min-width: 0; }
.announcement-admin-list { display: grid; gap: 8px; margin-top: 20px; }
.announcement-admin-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }

.identity-code,
.account-id-compact,
.account-id-line code {
  overflow-wrap: anywhere;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: .72rem;
}
.identity-code { margin: 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: #080d12; user-select: all; }
.account-id-line { margin: 9px 0 0; color: var(--ink-dim); font-size: .75rem; }
.account-id-compact { display: block; max-width: 185px; margin-top: 5px; }

.verified-owner {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid rgba(183, 243, 74, .45);
  border-radius: 999px;
  background: rgba(183, 243, 74, .1);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: middle;
}
.verified-owner::before { content: "✓"; margin-right: 5px; }
.verified-owner-large { transform: translateY(-7px); }
.seller-presence { display: flex; align-items: center; margin: 6px 0 14px; }
.presence-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-dim); font-family: var(--font-mono); font-size: .7rem; }
.presence-badge.online { color: var(--success); }
.presence-badge.online span,
.live-chat-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px rgba(121, 226, 168, .8); }

.meetup-fields { display: grid; gap: 9px; margin-top: 10px; }
.meetup-fields .warning-box { margin-bottom: 0; }
.username-validation { font-family: var(--font-mono); font-size: .7rem; }
.username-validation.valid { color: var(--success); }
.username-validation.invalid { color: var(--danger); }

.deadline-grid,
.moderation-overview { display: grid; gap: 10px; }
.deadline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0; }
.deadline-grid > div { padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.deadline-grid span { display: block; margin-bottom: 4px; color: var(--ink-dim); font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; }
.deadline-grid strong { font-size: .83rem; }
.live-chat-status { display: flex; align-items: center; gap: 7px; margin: -6px 0 12px; color: var(--ink-dim); font-family: var(--font-mono); font-size: .67rem; }

.moderation-overview { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.moderation-overview .stat-card { min-width: 0; }
.admin-user-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-user-toolbar input { max-width: 420px; }

.msg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 7px; }
.msg-actions button { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--ink-dim); font-family: var(--font-mono); font-size: .66rem; }
.msg-actions button:hover { transform: none; background: transparent; color: var(--accent); }

dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(1, 4, 7, .78);
  backdrop-filter: blur(10px);
  animation: backdrop-in .2s ease both;
}
.listing-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  overflow: visible;
}
.listing-dialog-shell {
  max-height: calc(100vh - 32px);
  position: relative;
  overflow: auto;
  border: 1px solid var(--border-bright);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(104, 220, 232, .06), transparent 35%), #0b1015;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .65), 0 0 0 1px rgba(183, 243, 74, .06);
  animation: listing-pop .34s cubic-bezier(.2, .9, .25, 1.12) both;
}
.dialog-close {
  width: 40px;
  min-height: 40px;
  padding: 0;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  border-radius: 50%;
  background: rgba(7, 10, 13, .82);
  font-size: 1.4rem;
}
.quick-detail-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr); min-height: 590px; }
.quick-detail-media { min-height: 520px; aspect-ratio: auto; border: 0; border-radius: 0; }
.quick-detail-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 5vw, 62px); }
.listing-dialog[open] .listing-dialog-shell { animation: listing-pop-in .32s cubic-bezier(.2,.8,.2,1); }
@keyframes listing-pop-in { from { opacity: 0; transform: translateY(-28px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.quick-detail-grid { display: block; }
.quick-detail-media { width: 100%; aspect-ratio: 16 / 7; min-height: 0; max-height: none; }
.quick-detail-copy h2 { padding-right: 35px; font-size: clamp(2.3rem, 5vw, 4.5rem); }
.quick-seller { margin-bottom: 16px; }
.quick-price-row { display: flex; align-items: center; gap: 7px; margin-bottom: 18px; flex-wrap: wrap; }
.quick-delivery { margin: 10px 0 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.quick-delivery ul { margin: 7px 0 0; padding-left: 20px; color: var(--ink-dim); font-size: .86rem; }
.quick-actions { margin-top: 4px; }

.action-dialog { width: min(560px, calc(100vw - 28px)); max-width: none; }
.action-dialog-card { position: relative; margin: 0; animation: listing-pop .26s cubic-bezier(.2, .9, .25, 1.08) both; }
.action-dialog-card h2 { padding-right: 42px; }

@keyframes listing-pop {
  from { opacity: 0; transform: translateY(24px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.restock-row { display: flex; align-items: center; gap: 8px; }
.restock-row input { width: 92px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); align-items: start; gap: clamp(28px, 5vw, 62px); }
.detail-grid > img,
.detail-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(104, 220, 232, .08), transparent), var(--surface);
  object-fit: contain;
  box-shadow: var(--shadow);
}
.detail-grid h1 { font-size: clamp(2.8rem, 6vw, 5.3rem); }
.detail-grid > div > p { color: var(--ink-soft); }
.detail-grid .field { padding-top: 18px; border-top: 1px solid var(--border); }

.delivery-option {
  display: block;
  margin-bottom: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0c1218;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.55;
  text-transform: none;
  cursor: pointer;
}
.delivery-option:hover { border-color: var(--border-bright); }
.delivery-option.selected { border-color: rgba(183, 243, 74, .55); background: rgba(183, 243, 74, .055); }
.delivery-option input { width: auto; min-height: auto; margin-right: 8px; accent-color: var(--accent); }

.checkout-bar {
  margin-top: 20px;
  padding: 16px;
  position: sticky;
  bottom: 16px;
  z-index: 10;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  background: rgba(10, 15, 20, .92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .38);
  backdrop-filter: blur(16px);
}

.messages {
  min-height: 190px;
  max-height: 390px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 14px 0;
  padding: 16px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #090e13;
}
.msg { max-width: min(78%, 620px); padding: 10px 13px; border: 1px solid var(--border); border-radius: 12px 12px 12px 3px; background: var(--surface-2); font-size: .9rem; }
.msg.mine { align-self: flex-end; border-color: rgba(183, 243, 74, .25); border-radius: 12px 12px 3px 12px; background: rgba(183, 243, 74, .14); color: var(--ink); }
.msg .meta { margin-top: 4px; color: var(--ink-dim); font-family: var(--font-mono); font-size: .65rem; }

.toggle-group { display: flex; gap: 7px; }
.toggle-group button.on { border-color: var(--accent); background: rgba(183, 243, 74, .1); color: var(--accent); }

table { width: 100%; border: 1px solid var(--border); border-collapse: separate; border-spacing: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); font-size: .86rem; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { background: #0b1117; color: var(--ink-dim); font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.account-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 32px; }
.stat-card { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat-card .hint { margin: 0 0 5px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.stat-card strong { font-family: var(--font-display); font-size: 2.25rem; }

footer.site-footer {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 26px 24px;
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 11, .7);
  color: var(--ink-dim);
  font-size: .78rem;
  text-align: center;
}
footer.site-footer::before { content: "6B"; padding: 3px 5px; border: 1px solid var(--border-bright); border-radius: 4px; color: var(--accent); font-family: var(--font-mono); font-size: .66rem; font-weight: 900; }

@media (max-width: 900px) {
  .shop-hero { grid-template-columns: 1fr; }
  .hero-panel { min-height: 300px; }
  .control-panel { gap: 28px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > img, .detail-media { max-height: 620px; aspect-ratio: 4 / 3; }
  .quick-detail-grid { grid-template-columns: 1fr; }
  .quick-detail-media { min-height: 300px; max-height: 430px; aspect-ratio: 16 / 10; }
  .settings-grid, .owner-grid { grid-template-columns: 1fr; }
  .moderation-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav { min-height: 66px; padding: 11px 16px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    width: calc(100% + 32px);
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    margin: 0 -16px -11px;
    padding: 10px 16px 16px;
    border-top: 1px solid var(--border);
    background: rgba(7, 10, 13, .98);
  }
  .nav.menu-open { flex-wrap: wrap; }
  .nav.menu-open .nav-links { display: flex; }
  .nav-links a { min-height: 44px; padding: 0 13px; }
  .nav-links a[href="/post.html"] { margin-left: 0; }

  .page { padding: 34px 16px 62px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .hero-panel, .control-panel { border-radius: 16px; }
  .hero-panel { min-height: 280px; padding: 28px 22px; }
  .hero-panel h1 { font-size: clamp(2.8rem, 14vw, 4.6rem); }
  .hero-panel::after { display: none; }
  .hero-panel .lede { padding-right: 0; }
  .control-panel { padding: 22px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 14px; }
  .order-header { align-items: flex-start; flex-wrap: wrap; }
  .order-header > div { min-width: calc(100% - 82px); }
  .notif-item { align-items: stretch; flex-direction: column; }
  .notif-actions { justify-content: flex-start; }
  .global-announcement { align-items: flex-start; flex-direction: column; padding: 10px 16px; }
  .quick-detail-copy { padding: 30px 22px; }
  .listing-dialog, .listing-dialog-shell { max-height: calc(100vh - 16px); }
  .listing-dialog { width: calc(100vw - 16px); }
  .listing-dialog-shell { border-radius: 17px; }
  table { display: block; overflow-x: auto; }
}

@media (max-width: 520px) {
  h1 { font-size: 2.6rem; }
  .brand-copy small { display: none; }
  .shop-hero { min-height: 0; }
  .market-meta { gap: 12px; }
  .market-stat { min-width: 75px; }
  .grid { grid-template-columns: 1fr; }
  .listing-media { aspect-ratio: 16 / 10; }
  .between { align-items: stretch; }
  .between > button, .between > .btn { width: 100%; }
  .notification-toolbar { align-items: stretch; justify-content: flex-start; }
  .notification-toolbar .hint { width: 100%; }
  .account-stats { grid-template-columns: 1fr; }
  .deadline-grid, .moderation-overview { grid-template-columns: 1fr; }
  .admin-user-toolbar { align-items: stretch; flex-direction: column; }
  .msg { max-width: 90%; }
  #msgForm { align-items: stretch; flex-direction: column; }
  #msgForm button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
