/* Tokens taken from the live aifian.app stylesheet (read 17 Nov 2026), plus a few additions for new parts. */
:root {
  --primary: #ff3b3b; /* brand red: illustration and large accents */
  --cta: #e02a2a; /* same red, deepened so white button text reaches 4.5:1 */
  --cta-hover: #c22525;
  --primary-ink: #c22525; /* small red text on light surfaces */
  --cta-soft: #ffd3cc;
  --cta-tint: #ffece9;
  --ink: #1a1a1a;
  --ink-2: #1e2939;
  --ink-3: #364153;
  --ink-4: #4a5565;
  --mute: #5b6472;
  --ink-6: #99a1af;
  --bg-soft: #f5f3ef;
  --tile: #f4f2ee; /* matches the product photos' backdrop */
  --bg-card: #fff;
  --rule: #0000001a;
  --rule-strong: #00000033;
  --gold: #f5b83d;
  --gold-soft: #fffaf0;
  --gold-rule: #efd9b4;
  --gold-ink: #7a4d00;
  --ok: #047857;
  --ok-ink: #065f46;
  --ok-soft: #d1fae5;
  --warn: #92400e;
  --warn-soft: #fdecc8;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  --font:
    "PingFang TC", "Noto Sans TC", -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", Arial, sans-serif;
  --shadow-float: 0 6px 24px -6px rgba(90, 40, 30, 0.18), 0 1px 2px rgba(90, 40, 30, 0.06);
  --top-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top-h) + 16px);
}
body {
  margin: 0;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1,
h2,
h3,
h4,
p,
ol,
ul,
dl,
dd,
figure,
fieldset,
legend {
  margin: 0;
  padding: 0;
}
h1,
h2,
h3 {
  color: var(--ink);
  text-wrap: balance;
}
ol,
ul {
  list-style: none;
}
fieldset {
  border: 0;
  min-width: 0;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
  -webkit-tap-highlight-color: transparent;
}
button[disabled] {
  cursor: not-allowed;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
table {
  border-collapse: collapse;
}
:focus-visible {
  outline: 2px solid var(--ink-2);
  outline-offset: 2px;
  border-radius: 6px;
}
#main {
  min-height: 62vh;
}
#main:focus {
  outline: none;
}
.num {
  font-variant-numeric: tabular-nums;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus {
  left: 8px;
}

.ic {
  width: 20px;
  height: 20px;
  flex: none;
}
.ic.s16 {
  width: 16px;
  height: 16px;
}
.ic.s18 {
  width: 18px;
  height: 18px;
}
.ic.s22 {
  width: 22px;
  height: 22px;
}
.ic.s28 {
  width: 28px;
  height: 28px;
}
.spin {
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.wrap {
  width: 100%;
  max-width: 1228px;
  margin: 0 auto;
  padding: 0 24px;
}
.muted {
  color: var(--ink-4);
}
.fine {
  font-size: 0.8125rem;
  color: var(--mute);
}
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-ink);
}
.linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: inherit;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
}
.linkbtn:hover {
  text-decoration-color: currentColor;
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    transform 0.15s var(--ease);
}
.btn:active {
  transform: scale(0.98);
}
.btn.sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}
.btn.lg {
  height: 52px;
  width: 100%;
  font-size: 1rem;
}
.btn.primary {
  background: var(--cta);
  color: #fff;
}
.btn.primary:hover {
  background: var(--cta-hover);
}
.btn.dark {
  background: var(--ink);
  color: #fff;
}
.btn.dark:hover {
  background: #000;
}
.btn.ghost {
  background: #fff;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
}
.btn.ghost:hover {
  border-color: var(--ink);
}
.btn[disabled] {
  opacity: 0.55;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  flex: none;
}
.icon-btn:hover {
  background: #0000000d;
}
.icon-btn.sm {
  width: 32px;
  height: 32px;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 14px;
  line-height: 1.3;
  text-align: left;
  border-radius: var(--r-full);
  background: #ffffffb3;
  border: 1px solid var(--rule-strong);
  font-size: 0.875rem;
  color: var(--ink);
  transition:
    border-color 0.15s,
    background-color 0.15s;
}
.chip:hover {
  background: #fff;
  border-color: var(--ink);
}

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f5f3efe6;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--top-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 44px;
}
.logo {
  height: 20px;
  width: auto;
}
.brand-name {
  padding-left: 12px;
  border-left: 1px solid var(--rule-strong);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.top-nav {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}
.top-nav button {
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  color: var(--ink-4);
}
.top-nav button:hover {
  color: var(--ink);
  background: #0000000a;
}
.top-nav button[aria-current] {
  color: var(--ink);
  font-weight: 600;
  background: #fff;
  box-shadow: 0 0 0 1px var(--rule);
}
.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-full);
  border: 1px solid var(--rule-strong);
  background: #fff;
}
.lang button {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-4);
}
.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.rw-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: var(--cta-tint);
  color: var(--primary-ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.rw-chip:hover {
  background: var(--cta-soft);
}
.only-narrow {
  display: none;
}
.brand,
.top-nav,
.top-right {
  flex: none;
}
.brand-name,
.top-nav button,
.lang button,
.top-right .btn,
.rw-chip {
  white-space: nowrap;
}

/* ---------- Footer, tab bar, buy bar ---------- */
body[data-route="home"] .foot {
  margin-top: 72px;
}
.foot {
  margin-top: 32px;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--mute);
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 28px;
}
.tabbar,
.buybar {
  display: none;
}

/* ---------- Home ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 48px;
}
.glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.glow img {
  position: absolute;
  max-width: none;
  opacity: 0.85;
}
.glow .g1 {
  width: 900px;
  left: -220px;
  top: -260px;
}
.glow .g2 {
  width: 760px;
  right: -160px;
  top: -200px;
}
.hero-in {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-h {
  font-size: clamp(2.125rem, 4.6vw, 3.5rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-h span {
  display: block;
}
:lang(zh-Hant) .hero-h {
  letter-spacing: 0;
  line-height: 1.22;
}
.hero-sub {
  margin-top: 18px;
  max-width: 34em;
  font-size: 1.0625rem;
  color: var(--ink-3);
}
.paste {
  margin-top: 28px;
  max-width: 620px;
}
.paste-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 18px;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 32px;
  box-shadow: var(--shadow-float);
  color: var(--mute);
}
.paste-box:focus-within {
  outline: 2px solid var(--ink-2);
  outline-offset: 3px;
}
.paste-box.err {
  border-color: var(--primary-ink);
}
.paste-box input {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  border: 0;
  background: none;
  outline: none;
  font-size: 1rem;
  color: var(--ink);
}
.paste-box input::placeholder {
  color: var(--mute);
}
.field-err {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-ink);
}
.samples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.samples-l {
  font-size: 0.875rem;
  color: var(--mute);
  margin-right: 4px;
}

.promo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 20px 28px 28px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 28px;
  box-shadow: var(--shadow-float);
}
.promo::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: calc(50% - 151px);
  top: calc(50% - 351px);
  width: 760px;
  height: 739px;
  background: url(./assets/brand/glow-pink.webp) no-repeat 0 0 / 100% 100%;
  opacity: 0.5;
  pointer-events: none;
}
.promo-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.promo h2 {
  font-size: 1.375rem;
  line-height: 1.25;
  font-weight: 700;
}
.promo p {
  font-size: 0.9375rem;
  color: var(--ink-4);
}
.promo .linkbtn {
  font-size: 0.875rem;
}
.promo .chest {
  width: 132px;
  flex: none;
}

.strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 20px;
  padding: 12px 12px 12px 16px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
}
.strip-t {
  font-weight: 600;
  color: var(--ink);
}
.strip-s {
  color: var(--ink-4);
  font-size: 0.9375rem;
}
.strip .btn {
  margin-left: auto;
}

.trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
}
.trust li {
  display: flex;
  gap: 14px;
  padding: 22px 24px;
  color: var(--primary-ink);
}
.trust li + li {
  border-left: 1px solid var(--rule);
}
.trust h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}
.trust p {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--ink-4);
}

.sec {
  margin-top: 56px;
}
.sec-h {
  margin-bottom: 20px;
}
.sec-h h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sec-h p {
  margin-top: 6px;
  max-width: 46em;
  color: var(--ink-4);
}

.pick {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  width: 100%;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 28px;
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.2s var(--ease);
}
@media (hover: hover) {
  .pick:hover {
    box-shadow: var(--shadow-float);
    transform: translateY(-2px);
  }
}
.pick-img {
  aspect-ratio: 1;
  background: var(--tile);
}
.pick-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pick-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 36px 40px;
}
.pick-name {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}
.pick-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.pick-price {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ink);
}
.pick-src {
  font-size: 0.875rem;
  color: var(--mute);
}
.pick-promise {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: #ffefc7;
  color: var(--gold-ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.pick-rw {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary-ink);
}
.pick-cta {
  margin-top: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pcard {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  height: 100%;
  padding: 10px 10px 14px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  transition:
    box-shadow 0.2s,
    transform 0.2s var(--ease);
}
@media (hover: hover) {
  .pcard:hover {
    box-shadow: var(--shadow-float);
    transform: translateY(-2px);
  }
}
.pcard-img {
  aspect-ratio: 1;
  margin-bottom: 8px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--tile);
}
.pcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pcard-src {
  font-size: 0.75rem;
  color: var(--mute);
}
.pcard-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.7em;
  font-size: 0.9375rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink);
}
.pcard-price {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
}
.pcard-rw {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary-ink);
}
.pcard-rw b {
  font-weight: 700;
  white-space: nowrap;
}

.how {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.how li {
  padding: 22px;
  background: #ffffff8c;
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
}
.how-n {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}
.how h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}
.how p {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--ink-4);
}

/* ---------- Pages ---------- */
.page {
  padding-top: 20px;
  padding-bottom: 48px;
}
.page.narrow {
  max-width: 688px;
}
.page.mid {
  max-width: 908px;
}
.page-h {
  margin-bottom: 20px;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  margin-bottom: 8px;
  padding-right: 8px;
  font-size: 0.9375rem;
  color: var(--ink-4);
}
.backlink:hover {
  color: var(--ink);
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 404px;
  gap: 24px;
  align-items: start;
}
.cols.even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}
.col-main,
.col-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
}
.card > h2 {
  margin-bottom: 14px;
  font-size: 1.0625rem;
  font-weight: 600;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 5px 0;
  font-size: 0.9375rem;
}
.row > span:first-child {
  color: var(--ink-4);
}
.row > .num {
  text-align: right;
  font-weight: 500;
  color: var(--ink);
}
.row.total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 1.0625rem;
}
.row.total > span {
  color: var(--ink);
  font-weight: 700;
}
.row.minus > .num {
  color: var(--ok);
}
.note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  font-size: 0.875rem;
  color: var(--ink-3);
}
.note .ic {
  margin-top: 1px;
}
.note.ok {
  background: var(--ok-soft);
  color: var(--ok-ink);
}
.proto {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 16px;
  border: 1.5px dashed var(--ink-6);
  border-radius: var(--r-lg);
  font-size: 0.875rem;
  color: var(--ink-4);
}
.proto-l {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink-3);
}
.proto .btn {
  margin-left: auto;
}
/* Additions for the rebuilt prototype: the made-up-data badge, a warning note, the debit toggle and mock screens. */
.proto-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1.5px dashed var(--ink-6);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-4);
  white-space: nowrap;
}
.note.warn {
  background: var(--warn-soft);
  color: var(--warn);
  margin: 0 0 12px;
}
.proto > p {
  flex-basis: 100%;
}
.proto .proto-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-basis: 100%;
}
.proto .proto-row .btn,
.proto .seg-inline .btn {
  margin-left: 0;
}
.seg-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.card .btn.ghost[data-act="bank-link"] {
  margin-top: 12px;
}
.bankmock {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  background: #fff;
}
.bankmock-n {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.0625rem;
  color: var(--ink);
}
.bankmock-acct {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--ink);
}
.ret-rw {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--gold-rule);
  border-radius: var(--r-md);
  background: var(--gold-soft);
  font-size: 0.875rem;
  color: var(--ink-3);
}
.ret-rw h3 {
  font-size: 0.9375rem;
}
.receipt {
  padding: 16px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-md);
  background: #fff;
}
.receipt-h {
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--ink);
}
.rw-all {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 16px;
}
.rw-all strong {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
}
.rw-all .fine {
  flex-basis: 100%;
}
.odds-h {
  margin: 18px 0 8px;
  font-size: 0.9375rem;
}
.top-in {
  min-width: 0;
}
@media (max-width: 599px) {
  .top-in {
    gap: 8px;
  }
  .top-right .rw-chip {
    display: none;
  }
  .proto-badge {
    display: block;
    min-width: 0;
    max-width: 34vw;
    height: 24px;
    padding: 0 8px;
    overflow: hidden;
    font-size: 0.6875rem;
    line-height: 21px;
    text-overflow: ellipsis;
  }
}
@media (max-width: 360px) {
  .proto-badge {
    display: none;
  }
}
.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill.live {
  background: var(--cta-tint);
  color: var(--primary-ink);
}
.pill.ok {
  background: var(--ok-soft);
  color: var(--ok-ink);
}
.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill.off {
  background: #e7e4de;
  color: var(--ink-4);
}

/* ---------- Reading, staff quote, declined, empty ---------- */
.status-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 32px;
}
.status-card h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
}
.status-ic {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cta-tint);
  color: var(--primary-ink);
}
.status-ic.no {
  background: #e7e4de;
  color: var(--ink-3);
}
.urlline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.8125rem;
  color: var(--ink-4);
}
.urlline span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.steps {
  display: grid;
  gap: 14px;
  width: 100%;
  margin-top: 8px;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--mute);
}
.steps-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-6);
  flex: none;
}
.steps li.done {
  color: var(--ink-2);
}
.steps li.done .steps-dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.steps li.now {
  color: var(--ink);
  font-weight: 600;
}
.steps li.now .steps-dot {
  border-color: var(--cta);
  color: var(--primary-ink);
}
.steps li.fail {
  color: var(--warn);
  font-weight: 600;
}
.steps li.fail .steps-dot {
  background: var(--warn-soft);
  border-color: #e2b469;
}
.eta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
}
.status-card + .proto {
  margin-top: 16px;
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
}
.empty h2 {
  font-size: 1.25rem;
  font-weight: 700;
}
.empty .btn {
  margin-top: 8px;
}

/* ---------- Offer ---------- */
.offer-head {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.offer-img {
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  background: var(--tile);
  border: 1px solid var(--rule);
}
.offer-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.offer-info h1 {
  margin: 6px 0 8px;
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.offer-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}
.src {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: #ffffffb3;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  font-size: 0.875rem;
}
.src > .ic {
  margin-top: 2px;
  color: var(--ink-4);
}
.src-t {
  font-weight: 500;
  color: var(--ink);
}
.src .dot {
  margin: 0 6px;
  color: var(--ink-6);
}
.src .linkbtn {
  margin-top: 4px;
  font-size: 0.8125rem;
}
.opts {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.opt legend {
  margin-bottom: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}
.opt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.opt-i {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 112px;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s;
}
.opt-i input,
.pay-i input,
.seg input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.opt-i:hover {
  border-color: var(--ink-4);
}
.opt-i.on {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.opt-i.out {
  background: var(--bg-soft);
  border-style: dashed;
  color: var(--mute);
  cursor: not-allowed;
}
.opt-i.out input {
  cursor: not-allowed;
}
.opt-i.out .opt-l {
  text-decoration: line-through;
}
.opt-i:has(input:focus-visible),
.pay-i:has(input:focus-visible),
.seg label:has(input:focus-visible) {
  outline: 2px solid var(--ink-2);
  outline-offset: 2px;
}
.opt-l {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}
.opt-i.out .opt-l {
  color: var(--mute);
}
.opt-p {
  font-size: 0.8125rem;
  color: var(--ink-4);
}
.opt-s {
  font-size: 0.75rem;
  color: var(--mute);
}
.opt-s.low {
  color: var(--warn);
  font-weight: 500;
}
.qty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.qty-l {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-full);
}
.stepper button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.stepper button:hover:not([disabled]) {
  background: #0000000d;
}
.stepper button[disabled] {
  color: var(--ink-6);
}
.stepper output {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  color: var(--ink);
}
.facts li {
  display: flex;
  gap: 14px;
  padding: 16px 4px;
  color: var(--ink-3);
}
.facts li + li {
  border-top: 1px solid var(--rule);
}
.facts h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}
.facts p {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--ink-4);
}

.rw-card {
  background: var(--gold-soft);
  border-color: var(--gold-rule);
}
.rw-card.off {
  background: #fff;
  border-color: var(--rule);
}
.rw-card.off .row > .num {
  text-decoration: line-through;
  color: var(--mute);
}
.rw-card.onhold {
  background: #fff;
  border-color: var(--rule);
}
.rw-card.onhold .row > .num {
  color: var(--mute);
}
.box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 6px;
  padding: 16px;
  background: #fff;
  border: 1.5px dashed #e3c188;
  border-radius: var(--r-lg);
}
.box .chest {
  width: 92px;
  flex: none;
}
.box-txt {
  min-width: 0;
  flex: 1;
}
.box-t {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
}
.box-s {
  font-size: 0.875rem;
  color: var(--ink-4);
}
.guar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: #ffefc7;
  color: var(--gold-ink);
  font-size: 0.8125rem;
  font-weight: 600;
}
.box .btn {
  margin: 12px 0 6px;
}
.box.won {
  border-style: solid;
  border-color: var(--gold);
}
.box-amt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 2px 0 6px;
  font-weight: 600;
  color: var(--ink-3);
}
.box-amt strong {
  font-size: 1.625rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--primary-ink);
}
.box.off {
  border-style: solid;
  border-color: var(--rule);
}
.box.off .chest {
  filter: grayscale(1);
  opacity: 0.45;
}
.rw-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 10px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--gold-rule);
  font-weight: 600;
  color: var(--ink);
}
.rw-total strong {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: right;
}

.chest {
  height: auto;
  overflow: visible;
}
.chest-lid {
  transform-origin: 14px 56px;
  transition: transform 0.45s var(--ease);
}
.chest-glow {
  opacity: 0;
  transition: opacity 0.3s 0.1s;
}
.chest.open .chest-lid {
  transform: translateY(-13px) rotate(-11deg);
}
.chest.open .chest-glow {
  opacity: 1;
}
.chest.shake {
  animation: shake 0.5s ease-in-out infinite;
  transform-origin: 50% 90%;
}
@keyframes shake {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}
.pop .chest {
  animation: pop 0.55s var(--ease);
}
@keyframes pop {
  0% {
    transform: scale(0.82);
  }
  55% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.sum-card .fine {
  margin-top: 8px;
}
.hold {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  font-size: 0.875rem;
  color: var(--ink-3);
}
.hold strong {
  margin-left: auto;
  font-size: 1rem;
  color: var(--ink);
}
.hold.ended {
  flex-wrap: wrap;
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 500;
}
.hold.ended .btn {
  margin-left: auto;
}
.in-flow-cta {
  margin-top: 14px;
}

/* ---------- Checkout ---------- */
.addr {
  display: flex;
  gap: 12px;
  color: var(--ink-3);
}
.addr p + p {
  margin-top: 2px;
}
.pay-list {
  display: grid;
  gap: 10px;
}
.pay-i {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 14px;
  cursor: pointer;
  color: var(--ink-3);
}
.pay-i::after {
  content: "";
  width: 20px;
  height: 20px;
  margin-left: auto;
  border: 1.5px solid var(--ink-6);
  border-radius: 50%;
  flex: none;
}
.pay-i.on {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.pay-i.on::after {
  border: 6px solid var(--ink);
}
.pay-i.out {
  background: var(--bg-soft);
  border-style: dashed;
  cursor: not-allowed;
}
.pay-i.out input {
  cursor: not-allowed;
}
.pay-t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pay-t strong {
  font-weight: 600;
  color: var(--ink);
}
.pay-t span {
  font-size: 0.875rem;
  color: var(--ink-4);
}
.use {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.use input {
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0;
  opacity: 0;
  cursor: pointer;
}
.use-box {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--mute);
  border-radius: 7px;
  color: transparent;
  flex: none;
}
.use input:checked + .use-box {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.use input:focus-visible + .use-box {
  outline: 2px solid var(--ink-2);
  outline-offset: 2px;
}
.use-note {
  margin-top: 10px;
}
.mini {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.mini img {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  background: var(--tile);
  flex: none;
}
.mini-n {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.earn {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--gold-soft);
  border: 1px solid var(--gold-rule);
}
.earn h3 {
  margin-bottom: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}
.consent {
  margin-top: 14px;
}

/* ---------- Order ---------- */
.order-h {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.head-card h1 {
  font-size: 1.625rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.head-card .muted {
  margin-top: 8px;
}
.clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
}
.head-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.ret-steps {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.ret-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-4);
}
.ret-steps li.done {
  color: var(--ok-ink);
  font-weight: 500;
}
.tl li {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 22px;
}
.tl li:last-child {
  padding-bottom: 0;
}
.tl li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: #00000024;
}
.tl li:last-child::before {
  display: none;
}
.tl li.done::before {
  background: var(--ink);
}
.tl-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink-6);
  border-radius: 50%;
  background: #fff;
  color: #fff;
}
.tl li.done .tl-dot {
  background: var(--ink);
  border-color: var(--ink);
}
.tl li.now .tl-dot {
  border-color: var(--cta);
  box-shadow: 0 0 0 4px var(--cta-tint);
}
.tl li.now .tl-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cta);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    transform: scale(0.6);
    opacity: 0.6;
  }
}
.tl-t {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 2px 12px;
  padding-top: 2px;
}
.tl-t strong {
  font-weight: 600;
  color: var(--ink);
}
.tl-t span {
  font-size: 0.8125rem;
  color: var(--mute);
}
.tl li.todo .tl-t strong {
  font-weight: 500;
  color: var(--mute);
}
.tl-d {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--ink-4);
}
.tl-d .num,
.kv .num {
  white-space: nowrap;
}
.tl li.todo .tl-d {
  color: var(--mute);
}
.wait {
  margin-top: 16px;
}
.wait .sec-h h2 {
  font-size: 1.125rem;
}
.wait .sec-h {
  margin-bottom: 12px;
}
.payline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.875rem;
  color: var(--ink-3);
}
.kv {
  display: grid;
  gap: 10px;
}
.kv > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.9375rem;
}
.kv dt {
  color: var(--ink-4);
}
.kv dd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}
.help-acts {
  display: grid;
  gap: 8px;
  margin: 14px 0 10px;
}
.help-acts .btn {
  justify-content: flex-start;
}
.msgs {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.msgs li {
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

/* ---------- Orders list ---------- */
.olist {
  display: grid;
  gap: 12px;
}
.orow {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px 12px 12px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  transition: box-shadow 0.2s;
}
@media (hover: hover) {
  .orow:hover {
    box-shadow: var(--shadow-float);
  }
}
.orow img {
  width: 72px;
  height: 72px;
  border-radius: var(--r-md);
  background: var(--tile);
  flex: none;
}
.orow-b {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.orow-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.orow-n {
  font-weight: 600;
  color: var(--ink);
}
.orow-a {
  font-weight: 700;
  color: var(--ink);
}
.orow > .ic {
  color: var(--ink-6);
}

/* ---------- Rewards ---------- */
.stats {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
}
.stat-l {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-4);
}
.stat strong {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}
.stat.main {
  background: var(--ink);
  border-color: var(--ink);
}
.stat.main strong {
  color: #fff;
  font-size: 2.125rem;
}
.stat.main .stat-l,
.stat.main .fine {
  color: #d6d3cd;
}
.tbl {
  width: 100%;
  font-size: 0.9375rem;
}
.tbl th,
.tbl td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--rule);
  text-align: right;
  vertical-align: top;
}
.tbl th:first-child {
  padding-left: 0;
  text-align: left;
}
.tbl td:last-child,
.tbl th:last-child {
  padding-right: 0;
}
.tbl thead th {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--mute);
}
.tbl tbody th {
  font-weight: 500;
  color: var(--ink);
}
.tbl tbody tr:last-child th,
.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.tbl tbody th .fine {
  display: block;
}
.tbl.odds tbody th {
  white-space: nowrap;
}
.tier-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: #b87333;
}
.tier-dot[data-tier="silver"] {
  background: #9aa3ad;
}
.tier-dot[data-tier="gold"] {
  background: var(--gold);
}
.tier-dot[data-tier="diamond"] {
  background: #5aa0f2;
}
.tier-dot[data-tier="grand"] {
  background: #9b5de5;
}
.tier-dot[data-tier="jackpot"] {
  background: var(--primary);
}
.rules {
  display: grid;
  gap: 12px;
  counter-reset: r;
}
.rules li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  counter-increment: r;
  font-size: 0.9375rem;
  color: var(--ink-3);
}
.rules li::before {
  content: counter(r);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-soft);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- Banban ---------- */
.chat-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  max-height: 52vh;
  padding: 4px;
  overflow-y: auto;
}
.msg {
  max-width: min(86%, 560px);
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9375rem;
}
.msg.bot {
  align-self: flex-start;
  background: var(--bg-soft);
  border-bottom-left-radius: 5px;
  color: var(--ink-2);
}
.msg.me {
  align-self: flex-end;
  background: var(--ink);
  border-bottom-right-radius: 5px;
  color: #fff;
  overflow-wrap: anywhere;
}
.msg .grid,
.msg .btn {
  margin-top: 10px;
}
.chat-prompts {
  margin-top: 0;
}
.chat-form {
  display: flex;
  gap: 8px;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-full);
  background: #fff;
  font-size: 1rem;
}
.chat-form input::placeholder {
  color: var(--mute);
}
.chat-form .btn {
  width: 48px;
  height: 48px;
  padding: 0;
  flex: none;
}

/* ---------- Dialogs ---------- */
dialog {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}
dialog::backdrop {
  background: #1a1a1a73;
}
.dlg {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 64px -16px #0000004d;
  overflow-y: auto;
}
.dlg[data-kind="rules"] {
  width: min(520px, calc(100vw - 32px));
}
.dlg-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 14px 6px 24px;
}
.dlg-h h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
}
.dlg-b {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 24px 24px;
}
.dlg-b h3 {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 700;
}
.dlg-b.center {
  align-items: center;
  text-align: center;
}
.dlg-acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
}
.field input,
.field textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
}
.field textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
}
.field [aria-invalid="true"] {
  border-color: var(--primary-ink);
}
.field .code {
  font-size: 1.25rem;
  letter-spacing: 0.4em;
  text-align: center;
}
.dlg .field-err {
  margin-top: -4px;
}
fieldset.plain legend {
  margin-bottom: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}
.dlg .note {
  margin-top: 0;
}
.dbox .chest {
  width: 148px;
  margin: 8px auto 0;
}
.dbox-amt {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-ink);
}
.menu {
  gap: 4px;
}
.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 12px;
  font-weight: 500;
}
.menu-i {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border-top: 1px solid var(--rule);
  font-weight: 500;
  color: var(--ink);
}
.menu-i span {
  flex: 1;
}
.menu-i .ic:last-child:not(:first-child) {
  color: var(--ink-6);
}

.drawer {
  width: min(480px, 100vw);
  height: 100dvh;
  margin: 0 0 0 auto;
  background: #fff;
  overflow-y: auto;
  box-shadow: -24px 0 64px -24px #0000004d;
}
.drawer .dlg-h {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.drawer-b {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 24px 32px;
  font-size: 0.9375rem;
  color: var(--ink-3);
}
.drawer-b h3 {
  margin-top: 14px;
  font-size: 1rem;
  font-weight: 700;
}
.bul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  list-style: disc;
}
.bul strong {
  color: var(--ink);
}
.seg {
  display: grid;
  gap: 8px;
}
.seg label {
  position: relative;
  display: block;
  padding: 12px 14px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 14px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--ink-4);
}
.seg label.on {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.seg strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--ink);
}
.jumps {
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
}
.jumps li + li {
  border-top: 1px solid var(--rule);
}
.jumps button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  color: var(--ink);
}
.jumps button:hover {
  background: var(--bg-soft);
}
.jumps .ic {
  color: var(--ink-6);
}
.spec {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}
.spec dt {
  font-weight: 600;
  color: var(--ink);
}
.spec dd {
  font-size: 0.875rem;
  color: var(--ink-4);
}

/* ---------- Toast ---------- */
.toast {
  display: none;
  position: fixed;
  inset: auto auto 28px 50%;
  width: max-content;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 12px 20px;
  border: 0;
  border-radius: 22px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 12px 32px -12px #00000066;
  z-index: 100;
  pointer-events: none;
}
.toast.show {
  display: block;
  animation: toast-in 0.25s var(--ease);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}

/* ---------- Medium and small screens ---------- */
@media (min-width: 960px) and (min-height: 860px) {
  body[data-route="offer"] .col-side,
  body[data-route="checkout"] .col-side {
    position: sticky;
    top: calc(var(--top-h) + 20px);
  }
}
@media (max-width: 1180px) {
  .top-in {
    gap: 12px;
  }
  .top-nav {
    margin-left: 0;
  }
  .top-nav button {
    padding: 0 11px;
  }
  .btn.sm.top-notes {
    width: 36px;
    padding: 0;
  }
  .top-notes span {
    display: none;
  }
}
@media (max-width: 1100px) {
  .grid {
    gap: 12px;
  }
  .cols {
    grid-template-columns: minmax(0, 1fr) 372px;
  }
  .offer-head {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px;
  }
}
@media (max-width: 959px) {
  :root {
    --top-h: 56px;
  }
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  .only-wide,
  .top-nav,
  .top-right > .lang {
    display: none;
  }
  .only-narrow {
    display: grid;
  }
  .top-in {
    gap: 12px;
  }
  .top-right .icon-btn {
    margin-right: -10px;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: #fffffff2;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--rule);
  }
  .tabbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 60px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--mute);
  }
  .tabbar button[aria-current] {
    color: var(--primary-ink);
    font-weight: 700;
  }
  .has-buybar .tabbar {
    display: none;
  }
  .has-buybar .buybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: block;
    padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--rule);
    box-shadow: 0 -8px 24px -12px #00000026;
  }
  .buybar-in {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .buybar-sum {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
  }
  .buybar-sum span {
    font-size: 0.75rem;
    color: var(--mute);
  }
  .buybar-sum strong {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--ink);
  }
  .buybar .btn {
    flex: 1;
    max-width: 240px;
    height: 48px;
    margin-left: auto;
  }
  .has-buybar {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .in-flow-cta {
    display: none;
  }
  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .foot {
    margin-top: 8px;
  }
  body[data-route="home"] .foot {
    margin-top: 44px;
  }

  .hero {
    padding: 36px 0 28px;
  }
  .promo::before {
    display: none;
  }
  .hero-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .hero-sub {
    font-size: 1rem;
  }
  .promo {
    padding: 20px 12px 20px 20px;
    border-radius: 22px;
  }
  .promo h2 {
    font-size: 1.1875rem;
  }
  .promo .chest {
    width: 104px;
  }
  .trust {
    grid-template-columns: minmax(0, 1fr);
  }
  .trust li {
    padding: 16px 18px;
  }
  .trust li + li {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .sec {
    margin-top: 40px;
  }
  .sec-h h2 {
    font-size: 1.3125rem;
  }
  .pick {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 22px;
  }
  .pick-txt {
    padding: 20px;
    gap: 8px;
  }
  .pick-name {
    font-size: 1.375rem;
  }
  .grid,
  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .how {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .how li {
    padding: 16px;
  }

  .page {
    padding-top: 12px;
    padding-bottom: 32px;
  }
  .page-h {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }
  .cols,
  .cols.even {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .card {
    padding: 18px;
  }
  .status-card {
    padding: 24px 20px;
  }
  .offer-head {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    gap: 0 14px;
    align-items: start;
  }
  .offer-img {
    grid-column: 1;
    grid-row: 1 / span 3;
    border-radius: var(--r-lg);
  }
  .offer-info {
    display: contents;
  }
  .offer-info > * {
    grid-column: 2;
  }
  .offer-info h1 {
    margin: 2px 0 4px;
    font-size: 1.3125rem;
  }
  .offer-price {
    font-size: 1.25rem;
  }
  .offer-info .src {
    grid-column: 1 / -1;
    margin-top: 14px;
  }
  .head-card h1 {
    font-size: 1.375rem;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .stat.main {
    grid-column: 1 / -1;
  }
  .stat:last-child {
    grid-column: 1 / -1;
  }
  .stat {
    padding: 16px;
  }
  .stat strong {
    font-size: 1.375rem;
  }
  .drawer {
    width: 100vw;
  }
  body[data-route="order"] .cols > .col-main,
  body[data-route="order"] .cols > .col-side {
    display: contents;
  }
  body[data-route="order"] .wait {
    order: 9;
    margin-top: 20px;
  }
  .chat-card {
    height: calc(100dvh - var(--top-h) - 64px - env(safe-area-inset-bottom) - 76px);
    min-height: 400px;
    padding: 14px;
    gap: 12px;
  }
  .chat-log {
    flex: 1;
    min-height: 0;
    max-height: none;
  }
  .chat-prompts {
    flex: none;
    flex-wrap: nowrap;
    margin: 0 -14px;
    padding: 0 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chat-prompts::-webkit-scrollbar {
    display: none;
  }
  .chat-prompts .chip {
    flex: none;
    white-space: nowrap;
  }
  .chat-form {
    flex: none;
  }
  body[data-route="chat"] .page {
    padding-bottom: 12px;
  }
}
@media (max-width: 599px) {
  .grid,
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid.three > li:nth-child(n + 3) {
    display: none;
  }
}
@media (max-width: 640px) {
  .ledger thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .ledger tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
  }
  .ledger tbody tr:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .ledger tbody th {
    grid-column: 1 / -1;
    padding: 0 0 4px;
    border: 0;
  }
  .ledger tbody td {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
    border: 0;
  }
  .ledger tbody td::before {
    content: attr(data-l);
    font-size: 0.8125rem;
    color: var(--mute);
  }
  .orow {
    gap: 12px;
    padding: 10px 12px 10px 10px;
  }
  .orow img {
    width: 60px;
    height: 60px;
  }
  .orow > .ic {
    display: none;
  }
  .tbl.odds {
    font-size: 0.875rem;
  }
  .tbl.odds th,
  .tbl.odds td {
    padding-left: 4px;
    padding-right: 4px;
  }
  .tbl.odds th:first-child {
    padding-left: 0;
  }
  .tbl.odds th:last-child,
  .tbl.odds td:last-child {
    padding-right: 0;
  }
}
@media (max-width: 560px) {
  .paste-box {
    flex-wrap: wrap;
    padding: 6px 6px 6px 14px;
    border-radius: 22px;
    row-gap: 4px;
  }
  .paste-box .btn {
    flex: 1 1 100%;
    margin-left: -8px;
    height: 48px;
  }
  .dlg {
    width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }
  .dlg[data-kind="rules"] {
    width: 100vw;
  }
  .dlg-b {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .head-acts .btn {
    flex: 1 1 100%;
  }
  .proto .btn {
    margin-left: 0;
  }
  .msg {
    max-width: 92%;
  }
}
@media (max-width: 380px) {
  .brand-name {
    font-size: 1rem;
    padding-left: 10px;
  }
  .brand {
    gap: 10px;
  }
}
/* Real reads (reader spike): remote product photos, the test-data tag, and the return rule beside the pay button. */
.real-img {
  object-fit: contain;
  background: #fff;
}
.real-noimg {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  font-size: 0.8125rem;
  color: var(--mute);
}
.real-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border: 1.5px dashed var(--ink-6);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-4);
}
.real-ret {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--ink-3);
}
.buybar-ret {
  display: none;
}
@media (max-width: 959px) {
  .has-buybar .buybar-ret {
    display: block;
    margin: 0 0 6px;
    font-size: 0.8125rem;
    color: var(--ink-3);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
