

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;

  overflow-x: clip;
  /* UI chrome (nav, buttons, pills, stat labels, headings) isn't meant to be
     selected - without this, a single click on ordinary display text can
     drop a text-selection caret into it, which reads as a rendering glitch
     ("every text has a blinking cursor"). Re-enabled below on the actual
     content people would want to copy: paragraphs, chat messages, reviews. */
  -webkit-user-select: none;
  user-select: none;
}
p, .chat-msg, .review, input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

h1, h2, h3, h4, .display { font-family: var(--font-display); letter-spacing: -0.015em; margin: 0; }
h1 { font-size: 34px; line-height: 1.12; font-weight: 700; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { color: var(--ink); font-weight: 600; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }


.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.page { padding: 32px 0 72px; }
.page-head { margin-bottom: 24px; }
.page-head p { color: var(--ink-soft); margin: 8px 0 0; max-width: 620px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: 16px; }
.stack > * + * { margin-top: 16px; }
.spacer { flex: 1; }


header.site {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--wrap); margin: 0 auto; padding: 0 20px;
  height: var(--nav-h); display: flex; align-items: center; gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 17px; flex: 0 0 auto; }
.brand .mark { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500;
  color: var(--ink-soft); transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel);
  color: var(--ink); cursor: pointer; position: relative; flex: 0 0 auto;
  transition: border-color .15s ease, background .15s ease;
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot {
  position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--danger); color: #fff;
  font-size: 9.5px; font-weight: 700; line-height: 15px; text-align: center;
}
[data-theme='dark'] .icon-btn .dot { color: #12131a; }
.hamburger { display: none; }

.account { position: relative; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow); padding: 6px; display: none; z-index: 80;
}
.account-menu.open { display: block; }
.account-menu a, .account-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: var(--r-sm); border: none; background: none;
  color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { background: var(--bg-alt); }
.account-menu .sep { height: 1px; background: var(--line); margin: 5px 0; }
.account-menu .head { padding: 9px 11px 4px; }

#mobileNav { display: none; border-top: 1px solid var(--line); background: var(--panel); padding: 8px 20px 14px; }
#mobileNav.open { display: block; }
#mobileNav a { display: block; padding: 11px 4px; font-size: 15px; border-bottom: 1px solid var(--line); }
#mobileNav a:last-child { border-bottom: none; }


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: transform .12s ease, border-color .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 6px 16px rgba(0, 100, 224, .28); }
.btn-primary:hover { opacity: .93; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-ok { border-color: var(--ok); color: var(--ok); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-full { width: 100%; }


.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.panel-flat { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.empty { color: var(--ink-soft); font-size: 14px; padding: 26px 0; text-align: center; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }


label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
input, textarea, select {
  width: 100%; padding: 11px 13px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 14.5px; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea { min-height: 96px; resize: vertical; }
.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1; }
.hint { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

.msg { margin-top: 12px; font-size: 13.5px; display: none; }
.msg.show { display: block; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }

.notice {
  border-radius: var(--r-md); padding: 13px 15px; font-size: 13.5px; line-height: 1.6;
  border: 1px solid var(--line); background: var(--bg-alt);
}
.notice.warn { border-color: var(--warn); background: var(--warn-soft); }
.notice.danger { border-color: var(--danger); background: var(--danger-soft); }
.notice.info { border-color: var(--info); background: var(--info-soft); }
.notice b { color: var(--ink); }


.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600;
  text-transform: capitalize; background: var(--bg-alt); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.pill.active, .pill.completed, .pill.approved { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.held, .pill.pending, .pill.pending_payment, .pill.pending_sale { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.delivered { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill.disputed, .pill.rejected, .pill.failed { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.pill.refunded, .pill.removed, .pill.sold { background: var(--bg-alt); color: var(--ink-soft); }

.badge { position: relative; display: inline-flex; align-items: center; vertical-align: middle; cursor: default; }
.badge svg { display: block; }
.badge::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%) translateY(4px); white-space: nowrap;
  background: var(--invert-bg); color: var(--invert-text);
  font-size: 11px; font-weight: 600; padding: 5px 9px; border-radius: var(--r-sm);
  opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; z-index: 90;
}
.badge:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

.tier {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: var(--r-pill); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.tier-new { background: var(--bg-alt); color: var(--ink-soft); }
.tier-rising { background: var(--info-soft); color: var(--info); }
.tier-trusted { background: var(--ok-soft); color: var(--ok); }
.tier-elite { background: var(--grad); color: #fff; }

.stars { color: #f5a623; letter-spacing: 1px; font-size: 13px; }
.stars .off { color: var(--line-strong); }


.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 14px; }
.lcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.lcard:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.lcard .plate {
  background: var(--plate-bg); padding: 26px 16px; text-align: center; position: relative;
}
.lcard .plate .name {
  font-family: var(--font-plate); font-weight: 700; color: #fff;
  font-size: clamp(20px, 5vw, 30px); letter-spacing: .01em; word-break: break-all;
}
.lcard .fav {
  position: absolute; top: 9px; right: 9px; width: 30px; height: 30px; border-radius: var(--r-pill);
  background: rgba(0, 0, 0, .38); border: none; cursor: pointer; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.lcard .fav svg { width: 15px; height: 15px; }
.lcard .fav.on { color: #ff5470; }
.lcard .body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.lcard .price { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.lcard .seller { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.lcard .len { position: absolute; top: 9px; left: 9px; font-size: 10.5px; color: rgba(255,255,255,.75); letter-spacing: .06em; text-transform: uppercase; }


.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.filters .f { display: flex; flex-direction: column; gap: 5px; }
.filters label { margin: 0; }
.filters input, .filters select { padding: 8px 11px; font-size: 13.5px; }
.filters .f-search { flex: 1 1 240px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-soft); font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip.active { background: var(--invert-bg); color: var(--invert-text); border-color: transparent; }

.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; }


.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.list-row:last-child { border-bottom: none; }
.list-row .rl { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.list-row .rr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px 16px;
}
.stat .n { font-family: var(--font-display); font-size: 23px; font-weight: 700; }
.stat .l { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }


.chat-log {
  height: 340px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-md);
}
.chat-msg { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.chat-msg .meta { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin-bottom: 3px; }
.chat-msg.mine { align-self: flex-end; background: var(--grad); color: #fff; }
.chat-msg.theirs { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); }
.chat-msg.system { align-self: center; background: transparent; color: var(--ink-soft); font-size: 12.5px; text-align: center; max-width: 100%; }
.chat-empty { margin: auto; color: var(--ink-soft); font-size: 13.5px; }
.chat-form { display: flex; gap: 9px; margin-top: 11px; }
.chat-form textarea { min-height: 46px; max-height: 130px; }


.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-step { display: flex; gap: 13px; }
.tl-step .rail { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.tl-step .dot {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--panel); display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--ink-soft);
}
.tl-step .bar { width: 2px; flex: 1; min-height: 22px; background: var(--line); }
.tl-step:last-child .bar { display: none; }
.tl-step .tl-body { padding-bottom: 20px; }
.tl-step .tl-body h4 { font-size: 14.5px; margin: 2px 0 2px; }
.tl-step .tl-body p { font-size: 13px; color: var(--ink-soft); margin: 0; }
.tl-step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-step.done .bar { background: var(--ok); }
.tl-step.current .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.tl-step.bad .dot { background: var(--danger); border-color: var(--danger); color: #fff; }


.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 7, 10, .62); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: modalFade .14s ease both;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 22px; width: 100%; max-width: 440px;
  max-height: calc(100vh - 40px); overflow-y: auto;
  animation: modalRise .16s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes modalRise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.modal-title { font-size: 18px; margin: 0 0 8px; }
.modal-title.danger { color: var(--danger); }
.modal-body p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 4px; }
.modal-box label { margin-top: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.modal-actions .btn { min-width: 96px; }


.modal-choices { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.modal-choices + .btn-ghost { width: 100%; margin-top: 4px; }
.btn.modal-choice {
  flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; padding: 12px 15px; min-width: 0;
}
.btn.modal-choice .cl { font-weight: 600; }
.btn.modal-choice .cd { font-size: 12px; font-weight: 400; opacity: .8; white-space: normal; }

body.modal-open { overflow: hidden; }

@media (max-width: 560px) {
  .modal-box { padding: 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}


.chat-msg .receipt {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; opacity: .75; margin-left: 8px; vertical-align: baseline;
}
.chat-msg .receipt svg { width: 13px; height: 9px; }
.chat-msg.mine .receipt { color: rgba(255, 255, 255, .85); }
.chat-msg .receipt.seen { opacity: 1; }
.chat-meta-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }


.order-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 900px) {
  .order-layout { grid-template-columns: 1fr; }
}


footer.site {
  border-top: 1px solid var(--line); margin-top: 60px; padding: 34px 0;
  color: var(--ink-soft); font-size: 12.5px;
}
footer.site .cols { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 22px; }
footer.site .cols h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink); margin-bottom: 9px; }
footer.site .cols a { display: block; padding: 3px 0; }
footer.site .cols a:hover { color: var(--ink); }
footer.site .fine { line-height: 1.6; max-width: 760px; }

.disclaimer-strip {
  background: var(--bg-alt); border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-soft); text-align: center; padding: 7px 20px;
}



@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: inline-flex; }
  h1 { font-size: 27px; }
  h2 { font-size: 21px; }
  .page { padding: 22px 0 56px; }
  .listing-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; }
  .chat-msg { max-width: 88%; }
  .card { padding: 16px; border-radius: var(--r-md); }
  .chat-log { height: 300px; }
  footer.site .cols { gap: 26px; }
}

@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .wrap, .wrap-narrow { padding: 0 14px; }
  .nav { gap: 10px; padding: 0 14px; }
  .brand { font-size: 15.5px; }
  .brand .mark { width: 22px; height: 22px; }

  
  #favBtn, #msgBtn { display: none !important; }
  .icon-btn { width: 34px; height: 34px; }

  h1 { font-size: 23px; }
  .page-head p { font-size: 13.5px; }

  
  .filters { gap: 8px; }
  .filters .f, .filters .f-search { flex: 1 1 100%; }
  .filters input, .filters select, .filters .btn { width: 100% !important; }

  
  .chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; padding-bottom: 2px;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }

  .listing-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 9px; }
  .lcard .plate { padding: 20px 10px; }
  .lcard .body { padding: 10px 11px 12px; }
  .lcard .price { font-size: 17px; }

  
  .list-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .list-row .rr { width: 100%; justify-content: flex-start; }
  .field-row { flex-direction: column; gap: 0; }
  .field-row .btn { width: 100%; margin-top: 12px; }
  .row-between { align-items: flex-start; }

  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat { padding: 12px 13px; }
  .stat .n { font-size: 19px; }

  .btn { padding: 11px 16px; }
  .col .btn, .card .btn-full { width: 100%; }

  .chat-log { height: 260px; padding: 10px; }
  .chat-msg { max-width: 92%; }
  .chat-form { flex-direction: column; }
  .chat-form .btn { width: 100%; }

  .timeline .tl-step .tl-body { padding-bottom: 16px; }
  footer.site .cols { flex-direction: column; gap: 20px; }
}
