*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root {
  --bg: #0b0c0f;
  --ink: #f3efe6;
  --muted: #b7b0a4;
  --faint: rgba(243, 239, 230, 0.16);
  --brass: #c6a36a;
  --jade: #9dcfc4;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", sans-serif;
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(420px 280px at 10% -8%, rgba(198, 163, 106, 0.2), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 8;
  opacity: 0.16;
  mix-blend-mode: overlay;
}
.grain svg { width: 100%; height: 100%; }

#app {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  overflow-x: hidden;
}

h1, h2, h3, .price, .export strong {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
}
h1 { font-size: 2.15rem; line-height: 1.05; }
.kicker, .eyebrow {
  margin: 0;
  color: var(--brass);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gate {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}
.gate-copy h1 { margin: 10px 0 8px; }
.gate-copy .en, .lead { margin: 0 0 10px; color: var(--muted); }
.lead.dim { color: #8d877c; }
.gate-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.search, .form input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--faint);
  background: rgba(0, 0, 0, 0.28);
  font-size: 16px;
}
.regions { display: grid; gap: 16px; min-width: 0; }
.region h2 { margin: 0 0 8px; font-size: 1rem; color: var(--brass); }
.country {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid var(--faint);
  text-align: start;
}
.country.on { border-color: var(--brass); background: rgba(198, 163, 106, 0.12); }
.iso {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #1b140c;
  color: var(--brass);
  font-size: 0.8rem;
}
.country strong, .country em { display: block; font-style: normal; }
.country em { color: var(--muted); font-size: 0.85rem; }
.cur { color: var(--jade); }
.enter, .form button {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #e6c48a, #b58848);
  color: #1b140c;
  font-weight: 650;
}
.enter { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); }
.enter:disabled { opacity: 0.45; }

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
}
.word { font-family: var(--serif); letter-spacing: 0.14em; }
.crumbs {
  display: flex;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  color: var(--muted);
  font-size: 0.92rem;
}
.pill {
  margin-inline-start: auto;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--faint);
}
.wrap { padding: 8px 16px 28px; }
.intro { margin-bottom: 16px; }
.intro p, .note, .aside, .foot, .basis { color: var(--muted); }
.foot {
  padding: 8px 16px calc(28px + env(safe-area-inset-bottom));
  font-size: 0.85rem;
}

.brand-grid, .doors, .lineup, .detail { display: grid; gap: 16px; }
.slab, .door, .car, .sheet, .frame {
  border-radius: 22px;
  border: 1px solid rgba(230, 196, 138, 0.22);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.slab-face { display: flex; flex-direction: column; min-height: 100%; background: #14120f; }
.slab-face img, .plinth img, .frame img, .door-plate img { width: 100%; object-fit: cover; }
.slab-face img { height: 190px; }
.slab-copy, .car-copy, .sheet, .door { padding: 14px 14px 16px; }
.door {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 168px;
  position: relative;
  padding-top: 188px;
}
.door.bev { background: linear-gradient(160deg, #24312f, #101614 58%, #0c0d10); }
.door.hybrid { background: linear-gradient(200deg, #3a2c1c, #16130f 60%, #0c0d10); }
.door-plate {
  position: absolute;
  inset: 12px 12px auto 12px;
  height: 164px;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(230, 196, 138, 0.5);
}
.door-plate img { height: 100%; object-fit: contain; background: #121410; }
.door-plate figcaption {
  position: absolute;
  inset-inline-start: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 12, 15, 0.82);
  font-size: 0.8rem;
}
.door span { color: var(--brass); letter-spacing: 0.14em; }
.door h2, .sheet h1 { margin: 6px 0; font-size: 2rem; }
.door strong { color: var(--jade); }
.rank { color: var(--brass); font-size: 0.75rem; letter-spacing: 0.12em; }
.slab h2 { margin: 6px 0; font-size: 1.7rem; }
.slab h2 em, .car h3 span, .latin { font-style: normal; color: var(--muted); font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0; }
.export { margin: 0; color: var(--jade); }
.export strong { font-size: 1.25rem; color: var(--ink); margin-inline-end: 6px; }
.note { margin: 8px 0 0; font-size: 0.92rem; }

.plinth { background: #101114; }
.plinth img { height: 200px; }
.car h3 { margin: 0; font-size: 1.45rem; }
.price { margin: 10px 0 4px; font-size: 1.7rem; }
.kind { color: var(--jade); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.basis, .aside { margin: 6px 0 0; font-size: 0.92rem; }

.frame img { height: 62vw; max-height: 280px; background: #111; }
.frame figcaption { padding: 8px 12px 12px; color: var(--muted); font-size: 0.8rem; }
.tools, .thumbs { display: flex; gap: 8px; max-width: 100%; }
.tools { flex-wrap: wrap; margin: 12px 0; }
.thumbs { overflow-x: auto; padding-bottom: 8px; }
.chip, .thumbs button, .light button, .ghost {
  min-height: 44px;
  min-width: 44px;
}
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--faint);
  color: var(--muted);
}
.chip.on { color: #1b140c; background: var(--brass); border-color: var(--brass); }
.thumbs button { padding: 0; border-radius: 12px; overflow: hidden; border: 1px solid transparent; flex: 0 0 84px; }
.thumbs img { width: 84px; height: 64px; object-fit: cover; }
.thumbs .on { border-color: var(--brass); }
.sheet { padding: 16px; background: rgba(255, 255, 255, 0.03); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.spec { min-width: 0; padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--faint); }
.spec span { display: block; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.spec strong { display: block; margin-top: 4px; font-weight: 560; }
.form { display: grid; gap: 10px; }
.credits { margin-top: 14px; }
.credits summary { min-height: 44px; color: var(--brass); }
.credits li { margin: 8px 0; color: var(--muted); font-size: 0.82rem; }
.credits a { text-decoration: underline; }

.light {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(5, 5, 7, 0.94);
}
.light header, .light footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.light img { width: 100%; height: 100%; object-fit: contain; }
.light button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--faint); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
