/* ==========================================================================
   Cuffy mini app — one stylesheet for the Telegram Mini App and the web page.
   Tokens come straight from the design; the accent palettes are swapped by
   <html data-accent="…">, which the operator picks in the bot.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-cyrillic.woff2") format("woff2-variations"),
       url("../fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2-variations"),
       url("../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin.woff2") format("woff2-variations"),
       url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("../fonts/jetbrains-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("../fonts/jetbrains-mono-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #0D0B11;
  --surface: #17141D;
  --surface-2: #1C1924;
  --surface-3: #241F2C;
  --surface-hover: #1D1924;
  --soft-hover: #2E2838;
  --card: #15121B;
  --card-2: #1B1822;
  --card-3: #1E1A26;
  --card-4: #221E2A;
  --card-5: #2A2533;
  --aside: #141119;
  --profile-card: #201A2B;
  --avatar: #2B2238;

  --text: #F2F0F5;
  --text-2: #DCD8E4;
  --muted: #A9A3B8;
  --muted-2: #8B8599;
  --muted-3: #6F6A7E;
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .12);

  --light: #EFEEF2;
  --light-hover: #FFFFFF;
  --qr-paper: #F4F3F7;
  --mascot: #F0F0F0;
  --ink: #1D192B;
  --ink-2: #5E5470;

  --accent: #CDB6FA;
  --accent-strong: #B48CF5;
  --accent-soft: #E4D7FD;
  --accent-ink: #401450;
  --accent-ink-hover: #55206B;
  --accent-tint: rgba(180, 140, 245, .12);
  --accent-badge: rgba(180, 140, 245, .16);
  --accent-badge-ink: #D9C8FB;
  --accent-flow: #F4EEFF;
  --glow-1: rgba(214, 172, 236, .24);
  --glow-2: rgba(150, 110, 220, .1);
  --glow-3: rgba(118, 86, 186, .22);
  --mascot-friend: #B48CF5;

  --soon: #F2C879;
  --soon-ink: #5E420C;
  --ended: #F0A3A8;
  --ended-ink: #641B22;
  --limited: #F7B98A;
  --limited-ink: #5B2A0B;
  --danger: #F8B5B5;
  --danger-tint: rgba(242, 139, 139, .14);

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --safe-top: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --nav-space: calc(118px + var(--safe-bottom));
  --page-x: 20px;
}

html[data-accent="mint"] {
  --accent: #A9E9CF; --accent-strong: #5FD1A4; --accent-soft: #D3F6E7; --accent-ink: #0E4733;
  --accent-ink-hover: #135C42; --accent-tint: rgba(95, 209, 164, .12); --accent-badge: rgba(95, 209, 164, .16);
  --accent-badge-ink: #BFF0DA; --accent-flow: #EFFFF8; --glow-1: rgba(150, 232, 200, .2);
  --glow-2: rgba(80, 190, 150, .09); --glow-3: rgba(60, 150, 120, .2); --mascot-friend: #5FD1A4;
}
html[data-accent="sky"] {
  --accent: #B3D2FB; --accent-strong: #74A9F6; --accent-soft: #DCEAFE; --accent-ink: #0E2E5C;
  --accent-ink-hover: #143D78; --accent-tint: rgba(116, 169, 246, .12); --accent-badge: rgba(116, 169, 246, .16);
  --accent-badge-ink: #C6DDFC; --accent-flow: #F1F7FF; --glow-1: rgba(160, 200, 250, .22);
  --glow-2: rgba(90, 140, 230, .1); --glow-3: rgba(70, 110, 200, .2); --mascot-friend: #74A9F6;
}
html[data-accent="peach"] {
  --accent: #F8C9A8; --accent-strong: #F29B67; --accent-soft: #FCE3D2; --accent-ink: #5C2A0E;
  --accent-ink-hover: #733614; --accent-tint: rgba(242, 155, 103, .12); --accent-badge: rgba(242, 155, 103, .16);
  --accent-badge-ink: #FAD7C0; --accent-flow: #FFF5EE; --glow-1: rgba(246, 190, 150, .2);
  --glow-2: rgba(220, 130, 90, .09); --glow-3: rgba(180, 100, 70, .18); --mascot-friend: #F29B67;
}
html[data-accent="rose"] {
  --accent: #F6BCD6; --accent-strong: #EC82B2; --accent-soft: #FBDCEA; --accent-ink: #5C1636;
  --accent-ink-hover: #741D45; --accent-tint: rgba(236, 130, 178, .12); --accent-badge: rgba(236, 130, 178, .16);
  --accent-badge-ink: #F8CDE0; --accent-flow: #FFF1F7; --glow-1: rgba(242, 170, 205, .22);
  --glow-2: rgba(210, 100, 160, .1); --glow-3: rgba(170, 70, 130, .2); --mascot-friend: #EC82B2;
}
html[data-accent="lime"] {
  --accent: #D6EE91; --accent-strong: #B4DC48; --accent-soft: #EBF7C8; --accent-ink: #2F3C08;
  --accent-ink-hover: #3E4F0B; --accent-tint: rgba(180, 220, 72, .12); --accent-badge: rgba(180, 220, 72, .16);
  --accent-badge-ink: #E1F3AE; --accent-flow: #FBFFEE; --glow-1: rgba(210, 236, 140, .18);
  --glow-2: rgba(160, 200, 70, .08); --glow-3: rgba(120, 160, 50, .16); --mascot-friend: #B4DC48;
}

/* ----------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  text-rendering: optimizeLegibility;
}
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.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;
}
.noscript { padding: 40px 24px; text-align: center; color: var(--muted); }
.mono { font-family: var(--mono); font-weight: 500; }
.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre { white-space: pre-line; }
.muted { color: var(--muted); }
.accent-text { color: var(--accent); }

/* --------------------------------------------------------------- splash */

.splash {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center;
  gap: 22px; background: var(--bg);
  transition: opacity .35s ease, visibility .35s;
}
.splash::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 440px; pointer-events: none;
  background: radial-gradient(58% 44% at 50% 0%, var(--glow-1) 0%, var(--glow-2) 52%, transparent 100%);
}
.splash.is-hidden { opacity: 0; visibility: hidden; }
.splash-mascot { animation: splash-float 2.4s ease-in-out infinite; }
.splash-eyes { transform-box: fill-box; transform-origin: 50% 62%; animation: splash-blink 3.2s infinite; }
.splash-dots { display: flex; gap: 6px; }
.splash-dots i {
  width: 6px; height: 6px; border-radius: 99px; background: var(--accent); opacity: .3;
  animation: splash-dot 1.2s infinite ease-in-out;
}
.splash-dots i:nth-child(2) { animation-delay: .15s; }
.splash-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes splash-float { 50% { transform: translateY(-5px); } }
@keyframes splash-blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes splash-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

/* ------------------------------------------------------------ app shell */

.app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  isolation: isolate;
}
.glow {
  position: absolute; left: 0; right: 0; top: 0; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(58% 44% at 50% 0%, var(--glow-1) 0%, var(--glow-2) 52%, transparent 100%);
}
.glow.is-strong {
  height: 600px;
  background:
    radial-gradient(40% 54% at 50% 8%, var(--glow-1) 0%, var(--glow-2) 50%, transparent 100%),
    radial-gradient(88% 58% at 50% 0%, var(--glow-3) 0%, transparent 72%);
}
.screen {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 8px) var(--page-x) var(--nav-space);
  will-change: transform, opacity;
}
.screen.no-nav { padding-bottom: calc(150px + var(--safe-bottom)); }

/* ------------------------------------------------------------- headings */

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.wordmark { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -.03em; }
.eyebrow { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--accent); }
.title-xl { margin: 0; font-size: 30px; line-height: 36px; font-weight: 800; letter-spacing: -.035em; }
.title-lg { margin: 0; font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -.025em; }
.title-md { margin: 0; font-size: 19px; line-height: 24px; font-weight: 800; letter-spacing: -.02em; }
.subtitle { margin: 6px 0 0; font-size: 15px; line-height: 21px; font-weight: 500; color: var(--muted); text-wrap: pretty; }
.section-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 26px 0 10px; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--muted);
}
.section-label span:last-child { font-size: 13px; font-weight: 600; color: var(--muted-2); }

/* -------------------------------------------------------------- buttons */

.tap {
  position: relative;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
  cursor: pointer;
}
.tap:disabled, .tap[aria-disabled="true"] { cursor: default; opacity: .55; }
.icon-btn {
  flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text-2);
  text-decoration: none;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.icon-btn.is-surface { background: var(--surface); color: var(--text); }
.icon-btn.is-surface:hover { background: var(--surface-hover); }
.icon-btn.is-soft { background: var(--surface-3); color: var(--text); }
.icon-btn.is-soft:hover { background: var(--soft-hover); }
.icon-btn.is-accent { color: var(--accent); }
.icon-btn.is-plain { background: transparent; color: var(--muted-2); }
.icon-btn.is-danger:hover { background: var(--danger-tint); color: var(--danger); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 22px; border: 0; border-radius: 999px;
  font-size: 16px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
}
.btn.is-block { width: 100%; }
.btn-light { background: var(--light); color: var(--accent-ink); }
.btn-light:hover { background: var(--light-hover); }
.btn-plum { background: var(--accent-ink); color: var(--text); height: 48px; font-size: 14px; padding: 0 14px; }
.btn-plum:hover { background: var(--accent-ink-hover); }
.btn-plumsoft { background: rgba(64, 20, 80, .08); color: var(--accent-ink); height: 48px; font-size: 14px; padding: 0 16px; }
html:not([data-accent="lavender"]) .btn-plumsoft { background: color-mix(in srgb, var(--accent-ink) 9%, transparent); }
.btn-plumsoft:hover { background: color-mix(in srgb, var(--accent-ink) 15%, transparent); }
.btn-ghost { background: var(--surface-2); color: var(--text-2); height: 44px; font-size: 14px; font-weight: 700; padding: 0 16px 0 13px; gap: 8px; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.btn-dark { background: var(--card-4); color: var(--text); height: 52px; font-size: 15px; font-weight: 700; }
.btn-dark:hover { background: var(--soft-hover); }
.btn-arrow {
  width: 40px; height: 40px; flex: none; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent-ink); color: var(--light);
}
.btn .spinner { width: 18px; height: 18px; border-width: 2px; }

/* Hero actions on the home screen, straight from the design. */
.action {
  display: flex; align-items: center; width: 100%; height: 58px; border: 0; border-radius: 20px;
  font-size: 16px; font-weight: 700; text-decoration: none; text-align: left;
}
.action-light { justify-content: space-between; padding: 0 10px 0 22px; background: var(--light); color: var(--accent-ink); }
.action-light:hover { background: var(--light-hover); }
.action-light .btn-arrow { width: 38px; height: 38px; }
.action-surface { gap: 10px; padding: 0 16px 0 22px; background: var(--surface); color: var(--text); }
.action-surface:hover { background: var(--surface-hover); }
.action-surface .grow { flex: 1; }
.action-surface .meta { font-size: 14px; font-weight: 600; color: var(--muted); }

/* --------------------------------------------------------------- lists */

.list { border-radius: 24px; background: var(--surface); overflow: hidden; }
.list.is-tight { border-radius: 22px; }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 0 18px 0 20px;
  border: 0; background: transparent; color: var(--text); text-decoration: none; text-align: left;
}
.row + .row { border-top: 1px solid var(--line); }
button.row:hover, a.row:hover { background: rgba(255, 255, 255, .03); }
.row.is-compact { min-height: 52px; padding: 0 16px; }
.row .row-icon { flex: none; color: var(--text-2); }
.row .row-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.row .row-meta { font-size: 14px; font-weight: 600; color: var(--muted-2); white-space: nowrap; }
.row .row-meta.is-accent { color: var(--accent); font-weight: 700; }
.row .row-chevron { flex: none; color: var(--muted-3); }
.row .row-stack { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .row-stack .row-title { flex: none; line-height: 20px; }
.row .row-sub { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted-2); }
.row .row-link { font-family: var(--mono); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted-2); }

/* --------------------------------------------------------- status card */

.status { position: relative; margin-top: 48px; }
.status-card {
  position: relative; z-index: 2; height: 252px; padding: 30px 22px 18px; border-radius: 28px;
  background: var(--accent); color: var(--ink); text-align: center; overflow: hidden;
  transform-origin: 50% 100%;
}
.status-card[data-state="soon"] { background: var(--soon); }
.status-card[data-state="ended"] { background: var(--ended); }
.status-card[data-state="disabled"] { background: var(--ended); }
.status-card[data-state="limited"] { background: var(--limited); }
.status-card[data-state="none"] { background: var(--surface); color: var(--text); }
.status-label { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--accent-ink); }
.status-card[data-state="soon"] .status-label, .status-card[data-state="soon"] .status-dates { color: var(--soon-ink); }
.status-card[data-state="ended"] .status-label, .status-card[data-state="ended"] .status-dates,
.status-card[data-state="disabled"] .status-label, .status-card[data-state="disabled"] .status-dates { color: var(--ended-ink); }
.status-card[data-state="limited"] .status-label, .status-card[data-state="limited"] .status-dates { color: var(--limited-ink); }
.status-number {
  margin-top: 8px; margin-left: -.05em; font-size: 96px; line-height: 88px; font-weight: 800;
  letter-spacing: -.05em; font-variant-numeric: tabular-nums;
}
.status-number.is-symbol { font-size: 88px; }
.status-caption { margin-top: 4px; font-size: 16px; line-height: 22px; font-weight: 700; }
.status-wave { margin-top: 24px; width: 100%; height: 16px; overflow: visible; }
.status-dates { margin-top: 6px; display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; font-weight: 700; color: var(--accent-ink); }
.status-card[data-state="none"] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px 24px; }
.status-card[data-state="none"] .status-empty-title { font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -.025em; }
.status-card[data-state="none"] .status-empty-text { max-width: 280px; font-size: 15px; line-height: 21px; font-weight: 500; color: var(--muted); }
.status-mascot { position: absolute; left: 50%; top: -59px; z-index: 1; width: 112px; height: 75px; margin-left: -56px; }
.status-paw { position: absolute; top: -8px; z-index: 3; width: 28px; height: 16px; }
.status-paw.is-left { left: calc(50% - 88px); }
.status-paw.is-right { left: calc(50% + 60px); }

.wave-rest { stroke: rgba(29, 25, 43, .16); }
.wave-fill { stroke: var(--ink); }
.wave-flow { stroke: #fff; stroke-dasharray: 14 46; animation: wave-flow 2.4s linear infinite; }
.on-dark .wave-rest { stroke: rgba(255, 255, 255, .12); }
.on-dark .wave-fill { stroke: var(--accent-strong); }
.on-dark .wave-flow { stroke: var(--accent-flow); }
@keyframes wave-flow { to { stroke-dashoffset: -60; } }

/* ---------------------------------------------------------- tab bar */

.tabbar {
  position: fixed; left: 50%; bottom: calc(22px + var(--safe-bottom)); z-index: 20;
  width: min(calc(100% - 24px), 536px); transform: translateX(-50%);
}
.tabbar-inner {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: 2px; padding: 6px; border-radius: 999px; background: rgba(28, 25, 36, .92);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .85), inset 0 0 0 1px rgba(255, 255, 255, .03);
  -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
}
.tabbar-pill {
  position: absolute; top: 6px; left: 6px; height: 56px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); pointer-events: none; will-change: transform, width;
}
.tab {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; height: 56px; padding: 0; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted-2); font-size: 11px; line-height: 13px; font-weight: 700; text-decoration: none;
}
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"] .tab-icon { color: var(--accent); }
.tab-icon { display: block; }

/* ------------------------------------------------------------- plans */

.plans-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan {
  position: relative; overflow: hidden; height: 184px; display: flex; flex-direction: column;
  align-items: stretch; justify-content: space-between; padding: 16px 16px 15px 18px; border-radius: 28px;
  border: 1px solid var(--surface); background: var(--surface); color: var(--text); text-align: left;
}
.plan[aria-pressed="true"] { background: var(--light); border-color: var(--light); color: var(--ink); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 24px; }
.plan-dot {
  width: 24px; height: 24px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .24);
  display: grid; place-items: center; color: transparent;
}
.plan[aria-pressed="true"] .plan-dot { border-color: var(--ink); background: var(--ink); color: var(--light); }
.plan-badge {
  height: 22px; padding: 0 8px; border-radius: 999px; background: var(--accent-badge); color: var(--accent-badge-ink);
  font-size: 12px; line-height: 22px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.plan[aria-pressed="true"] .plan-badge { background: var(--accent-ink); color: var(--text); }
.plan-num { font-size: 56px; line-height: 52px; font-weight: 800; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.plan-unit, .plan-per { margin-top: 4px; font-size: 15px; line-height: 18px; font-weight: 700; color: var(--muted); }
.plan-per { margin-top: 2px; font-size: 13px; font-weight: 600; }
.plan[aria-pressed="true"] .plan-unit, .plan[aria-pressed="true"] .plan-per { color: var(--ink-2); }
.plan-price { font-size: 20px; line-height: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-price s { margin-right: 6px; font-size: 14px; font-weight: 600; opacity: .55; }

.plan-chips { margin: 16px calc(var(--page-x) * -1) 0; padding: 0 var(--page-x); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.plan-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 700;
}
.chip[aria-pressed="true"] { background: var(--light); color: var(--accent-ink); }
.plan-details { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.plan-detail {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600;
}
.plan-detail svg { color: var(--accent); }

.methods { margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.method {
  position: relative; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 0 6px; border-radius: 20px; border: 1.5px solid var(--surface); background: var(--surface);
  color: var(--muted); font-size: 13px; line-height: 16px; font-weight: 700; text-align: center;
}
.method[aria-pressed="true"] { border-color: var(--accent-strong); background: var(--accent-tint); color: var(--text); }
.method[aria-disabled="true"] { opacity: .45; }
.method img, .method svg.method-icon { width: 28px; height: 28px; object-fit: contain; }
.method-name { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.method-note { position: absolute; top: 6px; right: 8px; font-size: 10px; font-weight: 800; color: var(--muted-2); }

.methods.is-muted { opacity: .38; pointer-events: none; filter: saturate(.6); transition: opacity .3s, filter .3s; }
.methods { transition: opacity .3s, filter .3s; }
.balance-toggle {
  width: 100%; margin-bottom: 8px; display: flex; align-items: center; gap: 14px; min-height: 64px;
  padding: 10px 16px 10px 14px; border-radius: 20px; border: 1.5px solid var(--surface);
  background: var(--surface); color: var(--text); text-align: left;
}
.balance-toggle.is-on { border-color: color-mix(in srgb, var(--accent-strong) 70%, transparent); background: var(--accent-tint); }
.balance-check {
  flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  border: 1.5px solid rgba(255, 255, 255, .24); color: transparent; transition: background-color .25s, border-color .25s, color .2s;
}
.balance-toggle.is-on .balance-check { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--surface); }
.balance-toggle .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.balance-toggle .t { font-size: 15px; line-height: 20px; font-weight: 700; }
.balance-toggle .s { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted-2); }
.balance-toggle .minus { flex: none; font-size: 15px; font-weight: 800; color: var(--muted); }
.balance-toggle.is-on .minus { color: var(--accent); }
.pay-note { margin: 10px 2px 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); }

.app-chips { margin: 14px calc(var(--page-x) * -1) 0; padding: 0 var(--page-x); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.app-chips::-webkit-scrollbar { display: none; }
.app-chip {
  flex: none; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 700;
}
.app-chip[aria-pressed="true"] { border-color: transparent; background: var(--accent-tint); color: var(--accent); }
.app-chip .star { margin-left: 4px; color: var(--soon); }
.step-actions.is-wrap { flex-wrap: wrap; }
.step-actions.is-wrap .btn-plum { flex: 1 1 100%; }
.step-actions.is-wrap .btn-plumsoft:not(.is-square) { flex: 1 1 auto; }
.step-actions .btn-plum.is-alt { background: color-mix(in srgb, var(--accent-ink) 82%, #000); }

.topup { display: flex; flex-direction: column; align-items: stretch; }
.topup > .sheet-title, .topup > .sheet-text { text-align: center; }
.topup > .sheet-text { max-width: 300px; margin-left: auto; margin-right: auto; }
.topup-amount {
  margin-top: 20px; display: flex; align-items: baseline; justify-content: center; gap: 8px;
  font-size: 56px; line-height: 60px; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums;
  cursor: text;
}
.topup-field { position: relative; display: inline-block; min-width: .6em; }
.topup-sizer { visibility: hidden; white-space: pre; }
.topup-field input {
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0; outline: none; background: transparent;
  color: var(--text); font: inherit; letter-spacing: inherit; text-align: center; caret-color: var(--accent);
}
.topup-field input::placeholder { color: var(--muted-3); }
.topup-currency { color: var(--muted); font-size: 36px; letter-spacing: 0; }
.topup-limits { margin-top: 6px; text-align: center; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted-2); }
.topup-presets { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.topup-presets .chip { width: 100%; height: 40px; padding: 0 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Inside a sheet the surface colour is the sheet itself: lift the idle tiles. */
.sheet .chip:not([aria-pressed="true"]) { background: var(--card-4); }
.sheet .method:not([aria-pressed="true"]) { background: var(--card-4); border-color: var(--card-4); }
.balance-row-btn { height: 34px; padding: 0 14px; font-size: 13px; }

.paybar {
  position: fixed; left: 50%; bottom: 0; z-index: 20; width: min(100%, 560px); transform: translateX(-50%);
  padding: 18px var(--page-x) calc(18px + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 62%, rgba(13, 11, 17, 0));
}
.paybar .btn { justify-content: space-between; padding: 0 8px 0 24px; }
.paybar-total { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.paybar-note { margin: 8px 0 0; text-align: center; font-size: 11px; line-height: 15px; font-weight: 500; color: var(--muted-2); }
.paybar-note a { color: var(--muted); }

/* ------------------------------------------------------------ connect */

.segment {
  position: relative; margin-top: 16px; height: 56px; padding: 4px; border-radius: 999px; background: var(--surface);
}
.segment-thumb {
  position: absolute; left: 4px; top: 4px; height: 48px; border-radius: 999px; background: var(--light);
  will-change: transform, width; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6);
}
.segment-items { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: 48px; }
.segment-item {
  height: 48px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font-size: 13px; line-height: 16px; font-weight: 800; letter-spacing: -.01em; transition: color .25s;
}
.segment-item:hover { color: var(--text); }
.segment-item[aria-pressed="true"] { color: var(--accent-ink); }

.connect-track { margin-top: 18px; display: grid; grid-template-columns: 60px minmax(0, 1fr) 60px; align-items: center; column-gap: 10px; }
.connect-node {
  width: 60px; height: 60px; border-radius: 999px; display: grid; place-items: center; background: var(--light);
}
.connect-node.is-device { border: 1px solid rgba(255, 255, 255, .1); background: var(--surface); color: var(--accent); }
.connect-node.is-device.is-done { border-color: var(--accent-strong); background: var(--accent-strong); color: var(--surface); }
.connect-labels {
  margin-top: 8px; display: grid; grid-template-columns: 60px minmax(0, 1fr) 60px; column-gap: 10px;
  font-size: 12px; line-height: 16px; font-weight: 700; color: var(--muted-2); text-align: center;
}
.connect-labels .is-done { color: var(--accent); }

.steps { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.step-card {
  position: relative; overflow: hidden; padding: 18px 18px 18px 20px; border-radius: 28px;
  background: var(--light); color: var(--ink);
}
.step-head { display: flex; align-items: center; justify-content: space-between; }
.step-num { font-size: 44px; line-height: 40px; font-weight: 800; letter-spacing: -.06em; }
.step-badge {
  height: 26px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent-ink) 8%, transparent);
  color: var(--accent-ink); font-size: 12px; line-height: 26px; font-weight: 800;
}
.step-title { margin: 8px 0 0; font-size: 19px; line-height: 24px; font-weight: 800; letter-spacing: -.02em; }
.step-text { margin: 4px 0 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); }
.step-actions { margin-top: 16px; display: flex; gap: 8px; }
.step-actions .btn-plum { flex: 1; min-width: 0; }
.step-actions .btn-plum span { overflow: hidden; text-overflow: ellipsis; }
.step-actions .btn-plumsoft.is-square { width: 48px; padding: 0; }
.step-row {
  display: flex; align-items: center; gap: 14px; width: 100%; height: 64px; padding: 0 18px 0 14px;
  border: 0; border-radius: 22px; background: var(--surface); color: var(--text); text-align: left;
}
.step-row:hover { background: rgba(255, 255, 255, .06); }
.step-row.is-todo { background: transparent; border: 1px dashed var(--line-2); cursor: default; }
.step-check {
  flex: none; width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent-strong); color: var(--surface);
}
.step-row.is-todo .step-check {
  background: transparent; border: 1.5px solid rgba(255, 255, 255, .18); color: var(--muted-2);
  font-size: 14px; font-weight: 800;
}
.step-row .row-stack { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.step-row .t { font-size: 15px; line-height: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-row.is-todo .t { color: var(--muted); }
.step-row .s { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted-2); }
.step-row .edit { font-size: 13px; font-weight: 700; color: var(--accent); }
.done-card {
  position: relative; overflow: hidden; margin-top: 18px; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 26px 22px 22px; border-radius: 28px; background: var(--light); color: var(--ink);
}
.done-card .btn-plum { margin-top: 20px; width: 100%; height: 50px; font-size: 15px; }
.qr-row {
  margin-top: 14px; width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 6px;
  border: 0; border-radius: 22px; background: var(--surface); color: var(--text); text-align: left;
}
.qr-row:hover { background: rgba(255, 255, 255, .06); }

/* ------------------------------------------------------------- friends */

.friends-hero { position: relative; margin: 14px auto 0; width: 300px; max-width: 100%; height: 168px; }
.friends-hero .shadow {
  position: absolute; left: 52px; right: 36px; bottom: 14px; height: 14px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); filter: blur(8px);
}
.friends-hero .mascot-a { position: absolute; left: 28px; top: 34px; filter: drop-shadow(0 18px 24px rgba(3, 2, 8, .6)); }
.friends-hero .mascot-b { position: absolute; left: 166px; top: 71px; filter: drop-shadow(0 14px 18px rgba(3, 2, 8, .55)); }
.reward { margin-top: 14px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.reward-value { font-size: 44px; line-height: 48px; font-weight: 800; letter-spacing: -.045em; }
.reward-text { margin: 6px 0 0; max-width: 300px; font-size: 15px; line-height: 21px; font-weight: 500; color: var(--muted); text-wrap: pretty; }
.linkbox {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; border-radius: 22px; background: var(--surface);
}
.linkbox .label { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--muted-2); }
.linkbox .value { margin-top: 6px; font-family: var(--mono); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); }
.stats { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 16px 18px; border-radius: 22px; background: var(--surface); }
.stat-value { font-size: 30px; line-height: 34px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 4px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted-2); }

/* ------------------------------------------------------------- profile */

.profile-head { display: flex; align-items: center; gap: 18px; padding-top: 40px; }
.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; overflow: hidden;
  background: var(--avatar); color: var(--accent-soft); font-size: 26px; font-weight: 800;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.is-sm { width: 40px; height: 40px; font-size: 16px; }
.profile-sub { margin: 4px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.plan-card { margin-top: 28px; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 24px; background: var(--profile-card); }
.plan-card .mascot-chip { flex: none; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: var(--bg); }
.plan-card .t { font-size: 15px; line-height: 20px; font-weight: 800; }
.plan-card .s { margin-top: 2px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--accent); }
.plan-card .s.is-ended { color: var(--ended); }
.plan-card .btn { height: 44px; padding: 0 16px; font-size: 14px; }
.device-row { display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 10px 0 16px; overflow: hidden; }
.device-row + .device-row { border-top: 1px solid var(--line); }
.device-row .icon { flex: none; width: 20px; display: grid; place-items: center; color: var(--accent); }
.device-row .name { font-size: 15px; line-height: 20px; font-weight: 700; }
.device-row .meta { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted-2); }
.dot { width: 6px; height: 6px; flex: none; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.dot.is-online { background: var(--accent-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-strong) 18%, transparent); }
.more-row {
  width: 100%; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 16px; border: 0;
  border-top: 1px solid var(--line); background: transparent; color: var(--accent); font-size: 15px; font-weight: 700; text-align: left;
}
.more-row:hover { background: rgba(255, 255, 255, .04); }
.empty-row { height: 64px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--muted-2); }

/* ------------------------------------------------------------- sheets */

.sheet-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.sheet-backdrop {
  position: absolute; inset: 0; border: 0; padding: 0; margin: 0; background: rgba(6, 5, 9, .66);
  pointer-events: auto; cursor: default; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.sheet {
  position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--safe-bottom));
  max-width: 544px; margin: 0 auto; max-height: calc(100% - var(--safe-top) - 40px);
  display: flex; flex-direction: column; border-radius: 36px; background: var(--surface);
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, .85); pointer-events: auto; will-change: transform;
  overflow: hidden;
}
.sheet-grip { flex: none; display: flex; justify-content: center; padding: 10px 0 0; touch-action: none; cursor: grab; }
.sheet-grip span { width: 40px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 14px 24px 24px; -webkit-overflow-scrolling: touch; }
.sheet-body.is-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sheet-title { margin: 6px 0 0; font-size: 21px; line-height: 26px; font-weight: 800; letter-spacing: -.02em; }
.sheet-text { margin: 6px 0 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); text-wrap: pretty; }
.sheet-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.sheet-actions .btn-dark { height: 52px; }

.qr-paper { margin-top: 22px; padding: 16px; border-radius: 30px; background: var(--qr-paper); }
.qr-svg { width: 208px; height: 208px; }
.qr-svg.is-sm { width: 156px; height: 156px; }

.field {
  width: 100%; height: 56px; padding: 0 20px; border-radius: 18px; border: 1.5px solid transparent;
  background: var(--card-3); color: var(--text); font: 600 17px/1 var(--font); letter-spacing: .04em; text-transform: uppercase;
  outline: none; transition: border-color .2s, background-color .2s;
}
.field::placeholder { color: var(--muted-3); text-transform: none; letter-spacing: 0; font-weight: 500; }
.field:focus { border-color: var(--accent-strong); background: var(--card-4); }
.field.is-error { border-color: var(--danger); }
.field-hint { margin-top: 10px; min-height: 20px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); }
.field-hint.is-error { color: var(--danger); }
.promo-result {
  margin-top: 14px; width: 100%; padding: 16px 18px; border-radius: 22px; background: var(--accent-tint); text-align: left;
  border: 1px solid color-mix(in srgb, var(--accent-strong) 35%, transparent);
}
.promo-result .t { font-size: 16px; line-height: 22px; font-weight: 800; }
.promo-result .s { margin-top: 4px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--soon); }

.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 0; border: 0; background: transparent;
  color: var(--text); font-size: 15px; line-height: 21px; font-weight: 700; text-align: left;
}
.faq-q svg { flex: none; margin-left: auto; color: var(--muted-2); transition: transform .3s; }
.faq-q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-a { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 0 16px; font-size: 14px; line-height: 21px; font-weight: 500; color: var(--muted); white-space: pre-line; }

.tx-row { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.tx-row + .tx-row { border-top: 1px solid var(--line); }
.tx-row .icon { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--card-3); }
.tx-row .icon img { width: 20px; height: 20px; object-fit: contain; }
.tx-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.tx-row .t { font-size: 15px; line-height: 20px; font-weight: 700; }
.tx-row .s { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted-2); }
.tx-row .amount { flex: none; font-size: 15px; line-height: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tx-row .amount.is-off { color: var(--muted-2); text-decoration: line-through; font-weight: 600; }

/* ------------------------------------------------------------- toast */

.toast-layer {
  position: fixed; left: 0; right: 0; bottom: calc(128px + var(--safe-bottom)); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.app.no-nav .toast-layer { bottom: calc(150px + var(--safe-bottom)); }
.toast {
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); min-height: 40px;
  padding: 9px 16px 9px 12px; border-radius: 999px; background: var(--light); color: var(--accent-ink);
  font-size: 14px; line-height: 20px; font-weight: 700; box-shadow: 0 16px 36px -10px rgba(0, 0, 0, .7);
}
.toast.is-error { background: #FBE3E3; color: #6A1B1B; }
.toast svg { flex: none; }

/* ------------------------------------------------------- gate & loading */

.gate {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--safe-top) + 24px) 28px calc(var(--safe-bottom) + 32px); text-align: center;
}
.gate .title-lg { margin-top: 28px; }
.gate .subtitle { max-width: 320px; }
.gate .btn { margin-top: 28px; min-width: 220px; }
.spinner {
  display: inline-block; width: 22px; height: 22px; border-radius: 999px;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  border-radius: 22px;
  background: linear-gradient(100deg, var(--surface) 30%, #201C28 50%, var(--surface) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ------------------------------------------------------------- login */

.login {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding: 0 clamp(16px, 6vw, 100px) clamp(16px, 3vw, 36px);
}
.login-header {
  width: 100%; max-width: 1240px; margin: 0 auto; height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.login-main {
  flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; min-height: 620px; display: flex; flex-wrap: wrap;
  gap: 4px; border-radius: 40px; overflow: hidden;
}
.login-art {
  position: relative; overflow: hidden; flex: 9 1 420px; min-width: 0; min-height: 360px;
  display: flex; align-items: center; justify-content: center; background: var(--accent);
}
.login-art .blob-a { position: absolute; left: -78px; top: -56px; width: 250px; height: 250px; transform: rotate(14deg); }
.login-art .blob-b { position: absolute; right: -92px; bottom: -96px; width: 270px; height: 270px; }
.login-art .blob-a path, .login-art .blob-b path { fill: color-mix(in srgb, #fff 62%, var(--accent)); }
.login-art .plate { position: relative; width: min(420px, 78%); aspect-ratio: 1 / 1; }
.login-art .plate > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-art .plate > svg:first-child path { fill: color-mix(in srgb, var(--accent-strong) 70%, var(--accent)); }
.login-art .plate .mascot-big {
  position: absolute; left: 50%; top: 50%; width: 62%; height: auto; transform: translate(-50%, -50%) rotate(-4deg);
  filter: drop-shadow(0 18px 22px rgba(64, 20, 80, .22)); overflow: visible;
}
.login-panel {
  flex: 11 1 460px; min-width: 0; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(36px, 6vw, 88px); background: var(--surface);
}
.login-title { margin: 0; font-size: clamp(36px, 4.2vw, 60px); line-height: 1.05; font-weight: 800; letter-spacing: -.04em; }
.login-text { margin: 18px 0 0; max-width: 420px; font-size: 18px; line-height: 28px; font-weight: 500; color: var(--muted); text-wrap: pretty; }
.login-panel .btn { margin-top: 36px; width: 100%; max-width: 400px; height: 64px; font-size: 17px; }
.login-foot { margin: 48px 0 0; max-width: 380px; font-size: 14px; line-height: 22px; font-weight: 500; color: var(--muted-2); }
.login-foot a { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
.login-wait { margin-top: 28px; max-width: 400px; padding: 18px 20px; border-radius: 22px; background: var(--card-3); }
.login-wait .t { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; }
.login-wait .s { margin-top: 6px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); }
.login-wait .btn { margin-top: 14px; height: 48px; font-size: 14px; }
.login-error { margin-top: 18px; font-size: 14px; font-weight: 700; color: var(--danger); }

/* ------------------------------------------------------------ desktop */

.desktop {
  display: flex; align-items: flex-start; gap: 16px; padding: 16px; min-height: 100vh; min-height: 100dvh;
}
.desktop > .glow {
  height: 640px;
  background:
    radial-gradient(22% 64% at 60% 0%, var(--glow-1) 0%, var(--glow-2) 50%, transparent 100%),
    radial-gradient(60% 56% at 60% 0%, var(--glow-3) 0%, transparent 72%);
}
.sidebar {
  position: sticky; top: 16px; flex: none; width: 248px; height: calc(100vh - 32px); height: calc(100dvh - 32px);
  display: flex; flex-direction: column; padding: 22px 14px 14px; border-radius: 28px; background: var(--aside);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 8px; font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.sidebar-nav { position: relative; margin-top: 28px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-pill { position: absolute; left: 0; right: 0; top: 0; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .07); pointer-events: none; }
.sidebar-link {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px;
  border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; text-align: left;
}
.sidebar-link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.sidebar-link[aria-current="page"] { color: var(--text); font-weight: 700; }
.sidebar-link[aria-current="page"]:hover { background: transparent; }
.sidebar-extra { margin-top: auto; padding-top: 24px; }
.help-card { padding: 16px; border-radius: 20px; background: #1C1824; }
.help-card .t { margin-top: 12px; font-size: 15px; line-height: 20px; font-weight: 800; }
.help-card .s { margin: 4px 0 0; font-size: 13px; line-height: 19px; font-weight: 500; color: var(--muted); }
.help-card .btn { margin-top: 14px; width: 100%; height: 44px; font-size: 14px; font-weight: 700; background: var(--card-4); color: var(--text); }
.me-row { margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 8px 4px 2px 8px; }
.me-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-row .t { font-size: 14px; line-height: 19px; font-weight: 700; }
.me-row .s { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted-2); }

.desk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 10px 8px 8px 12px; }
.desk-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 8px 4px 4px; }
.desk-title { margin: 0; font-size: 32px; line-height: 40px; font-weight: 800; letter-spacing: -.04em; }
.desk-date { margin: 4px 0 0; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--muted); }
.desk-row { display: flex; flex-wrap: wrap; gap: 16px; }
.panel { min-width: 0; padding: 24px; border-radius: 28px; background: var(--card); }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-title h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 800; letter-spacing: -.02em; }
.panel-title span, .panel-title button { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted-2); }
.panel-title button { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 700; }
.hero-panel {
  position: relative; overflow: hidden; flex: 2 1 520px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 32px 36px; border-radius: 32px; background: var(--card);
}
.hero-left { position: relative; flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.hero-days { margin-top: 16px; display: flex; align-items: baseline; gap: 12px; }
.hero-days .n { font-size: 96px; line-height: 1; font-weight: 800; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.hero-days .u { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--muted); }
.hero-sub { margin: 6px 0 0; font-size: 16px; line-height: 22px; font-weight: 500; color: var(--muted); }
.hero-wave { display: block; margin-top: 18px; width: 100%; max-width: 360px; height: auto; aspect-ratio: 360 / 16; overflow: visible; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { height: 52px; font-size: 15px; }
.hero-art { position: relative; flex: 0 1 240px; min-width: 0; height: 220px; display: flex; align-items: center; justify-content: center; }
.hero-art .shadow { position: absolute; left: 40px; right: 40px; bottom: 30px; height: 16px; border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(10px); }
.qr-panel { flex: 1 1 300px; display: flex; flex-direction: column; padding: 28px; border-radius: 32px; }
.qr-panel .qr-paper { margin: 20px auto 0; padding: 14px; border-radius: 26px; }
.copybox { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 18px; background: var(--card-3); }
.copybox .v { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-2); }
.copybox .icon-btn { background: var(--card-5); color: var(--accent); }
.copybox .icon-btn:hover { background: #332D3E; }
.panel.is-third { flex: 1 1 300px; }
.dev-tile { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 14px 0 16px; border-radius: 16px; background: var(--card-2); }
.dashed-link {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, .16); background: transparent; color: var(--accent); font-size: 14px; font-weight: 700; width: 100%;
}
.dashed-link:hover { border-color: color-mix(in srgb, var(--accent-strong) 50%, transparent); color: var(--accent-soft); }
.desk-view { width: 100%; max-width: 620px; margin: 0 auto; }
.desk-view .screen { padding: 8px 0 120px; max-width: none; }
.desk-view .paybar { position: sticky; bottom: 0; width: 100%; left: auto; transform: none; padding-left: 0; padding-right: 0; }
.desk-view .tabbar { display: none; }
/* The cabinet has one glow across the whole page; a screen's own glow would be
   clipped to the narrow column and show its edges. */
.desk-view .glow { display: none; }

@media (max-width: 760px) {
  .hide-sm { display: none !important; }
}

/* ------------------------------------------------------- motion prefs */

@media (prefers-reduced-motion: reduce) {
  .splash-mascot, .splash-eyes, .wave-flow, .skeleton, .splash-dots i { animation: none !important; }
}
