@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ground: #ffffff;
  --well: #f5f5f7;
  --well-2: #ececf0;
  --line: #e3e3e8;
  --ink: #1d1d1f;
  --ink-2: #55555c;
  --ink-3: #6e6e73;
  --blue: #0a66ff;
  --blue-press: #0052d6;
  --blue-wash: #eaf2ff;
  --green: #138a4f;
  --green-bright: #1fb26a;
  --green-wash: #e7f6ee;
  --red: #c4271b;
  --red-wash: #fdeeec;
  --amber: #a15c00;
  --amber-wash: #fff4e0;
  --bubble-owner: #e9e9eb;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-lift: 0 1px 2px rgb(16 24 40 / 0.04), 0 8px 24px -6px rgb(16 24 40 / 0.10);
  --shadow-press: 0 1px 2px rgb(16 24 40 / 0.06);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.5 var(--font);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  caret-color: var(--blue);
  text-rendering: optimizeLegibility;
}
::selection { background: rgb(10 102 255 / 0.18); color: var(--ink); }
:focus-visible { outline: 3px solid rgb(10 102 255 / 0.45); outline-offset: 2px; border-radius: 6px; }
html { scrollbar-color: #c7c7cc transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c7c7cc; border-radius: 10px; border: 3px solid var(--ground); }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-press); }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 650; }
p { margin: 0; text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- icons ---------- */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.i-lg { width: 28px; height: 28px; }

/* ---------- top bar ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
}
.wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 19px; letter-spacing: -0.02em; }
.wordmark:hover { color: var(--ink); }
.wordmark svg { width: 26px; height: 26px; }
.bar-link { font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.bar-link:hover { background: var(--well); color: var(--ink); }

/* ---------- page shells ---------- */
.page { max-width: 560px; margin: 0 auto; padding: 8px 20px 56px; }
.page-wide { max-width: 1080px; }
.stack > * + * { margin-top: 16px; }

.foot {
  max-width: 1080px; margin: 0 auto; padding: 28px 20px 40px;
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center;
  color: var(--ink-3); font-size: 14px;
}
.foot a { color: var(--ink-3); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- type ---------- */
.display { font-size: clamp(34px, 8.8vw, 42px); line-height: 1.1; letter-spacing: -0.03em; }
.title { font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.subtitle { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.lede { font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: 14px; line-height: 1.45; }
.code { font-family: var(--mono); font-feature-settings: "zero"; letter-spacing: 0.04em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- hero with ping ---------- */
.hero { text-align: center; padding: 12px 0 4px; }
.hero .display { margin-top: 14px; }
.hero .lede { margin-top: 8px; }
.ping { position: relative; width: 96px; height: 96px; margin: 0 auto; display: grid; place-items: center; }
.ping::before, .ping::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid var(--blue); }
.ping::before { inset: 0; opacity: 0.18; }
.ping::after { inset: 15px; opacity: 0.4; }
.ping-core {
  position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center;
}
.ping-core::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue);
  animation: ping 2.6s var(--ease-out) infinite;
}
.ping-core .i { width: 22px; height: 22px; stroke-width: 2; }
@keyframes ping {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.1); opacity: 0; }
}
.ping.found .ping-core { background: var(--green-bright); }
.ping.found::before, .ping.found::after, .ping.found .ping-core::after { border-color: var(--green-bright); }
.ping.quiet::before, .ping.quiet::after { border-color: #c7c7cc; }
.ping.quiet .ping-core { background: var(--well-2); color: var(--ink-2); }
.ping.quiet .ping-core::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  .ping-core::after { animation: none; display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- journey track ---------- */
.journey { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.journey li { position: relative; text-align: center; font-size: 13px; line-height: 1.25; color: var(--ink-3); padding-top: 30px; }
.journey li::before {
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box;
  border: 2px solid #c7c7cc; background: var(--ground); z-index: 1;
}
.journey li::after {
  content: ""; position: absolute; top: 12px; left: calc(-50% + 9px); right: calc(50% + 9px);
  border-top: 2px dashed #c7c7cc;
}
.journey li:first-child::after { display: none; }
.journey li.done { color: var(--ink-2); }
.journey li.done::before { background: var(--green-bright); border-color: var(--green-bright); }
.journey li.done::after, .journey li.now::after { border-top-style: solid; border-color: var(--green-bright); }
.journey li.now { color: var(--ink); font-weight: 600; }
.journey li.now::before { border-color: var(--blue); border-width: 4px; width: 18px; height: 18px; top: 4px; box-shadow: 0 0 0 4px var(--blue-wash); }

/* ---------- surfaces ---------- */
.panel { background: var(--well); border-radius: var(--r-lg); padding: 22px; }
.panel-white { background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-lift); }
.panel h2 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 6px; }
.row { display: flex; gap: 12px; align-items: flex-start; }
.row .i { margin-top: 2px; color: var(--ink-2); }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

.note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); font-size: 15px; line-height: 1.45; }
.note .i { margin-top: 1px; }
.note-info { background: var(--blue-wash); color: #0b3f99; }
.note-ok { background: var(--green-wash); color: #0b5c33; }
.note-error { background: var(--red-wash); color: var(--red); }
.note-warn { background: var(--amber-wash); color: #7a4500; }

/* ---------- forms ---------- */
.field { display: block; }
.field + .field { margin-top: 12px; }
.field-label { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.field-label .opt { font-weight: 400; color: var(--ink-3); }
.input {
  display: block; width: 100%; min-height: 52px; padding: 14px 16px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--well); border: 1.5px solid transparent; border-radius: var(--r-md);
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: #86868b; }
.input:hover { background: var(--well-2); }
.input:focus { outline: none; background: var(--ground); border-color: var(--blue); box-shadow: 0 0 0 4px rgb(10 102 255 / 0.15); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355555c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
.input-code { font-family: var(--mono); font-size: 22px; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; }
.field-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.field-row .field + .field { margin-top: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 14px 26px; border: 0; border-radius: 999px;
  font: inherit; font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  background: var(--blue); color: #fff;
  transition: background-color 0.2s, transform 0.15s var(--ease-out), box-shadow 0.2s;
}
.btn:hover { background: var(--blue-press); color: #fff; }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn.is-busy { opacity: 0.6; pointer-events: none; }
.btn-block { display: flex; width: 100%; }
.btn-tg { background: #1d8fcf; }
.btn-tg:hover { background: #1679b0; }
.btn-quiet { background: var(--well); color: var(--ink); box-shadow: none; }
.btn-quiet:hover { background: var(--well-2); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.actions { margin-top: 18px; }
.actions .small { margin-top: 12px; text-align: center; }

/* ---------- chat ---------- */
.thread { display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: 82%; display: flex; flex-direction: column; }
.msg + .msg.same { margin-top: -1px; }
.msg-meta { font-size: 12px; color: var(--ink-3); margin: 10px 12px 3px; font-variant-numeric: tabular-nums; }
.bubble { padding: 10px 15px; border-radius: 20px; font-size: 16px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.finder { align-self: flex-end; align-items: flex-end; }
.msg.finder .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.msg.owner { align-self: flex-start; }
.msg.owner .bubble { background: var(--bubble-owner); color: var(--ink); border-bottom-left-radius: 6px; }
.typing { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--ink-3); font-size: 14px; }
.dots { display: inline-flex; gap: 4px; padding: 11px 14px; background: var(--bubble-owner); border-radius: 18px; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: #8e8e93; animation: dot 1.3s infinite ease-in-out; }
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .dots span { animation: none; } }
.composer { display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; }
.composer .input { min-height: 48px; border-radius: 24px; padding: 12px 18px; }
.composer textarea.input { min-height: 48px; height: 48px; resize: none; overflow: hidden; line-height: 22px; padding-top: 12px; padding-bottom: 12px; }
.send-btn { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color 0.2s, transform 0.15s var(--ease-out); }
.send-btn:hover { background: var(--blue-press); }
.send-btn:active { transform: scale(0.94); }

/* ---------- steps list (activation) ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; }
.steps li + li { border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ground); border: 1.5px solid var(--line); display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}

/* ---------- shop ---------- */
.shop-hero { text-align: center; padding: 24px 0 0; max-width: 720px; margin: 0 auto; }
.shop-hero .display { font-size: clamp(36px, 8vw, 64px); letter-spacing: -0.04em; line-height: 1.02; }
.shop-hero .lede { margin: 16px auto 0; max-width: 34ch; }
.how { max-width: 620px; margin: 28px auto 0; }
.how .journey li { font-size: 14px; }
.products { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.product {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 32px;
  background: var(--well); border-radius: 28px; padding: 28px 36px; overflow: hidden;
}
.product:nth-child(even) .product-art { order: 2; }
.product-art { display: grid; place-items: center; min-height: 260px; }
.product-art svg { width: 100%; max-width: 380px; height: auto; }
.product h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.03em; line-height: 1.1; }
.product .contents { margin-top: 8px; font-size: 17px; color: var(--ink-2); }
.product .for { margin-top: 4px; font-size: 15px; color: var(--ink-3); }
.price { margin-top: 18px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: 14px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.product .btn { margin-top: 18px; }
.stock-low { display: inline-block; margin-left: 10px; font-size: 13px; font-weight: 500; color: var(--amber); }
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.promise h3 { font-size: 16px; letter-spacing: -0.01em; }
.promise p { font-size: 14px; color: var(--ink-3); margin-top: 3px; }

.buy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.buy-art { background: var(--well); border-radius: 28px; padding: 28px; display: grid; place-items: center; position: sticky; top: 16px; }
.buy-art svg { width: 100%; max-width: 360px; height: auto; }
.summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 0; font-size: 15px; margin-top: 20px; font-variant-numeric: tabular-nums; }
.summary dt { color: var(--ink-2); white-space: nowrap; }
.summary dd { margin: 0; padding-left: 16px; text-align: right; min-width: 0; }
.summary .total { font-weight: 650; font-size: 17px; color: var(--ink); padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 12px 0 20px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpi { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.kpi dt { font-size: 13px; color: var(--ink-3); }
.kpi dd { margin: 4px 0 0; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi dd small { display: block; font-size: 13px; font-weight: 500; color: var(--green); letter-spacing: 0; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-title h2 { font-size: 17px; letter-spacing: -0.01em; }
.section-title a { font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 0 10px 8px 0; white-space: nowrap; }
td { padding: 10px 10px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
td.right, th.right { text-align: right; padding-right: 0; }
.empty { color: var(--ink-3); padding: 18px 0 4px; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-open { background: var(--blue-wash); color: #0b3f99; }
.pill-returned, .pill-shipped { background: var(--green-wash); color: #0b5c33; }
.pill-paid { background: var(--amber-wash); color: #7a4500; }
.stock-bar { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.stock-bar:first-of-type { border-top: 0; }

/* ---------- prose (privacy) ---------- */
.prose { max-width: 66ch; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { font-size: 19px; margin: 32px 0 8px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 20px; margin: 0; }
.prose li + li { margin-top: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .product, .buy { grid-template-columns: 1fr; }
  .product { padding: 24px 22px 28px; gap: 8px; border-radius: 24px; }
  .product:nth-child(even) .product-art { order: 0; }
  .product-art { min-height: 0; }
  .buy-art { position: static; padding: 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .promise { grid-template-columns: 1fr; gap: 16px; }
  .how { gap: 0; }
}
@media (max-width: 600px) {
  .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .hide-sm { display: none; }
  .show-sm { display: block !important; }
}
.show-sm { display: none; }
@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
  .field-row .field + .field { margin-top: 12px; }
}

.sold-out { display: inline-block; margin-left: 10px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.product .btn-quiet, .panel .btn-quiet { background: var(--ground); box-shadow: inset 0 0 0 1px var(--line); }
.product .btn-quiet:hover, .panel .btn-quiet:hover { background: #fafafa; }
