/* ===========================================================================
   Window Sync Pro — card shop
   Palette mirrors the desktop app (app/ui2/theme.py, "Nocturne Mint").
   Motion follows Material 3 easing tokens from app/ui2/motion.py.
   =========================================================================== */

.dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.dl__card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.dl__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl__head b { font-size: 17px; }
.dl__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); gap: 8px; margin: 4px 0 2px; }
.dl__meta div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.dl__meta dt { font-size: 11px; color: var(--subtle); letter-spacing: .08em; text-transform: uppercase; }
.dl__meta dd { margin: 2px 0 0; font-size: 13px; color: var(--text); }
.dl__hash { margin: 0; opacity: .6; }
.btn--block { width: 100%; text-align: center; }
.dl__log { margin-top: 16px; }
.dl__log h3 { margin: 0 0 10px; font-size: 15px; }
.dl__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dl__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); }
.dl__list li > span:first-child { min-width: 52px; }
.dl__list li > span.tiny.subtle { min-width: 44px; }
.dl__list li > span.tiny.muted { flex: 1 1 220px; min-width: 0; }
@media (max-width: 760px) {
  .dl { grid-template-columns: minmax(0, 1fr); }
  .dl__list li > span.tiny.muted { flex-basis: 100%; }
}

/* ------------------------------------------------- authorization card */
.entbar { display: flex; align-items: center; gap: 8px; margin-right: 6px; }
.entbar .chip { white-space: nowrap; }
.entcard { display: grid; gap: 14px; border-color: var(--border-strong);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 62%); }
.entcard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.entcard__state { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; color: var(--accent);
  margin: 6px 0 4px; }
.entcard__meter { display: flex; align-items: baseline; gap: 4px; padding: 10px 16px;
  border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.entcard__meter b { font-size: 28px; line-height: 1; }
.entcard__row { display: flex; gap: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.devlist { list-style: none; display: grid; gap: 6px; }
.devrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); }
.devrow span:first-child { flex: 1; }
.order__more { grid-column: 1 / -1; display: grid; gap: 8px; }
.order__more summary { cursor: pointer; }
.order__more .order__card { margin-top: 8px; }
@media (max-width: 640px) {
  .entbar { display: none; }
  .entcard__head { flex-direction: column; }
}

:root {
  --bg: #0b0d10;
  --bg-alt: #0e1216;
  --rail: #101418;
  --surface: #14191f;
  --surface-2: #1a2027;
  --surface-3: #20272f;
  --elevated: #242c34;
  --input: #10151a;
  --border: #252d36;
  --border-strong: #35414a;
  --text: #f4f7f5;
  --muted: #8b9793;
  --subtle: #5e6a66;
  --accent: #6fe7c0;
  --accent-hover: #8cf0d0;
  --accent-dark: #3fc79e;
  --accent-soft: #17352e;
  --red: #ff7a8a;
  --red-soft: #2e171d;
  --amber: #f4c76b;
  --amber-soft: #2b2416;
  --ease-emph: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-std: cubic-bezier(0.2, 0, 0, 1);
  --dur-short: 200ms;
  --dur-med: 300ms;
  --dur-long: 450ms;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-lift: 0 24px 60px -32px rgba(0, 0, 0, 0.9);
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC",
          "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Consolas", "Cascadia Mono", "JetBrains Mono", ui-monospace, monospace;
  --shell: 1180px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint vertical rails, like the desktop window chrome */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 88px 100%;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 78%);
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: var(--accent-soft); color: var(--text); }

.shell { width: min(var(--shell), calc(100% - 48px)); margin-inline: auto; position: relative; z-index: 1; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.tiny { font-size: 12px; }
.hidden { display: none !important; }

/* --------------------------------------------------------------- top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px) saturate(1.1);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.02em; }
.brand__mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(150deg, var(--accent), var(--accent-dark));
  box-shadow: 0 0 0 1px rgba(111,231,192,0.35), 0 8px 20px -12px var(--accent);
  position: relative;
}
.brand__mark::after {
  content: ""; position: absolute; inset: 7px; border-radius: 3px;
  background: var(--bg); opacity: 0.65;
}
.brand small { color: var(--subtle); font-weight: 400; letter-spacing: 0.18em; font-size: 10px; }
.topbar__links { display: flex; gap: 4px; margin-left: 12px; }
.navlink {
  padding: 7px 12px; border-radius: 999px; color: var(--muted);
  font-size: 13px; transition: color var(--dur-short) var(--ease-std),
    background var(--dur-short) var(--ease-std);
}
.navlink:hover { color: var(--text); background: var(--surface); }
.navlink.is-active { color: var(--accent); background: var(--accent-soft); }
.topbar__spacer { flex: 1; }
.topbar__user { display: flex; align-items: center; gap: 10px; font-size: 13px; }

.notice {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
  font-size: 12.5px;
  color: var(--muted);
}
.notice__inner { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.notice__dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(111,231,192,0.12);
  animation: pulse 3.2s var(--ease-std) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: 84px 0 64px; overflow: clip; }
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: 0.85; pointer-events: none;
}
.hero__glow {
  position: absolute; inset: -140px -10% auto; height: 420px; z-index: 0;
  background: radial-gradient(50% 60% at 22% 40%, rgba(111,231,192,0.16), transparent 70%),
              radial-gradient(42% 50% at 82% 10%, rgba(63,199,158,0.10), transparent 72%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; display: grid; gap: 28px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.28em;
  color: var(--accent); text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--accent); opacity: 0.6;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 17ch;
  font-weight: 650;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-hover) 55%, var(--accent-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { max-width: 58ch; color: var(--muted); font-size: 16px; line-height: 1.75; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 26px; padding-top: 10px;
  border-top: 1px solid var(--border); margin-top: 6px;
}
.hero__meta div { display: grid; gap: 2px; }
.hero__meta b { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--text); }
.hero__meta span { font-size: 12px; color: var(--subtle); letter-spacing: 0.04em; }

/* --------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-bd: var(--border-strong);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; overflow: hidden;
  transition: transform var(--dur-short) var(--ease-std),
    background var(--dur-short) var(--ease-std),
    border-color var(--dur-short) var(--ease-std),
    box-shadow var(--dur-med) var(--ease-std);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--primary {
  --btn-bg: var(--accent); --btn-fg: #06231b; --btn-bd: transparent;
  box-shadow: 0 14px 34px -18px var(--accent);
}
.btn--primary:hover { --btn-bg: var(--accent-hover); box-shadow: 0 18px 40px -18px var(--accent); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--muted); --btn-bd: var(--border); }
.btn--ghost:hover { --btn-fg: var(--text); --btn-bd: var(--border-strong); background: var(--surface); }
.btn--danger { --btn-bg: var(--red-soft); --btn-fg: var(--red); --btn-bd: rgba(255,122,138,0.3); }
.btn--sm { padding: 7px 13px; font-size: 12.5px; }
/* highlighted download call-to-action (hero) */
.btn--dl {
  --btn-bg: linear-gradient(180deg, rgba(110, 242, 196, 0.18), rgba(110, 242, 196, 0.06));
  --btn-fg: var(--accent);
  --btn-bd: rgba(110, 242, 196, 0.55);
  box-shadow: 0 12px 30px -22px var(--accent);
  animation: dlPulse 3.4s var(--ease-std) infinite;
}
.btn--dl:hover {
  --btn-fg: #06231b;
  --btn-bg: var(--accent);
  --btn-bd: transparent;
  box-shadow: 0 18px 40px -16px var(--accent);
  animation: none;
}
@keyframes dlPulse {
  0%, 100% { box-shadow: 0 10px 26px -22px var(--accent); }
  50% { box-shadow: 0 16px 36px -14px var(--accent); }
}
@media (prefers-reduced-motion: reduce) { .btn--dl { animation: none; } }
.btn__ico { flex: 0 0 auto; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn__ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: 0.18; transform: translate(-50%, -50%) scale(0);
  animation: ripple var(--dur-long) var(--ease-std) forwards;
}
@keyframes ripple {
  to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ----------------------------------------------------------------- plans */
.section { padding: 30px 0 10px; }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 22px;
}
.section__head h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; }
.section__head p { color: var(--muted); font-size: 13.5px; }

.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.plan {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px 20px 20px;
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  transition: transform var(--dur-med) var(--ease-emph),
    border-color var(--dur-med) var(--ease-std),
    box-shadow var(--dur-med) var(--ease-std);
  will-change: transform;
}
.plan::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 50% -30%, rgba(111,231,192,0.10), transparent 60%);
  opacity: 0; transition: opacity var(--dur-med) var(--ease-std);
}
.plan:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lift); }
.plan:hover::after { opacity: 1; }
.plan.is-featured { border-color: rgba(111,231,192,0.42); background: linear-gradient(180deg, #16221e, #0f1714); }
.plan.is-disabled { opacity: 0.45; pointer-events: none; }
.plan__badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: #06231b; font-weight: 700;
  box-shadow: 0 0 24px -8px var(--accent);
}
.plan__name { font-size: 15px; color: var(--muted); letter-spacing: 0.02em; padding-right: 92px; }
.plan__price { display: flex; align-items: baseline; gap: 6px; }
.plan__price b { font-family: var(--mono); font-size: 38px; font-weight: 600; letter-spacing: -0.03em; }
.plan__price i { font-family: var(--mono); font-style: normal; font-size: 15px; color: var(--muted); }
.plan__was { font-size: 12px; color: var(--subtle); text-decoration: line-through; }
.plan__blurb { font-size: 12.5px; color: var(--muted); min-height: 2.6em; }
.plan__foot { margin-top: auto; display: grid; gap: 8px; }
.plan__unit { font-size: 11.5px; color: var(--subtle); letter-spacing: 0.02em; }

/* ------------------------------------------------------------------ bento */
.bento { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 26px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 24px;
}
.card--pad0 { padding: 0; overflow: hidden; }
.card h3 { font-size: 16px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 13.5px; }
.bento .card { display: flex; flex-direction: column; }
.steps { display: grid; gap: 14px; margin-top: 18px; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.steps b {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid rgba(111,231,192,0.3); border-radius: 8px; background: var(--accent-soft);
}
.steps span { font-size: 13.5px; color: var(--muted); }
.steps strong { color: var(--text); font-weight: 600; }
.flowline {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.flowline__node {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--subtle);
  padding: 5px 9px; border-radius: 7px; border: 1px solid var(--border); background: var(--input);
  white-space: nowrap;
}
.flowline__node--accent { color: var(--accent); border-color: rgba(111,231,192,0.34); background: var(--accent-soft); }
.flowline i {
  position: relative; flex: 1; height: 1px; min-width: 16px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 5px, transparent 5px 10px);
}
.flowline i::after {
  content: ""; position: absolute; top: -2px; left: 0; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  animation: flow 2.6s linear infinite;
}
@keyframes flow { from { left: 0; opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } to { left: calc(100% - 5px); opacity: 0; } }
.orbit {
  position: relative; aspect-ratio: 1; max-height: 240px; margin: 8px auto 0;
  border-radius: 50%; border: 1px dashed var(--border-strong);
  display: grid; place-items: center;
}
.orbit::before {
  content: ""; position: absolute; width: 62%; height: 62%; border-radius: 50%;
  border: 1px solid var(--border);
  animation: spin 22s linear infinite;
}
.orbit__core {
  width: 84px; height: 84px; border-radius: 26px;
  background: linear-gradient(150deg, var(--accent), var(--accent-dark));
  box-shadow: 0 0 60px -18px var(--accent);
  display: grid; place-items: center; font-family: var(--mono); font-size: 11px;
  color: #06231b; font-weight: 700; letter-spacing: 0.1em;
}
.orbit__sat {
  position: absolute; top: 50%; left: 50%; width: 10px; height: 10px;
  margin: -5px; border-radius: 50%; background: var(--accent);
  transform-origin: 0 0;
  animation: orbit 9s linear infinite;
}
.orbit__sat--b { animation-duration: 13s; animation-direction: reverse; background: var(--amber); }
@keyframes orbit {
  from { transform: rotate(0deg) translateX(104px); }
  to { transform: rotate(360deg) translateX(104px); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- orders */
.orderlist { display: grid; gap: 12px; }
.order {
  display: grid; grid-template-columns: 1fr auto; gap: 14px;
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-m);
  background: var(--surface);
}
.order__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order__no { font-family: var(--mono); font-size: 13px; color: var(--text); }
.chip {
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--muted); letter-spacing: 0.04em;
}
.chip--pending { color: var(--amber); border-color: rgba(244,199,107,0.35); background: var(--amber-soft); }
.chip--claimed { color: var(--accent); border-color: rgba(111,231,192,0.35); background: var(--accent-soft); }
.chip--paid { color: var(--accent); border-color: rgba(111,231,192,0.45); background: rgba(23,53,46,0.7); }
.chip--canceled { color: var(--red); border-color: rgba(255,122,138,0.3); background: var(--red-soft); }
.order__meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.order__card {
  grid-column: 1 / -1; margin-top: 4px; padding: 12px 14px; border-radius: var(--radius-s);
  background: var(--input); border: 1px dashed rgba(111,231,192,0.35);
  font-family: var(--mono); font-size: 13px; word-break: break-all; color: var(--accent-hover);
}
.order__acts { display: flex; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- drawer */
.scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(4, 6, 8, 0.62);
  backdrop-filter: blur(2px); opacity: 0; pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-std);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 61; top: 0; right: 0; height: 100%;
  width: min(460px, 100%);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface), var(--bg));
  border-left: 1px solid var(--border);
  transform: translateX(102%);
  transition: transform var(--dur-long) var(--ease-emph);
  box-shadow: var(--shadow-lift);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--border);
}
.drawer__body { padding: 22px; overflow-y: auto; display: grid; gap: 18px; align-content: start; }
.drawer__foot[hidden] { display: none !important; }
.drawer__foot { margin-top: auto; padding: 18px 22px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.iconbtn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  background: transparent; border: 1px solid var(--border); color: var(--muted); cursor: pointer;
  transition: color var(--dur-short) var(--ease-std), border-color var(--dur-short) var(--ease-std);
}
.iconbtn:hover { color: var(--text); border-color: var(--border-strong); }

.field { display: grid; gap: 7px; }
.field label { font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-s);
  background: var(--input); border: 1px solid var(--border);
  transition: border-color var(--dur-short) var(--ease-std), box-shadow var(--dur-short) var(--ease-std);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(111,231,192,0.12);
}
.field .hint { font-size: 11.5px; color: var(--subtle); }
.field input.mono { letter-spacing: 0.14em; }

.summary {
  display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--radius-m);
  background: var(--surface-2); border: 1px solid var(--border);
}
.summary__row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.summary__row b { color: var(--text); font-weight: 600; }
.summary__total { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
.summary__total b { font-family: var(--mono); font-size: 20px; color: var(--accent); }

.qrbox { display: grid; place-items: center; gap: 10px; padding: 16px; border-radius: var(--radius-m);
  background: var(--surface-2); border: 1px solid var(--border); }
.qrbox img { width: 200px; height: 200px; object-fit: contain; border-radius: 10px; background: #fff; }
.qrbox .empty {
  width: 200px; height: 200px; display: grid; place-items: center; text-align: center;
  border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--subtle); font-size: 12px;
  padding: 12px;
}
.qrbox .payqr { display: none; }
.qrbox .payqr.is-active { display: block; }
.qrbox.payqrbox { background: transparent; border: 0; padding: 14px 0 2px; gap: 12px; }
.qrbox.payqrbox img { width: 246px; height: 246px; border-radius: 0; background: transparent;
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, .55)) drop-shadow(0 0 22px rgba(94, 234, 181, .14)); }
.qrbox.payqrbox .tiny.subtle { text-align: center; line-height: 1.6; }
.paytabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); }
.paytab { appearance: none; border: 0; cursor: pointer; padding: 6px 14px; border-radius: 999px;
  background: transparent; color: var(--muted); font: inherit; font-size: 12px; transition: .16s ease; }
.paytab:hover { color: var(--text); }
.paytab.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.payamt { display: grid; gap: 6px; padding: 16px 18px; border-radius: var(--radius-m);
  background: linear-gradient(135deg, rgba(94,234,181,.10), rgba(94,234,181,.02));
  border: 1px solid rgba(94,234,181,.28); justify-items: start; }
.payamt__num { font-size: 30px; line-height: 1.1; color: var(--accent); letter-spacing: -.02em; }
.payamt .subtle { max-width: 34ch; line-height: 1.5; }
/* ----------------------------------------------------------------- modal */
.modal {
  position: fixed; z-index: 70; inset: 0; display: grid; place-items: center;
  padding: 24px; opacity: 0; pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-std);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__panel {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-l); padding: 26px; box-shadow: var(--shadow-lift);
  transform: translateY(10px) scale(0.985);
  transition: transform var(--dur-med) var(--ease-emph);
}
.modal.is-open .modal__panel { transform: none; }
.modal__tabs { display: flex; gap: 6px; padding: 4px; background: var(--input);
  border-radius: 999px; border: 1px solid var(--border); margin-bottom: 20px; }
.modal__tabs button {
  flex: 1; padding: 8px 0; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 13px; transition: all var(--dur-short) var(--ease-std);
}
.modal__tabs button.is-active { background: var(--surface-3); color: var(--text); }

/* ----------------------------------------------------------------- toast */
.toasts { position: fixed; z-index: 90; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast {
  padding: 12px 16px; border-radius: 12px; font-size: 13px;
  background: var(--elevated); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift); color: var(--text);
  animation: toast-in var(--dur-med) var(--ease-emph) both;
}
.toast--err { border-color: rgba(255,122,138,0.45); color: var(--red); background: #23161a; }
.toast--ok { border-color: rgba(111,231,192,0.4); color: var(--accent); background: #12211c; }
.toast.is-out { animation: toast-out var(--dur-med) var(--ease-std) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- footer */
footer.site {
  margin-top: 80px; padding: 34px 0 40px; border-top: 1px solid var(--border);
  color: var(--subtle); font-size: 12.5px;
}
footer.site .cols { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
footer.site b { color: var(--muted); font-weight: 600; }
.legal {
  white-space: pre-wrap; max-height: 240px; overflow: auto; padding-right: 6px;
  font-size: 12px; line-height: 1.75; color: var(--subtle);
}

/* -------------------------------------------------------------- reveals */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  animation: reveal-in 620ms var(--ease-emph) both;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* scroll-driven variant — compositor thread, no JS */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      opacity: 1; transform: none; animation: none;
      animation-timeline: view();
      animation-range: entry 5% cover 26%;
      animation-name: reveal-in;
      animation-duration: 1ms;
      animation-fill-mode: both;
      animation-timing-function: var(--ease-emph);
    }
  }
}

::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: var(--dur-med);
  animation-timing-function: var(--ease-std);
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1020px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 30px); }
  .hero { padding: 56px 0 40px; }
  .plans { grid-template-columns: 1fr; }
  .plan__price b { font-size: 32px; }
  .topbar__links { display: none; }
  .order { grid-template-columns: 1fr; }
  .drawer { width: 100%; border-left: 0; border-top: 1px solid var(--border); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__canvas { display: none; }
}
