/* Nephrite VPN Mini App — design tokens and components */

@font-face { font-family: Geologica; font-weight: 400 800; font-display: swap; src: url(../assets/fonts/geologica-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Geologica; font-weight: 400 800; font-display: swap; src: url(../assets/fonts/geologica-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Geologica; font-weight: 400 800; font-display: swap; src: url(../assets/fonts/geologica-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-weight: 400 800; font-display: swap; src: url(../assets/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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-weight: 400 800; font-display: swap; src: url(../assets/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+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Manrope; font-weight: 400 800; font-display: swap; src: url(../assets/fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --font-display: Geologica, 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-text: Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --jade: #00A96C;
  --bg: #F3F6F4;
  --surface: #FFFFFF;
  --surface-2: #EDF2EF;
  --surface-3: #E2EAE5;
  --border: #E1E8E4;
  --text: #0A1A13;
  --text-2: #3F5148;
  --text-3: #5F716A;
  --accent: #00A96C;
  --accent-press: #009761;
  --on-accent: #04140C;
  --accent-ink: #00754B;
  --accent-soft: #E0F5EC;
  --accent-soft-ink: #006640;
  --warn: #9A5E00;
  --warn-soft: #FFF1DB;
  --danger: #C93439;
  --danger-soft: #FDE8E8;
  --track: #E3EBE7;
  --scrim: rgba(6, 16, 11, .45);
  --bar: rgba(255, 255, 255, .86);
  --shadow: 0 1px 2px rgba(10, 26, 19, .05), 0 12px 32px -16px rgba(10, 26, 19, .2);
  --hero: radial-gradient(120% 90% at 100% 0%, rgba(0, 169, 108, .17), transparent 62%), var(--surface);
  --circuit-op: .09;

  --r-sm: 12px; --r-md: 16px; --r-lg: 24px; --r-xl: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 120ms; --t-base: 220ms; --t-slow: 360ms;
  --safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #070F0B;
  --surface: #0F1A15;
  --surface-2: #16231D;
  --surface-3: #1E2D26;
  --border: #1F2E27;
  --text: #EAF3EE;
  --text-2: #A7B8AF;
  --text-3: #7D8F86;
  --accent: #16C27F;
  --accent-press: #12AE71;
  --on-accent: #03130B;
  --accent-ink: #3DDC98;
  --accent-soft: rgba(22, 194, 127, .14);
  --accent-soft-ink: #5FE3AA;
  --warn: #F2B24C;
  --warn-soft: rgba(242, 178, 76, .14);
  --danger: #FF7A7A;
  --danger-soft: rgba(255, 122, 122, .13);
  --track: #1C2A23;
  --scrim: rgba(0, 0, 0, .62);
  --bar: rgba(9, 17, 13, .86);
  --shadow: none;
  --hero: radial-gradient(120% 90% at 100% 0%, rgba(22, 194, 127, .24), transparent 62%), var(--surface);
  --circuit-op: .12;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font-text); font-size: 16px; line-height: 1.5; font-weight: 500;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none;
  transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell */
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.page { padding: calc(8px + var(--safe-top)) 16px calc(104px + var(--safe-bottom)); animation: page-in var(--t-slow) var(--ease); }
.page.sub { padding-bottom: calc(32px + var(--safe-bottom)); }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin: 0 -4px 6px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 23px; letter-spacing: -0.045em; line-height: 1; }
.brand-name small { font-family: var(--font-text); font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--text-3); margin-left: 4px; vertical-align: 2px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text); box-shadow: var(--shadow);
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast);
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn.plain { border: 0; background: transparent; box-shadow: none; }

/* Type */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); margin: 6px 0 8px; }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.h1 { font-family: var(--font-display); font-weight: 760; font-size: 31px; line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 8px; text-wrap: balance; }
.h1 .mute { color: var(--text-3); }
.h2 { font-family: var(--font-display); font-weight: 720; font-size: 21px; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.h3 { font-weight: 700; font-size: 17px; line-height: 1.3; margin: 0; }
.lead { color: var(--text-2); font-size: 15px; margin: 0 0 18px; }
.muted { color: var(--text-3); }
.small { font-size: 13px; line-height: 1.45; }
.section-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 22px 4px 8px; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.card + .card, .card + .stack, .stack + .card { margin-top: 12px; }
.stack { display: grid; gap: 10px; }
.card.flat { box-shadow: none; }
.card.tight { padding: 6px; }
.hero { position: relative; overflow: hidden; background: var(--hero); padding: 20px 18px 18px; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: var(--circuit-op);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' fill='none' stroke='%2300A96C' stroke-width='1.4'%3E%3Cpath d='M0 40h70l20 20h60l20-20h50M0 120h40l20-20h50l30 30h80M30 220v-50l20-20h60l20 20v50M160 0v30l20 20v40'/%3E%3Ccircle cx='70' cy='40' r='4'/%3E%3Ccircle cx='150' cy='60' r='4'/%3E%3Ccircle cx='60' cy='100' r='4'/%3E%3Ccircle cx='140' cy='130' r='4'/%3E%3Ccircle cx='110' cy='150' r='4'/%3E%3Ccircle cx='180' cy='90' r='4'/%3E%3C/svg%3E") right -30px top -20px / 260px no-repeat;
  -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 70%); mask-image: linear-gradient(200deg, #000 10%, transparent 70%);
}
.hero > * { position: relative; z-index: 1; }

/* Status hero */
.status { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { display: block; transform: rotate(-90deg); }
.ring .track { stroke: var(--track); }
.ring .bar { stroke: var(--accent); transition: stroke-dashoffset 900ms var(--ease); }
.ring .knob { fill: var(--surface); stroke: var(--accent); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-num { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: .95; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.ring-unit { font-size: 13px; font-weight: 700; color: var(--text-3); margin-top: 4px; }
.status-meta { min-width: 0; }
.status-title { font-family: var(--font-display); font-weight: 760; font-size: 20px; letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 4px; }
.status-sub { font-size: 14px; color: var(--text-2); }

.pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent-soft-ink); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live .dot { animation: live 2.2s ease-in-out infinite; }
@keyframes live { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.neutral { background: var(--surface-2); color: var(--text-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--text-2); border: 0; }
.chip svg { color: var(--accent-ink); }
button.chip:active { background: var(--surface-3); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 54px; padding: 0 20px;
  border-radius: var(--r-md); border: 0; font-weight: 700; font-size: 16px; letter-spacing: -0.005em; text-decoration: none;
  transition: background-color var(--t-fast) var(--ease), opacity var(--t-fast), box-shadow var(--t-base);
  user-select: none; -webkit-user-select: none;
}
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn.primary:active { background: var(--accent-press); }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.secondary:active { background: var(--surface-3); }
.btn.outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn.ghost { background: transparent; color: var(--accent-ink); min-height: 44px; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { min-height: 40px; width: auto; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn .spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: grid; gap: 10px; margin-top: 14px; }

/* Rows */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.list + .list, .card + .list, .list + .card { margin-top: 12px; }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 16px; text-align: left;
  background: transparent; border: 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none;
  transition: background-color var(--t-fast) var(--ease);
}
.row:first-child { border-top: 0; }
button.row:active, a.row:active { background: var(--surface-2); }
.row-icon { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.row-icon.neutral { background: var(--surface-2); color: var(--text-2); }
.row-body { flex: 1; min-width: 0; }
.row-title { font-weight: 700; font-size: 16px; line-height: 1.3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-sub { font-size: 13px; color: var(--text-3); line-height: 1.35; margin-top: 2px; }
.row-end { color: var(--text-3); flex: none; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .01em; background: var(--accent-soft); color: var(--accent-soft-ink); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.hot { background: var(--accent); color: var(--on-accent); }

/* Bento tiles */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 124px; padding: 16px;
  border-radius: 22px; border: 1px solid var(--border); background: var(--surface); text-align: left; color: var(--text); box-shadow: var(--shadow);
  transition: background-color var(--t-fast) var(--ease);
}
.tile:active { background: var(--surface-2); }
.tile .row-icon { width: 40px; height: 40px; }
.tile-title { font-weight: 800; font-size: 15.5px; line-height: 1.25; }
.tile-sub { font-size: 12.5px; color: var(--text-3); line-height: 1.35; margin-top: 3px; }
.tile.accent { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 70%); }

/* Steps */
.step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid var(--border); }
.step:first-child { border-top: 0; padding-top: 4px; }
.step-n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 16px; background: var(--text); color: var(--surface); }
.step.done .step-n { background: var(--accent); color: var(--on-accent); }
.step-title { font-family: var(--font-display); font-weight: 720; font-size: 18px; letter-spacing: -0.015em; margin: 4px 0 6px; }
.step p { margin: 0 0 12px; color: var(--text-2); font-size: 14.5px; }
.note { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--text-3); margin-top: 10px; line-height: 1.45; }
.note svg { flex: none; margin-top: 1px; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-soft-ink); font-size: 14px; font-weight: 600; }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.callout b { font-weight: 800; }

/* Plans */
.plan {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 14px 16px; border-radius: 20px; text-align: left;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast), box-shadow var(--t-base);
}
.plan[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.radio { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--surface-3); display: grid; place-items: center; transition: border-color var(--t-fast); }
.plan[aria-checked="true"] .radio { border-color: var(--accent); }
.plan[aria-checked="true"] .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.plan-body { flex: 1; min-width: 0; }
.plan-name { font-weight: 800; font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plan-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.plan-price { font-family: var(--font-display); font-weight: 780; font-size: 21px; letter-spacing: -0.03em; white-space: nowrap; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; margin-top: 14px; }
.feature { display: flex; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.feature .row-icon { width: 34px; height: 34px; border-radius: 11px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 4px; }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 11px; background: var(--surface); color: var(--text); display: grid; place-items: center; box-shadow: var(--shadow); }
.stepper button[disabled] { opacity: .4; }
.stepper output { min-width: 36px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.total-price { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.04em; white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--text-3); font-weight: 600; font-size: 15px; margin-right: 6px; }

/* Inputs */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.input, .textarea {
  width: 100%; min-height: 52px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text); outline: none; transition: border-color var(--t-fast), background-color var(--t-fast);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus { border-color: var(--accent); background: var(--surface); }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.error-text { color: var(--danger); font-size: 13px; font-weight: 600; }

/* Key */
.key { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface-2); border-radius: 14px; padding: 13px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.key-actions .btn { min-height: 64px; flex-direction: column; gap: 4px; font-size: 13px; padding: 0 8px; }

/* Segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.seg button { min-height: 40px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; font-size: 14px; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color var(--t-fast), color var(--t-fast); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Devices */
.slots { display: flex; gap: 6px; margin: 12px 0 4px; }
.slots span { flex: 1; height: 8px; border-radius: 99px; background: var(--track); }
.slots span.on { background: var(--accent); }
.big-count { font-family: var(--font-display); font-weight: 800; font-size: 44px; letter-spacing: -0.05em; line-height: 1; }
.big-count .mute { color: var(--text-3); }

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 8px 12px calc(8px + var(--safe-bottom));
  background: var(--bar); border-top: 1px solid var(--border); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
}
.tabbar-in { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; padding: 7px 4px 4px; border: 0; border-radius: 14px; background: transparent; color: var(--text-3); font-size: 11.5px; font-weight: 700; transition: color var(--t-base) var(--ease); }
.tab[aria-current="page"] { color: var(--accent-ink); }
.tab::before { content: ''; position: absolute; top: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform var(--t-base) var(--ease); }
.tab[aria-current="page"]::before { transform: scale(1); }
.tab:active { background: var(--surface-2); }

/* Sheet */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); animation: fade-in var(--t-base) var(--ease); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 520px; margin: 0 auto; max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 8px 18px calc(22px + var(--safe-bottom));
  animation: sheet-in var(--t-slow) var(--ease); box-shadow: 0 -20px 60px -30px rgba(0, 0, 0, .35);
}
.sheet-handle { width: 38px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 2px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-head .icon-btn { width: 40px; height: 40px; border-radius: 50%; box-shadow: none; background: var(--surface-2); border: 0; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.group-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 16px 4px 8px; }
.group-label:first-child { margin-top: 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 16px;
  background: var(--text); color: var(--surface); font-size: 14px; font-weight: 700; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4);
  animation: toast-in var(--t-base) var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Accordion */
details.faq { border-top: 1px solid var(--border); }
details.faq:first-of-type { border-top: 0; }
details.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 16px; font-weight: 700; cursor: pointer; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary svg { flex: none; color: var(--text-3); transition: transform var(--t-base) var(--ease); }
details.faq[open] summary svg { transform: rotate(180deg); }
details.faq .faq-body { padding: 0 16px 16px; color: var(--text-2); font-size: 14.5px; }
details.faq .faq-body p { margin: 0 0 8px; }

/* Relay animation: the lever hops between two contacts, the live one glows */
.relay-tile { width: 64px; height: 64px; flex: none; border-radius: 20px; background: var(--accent-soft); display: grid; place-items: center; }
.relay { width: 48px; height: 48px; overflow: visible; }
.relay .lever { transform-box: view-box; transform-origin: 16px 32px; animation: relay 4s var(--ease) infinite; }
.relay .c-a { transform-box: fill-box; transform-origin: center; animation: contact-a 4s var(--ease) infinite; }
.relay .c-b { transform-box: fill-box; transform-origin: center; animation: contact-b 4s var(--ease) infinite; }
@keyframes relay { 0%, 44% { transform: rotate(-23deg); } 52%, 94% { transform: rotate(23deg); } 100% { transform: rotate(-23deg); } }
@keyframes contact-a { 0%, 44% { opacity: 1; transform: scale(1); } 52%, 94% { opacity: .28; transform: scale(.8); } 100% { opacity: 1; transform: scale(1); } }
@keyframes contact-b { 0%, 44% { opacity: .28; transform: scale(.8); } 52%, 94% { opacity: 1; transform: scale(1); } 100% { opacity: .28; transform: scale(.8); } }

/* QR */
.qr { width: 236px; height: 236px; margin: 4px auto 14px; padding: 14px; border-radius: 24px; background: #FFFFFF; display: grid; place-items: center; box-shadow: var(--shadow); }
.qr svg { width: 100%; height: 100%; }

/* Skeleton & states */
.skel { border-radius: 14px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.center { text-align: center; }
.empty { text-align: center; padding: 26px 12px 8px; color: var(--text-3); font-size: 14px; }
.empty .row-icon { margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 18px; }
.splash { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.splash-mark { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1); } }
.spacer { height: 12px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--accent-ink); font-weight: 700; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.footer { text-align: center; color: var(--text-3); font-size: 12.5px; margin: 22px 0 4px; display: grid; gap: 6px; }
.footer a { color: var(--text-3); }
.avatar { width: 56px; height: 56px; border-radius: 18px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 22px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 360px) {
  .h1 { font-size: 27px; }
  .ring { width: 116px; height: 116px; }
  .ring-num { font-size: 38px; }
  .features { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
