:root {
  --ink: #0e0e10;
  --ink-soft: #4b4b52;
  --line: #e6e6ea;
  --bg: #f6f6f4;
  --card: #ffffff;
  --accent: #e11d48;      /* tattoo crimson */
  --green: #16a34a;
  --radius: 20px;
  --shadow: 0 20px 50px rgba(14, 14, 16, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,246,244,0.85);
  backdrop-filter: blur(12px);
}
.nav__inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; }
.brand__logo { height: 34px; width: auto; display: block; }
.nav__links { display: flex; gap: 26px; font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 14px; }
.curr-toggle { display: flex; background: #ececec; border-radius: 999px; padding: 3px; }
.curr { border: 0; background: transparent; width: 30px; height: 26px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.curr.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.btn {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 14px;
  padding: 11px 20px; border-radius: 999px; transition: transform .1s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { opacity: .9; }
.btn:disabled { cursor: wait; opacity: .6; }
.btn--full { width: 100%; padding: 15px; font-size: 15px; margin-top: 6px; }

/* ===== HERO ===== */
.hero { max-width: 760px; margin: 0 auto; padding: 18px 24px 2px; text-align: center; }
.live-pill { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.live-stat { display: inline-flex; align-items: center; gap: 7px; }
.live-pill .dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
.live-pill .dot--blue { background: #3867f5; animation: none; }
.live-pill .live-count { font-size: 18px; line-height: 1; }
.live-pill .live-count--green { color: var(--green); }
.live-pill .live-count--blue { color: #3867f5; }
.live-pill a { color: #3867f5; font-weight: 700; text-decoration: none; }
.live-pill a:hover { color: #234dd4; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.hero__title { font-size: clamp(26px, 4vw, 42px); font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.ink { position: relative; color: var(--accent); }
.ink::after { content:""; position:absolute; left:-2%; right:-2%; bottom:8%; height:16%; background: rgba(225,29,72,.18); border-radius: 4px; z-index:-1; }
.hero__sub { margin: 10px auto 0; max-width: 460px; color: var(--ink-soft); font-size: 15px; line-height: 1.45; }

/* ===== 3D STAGE ===== */
.stage-wrap { display: grid; place-items: center; padding: 0 16px; }
.stage3d {
  position: relative;
  width: min(560px, 92vw);
  aspect-ratio: 1/1;
  max-height: 58vh;
}
#faceCanvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#faceCanvas:active { cursor: grabbing; }

.loader {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--ink-soft); font-size: 14px; font-weight: 500;
}
.loader[hidden] { display: none; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.drag-hint { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--ink-soft); pointer-events: none; opacity: .7; }

/* invisible hover zones over each tattoo — price pill appears on hover only */
.spots { position: absolute; inset: 0; pointer-events: none; }
.spot {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: pointer;
  width: 58px; height: 48px;
  background: none; border: 0; padding: 0;
  display: grid; place-items: center;
  transition: opacity .18s ease;
}
/* the visible price pill — hidden until hover */
.spot__pill {
  position: absolute; bottom: 100%; left: 50%;
  transform: translate(-50%, 4px) scale(.9);
  transform-origin: bottom center;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.96);
  border: 1.5px solid var(--accent);
  border-radius: 999px; padding: 5px 11px 5px 9px;
  box-shadow: 0 6px 18px rgba(14,14,16,.18);
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.spot__pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none;
}
.spot:hover .spot__pill { opacity: 1; transform: translate(-50%, 0) scale(1); }
.spot__label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.spot__price { font-size: 13px; font-weight: 800; color: var(--ink); }

/* final-ink view: borders come off the tattoos (handled in canvas),
   but hover price pills still work — so nothing to hide here. */

/* ===== UNDER FACE ===== */
.under-face { max-width: 460px; margin: 0 auto; padding: 6px 24px 10px; }
.progress { max-width: 440px; margin: 16px auto 0; text-align: left; }
.progress__top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--ink-soft); }
.raised b { font-size: 22px; color: var(--ink); font-weight: 800; }
.green { color: var(--green); }
.bar { height: 8px; background: #e6e6ea; border-radius: 999px; margin: 10px 0; overflow: hidden; }
.bar__fill { height: 100%; background: linear-gradient(90deg, var(--accent), #f43f5e); border-radius: 999px; }
.progress__note { font-size: 13px; color: var(--ink-soft); }

.view-toggle { display: flex; justify-content: center; gap: 4px; margin: 22px auto 0; background:#ececec; padding:4px; border-radius:999px; width:max-content; }
.vt { border:0; background:transparent; padding:8px 20px; border-radius:999px; cursor:pointer; font-weight:600; font-size:13px; color:var(--ink-soft); font-family:inherit; }
.vt.active { background:#fff; color:var(--ink); box-shadow:0 1px 3px rgba(0,0,0,.12); }

.hero__meta { margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.hero__meta b { color: var(--ink); }

/* ===== BIDDERS TABLE ===== */
.auction { max-width: 860px; margin: 30px auto 0; padding: 40px 24px 10px; }
.auction__title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.auction__sub { margin-top: 8px; color: var(--ink-soft); font-size: 15px; }

.table {
  margin-top: 22px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.table__head, .table__row {
  display: grid; grid-template-columns: 1.6fr .7fr 1.2fr 1fr auto;
  align-items: center; gap: 14px; padding: 14px 20px;
}
.table__head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-weight: 600; border-bottom: 1px solid var(--line); }
.table__row { border-bottom: 1px solid var(--line); }
.table__row:last-child { border-bottom: 0; }
.table__row:hover { background: #fafafa; }
.t-spot { font-weight: 600; font-size: 15px; }
.badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #f0f0f0; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.t-held b { font-weight: 800; }
.t-open { color: var(--ink-soft); font-size: 14px; }
.t-bid { display: flex; flex-direction: column; line-height: 1.2; }
.t-bid b { font-size: 16px; font-weight: 800; }
.t-bid small { color: var(--ink-soft); font-size: 12px; }
.btn-outbid {
  border: 1.5px solid var(--accent); color: var(--accent); background: #fff;
  border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: 13px; cursor: pointer;
  font-family: inherit; transition: background .15s, color .15s;
}
.btn-outbid:hover { background: var(--accent); color: #fff; }

/* ===== FAQ ===== */
.faq { max-width: 780px; margin: 50px auto 0; padding: 20px 24px 20px; }
.faq__title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 18px 4px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 17px; font-weight: 600;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__x { color: var(--ink-soft); font-size: 22px; font-weight: 400; transition: transform .2s; }
.faq__item[open] .faq__x { transform: rotate(45deg); }
.faq__item p { padding: 0 4px 20px; color: var(--ink-soft); font-size: 15px; line-height: 1.55; max-width: 620px; }
.disclaimer { margin-top:24px; font-size:13px; color:var(--ink-soft); font-style:italic; text-align:center; }

/* ===== MODAL ===== */
.modal { position: fixed; inset:0; z-index:100; display:grid; place-items:center; }
.modal[hidden] { display:none; }
.modal__backdrop { position:absolute; inset:0; background:rgba(14,14,16,.5); backdrop-filter:blur(3px); }
.modal__card { position:relative; background:#fff; width:min(420px,92vw); border-radius:24px; padding:30px; box-shadow:0 30px 80px rgba(0,0,0,.3); }
.modal__x { position:absolute; top:16px; right:18px; border:0; background:none; font-size:26px; cursor:pointer; color:var(--ink-soft); line-height:1; }
.modal__eyebrow { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--accent); }
.modal__title { font-size:26px; font-weight:800; margin:6px 0 4px; }
.modal__current { font-size:14px; color:var(--ink-soft); margin-bottom:20px; }
.modal__current b { color:var(--ink); }
.bid-adjuster { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fafafa; }
.bid-adjuster button { height: 54px; border: 0; background: #fff; color: var(--accent); cursor: pointer; font: 800 24px/1 Inter, system-ui, sans-serif; }
.bid-adjuster button:hover { background: #fff1f3; }
.bid-adjuster button:disabled { color: #b8b8be; background: #fff; cursor: not-allowed; opacity: 1; }
.bid-adjuster output { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.bid-step { margin: 8px 0 18px; color: var(--ink-soft); font-size: 12px; text-align: center; }
.field { display:block; margin-bottom:16px; }
.field span { display:block; font-size:13px; font-weight:600; margin-bottom:6px; }
.field input { width:100%; padding:13px 14px; border:1px solid var(--line); border-radius:12px; font-family:inherit; font-size:15px; }
.field input:focus { outline:none; border-color:var(--ink); }
.field em { color: var(--ink-soft); font-size: 11px; font-style: normal; font-weight: 500; }
.field input[type="file"] { padding: 10px; font-size: 12px; }
.money { display:flex; align-items:center; border:1px solid var(--line); border-radius:12px; padding-left:14px; }
.money span { font-weight:700; color:var(--ink-soft); }
.money input { border:0; padding:13px 10px; width:100%; }
.money input:focus { outline:none; }
.money:focus-within { border-color:var(--ink); }
.modal__fine { font-size:12px; color:var(--ink-soft); margin-top:14px; text-align:center; line-height:1.4; }
.modal__notice { min-height: 18px; margin-top: 10px; color: var(--accent); font-size: 12px; line-height: 1.35; text-align: center; }
.check { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.check input { margin-top: 2px; accent-color: var(--accent); }
.check a, .footer a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ===== FOOTER ===== */
.footer { text-align:center; padding:40px 24px 60px; font-size:13px; color:var(--ink-soft); }
.footer__logo { height: 42px; width: auto; opacity: .8; margin-bottom: 14px; }
.footer p + p { margin-top: 8px; }

.success-page, .legal-page { width: min(720px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 90px; }
.success-card, .legal-page article { margin-top: 42px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(28px, 6vw, 54px); }
.success-card h1, .legal-page h1 { margin-top: 7px; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.04em; }
.success-card p { margin: 14px 0 26px; color: var(--ink-soft); line-height: 1.55; }
.legal-page article > p { color: var(--ink-soft); line-height: 1.65; }
.legal-page h2 { margin: 30px 0 8px; font-size: 20px; letter-spacing: -.02em; }
.legal-page h2 + p { color: var(--ink-soft); line-height: 1.65; }
.legal-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
  .nav__links { display:none; }
}
@media (max-width: 640px) {
  .table__head { display: none; }
  .table__row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "spot act" "held bid" "size bid";
    row-gap: 4px;
  }
  .t-spot { grid-area: spot; }
  .t-size { grid-area: size; }
  .t-held { grid-area: held; }
  .t-bid { grid-area: bid; align-items: flex-end; }
  .t-act { grid-area: act; }
}

/* ===== PLACEMENT EDITOR (#edit) ===== */
#editPanel {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  width: 300px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.18);
  font-size: 13px;
}
#editPanel .ep__row { margin-bottom: 8px; }
#editPanel select { width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; }
#editPanel .ep__hint { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
#editPanel kbd { background: #eee; border-radius: 4px; padding: 1px 5px; font-family: monospace; }
#editPanel textarea { width: 100%; height: 180px; font-family: monospace; font-size: 11px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; resize: vertical; }
#editPanel #epCopy { width: 100%; margin-top: 8px; padding: 8px; border: 0; background: var(--ink); color: #fff; border-radius: 8px; cursor: pointer; font-weight: 600; }

/* selected spot highlight in edit mode */
.spot.editing .spot__pill { opacity: 1; transform: translate(-50%, 0) scale(1); border-color: #16a34a; }
.spot.editing::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 14px; height: 14px; transform: translate(-50%,-50%);
  border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.3);
}
