:root {
  color-scheme: only dark;
  font: 16px/1.5 system-ui, sans-serif;
  color: #edf4ef;
  background: #101512;
  --paper: #1a221d;
  --muted: #aebfb4;
  --line: #38483e;
  --control-border: #63796b;
  --field: #121a15;
  --media: #24312a;
  --accent: #9bdfb0;
  --accent-ink: #102419;
  --focus: #f4cf84;
}
body { margin: 0; }
main { width: min(68rem, calc(100% - 3rem)); margin: 2.75rem auto 4rem; }
[hidden] { display: none !important; }
.site-header, .section-header, .detail-heading, .actions, .row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-header, .section-header { justify-content: space-between; }
.site-header { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
h1, h2, h3, p { margin: 0; }
h1, h2 { letter-spacing: -.04em; line-height: 1.15; }
h1 { font-size: clamp(1.75rem, 4vw, 2.35rem); }
h2 { font-size: clamp(1.55rem, 4vw, 2rem); }
h3 { font-size: 1.05rem; }
#status:not(:empty) { font-size: .92rem; margin: 1rem 0; }
.muted { color: var(--muted); }
#view-count { margin-top: .3rem; font-size: .9rem; }
.tabs { display: flex; gap: 1.75rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.tabs button { white-space: nowrap; background: transparent; color: var(--muted); border: 0; border-radius: 0; border-bottom: 3px solid transparent; padding: .9rem .1rem .75rem; }
.tabs button[aria-selected=true] { color: var(--accent); border-color: var(--accent); }
.tabs button:focus-visible { outline-offset: -3px; }
.actions { gap: .6rem; }
.listing-list, .market-list { padding: 0; margin: 0; list-style: none; }
.listing-list { margin-top: 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: .8rem; }
.listing-list:empty { display: none; }
.listing-list li + li, .market-list li + li { border-top: 1px solid var(--line); }
.listing-row { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto minmax(4.5rem, auto) 1rem; text-align: left; align-items: center; gap: .8rem; width: 100%; background: transparent; color: inherit; border: 0; border-radius: .65rem; padding: .75rem 1rem; }
.listing-row:hover { background: #26362c; }
.thumbnail { width: 4rem; height: 3.3rem; display: grid; place-items: center; border-radius: .4rem; overflow: hidden; background: var(--media); color: var(--muted); }
.thumbnail img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.listing-name { min-width: 0; overflow-wrap: anywhere; }
.listing-name span { display: block; margin-top: .15rem; font-size: .82rem; font-weight: 450; }
.price { text-align: right; overflow-wrap: anywhere; max-width: 12rem; }
.chevron { color: var(--muted); font-size: 1.45rem; text-align: right; }
.badges { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.badge { display: inline-block; width: max-content; padding: .14rem .55rem; border-radius: 1rem; font-size: .78rem; font-weight: 650; color: #d3e2d8; background: #304037; }
.badge.posted { color: #a6edbd; background: #223e2d; }
.badge.draft { color: #f3d78d; background: #41351e; }
.badge.unknown, .badge.legacy_unresolved { color: #ffcca9; background: #453123; }
.badge.collected { color: #bfdcff; background: #29394d; }
.empty { margin-top: 1.25rem; padding: 1.75rem; border: 1px dashed var(--control-border); border-radius: .75rem; color: var(--muted); }
.detail-heading { margin: .8rem 0 1rem; overflow-wrap: anywhere; }
.panel, form { padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--paper); }
.panel + .panel, #approval, #email-enroll, #settings h2 + button, #email-sign-in, #email-verify { margin-top: 1rem; }
.listing-facts { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; margin: 0; }
.listing-facts dt { color: var(--muted); }
.listing-facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.listing-facts + h3, .gallery { margin-top: 1rem; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .3rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(11rem, 100%), 1fr)); gap: .65rem; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: contain; border-radius: .4rem; background: var(--media); }
.market-list li { padding: .6rem 0; display: flex; justify-content: space-between; align-items: center; gap: .7rem; overflow-wrap: anywhere; }
.market-list small { display: block; }
.panel > .muted { margin-top: .35rem; }
a { color: var(--accent); }
#draft-forms { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
#email-sign-in, #email-verify, #email-enroll { max-width: 30rem; }
#email-setup-key { overflow-wrap: anywhere; }
form p { margin-top: .75rem; color: var(--muted); }
label { display: block; font-weight: 600; }
form label + label { margin-top: .75rem; }
.row { margin: .75rem 0; }
.row label { flex: 1 1 10rem; margin: 0; }
input, textarea, button { font: inherit; }
input:not([type=radio]):not([type=checkbox]), textarea { display: block; width: 100%; box-sizing: border-box; padding: .55rem; margin-top: .25rem; border: 1px solid var(--control-border); border-radius: .35rem; background: var(--field); color: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { min-height: 5rem; }
.platform-choices { border: 0; margin: 0; padding: 0; }
.platform-choices legend { padding: 0; font-weight: 650; }
.platform-choices label { display: flex; align-items: center; gap: .45rem; margin-top: .5rem; font-weight: 450; }
.platform-choices input { margin: 0; accent-color: var(--accent); }
form button { margin-top: .75rem; }
button { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink); font-weight: 650; padding: .5rem .875rem; border-radius: .4rem; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
.secondary { background: transparent; color: var(--accent); border-color: var(--control-border); }
.text-button { padding: .25rem 0; border: 0; background: transparent; color: var(--accent); }
#photos { display: flex; flex-wrap: wrap; gap: .75rem; }
#photos label { margin: 0; font-size: .875rem; }
#photos img { display: block; width: 8rem; height: 6rem; object-fit: contain; border-radius: .4rem; background: var(--media); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (max-width: 42rem) {
  main { width: calc(100% - 2rem); margin-top: 1.25rem; }
  .tabs { gap: 1rem; margin-bottom: 1.25rem; }
  .listing-row { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, auto); gap: .25rem .65rem; padding: .65rem; }
  .thumbnail { grid-row: span 2; width: 3rem; height: 3rem; }
  .listing-row .badges { grid-column: 2; grid-row: 2; }
  .listing-row .price { grid-column: 3; grid-row: 1; max-width: 6rem; }
  .chevron { display: none; }
  #draft-forms { grid-template-columns: minmax(0, 1fr); }
}
