/* Apex Network · design system
   Material 3 logic (tonal surfaces, pill controls, state layers, ripple), light lavender palette.
   Layout signature: quiet top bar + floating bottom dock, centered compositions, list-style pricing. */

:root {
  color-scheme: light;
  --bg: #f4effb;
  --surface: #fdfbff;
  --surface-1: #f3edfa;
  --surface-2: #ece4f6;
  --surface-3: #e2d8f0;
  --on-surface: #1d1a23;
  --on-surface-2: #4b4459;
  --outline: #7b7389;
  --outline-2: #d9d0e5;
  --primary: #6a4fb0;
  --on-primary: #ffffff;
  --primary-container: #e8ddff;
  --on-primary-container: #2a1660;
  --accent: #f6e4cf;
  --success: #2f7d55;
  --success-container: #d6f2e1;
  --warn: #8a5a00;
  --warn-container: #ffe6b8;
  --error: #b3261e;
  --error-container: #f9dedc;
  --shadow: 0 1px 2px rgb(40 20 80 / 0.05), 0 12px 32px -14px rgb(60 30 120 / 0.22);
  --aura-1: rgb(190 165 245 / 0.45);
  --dot: rgb(106 79 176 / 0.3);
  --aura-2: rgb(200 210 255 / 0.45);

  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "ZCOOL XiaoWei", "Nunito", "PingFang SC", "Microsoft YaHei", serif;
  --mono-label: "Nunito", "PingFang SC", sans-serif;
  --font-num: "Nunito", "PingFang SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

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

  --container: 1120px;
  --gutter: 28px;
  --dock-space: 120px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-decel: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t1: 150ms;
  --t2: 260ms;
  --t3: 480ms;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1623;
  --surface: #1d1924;
  --surface-1: #221d2a;
  --surface-2: #2a2533;
  --surface-3: #352f3f;
  --on-surface: #ebe2f2;
  --on-surface-2: #cdc3da;
  --outline: #978ea5;
  --outline-2: #3f3849;
  --primary: #cfbcff;
  --on-primary: #36206f;
  --primary-container: #4a368a;
  --on-primary-container: #ebdcff;
  --accent: #5a4330;
  --success: #8bd6ab;
  --success-container: #1f4d36;
  --warn: #f3c46b;
  --warn-container: #4d3800;
  --error: #f2b8b5;
  --error-container: #8c1d18;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 14px 34px -14px rgb(0 0 0 / 0.65);
  --aura-1: rgb(120 85 210 / 0.35);
  --dot: rgb(207 188 255 / 0.16);
  --aura-2: rgb(80 90 170 / 0.18);
}

/* Cross-page view transitions removed: they block clicks while running, which made nav feel laggy */
::view-transition-old(root) { animation: vt-out 120ms cubic-bezier(0.3, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 240ms cubic-bezier(0, 0, 0, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
/* The active nav pill slides between Home and Pricing instead of blinking */
.topbar__nav a[aria-current="page"] { view-transition-name: nav-pill; }
::view-transition-group(nav-pill) { animation-duration: 340ms; animation-timing-function: cubic-bezier(0.2, 0, 0, 1); }
::view-transition-old(nav-pill), ::view-transition-new(nav-pill) { animation-duration: 200ms; }
.topbar__end { view-transition-name: topbar-end; }
/* Coming back to a page in the same visit: content is already there, no intro replay */
.no-intro .stage-hero__copy > *, .no-intro .pet__body, .no-intro .pet__disc,
.no-intro .price-row, .no-intro .auth__box, .no-intro .view { animation: none !important; }
.dock { view-transition-name: dock; }
.topbar .brand { view-transition-name: brand; }

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

html {
  overflow-x: clip;
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--on-surface);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color var(--t2) var(--ease), color var(--t2) var(--ease);
}
body.has-dock { padding-bottom: var(--dock-space); }

/* Soft aura at the top of every page, instead of a grid */
body::before {
  display: none;
  content: ""; position: absolute; inset: 0 0 auto; height: 720px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 60% at 22% 0%, var(--aura-1), transparent 70%),
    radial-gradient(38% 52% at 82% 8%, var(--aura-2), transparent 70%);
}

main { flex: 1; }
main:focus { outline: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; }
::selection { background: var(--primary-container); color: var(--on-primary-container); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 880px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 900; padding: 10px 16px; border-radius: var(--r-ctl); background: var(--primary); color: var(--on-primary); font-weight: 800; }
.skip-link:focus { top: 12px; }
.muted { color: var(--on-surface-2); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand__logo { width: 34px; height: 34px; border-radius: 11px; background: #fff; object-fit: cover; box-shadow: 0 0 0 1px var(--outline-2); transition: transform var(--t3) var(--ease-spring); }
.brand:hover .brand__logo { transform: rotate(-10deg) scale(1.08); }

/* ---------- Top bar ---------- */
/* Top bar: glass fades in gradually with scroll and stays light so it never blocks the view */
.topbar {
  position: sticky; top: 0; z-index: 300;
  background: color-mix(in srgb, var(--bg) 0%, transparent);
  -webkit-backdrop-filter: blur(0px) saturate(100%); backdrop-filter: blur(0px) saturate(100%);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--outline-2) 0%, transparent);
  transition: background-color 500ms var(--ease), backdrop-filter 500ms var(--ease), -webkit-backdrop-filter 500ms var(--ease), box-shadow 500ms var(--ease);
}
.topbar[data-stuck="true"] {
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--outline-2) 70%, transparent);
}
@supports (animation-timeline: scroll()) {
  .topbar, .topbar[data-stuck="true"] { transition: none; animation: topbar-glass linear both; animation-timeline: scroll(root); animation-range: 0 120px; }
  @keyframes topbar-glass {
    from { background: color-mix(in srgb, var(--bg) 0%, transparent); -webkit-backdrop-filter: blur(0px) saturate(100%); backdrop-filter: blur(0px) saturate(100%); box-shadow: 0 1px 0 color-mix(in srgb, var(--outline-2) 0%, transparent); }
    to { background: color-mix(in srgb, var(--bg) 58%, transparent); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); box-shadow: 0 1px 0 color-mix(in srgb, var(--outline-2) 70%, transparent); }
  }
}
.topbar__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; height: 72px; }
.topbar__end { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.topbar__nav { display: flex; gap: 2px; padding: 4px; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--outline-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar__nav a { position: relative; display: inline-flex; align-items: center; height: 38px; padding: 0 20px; border-radius: var(--r-ctl); font-size: 14px; font-weight: 800; color: var(--on-surface-2); overflow: hidden; isolation: isolate; transition: background-color var(--t2) var(--ease), color var(--t2) var(--ease); }
.topbar__nav a::after { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; transition: opacity var(--t1) var(--ease); }
.topbar__nav a:hover::after { opacity: 0.08; }
.topbar__nav a[aria-current="page"] { background: var(--on-surface); color: var(--bg); }
@media (min-width: 761px) {
  .dock.dock--site { display: none; }
  body[data-dock="site"].has-dock { padding-bottom: 0; }
}
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: 6px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 16px; text-transform: uppercase; transition: transform var(--t2) var(--ease-spring); }
.avatar:hover { transform: scale(1.08); }
.avatar:active { transform: scale(0.94); }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--on-surface-2);
  cursor: pointer; overflow: hidden; isolation: isolate;
  transition: color var(--t1) var(--ease), transform var(--t2) var(--ease-spring);
}
.icon-btn::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity var(--t1) var(--ease); }
.icon-btn:hover { color: var(--on-surface); }
.icon-btn:hover::after { opacity: 0.08; }
.icon-btn:active { transform: scale(0.9); }
.icon-btn .i { width: 22px; height: 22px; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }

/* ---------- Bottom dock (site + console navigation) ---------- */
.dock {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 320;
  display: flex; gap: 4px; padding: 6px; translate: -50% 0;
  border-radius: var(--r-ctl);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border: 1px solid var(--outline-2);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow);
}
.dock__item {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px;
  border-radius: var(--r-ctl); font-size: 15px; font-weight: 800; color: var(--on-surface-2); white-space: nowrap;
  overflow: hidden; isolation: isolate;
  transition: background-color var(--t2) var(--ease), color var(--t2) var(--ease), padding var(--t3) var(--ease-decel);
}
.dock__item::after { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; transition: opacity var(--t1) var(--ease); }
.dock__item:hover::after { opacity: 0.08; }
.dock__item .i { width: 22px; height: 22px; }
.dock__item[aria-current="page"] { background: var(--primary); color: var(--on-primary); }
.dock__label { display: inline-block; max-width: 8em; transition: max-width var(--t3) var(--ease-decel), opacity var(--t2) var(--ease); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px; border: 1px solid transparent; border-radius: 12px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap; cursor: pointer;
  overflow: hidden; isolation: isolate; user-select: none;
  transition: background-color var(--t1) var(--ease), border-color var(--t1) var(--ease), box-shadow var(--t2) var(--ease), transform var(--t2) var(--ease), color var(--t1) var(--ease);
}
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; transition: opacity var(--t1) var(--ease); }
.btn:hover::after { opacity: 0.06; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn .i { width: 17px; height: 17px; }
.btn .i-arrow { transition: transform var(--t2) var(--ease); }
.btn:hover .i-arrow { transform: translateX(3px); }
/* Filled: a hairline top highlight and a soft tinted shadow instead of a flat slab */
.btn--filled {
  background: var(--primary); color: var(--on-primary);
  border-color: color-mix(in srgb, var(--primary) 80%, #000);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 1px 2px rgb(40 20 90 / 0.18), 0 6px 16px -8px color-mix(in srgb, var(--primary) 75%, transparent);
}
.btn--filled:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 2px 4px rgb(40 20 90 / 0.16), 0 12px 24px -10px color-mix(in srgb, var(--primary) 80%, transparent); }
:root[data-theme="dark"] .btn--filled { border-color: color-mix(in srgb, var(--primary) 85%, #fff); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 6px 16px -8px rgb(0 0 0 / 0.6); }
.btn--tonal { background: var(--primary-container); color: var(--on-primary-container); }
/* Outlined: hairline border on a solid surface, border turns violet on hover */
.btn--outlined { background: var(--surface); border-color: var(--outline-2); color: var(--on-surface); box-shadow: 0 1px 2px rgb(40 20 90 / 0.06); }
.btn--outlined:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 6px 16px -10px rgb(40 20 90 / 0.3); }
.btn--text { padding: 0 14px; color: var(--primary); }
.btn--text:hover { transform: none; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 15.5px; }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }

.link-action { display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 18px; border-radius: var(--r-ctl); font-weight: 800; color: var(--on-surface-2); transition: color var(--t1) var(--ease), background-color var(--t1) var(--ease); }
.link-action:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }

.ripple { position: absolute; z-index: -1; border-radius: 50%; background: currentColor; opacity: 0.18; transform: scale(0); pointer-events: none; animation: ripple 560ms var(--ease-decel) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- Segmented control ---------- */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--r-ctl); background: var(--surface-2); }
.seg__btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 0; border-radius: var(--r-ctl); background: transparent; font-size: 14px; font-weight: 800; cursor: pointer;
  color: var(--on-surface-2); white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: background-color var(--t2) var(--ease), color var(--t2) var(--ease), box-shadow var(--t2) var(--ease);
}
.seg__btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; transition: opacity var(--t1) var(--ease); }
.seg__btn:hover::after { opacity: 0.07; }
.seg__btn[aria-pressed="true"] { background: var(--surface); color: var(--on-surface); box-shadow: 0 1px 3px rgb(40 20 80 / 0.12); }
:root[data-theme="dark"] .seg__btn[aria-pressed="true"] { background: var(--primary-container); color: var(--on-primary-container); }
.seg__sub { font-size: 12px; font-weight: 700; color: var(--primary); }
.seg--lg { padding: 6px; }
.seg--lg .seg__btn { height: 52px; padding: 0 28px; font-size: 16px; }
.seg--block { display: grid; width: 100%; }
.flag { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08); flex-shrink: 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-ctl); font-size: 12px; font-weight: 800; background: var(--surface-3); color: var(--on-surface-2); white-space: nowrap; }
.badge--primary { background: var(--primary-container); color: var(--on-primary-container); }
.badge--ok { background: var(--success-container); color: var(--success); }
.badge--warn { background: var(--warn-container); color: var(--warn); }

/* ---------- Surfaces ---------- */
.card { position: relative; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--outline-2); }
.card__pad { padding: 24px; }

/* ---------- Text fields ---------- */
.field { position: relative; display: block; }
.field__input {
  width: 100%; height: 58px; padding: 20px 18px 2px; border: 0; border-radius: var(--r-md);
  background: var(--surface-2); font-size: 16px; color: var(--on-surface); outline: none;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow var(--t1) var(--ease), background-color var(--t1) var(--ease);
}
.field__input:hover { background: var(--surface-3); }
.field__input:focus { background: var(--surface); box-shadow: inset 0 0 0 2px var(--primary); }
.field__label {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--on-surface-2);
  pointer-events: none; transition: top var(--t2) var(--ease), font-size var(--t2) var(--ease), color var(--t1) var(--ease);
}
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label { top: 16px; font-size: 12px; font-weight: 700; }
.field__input:focus + .field__label { color: var(--primary); }
.field__input::placeholder { color: transparent; }
.field--trail .field__input { padding-right: 54px; }
.field__trail { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.field__hint { display: block; margin: 6px 18px 0; font-size: 13px; color: var(--on-surface-2); }
.field__hint:empty { display: none; }
.field--error .field__input { box-shadow: inset 0 0 0 2px var(--error); }
.field--error .field__label { color: var(--error); }
.field--error + .field__hint { color: var(--error); }

.check { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.check input { appearance: none; width: 20px; height: 20px; margin: 0; border: 2px solid var(--on-surface-2); border-radius: 6px; display: grid; place-items: center; cursor: pointer; transition: background-color var(--t1) var(--ease), border-color var(--t1) var(--ease); }
.check input::after { content: ""; width: 10px; height: 5px; border-left: 2px solid var(--on-primary); border-bottom: 2px solid var(--on-primary); transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform var(--t2) var(--ease-spring); }
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; background: var(--error-container); color: var(--error); }
.alert--info { background: var(--primary-container); color: var(--on-primary-container); }
.alert .i { margin-top: 1px; }

.snackbar {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 950;
  max-width: calc(100% - 32px); padding: 14px 22px; border-radius: var(--r-ctl);
  background: var(--on-surface); color: var(--bg); font-size: 14px; font-weight: 700; box-shadow: var(--shadow);
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform var(--t3) var(--ease-decel), opacity var(--t2) var(--ease);
}
.snackbar[data-show="true"] { transform: translate(-50%, 0); opacity: 1; }
.demo-banner { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-ctl); background: var(--warn-container); color: var(--warn); font-size: 12px; font-weight: 800; }

/* =====================================================
   HOME · patterned stage + a fox you can poke and drag
   ===================================================== */
:root {
  --hero-bg: #f4effb;
  --pattern: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132'><g fill='none' stroke='%236a4fb0' stroke-opacity='.13' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M24 13c1 6 3 8 9 9-6 1-8 3-9 9-1-6-3-8-9-9 6-1 8-3 9-9z'/><path d='M82 56l14 25H68z'/><path d='M82 66l-5 8h10'/><path d='M106 14c.7 4 2 5.3 6 6-4 .7-5.3 2-6 6-.7-4-2-5.3-6-6 4-.7 5.3-2 6-6z'/><circle cx='34' cy='92' r='5'/></g><g fill='%236a4fb0' fill-opacity='.14'><circle cx='112' cy='106' r='2'/><circle cx='60' cy='24' r='1.6'/><circle cx='14' cy='120' r='1.6'/><circle cx='118' cy='60' r='1.4'/></g></svg>");
  --disc: #e8defa;
  --disc-ring: rgb(106 79 176 / 0.22);
}
:root[data-theme="dark"] {
  --hero-bg: #1a1623;
  --pattern: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132'><g fill='none' stroke='%23cfbcff' stroke-opacity='.09' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M24 13c1 6 3 8 9 9-6 1-8 3-9 9-1-6-3-8-9-9 6-1 8-3 9-9z'/><path d='M82 56l14 25H68z'/><path d='M82 66l-5 8h10'/><path d='M106 14c.7 4 2 5.3 6 6-4 .7-5.3 2-6 6-.7-4-2-5.3-6-6 4-.7 5.3-2 6-6z'/><circle cx='34' cy='92' r='5'/></g><g fill='%23cfbcff' fill-opacity='.1'><circle cx='112' cy='106' r='2'/><circle cx='60' cy='24' r='1.6'/><circle cx='14' cy='120' r='1.6'/><circle cx='118' cy='60' r='1.4'/></g></svg>");
  --disc: #2a2240;
  --disc-ring: rgb(207 188 255 / 0.16);
}

.stage-hero { --px: 0; --py: 0; position: relative; isolation: isolate; overflow: clip; margin-top: -72px; padding-top: 72px; background: var(--hero-bg); }
.stage-hero__pattern {
  position: absolute; inset: -140px; z-index: -1; pointer-events: none;
  background-image: var(--pattern), var(--pattern);
  background-size: 132px 132px; background-position: 0 0, 66px 66px;
  -webkit-mask: linear-gradient(180deg, #000 52%, transparent 96%); mask: linear-gradient(180deg, #000 52%, transparent 96%);
  translate: calc(var(--px) * -12px) calc(var(--py) * -8px);
  transition: translate 1000ms cubic-bezier(0.2, 0.9, 0.2, 1);
  animation: pattern-drift 80s linear infinite;
}
@keyframes pattern-drift { to { background-position: 132px 132px, 198px 198px; } }
.stage-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; }

.stage-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px;
  min-height: min(calc(100svh - 72px), 880px); padding-block: 16px 96px;
}
.stage-hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(4.25rem, 8.6vw, 8.4rem); line-height: 1.04; letter-spacing: -0.02em; white-space: nowrap; }
:root[lang="en"] .stage-hero__title { font-size: clamp(3rem, 6vw, 5.75rem); white-space: normal; }
.stage-hero__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; color: var(--on-surface-2); }
.stage-hero__sub .i { width: 26px; height: 26px; color: var(--primary); }
.stage-hero__sub i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.stage-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.stage-hero__actions .btn--outlined { background: var(--surface); }

.specs { display: flex; margin-top: 48px; }
.specs > div { padding-right: 26px; margin-right: 26px; border-right: 1px solid var(--outline-2); }
.specs > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.specs strong { display: block; font-family: var(--font-num); font-weight: 900; font-size: 32px; line-height: 1; letter-spacing: -0.03em; }
.specs span { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--on-surface-2); }

/* The pet */
.pet { position: relative; justify-self: center; width: min(560px, 100%); aspect-ratio: 1; display: grid; place-items: center; user-select: none; }
.pet__disc { position: absolute; inset: 12% 10% 8%; border-radius: 50%; background: var(--disc); box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.7), 0 0 0 1.5px var(--disc-ring); translate: calc(var(--px) * 8px) calc(var(--py) * 5px); transition: translate 900ms cubic-bezier(0.2, 0.9, 0.2, 1); }
:root[data-theme="dark"] .pet__disc { box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.05), 0 0 0 1.5px var(--disc-ring); }
.pet__shadow { position: absolute; left: 27%; right: 27%; bottom: 9%; height: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgb(70 40 140 / 0.3), transparent); animation: shadow 6.5s ease-in-out infinite; }
:root[data-theme="dark"] .pet__shadow { background: radial-gradient(closest-side, rgb(0 0 0 / 0.55), transparent); }
.pet__body { position: relative; z-index: 1; width: 90%; touch-action: none; }
.pet__float { animation: float 6.5s ease-in-out infinite; }
.pet.is-dragging .pet__float, .pet.is-dragging .pet__shadow { animation-play-state: paused; }
.pet__lean { transition: transform 700ms cubic-bezier(0.2, 0.9, 0.2, 1); }
.pet__squash { transform-origin: 50% 80%; }
.mascot { display: block; width: 100%; height: auto; cursor: grab; -webkit-user-drag: none; filter: drop-shadow(0 18px 22px rgb(70 40 140 / 0.16)); }
.pet.is-dragging .mascot { cursor: grabbing; }
.mascot:focus-visible { outline: 2px solid var(--primary); outline-offset: -30px; border-radius: 40%; }

.pet__bubble {
  position: absolute; left: 50%; top: 4%; z-index: 4; translate: -50% 0;
  padding: 10px 16px; border-radius: 14px; background: var(--surface); color: var(--on-surface);
  border: 1.5px solid var(--on-surface); box-shadow: 3px 3px 0 var(--on-surface);
  font-size: 16px; font-weight: 800; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateY(10px) scale(0.85); transform-origin: 50% 100%;
  transition: opacity 180ms var(--ease), transform 420ms var(--ease-spring);
}
.pet__bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; margin-left: -6px; background: var(--surface); border-right: 1.5px solid var(--on-surface); border-bottom: 1.5px solid var(--on-surface); transform: rotate(45deg); }
.pet__bubble.is-show { opacity: 1; transform: none; }
.pet__hint { position: absolute; bottom: -2%; font-size: 13px; font-weight: 800; color: var(--on-surface-2); opacity: 0.8; white-space: nowrap; }

.twinkle { position: absolute; z-index: 2; color: var(--primary); pointer-events: none; animation: twinkle 3.4s ease-in-out infinite; }
:root[data-theme="dark"] .twinkle { color: #f6e2c6; }
.twinkle svg { width: 100%; height: 100%; }
.twinkle--a { top: 12%; left: 12%; width: 22px; height: 22px; }
.twinkle--b { top: 20%; right: 6%; width: 16px; height: 16px; animation-delay: -1.2s; color: #e0b27a; }
.twinkle--c { bottom: 22%; left: 4%; width: 14px; height: 14px; animation-delay: -2.1s; }
.twinkle--d { bottom: 16%; right: 10%; width: 20px; height: 20px; animation-delay: -0.6s; color: #e0b27a; }

.burst { position: absolute; left: 50%; top: 48%; width: 20px; height: 20px; margin: -10px 0 0 -10px; z-index: 3; color: var(--primary); pointer-events: none; }
.burst:nth-child(3n) { color: #e0b27a; }
.burst:nth-child(3n + 1) { color: #ff9cc7; }
.burst svg { width: 100%; height: 100%; }

@keyframes float { 0%, 100% { transform: translateY(-1.8%); } 50% { transform: translateY(1.8%); } }
@keyframes shadow { 0%, 100% { transform: scale(0.86); opacity: 0.75; } 50% { transform: scale(1); opacity: 1; } }
@keyframes twinkle { 0%, 100% { transform: scale(0.5) rotate(0deg); opacity: 0.25; } 50% { transform: scale(1) rotate(30deg); opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .stage-hero__copy > * { animation: settle 900ms var(--ease-decel) both; }
  .stage-hero__copy > :nth-child(2) { animation-delay: 90ms; }
  .stage-hero__copy > :nth-child(3) { animation-delay: 180ms; }
  .stage-hero__copy > :nth-child(4) { animation-delay: 270ms; }
  .pet__body { animation: pop-in 1.1s var(--ease-spring) 200ms both; }
  .pet__disc { animation: disc-in 900ms var(--ease-decel) both; }
}
@keyframes settle { from { transform: translateY(18px); opacity: 0; } }
@keyframes pop-in { from { scale: 0.8; opacity: 0; translate: 0 6%; } }
@keyframes disc-in { from { scale: 0.6; opacity: 0; } }

/* Buy by region */
.buy { padding-block: 80px 48px; }
.buy__head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.buy__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.25rem, 4.4vw, 3.5rem); line-height: 1.1; letter-spacing: -0.01em; }
.buy__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.region-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 20px;
  padding: 26px 26px 26px 28px; border: 1.5px solid var(--on-surface); border-radius: var(--r-xl); background: var(--surface);
  transition: background-color var(--t2) var(--ease), transform var(--t3) var(--ease-spring), box-shadow var(--t2) var(--ease);
}
.region-card:hover { background: var(--primary-container); transform: translateY(-3px); box-shadow: 5px 5px 0 var(--on-surface); }
.region-card:active { transform: translateY(0); box-shadow: 2px 2px 0 var(--on-surface); }
.region-card .flag { width: 54px; height: 36px; border-radius: 6px; }
.region-card__name { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1.15; }
.region-card__meta { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--on-surface-2); }
.region-card__price { font-family: var(--font-num); font-weight: 900; font-size: 40px; line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }
.region-card__price small { font-size: 15px; letter-spacing: 0; color: var(--on-surface-2); margin-left: 2px; }
.region-card__go { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-ctl); background: var(--on-surface); color: var(--bg); transition: transform var(--t3) var(--ease-spring); }
.region-card:hover .region-card__go { transform: translateX(4px) rotate(-12deg); }

/* ---------- Footer ---------- */
.footer { padding-block: 24px 32px; }
.footer__inner { display: grid; justify-items: center; gap: 10px; text-align: center; }
.footer__links { display: flex; gap: 4px; }
.footer__links a { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: var(--r-ctl); font-size: 14px; font-weight: 700; color: var(--on-surface-2); transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease); }
.footer__links a:hover { background: var(--surface-2); color: var(--on-surface); }
.footer__copy { font-size: 13px; color: var(--on-surface-2); }

/* =====================================================
   PRICING · centered toggle + list rows
   ===================================================== */
.page-head { display: grid; justify-items: center; gap: 10px; padding-block: 28px 32px; text-align: center; }
.page-title { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; font-size: clamp(2.75rem, 5.5vw, 4.25rem); line-height: 1.1; }
.page-sub { font-size: 16px; font-weight: 600; color: var(--on-surface-2); }
.page-head .seg { margin-top: 14px; }

.price-list { border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--outline-2); overflow: hidden; box-shadow: var(--shadow); }
.price-row {
  display: grid; grid-template-columns: minmax(200px, 1fr) auto minmax(130px, auto) auto; align-items: center; gap: 24px;
  padding: 28px 32px; border-bottom: 1px solid var(--outline-2);
  animation: row-in 520ms var(--ease-decel) both;
}
.price-row:nth-child(2) { animation-delay: 60ms; }
.price-row:last-child { border-bottom: 0; }
.price-row__name { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; white-space: nowrap; }
.price-row__meta span { white-space: nowrap; }
.pricing-wrap { max-width: 1060px; }
.price-row__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--on-surface-2); }
.price-row__meta span { display: inline-flex; align-items: center; gap: 6px; }
.price-row__meta .i { width: 18px; height: 18px; color: var(--primary); }
.price-row__price { text-align: right; }
.price-row__amount { font-family: var(--font-num); font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.price-row__per { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--on-surface-2); }
@keyframes row-in { from { opacity: 0; transform: translateY(10px); } }

.perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; padding-block: 28px 56px; font-size: 15px; font-weight: 700; color: var(--on-surface-2); }
.perks span { display: inline-flex; align-items: center; gap: 8px; }
.perks .i { color: var(--primary); }

/* =====================================================
   AUTH · split screen
   ===================================================== */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; min-height: calc(100svh - 72px); padding: 0 16px 16px; }
.auth__art {
  position: relative; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-xl);
  background-color: var(--disc);
  background-image: var(--pattern), var(--pattern);
  background-size: 132px 132px;
  background-position: 0 0, 66px 66px;
}
:root[data-theme="dark"] .auth__art { background-color: var(--disc); }
.auth__art { min-height: 0; }
.auth__art img { width: min(400px, 30vw); height: auto; animation: float 6.5s ease-in-out infinite; filter: drop-shadow(0 20px 24px rgb(80 50 150 / 0.2)); }
.auth__quote { position: absolute; left: 36px; right: 36px; bottom: 32px; font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; color: #2a1660; }
:root[data-theme="dark"] .auth__quote { color: #ebdcff; }
.auth__panel { display: grid; place-items: center; padding: 32px 16px; }
.auth__box { width: min(100%, 400px); animation: row-in 520ms var(--ease-decel) both; }
.auth__title { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; font-size: 44px; line-height: 1.1; }
.auth__sub { margin-top: 6px; font-weight: 600; color: var(--on-surface-2); }
.auth-form { display: grid; gap: 14px; margin-top: 32px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth__switch { margin-top: 28px; text-align: center; font-weight: 600; color: var(--on-surface-2); }
.auth__switch a { margin-left: 4px; font-weight: 800; color: var(--primary); }
.auth__switch a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* =====================================================
   CONSOLE
   ===================================================== */
.view { padding-block: 12px 32px; animation: row-in 420ms var(--ease-decel) both; }
.view__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 24px; }
.view__title { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1.15; }
.view__sub { margin-top: 2px; font-weight: 600; color: var(--on-surface-2); }
.crumbs { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 14px; font-weight: 800; color: var(--on-surface-2); }
.crumbs a:hover { color: var(--primary); }
.crumbs .i { width: 16px; height: 16px; }
.section-label { margin: 28px 0 12px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: var(--on-surface-2); }

.stack { display: grid; gap: 16px; }
.stack > * { min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }

.sub-card { padding: 26px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--outline-2); }
.sub-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sub-card__name { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.sub-card__big { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; }
.sub-card__big strong { font-family: var(--font-num); font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.sub-card__big span { font-weight: 800; color: var(--on-surface-2); }
.progress { height: 8px; margin-top: 16px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); transform-origin: left; animation: grow 900ms var(--ease-decel) both; }
@keyframes grow { from { transform: scaleX(0); } }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.fact { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-ctl); background: var(--surface-2); font-size: 13px; font-weight: 800; color: var(--on-surface-2); }
.fact .i { width: 16px; height: 16px; color: var(--primary); }
.sub-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.empty { display: grid; justify-items: center; gap: 10px; padding: 44px 24px; text-align: center; border-radius: var(--r-xl); background: var(--surface); border: 1px dashed var(--outline-2); }
.empty img { width: 140px; height: auto; animation: float 6s ease-in-out infinite; }
.empty h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; font-size: 28px; }
.empty p { font-weight: 600; color: var(--on-surface-2); }

.copy-field { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; border-radius: var(--r-ctl); background: var(--surface-2); }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 13px; color: var(--on-surface-2); }

.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.client {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-radius: var(--r-md);
  border: 0; background: var(--surface-2); cursor: pointer; text-align: left; overflow: hidden; isolation: isolate;
  transition: background-color var(--t1) var(--ease), transform var(--t2) var(--ease-spring);
}
.client::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--primary); opacity: 0; transition: opacity var(--t1) var(--ease); }
.client:hover::after { opacity: 0.08; }
.client:active { transform: scale(0.97); }
.client strong { display: block; font-size: 15px; font-weight: 800; }
.client small { font-size: 12px; font-weight: 600; color: var(--on-surface-2); }
.client .i { color: var(--primary); }

.list { border-radius: var(--r-xl); border: 1px solid var(--outline-2); background: var(--surface); overflow: hidden; }
.list__item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; min-height: 76px; padding: 14px 22px; border-bottom: 1px solid var(--outline-2); overflow: hidden; isolation: isolate; }
.list__item:last-child { border-bottom: 0; }
a.list__item::after { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; transition: opacity var(--t1) var(--ease); }
a.list__item:hover::after { opacity: 0.05; }
.list__title { font-weight: 800; }
.list__sub { font-size: 13px; font-weight: 600; color: var(--on-surface-2); }
.list__amount { font-family: var(--font-num); font-weight: 800; font-size: 20px; }

.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--outline-2); font-size: 15px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--on-surface-2); font-weight: 600; }
.kv dd { font-weight: 800; text-align: right; overflow-wrap: anywhere; }

/* =====================================================
   CHECKOUT
   ===================================================== */
.steps { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; color: var(--on-surface-2); }
.steps__dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); font-size: 12px; }
.steps__dot .i { width: 14px; height: 14px; }
.steps__item { display: inline-flex; align-items: center; gap: 8px; }
.steps__item[data-state="active"] { color: var(--on-surface); }
.steps__item[data-state="active"] .steps__dot { background: var(--primary); color: var(--on-primary); }
.steps__item[data-state="done"] .steps__dot { background: var(--primary-container); color: var(--on-primary-container); }
.steps__line { width: 24px; height: 2px; border-radius: 1px; background: var(--outline-2); }

.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 40px; }
.co-block { padding: 22px 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--outline-2); }
.co-block + .co-block { margin-top: 12px; }
.co-label { margin-bottom: 12px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: var(--on-surface-2); }
.co-summary { position: sticky; top: 88px; padding: 26px; border-radius: var(--r-xl); background: var(--primary-container); color: var(--on-primary-container); }
.co-summary .kv > div { border-color: color-mix(in srgb, var(--on-primary-container) 14%, transparent); }
.co-summary .kv dt { color: inherit; opacity: 0.75; }
.co-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 0 20px; }
.co-total__v { font-family: var(--font-num); font-size: 48px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.co-total small { display: block; font-size: 13px; font-weight: 700; opacity: 0.8; }
.pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pay-opt {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border: 2px solid transparent; border-radius: var(--r-md);
  background: var(--surface-2); font-size: 14px; font-weight: 800; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: border-color var(--t1) var(--ease), background-color var(--t1) var(--ease);
}
.pay-opt span { font-size: 12px; font-weight: 600; color: var(--on-surface-2); }
.pay-opt[aria-checked="true"] { border-color: var(--primary); background: var(--surface); }
.qr-box { display: grid; justify-items: center; gap: 14px; padding: 32px 20px; text-align: center; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--outline-2); }
.qr { padding: 14px; border-radius: var(--r-md); background: #fff; box-shadow: 0 0 0 1px var(--outline-2); line-height: 0; color: #1d1a23; }
.success { display: grid; justify-items: center; gap: 12px; padding: 48px 24px; text-align: center; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--outline-2); }
.success img { width: 150px; animation: pop 640ms var(--ease-spring) both; }
@keyframes pop { from { transform: scale(0.4) rotate(-12deg); opacity: 0; } }

.nf { display: grid; justify-items: center; gap: 12px; padding: 40px 16px; text-align: center; }
.nf img { width: min(240px, 56vw); animation: float 6s ease-in-out infinite; }
.nf h1 { font-family: var(--font-num); font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 960px) {
  .checkout { grid-template-columns: minmax(0, 1fr); }
  .co-summary { position: static; }
  .price-row { grid-template-columns: minmax(0, 1fr) auto; gap: 16px 20px; }
  .price-row .seg { grid-column: 1 / -1; grid-row: 2; }
  .price-row__price { grid-column: 1; grid-row: 3; text-align: left; }
  .price-row > .btn { grid-column: 2; grid-row: 3; }
}

@media (max-width: 760px) {
  :root { --gutter: 18px; --dock-space: 108px; }
  .topbar__inner { height: 64px; grid-template-columns: minmax(0, 1fr) auto; }
  .topbar__nav { display: none; }
  .topbar__reg { display: none; }
  .dock { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .dock__item { padding: 0 14px; }
  .dock__item:not([aria-current="page"]) .dock__label { max-width: 0; opacity: 0; margin-left: -8px; }

  .stage-hero__grid { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 18px; padding-block: 4px 56px; }
  .pet { order: -1; width: min(88vw, 400px, 52svh); }
  .pet__hint { display: none; }
  .stage-hero__title { font-size: clamp(3.6rem, 19vw, 5.6rem); }
  :root[lang="en"] .stage-hero__title { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .stage-hero__actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 26px; }
  .stage-hero__actions .btn { height: 54px; padding: 0 10px; }
  .specs { margin-top: 30px; justify-content: space-between; }
  .specs > div { padding-right: 0; margin-right: 0; border-right: 0; }
  .specs strong { font-size: 26px; }
  .buy { padding-block: 48px 32px; }
  .buy__grid { grid-template-columns: minmax(0, 1fr); }
  .region-card { grid-template-columns: auto minmax(0, 1fr) auto; padding: 20px; gap: 14px; }
  .region-card .flag { width: 42px; height: 28px; }
  .region-card__name { font-size: 22px; }
  .region-card__price { grid-column: 2; font-size: 30px; }
  .region-card__go { grid-row: 1 / span 2; grid-column: 3; width: 44px; height: 44px; }

  .price-row { padding: 22px 20px; }
  .price-row .seg { width: 100%; }

  .auth { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: auto; padding: 0 12px 24px; }
  .auth__art { height: 190px; border-radius: var(--r-lg); }
  .auth__art img { width: 150px; }
  .auth__quote { display: none; }
  .auth__panel { padding: 28px 8px 8px; }
  .auth__title { font-size: 38px; }

  .list__item { padding: 14px 16px; }
  .sub-card { padding: 22px; }
}

@media (max-width: 420px) {
  .seg__btn { padding: 0 10px; }
  .seg--lg .seg__btn { padding: 0 18px; }
  .price-row .seg__btn { flex-direction: column; gap: 0; height: auto; min-height: 48px; padding: 6px 4px; line-height: 1.2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  @view-transition { navigation: none; }
}

/* =====================================================
   Round 8: consistency + data
   ===================================================== */
/* Nav pill slides without stretching the label */
::view-transition-old(nav-pill), ::view-transition-new(nav-pill) { height: 100%; width: auto; object-fit: none; animation-duration: 180ms; }
/* Language switch: a short crossfade of the whole page */
.vt-lang::view-transition-old(root) { animation: vt-out 160ms ease-out both; }
.vt-lang::view-transition-new(root) { animation: vt-fade 260ms cubic-bezier(0, 0, 0, 1) both; }
@keyframes vt-fade { from { opacity: 0; } }

.page-sub:empty, .view__sub:empty { display: none; }

/* Same patterned ground on every inner page, fading out like the home hero */
body:not([data-page="home"]):not([data-page="login"]):not([data-page="register"]):not([data-page="forgot"])::before {
  display: block; content: ""; position: absolute; inset: 0 0 auto; height: 620px; z-index: -1; pointer-events: none;
  background: var(--pattern), var(--pattern);
  background-size: 132px 132px; background-position: 0 0, 66px 66px;
  -webkit-mask: linear-gradient(180deg, #000 25%, transparent 100%); mask: linear-gradient(180deg, #000 25%, transparent 100%);
  animation: pattern-drift 80s linear infinite;
}
.price-list, .co-block, .sub-card, .list, .card, .empty, .qr-box, .success { background-color: var(--surface); }

/* Home: measured data, US vs Japan */
.data-sec { padding-block: 24px 24px; }
.data-sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.data-sec__note { font-size: 13px; font-weight: 700; color: var(--on-surface-2); }
.dtable { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--outline-2); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; font-size: 16px; }
.dtable th, .dtable td { padding: 16px 24px; text-align: left; border-bottom: 1px solid var(--outline-2); vertical-align: middle; }
.dtable tr:last-child th, .dtable tr:last-child td { border-bottom: 0; }
.dtable thead th { padding-block: 18px; background: var(--surface-1); font-size: 15px; font-weight: 800; }
.dtable thead th span { display: inline-flex; align-items: center; gap: 10px; }
.dtable thead .flag { width: 26px; height: 18px; }
.dtable tbody th { width: 26%; font-size: 14px; font-weight: 700; color: var(--on-surface-2); }
.dtable td { width: 37%; font-weight: 800; font-variant-numeric: tabular-nums; }
.dtable td small { margin-left: 4px; font-size: 13px; font-weight: 700; color: var(--on-surface-2); }
.dtable .pending { font-weight: 700; color: var(--on-surface-2); opacity: 0.75; }
.dtable .rec { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 8px; background: var(--primary-container); color: var(--on-primary-container); font-size: 13px; font-weight: 800; }
.dtable tbody tr { transition: background-color var(--t1) var(--ease); }
.dtable tbody tr:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); }

@media (max-width: 760px) {
  .dtable { font-size: 14px; border-radius: var(--r-lg); }
  .dtable th, .dtable td { padding: 12px 12px; }
  .dtable thead th { font-size: 13px; }
  .dtable thead .flag { width: 20px; height: 14px; }
  .dtable tbody th { width: 28%; font-size: 12px; }
  .dtable td small { display: block; margin: 2px 0 0; font-size: 11px; }
  .dtable .rec { height: 24px; padding: 0 8px; font-size: 12px; }
}

/* =====================================================
   Pricing v2: one control row, two cards, in-place updates
   ===================================================== */
.pricing-wrap { max-width: 960px; }
.pr-head { display: grid; justify-items: center; gap: 22px; padding-block: 40px 36px; text-align: center; }
.pr-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pr-controls .seg__btn { height: 44px; padding: 0 18px; }
.plans2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan2 {
  position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--outline-2);
  transition: transform var(--t3) var(--ease-spring), box-shadow var(--t2) var(--ease), border-color var(--t2) var(--ease);
}
.plan2:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgb(60 30 120 / 0.35); }
.plan2--hot { border: 1.5px solid var(--on-surface); box-shadow: 5px 5px 0 var(--on-surface); }
.plan2--hot:hover { box-shadow: 7px 8px 0 var(--on-surface); }
.plan2__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan2__name { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.plan2__price { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.plan2__amount { font-family: var(--font-num); font-weight: 900; font-size: clamp(3.25rem, 6vw, 4.5rem); line-height: 0.95; letter-spacing: -0.04em; }
.plan2__amount.is-tick { animation: price-tick 260ms var(--ease-decel); }
@keyframes price-tick { from { opacity: 0.35; transform: translateY(6px); } }
.plan2__per { font-size: 16px; font-weight: 700; color: var(--on-surface-2); }
.plan2__monthly { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--on-surface-2); }
.plan2__list { display: grid; gap: 12px; margin: 26px 0 28px; padding-top: 22px; border-top: 1px solid var(--outline-2); font-size: 15px; font-weight: 700; }
.plan2__list li { display: flex; align-items: center; gap: 10px; }
.plan2__list .i { width: 18px; height: 18px; color: var(--primary); }
.plan2 .btn { margin-top: auto; }
.pr-note { margin-top: 26px; text-align: center; font-size: 14px; font-weight: 700; color: var(--on-surface-2); }

@media (max-width: 760px) {
  .pr-head { padding-block: 20px 24px; gap: 16px; }
  .pr-controls { display: grid; width: 100%; }
  .pr-controls .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .pr-controls .seg__btn { padding: 0 8px; }
  .plans2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .plan2 { padding: 24px 20px; }
  .plan2--hot { box-shadow: 4px 4px 0 var(--on-surface); }
}

/* Cap human check, styled to match the fields */
.cap-slot { min-height: 58px; }
.cap-slot cap-widget {
  display: block; width: 100%;
  --cap-background: var(--surface-2); --cap-border-color: transparent; --cap-border-radius: 12px;
  --cap-color: var(--on-surface); --cap-font: var(--font); --cap-checkbox-size: 24px;
  --cap-spinner-color: var(--primary); --cap-focus-ring: 0 0 0 2px var(--primary);
  --cap-widget-width: 100%;
}
