:root {
  --bg: #F5F3EF;
  --surface: #FFFFFF;
  --surface-2: #FAF8F5;
  --ink: #161514;
  --ink-2: #4A4743;
  --muted: #8A8580;
  --line: #E8E3DC;
  --line-2: #D9D3CA;
  --accent: #E8792B;
  --accent-2: #F5A24B;
  --accent-ink: #B85A16;
  --accent-soft: #FDF1E7;
  --ok: #2E8B57;
  --ok-soft: #E8F5EE;
  --warn: #B7791F;
  --warn-soft: #FBF3E0;
  --bad: #C0392B;
  --bad-soft: #FBEAE7;
  --hero: #121110;
  --radius: 20px;
  --radius-s: 14px;
  --shadow: 0 1px 2px rgba(20, 16, 10, .04), 0 18px 44px -24px rgba(20, 16, 10, .22);
  --font: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
input, textarea { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
@media (min-width: 768px) { .wrap { width: min(1080px, 100% - 64px); } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero);
  color: #fff;
  padding-bottom: 112px;
}
.hero::before {
  content: "";
  position: absolute;
  right: -12%;
  top: -30%;
  width: 64vw;
  max-width: 760px;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(232, 121, 43, .34), rgba(232, 121, 43, 0));
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 85%);
  pointer-events: none;
}
.hero > .wrap { position: relative; z-index: 3; }
.hero--compact .hero-body { padding-top: 28px; }
@media (max-width: 479px) {
  .brand span { display: none; }
  .topbar-right { gap: 2px; }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand b { color: var(--accent-2); font-weight: 700; }
.brand span {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .62);
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .22);
}
.topbar-right { position: relative; display: flex; align-items: center; gap: 6px; }
.nav-link {
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  font-size: 14px;
  padding: 9px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  max-width: 44vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .2s;
}
.nav-user:hover { background: rgba(255, 255, 255, .16); }
.nav-user .avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff; font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center; flex: none;
}
.pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 168px;
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 8px 30px -8px rgba(20, 16, 10, .35), 0 0 0 1px var(--line);
  z-index: 30;
  animation: pop .18s ease;
}
.pop a, .pop button {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  font-size: 14px; text-decoration: none; cursor: pointer;
}
.pop a:hover, .pop button:hover { background: var(--surface-2); }
.pop .pop-name { padding: 8px 12px 4px; font-size: 12px; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.hero-body { padding: 44px 0 0; }
.eyebrow { font-size: 13px; letter-spacing: .22em; color: var(--accent-2); font-weight: 500; }
h1 {
  margin: 8px 0 22px;
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .01em;
}
.steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 10px 28px; flex-wrap: wrap;
  color: rgba(255, 255, 255, .55); font-size: 14px;
}
.steps li { display: flex; align-items: center; gap: 8px; }
.steps .num { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: rgba(255, 255, 255, .4); }
.steps li.is-current { color: #fff; }
.steps li.is-current .num { color: var(--accent-2); }

/* ---------- main ---------- */
.main {
  position: relative; z-index: 2;
  margin-top: -84px;
  display: grid; gap: 20px;
  padding-bottom: 56px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-head h2 { margin: 0; font-size: 22px; font-weight: 700; }
.step-tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 999px; padding: 4px 10px;
}

/* ---------- search bar ---------- */
.search-card { padding: 10px; }
.bar {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
  grid-template-areas: "brand" "model" "year" "vin" "part" "go";
}
.seg-brand { grid-area: brand; }
.seg-model { grid-area: model; }
.seg-year { grid-area: year; }
.seg-vin { grid-area: vin; }
.seg-part { grid-area: part; }
.go { grid-area: go; }
@media (min-width: 640px) {
  .bar {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-areas: "brand brand model model" "year vin vin vin" "part part part go";
  }
  .go { min-width: 0; }
}
@media (min-width: 1024px) {
  .bar {
    gap: 0;
    grid-template-columns: 1.1fr 1.1fr .55fr 1.95fr 1.15fr auto;
    grid-template-areas: "brand model year vin part go";
    align-items: stretch;
  }
  .go { justify-self: stretch; align-self: center; min-width: 0; min-height: 52px; margin-left: 6px; padding: 0 24px; }
}
.seg {
  position: relative;
  padding: 12px 18px 10px;
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background .18s, box-shadow .18s;
}
@media (min-width: 1024px) {
  .seg { background: transparent; box-shadow: none; }
}
.seg label {
  display: block;
  font-size: 12px; font-weight: 500; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 1px;
  cursor: text;
}
.seg input {
  width: 100%; min-height: 30px;
  border: 0; outline: 0; background: transparent; padding: 0;
  font-size: 17px; color: var(--ink);
}
.seg:hover { background: var(--surface-2); }
.seg:focus-within { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--accent); }
.seg.is-error { box-shadow: inset 0 0 0 2px var(--bad); }
.seg.is-error label { color: var(--bad); }
@media (min-width: 1024px) {
  .seg:not(.seg-brand)::before {
    content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px;
    background: var(--line);
  }
  .seg:focus-within::before, .seg:hover::before { display: none; }
}
.seg-row { display: flex; align-items: center; gap: 8px; }
.seg-row input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 16px; letter-spacing: .03em; }
.attach {
  flex: none;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer;
  white-space: nowrap; transition: background .18s, border-color .18s;
}
.attach:hover { border-color: var(--ink); color: var(--ink); }
.attach.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

.suggest {
  position: absolute; left: 8px; right: 8px; top: calc(100% + 6px);
  background: #fff; border-radius: 14px; padding: 6px;
  box-shadow: 0 10px 34px -10px rgba(20, 16, 10, .35), 0 0 0 1px var(--line);
  z-index: 25; max-height: 280px; overflow: auto;
}
.suggest button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left; padding: 9px 12px; border-radius: 10px; border: 0; background: none;
  font-size: 15px; cursor: pointer;
}
.suggest button small { color: var(--muted); font-size: 12px; }
.suggest button:hover, .suggest button.is-active { background: var(--surface-2); }

.go {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff; font-size: 17px; font-weight: 700; letter-spacing: .06em;
  box-shadow: 0 10px 24px -12px rgba(232, 121, 43, .8);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.go .go-icon { font-size: 22px; line-height: 1; font-weight: 400; }
.go:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 14px 30px -12px rgba(232, 121, 43, .9); }
.go:active { transform: translateY(0); }
.go[disabled] { opacity: .7; cursor: progress; transform: none; }

.bar-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 8px 4px;
}
.quota { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.quota .dots { display: inline-flex; gap: 4px; }
.quota .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.quota .dots i.on { background: var(--accent); }
.quota.is-out { color: var(--bad); }
.vin-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 4px;
}
.vin-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.vin-chip button {
  border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 50%;
}
.vin-chip button:hover { color: var(--bad); background: var(--bad-soft); }

/* ---------- result ---------- */
.result { padding: 26px 26px 22px; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.result-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: .1em; color: var(--ink-2); }
.result-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.result-kicker .dot.is-demo { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.result-kicker .dot.is-off { background: var(--muted); box-shadow: 0 0 0 4px var(--line); }
.badge {
  font-size: 12px; font-weight: 500; letter-spacing: .06em;
  border-radius: 999px; padding: 3px 10px;
  background: var(--warn-soft); color: var(--warn);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.result-time { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.result-title { font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; line-height: 1.25; }
.result-title .year { color: var(--muted); font-weight: 500; margin-left: 8px; font-size: .78em; }
.result-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 20px; font-size: 17px; color: var(--ink-2); }
.vin-tag {
  font-family: var(--mono); font-size: 13px; letter-spacing: .06em;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; color: var(--ink-2);
}
.result-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .result-grid { grid-template-columns: 1fr 1fr 1fr; gap: 16px; } .result-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.rcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px; min-height: 140px; }
.rlabel { font-size: 12px; letter-spacing: .1em; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.pn-list { display: grid; gap: 8px; }
.pn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--mono); font-size: 17px; letter-spacing: .03em;
  background: #fff; border: 1px dashed var(--line-2); border-radius: 10px; padding: 9px 12px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.pn small { font-family: var(--font); font-size: 12px; color: var(--muted); letter-spacing: 0; }
.pn:hover { border-color: var(--accent); background: var(--accent-soft); }
.pn.is-copied { border-color: var(--ok); background: var(--ok-soft); }
.pn.is-copied small { color: var(--ok); }
.empty { color: var(--muted); font-size: 14px; }
.hint { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px;
  transition: border-color .15s, background .15s;
}
.chip-link:hover { border-color: var(--ink); }
.pic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pic { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
span.pic:hover img { transform: none; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.pic:hover img { transform: scale(1.04); }
.result-desc { margin: 18px 0 0; font-size: 15px; }
.result-note { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); padding-left: 14px; border-left: 2px solid var(--accent-2); }
.result-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.fine { font-size: 13px; color: var(--muted); }
.result-state { text-align: center; padding: 26px 10px 10px; }
.result-state .big { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.result-state p { margin: 0 0 18px; color: var(--ink-2); }
.sk { background: linear-gradient(90deg, #ECE8E2 25%, #F6F3EE 37%, #ECE8E2 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- rules ---------- */
.rules { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 4px 6px; }
@media (min-width: 768px) { .rules { grid-template-columns: 1fr 1fr 1fr; gap: 16px; } }
.rule { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.rule .num { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--accent-ink); padding-top: 4px; flex: none; }
.rule p { margin: 0; }

/* ---------- rfq ---------- */
.rfq { padding: 26px; }
.choices { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .choices { grid-template-columns: 1fr 1fr 1fr; gap: 12px; } }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice-box {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px; border: 1.5px solid var(--line-2); border-radius: var(--radius-s);
  cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
  font-weight: 500;
}
.choice-box:hover { border-color: var(--ink); }
.choice-mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; transition: all .15s; }
.choice input:checked + .choice-box { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(232, 121, 43, .14); }
.choice input:checked + .choice-box .choice-mark { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px #fff; }
.choice input:focus-visible + .choice-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.choices.is-error .choice-box { border-color: var(--bad); }

.field-row { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 18px 0 0; margin-top: 18px; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .field-row { grid-template-columns: 132px 1fr; gap: 16px; align-items: start; } }
.field-label { font-size: 14px; font-weight: 500; color: var(--ink-2); padding-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-2); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.photos { display: flex; flex-wrap: wrap; gap: 10px; }
.photo { position: relative; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.is-busy::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .55); }
.photo-x {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: rgba(22, 21, 20, .8); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
}
.photo-add {
  width: 88px; height: 88px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: transparent;
  color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; transition: border-color .15s, color .15s;
}
.photo-add:hover { border-color: var(--ink); color: var(--ink); }
.rfq textarea {
  width: 100%; min-height: 92px; resize: vertical;
  border: 1.5px solid var(--line-2); border-radius: 12px; padding: 12px 14px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.rfq textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 121, 43, .14); }
.rfq-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.rfq-summary {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 18px;
  font-size: 14px; color: var(--ink-2);
}
.rfq-summary b { color: var(--ink); font-weight: 500; }
.rfq-summary .vin-tag { font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #000; }
.btn.accent { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -12px rgba(232, 121, 43, .8); }
.btn.accent:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

.ticket {
  margin-top: 22px; border-radius: var(--radius-s);
  background: var(--hero); color: #fff; padding: 22px;
  display: grid; grid-template-columns: 1fr; gap: 18px;
  animation: rise .35s ease;
}
@media (min-width: 768px) { .ticket { grid-template-columns: auto 1fr; gap: 28px; padding: 26px 28px; align-items: center; } }
.ticket-no { font-family: var(--mono); font-size: clamp(34px, 6vw, 46px); font-weight: 600; letter-spacing: .06em; color: var(--accent-2); line-height: 1; }
.ticket-label { font-size: 12px; letter-spacing: .18em; color: rgba(255, 255, 255, .55); margin-bottom: 8px; }
.ticket-meta { font-size: 13px; color: rgba(255, 255, 255, .6); margin-top: 10px; font-family: var(--mono); }
.timeline { display: grid; gap: 10px; }
.timeline div { display: flex; gap: 12px; align-items: baseline; font-size: 15px; }
.timeline .num { font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .45); letter-spacing: .1em; flex: none; }
.timeline .is-done { color: var(--accent-2); }
.timeline .is-done .num { color: var(--accent-2); }
.ticket-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ticket .btn { border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; }
.ticket .btn:hover { background: rgba(255, 255, 255, .16); }
.ticket .btn.accent { border-color: transparent; }

/* ---------- contact ---------- */
.contact { padding: 26px; display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .contact { grid-template-columns: 1fr auto; gap: 28px; align-items: center; } }
.contact-label { font-size: 12px; letter-spacing: .18em; color: var(--muted); font-weight: 500; }
.contact-id { font-family: var(--mono); font-size: clamp(28px, 5vw, 38px); font-weight: 600; letter-spacing: .05em; line-height: 1.2; margin: 6px 0 14px; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-qr { width: 132px; height: 132px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; justify-self: start; }
@media (min-width: 768px) { .contact-qr { justify-self: end; } }
.contact-qr svg { width: 100%; height: 100%; display: block; }
.notes { grid-column: 1 / -1; width: 100%; border-collapse: collapse; margin-top: 4px; }
.notes th { width: 84px; text-align: left; vertical-align: top; font-weight: 500; color: var(--muted); padding: 12px 12px 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.notes td { padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }

/* ---------- my inquiries ---------- */
.inq { padding: 22px 24px; display: grid; gap: 14px; }
.inq-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inq-no { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: .06em; }
.pill { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 500; letter-spacing: .06em; border-radius: 999px; padding: 4px 10px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill.new { background: var(--surface-2); }
.pill.sent { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.quoted { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill.selected { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.closed { background: var(--line); color: var(--ink-2); border-color: transparent; }
.inq-date { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.inq-car { font-size: 18px; font-weight: 700; }
.inq-car .year { color: var(--muted); font-weight: 500; font-size: .85em; margin-left: 6px; }
.inq-part { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 15px; color: var(--ink-2); }
.inq-part b { color: var(--ink); font-weight: 500; }
.inq-pics { display: flex; gap: 8px; flex-wrap: wrap; }
.inq-pics a { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); display: block; }
.inq-pics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quotes { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.quotes-label { font-size: 12px; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
.quote {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.quote.is-selected { border-color: var(--ok); background: var(--ok-soft); }
.quote-seller { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quote-code { font-family: var(--mono); font-weight: 600; letter-spacing: .06em; }
.quote-type { font-size: 12px; border-radius: 999px; padding: 2px 9px; background: #fff; border: 1px solid var(--line-2); color: var(--ink-2); }
.quote-memo { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.quote-price { font-family: var(--mono); font-size: 20px; font-weight: 600; white-space: nowrap; }
.quote-price small { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 400; margin-right: 4px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.check-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2); background: #fff; display: inline-grid; place-items: center; transition: all .15s; flex: none; }
.check-box::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); opacity: 0; }
.check input:checked + .check-box { background: var(--ok); border-color: var(--ok); }
.check input:checked + .check-box::after { opacity: 1; }
.check input:focus-visible + .check-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check:has(input:disabled) { cursor: default; color: var(--muted); }
.check input:disabled + .check-box { opacity: .5; }
.quote-select { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
@media (min-width: 640px) {
  .quote { grid-template-columns: 1fr auto auto; }
  .quote-memo { grid-column: 1 / 2; grid-row: 2; }
  .quote-select { grid-column: auto; grid-row: 1 / 3; }
}
.empty-card { padding: 40px 24px; text-align: center; color: var(--ink-2); display: grid; gap: 14px; justify-items: center; }
.empty-card .big { font-size: 20px; font-weight: 700; color: var(--ink); }

/* ---------- sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(18, 17, 16, .55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease;
}
@media (min-width: 640px) { .sheet-backdrop { align-items: center; padding: 20px; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: relative; width: 100%; max-width: 440px;
  background: #fff; color: var(--ink);
  border-radius: 24px 24px 0 0; padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  animation: up .3s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
}
@media (min-width: 640px) { .sheet { border-radius: 24px; padding: 30px 28px; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 18px; font-size: 22px; }
.sheet-close {
  position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--surface-2); font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-2);
}
.sheet-close:hover { background: var(--line); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: .04em; }
.field input {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 17px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 121, 43, .14); }
.field.is-error input { border-color: var(--bad); }
.sheet .btn { margin-top: 6px; min-height: 52px; font-size: 16px; }

/* ---------- terms ---------- */
.agree { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 6px; }
.agree.is-error .check-box { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; font-size: 14px; }
.link-btn:hover { color: var(--accent); }
.sheet--wide { max-width: 680px; }
.terms-body { max-height: 58vh; overflow: auto; padding: 12px 8px 12px 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.terms-body h4 { margin: 18px 0 6px; font-size: 15px; color: var(--ink); }
.terms-body h4:first-child { margin-top: 0; }
.terms-body p { margin: 0 0 8px; }
.terms-body p.num { display: grid; grid-template-columns: 2.4em 1fr; column-gap: 8px; }
.terms-body p.num b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.terms-body p.cont { padding-left: calc(2.4em + 8px); }
.terms-body p.sub { padding-left: 3em; text-indent: -3em; }
.terms-body p.sub.cont { padding-left: calc(2.4em + 8px + 3em); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 60; max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; font-size: 14px;
  padding: 12px 18px; border-radius: 999px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
  pointer-events: none;
  animation: toast .25s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.is-bad { background: var(--bad); }
.toast.is-ok { background: var(--ok); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- footer ---------- */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 0 40px; font-size: 13px; color: var(--muted);
}
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- guide ---------- */
.steps--links a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.steps--links a:hover { color: #fff; }
.gsec { padding: 26px; scroll-margin-top: 16px; }
.gsec .card-head { margin-bottom: 20px; }
.gsec .card-head h2 { font-size: 20px; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tl li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.tl li::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: -14px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 14px; font-weight: 600; flex: none; }
.tl p { margin: 0; padding: 6px 0 4px; font-size: 15px; color: var(--ink-2); }
.tl p b { color: var(--ink); font-weight: 600; }
.tl mark { background: var(--accent-soft); color: var(--accent-ink); padding: 1px 4px; border-radius: 4px; }
.callout { margin-top: 22px; padding: 18px 20px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); }
.callout--accent { background: var(--accent-soft); border-color: transparent; }
.callout--accent p { margin: 0; color: var(--accent-ink); font-size: 15px; }
.callout-title { font-size: 13px; letter-spacing: .12em; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.callout--accent .callout-title { color: var(--accent-ink); }
.nlist { margin: 0; padding: 0 0 0 22px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.nlist--wide { margin-top: 22px; font-size: 15px; gap: 8px; }
.nlist li::marker { font-family: var(--mono); color: var(--accent-ink); font-weight: 600; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.flow li { position: relative; padding: 16px 16px 16px 18px; border: 1.5px solid var(--line-2); border-radius: var(--radius-s); background: #fff; }
.flow li:not(:last-child)::after { content: "↓"; position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); width: 24px; height: 18px; text-align: center; font-size: 13px; color: var(--accent); background: var(--surface); line-height: 18px; z-index: 1; }
.flow-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.flow p { margin: 0; font-size: 14px; color: var(--ink-2); }
.flow li:last-child { background: var(--ok-soft); border-color: transparent; }
.flow li:last-child .flow-n { background: var(--ok); }
.flow li:last-child p { color: var(--ok); font-weight: 500; }
@media (min-width: 900px) {
  .flow { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .flow li:not(:last-child)::after { content: "→"; left: auto; right: -14px; top: 50%; bottom: auto; transform: translateY(-50%); width: 14px; }
}
.guide .links { margin-top: 20px; }
.promo { margin-top: 24px; padding: 24px; border-radius: var(--radius-s); background: var(--hero); color: #fff; }
.promo-title { font-size: 22px; font-weight: 700; color: var(--accent-2); }
.promo-lead { margin: 6px 0 14px; color: rgba(255, 255, 255, .75); font-size: 15px; }
.promo-notes th { color: rgba(255, 255, 255, .55); border-top-color: rgba(255, 255, 255, .12); }
.promo-notes td { color: rgba(255, 255, 255, .88); border-top-color: rgba(255, 255, 255, .12); }
.lead { margin: 0 0 18px; font-size: 15px; color: var(--ink-2); }
.risks { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .risks { grid-template-columns: 1fr 1fr; } }
.risk { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius-s); background: var(--bad-soft); }
.risk-n { width: 30px; height: 30px; border-radius: 50%; background: var(--bad); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 13px; flex: none; }
.risk p { margin: 0; font-size: 15px; color: var(--ink); }
.assure { margin-top: 14px; padding: 22px; border-radius: var(--radius-s); background: var(--ok-soft); }
.assure-title { font-weight: 700; color: var(--ok); margin-bottom: 6px; }
.assure p { margin: 0; font-size: 15px; color: var(--ink-2); }
.nav-link--guide { display: none; }
@media (min-width: 640px) { .nav-link--guide { display: inline-block; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
