@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg: #080b10;
  --bg2: #0d1117;
  --bg3: #131922;
  --border: rgba(0, 214, 143, 0.12);
  --border-hover: rgba(0, 214, 143, 0.35);
  --accent: #00d68f;
  --accent-dim: rgba(0, 214, 143, 0.15);
  --accent2: #00cfff;
  --accent2-dim: rgba(0, 207, 255, 0.12);
  --danger: #ff4466;
  --warn: #ffb347;
  --text: #e8edf5;
  --text-muted: #5a6a80;
  --text-dim: #8899aa;
  --radius: 12px;
  --radius-sm: 8px;
  --font-mono: 'Space Mono', monospace;
  --font-sans: 'Syne', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: 0.4;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; color: var(--text); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.muted { color: var(--text-muted); }

/* ── htmx indicators (заменяют React loading state) ──────────────────── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; }
.htmx-request.btn-primary .btn-text,
.htmx-request .btn-text { opacity: 0.6; }

/* ── Toast container (фикс top, общий для всех страниц) ──────────────── */
#toast-container {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  padding: 12px 20px; border-radius: 100px; font-size: 14px; font-weight: 600;
  animation: toastIn 0.3s ease; white-space: nowrap; max-width: 90vw;
}
.toast-success { background: rgba(0,214,143,0.15); border: 1px solid rgba(0,214,143,0.4); color: var(--accent); }
.toast-error { background: rgba(255,68,102,0.15); border: 1px solid rgba(255,68,102,0.4); color: var(--danger); }
.toast-info { background: var(--bg3); border: 1px solid var(--border); color: var(--text); }
@keyframes toastIn { from { opacity:0; transform: translateY(-10px);} to {opacity:1; transform: translateY(0);} }

@keyframes fadeUp { from { opacity:0; transform: translateY(16px);} to {opacity:1; transform: translateY(0);} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 4px var(--accent); } 50% { box-shadow: 0 0 12px var(--accent); } }

.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.3); border-top-color: #000;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
.spinner-sm {
  width: 14px; height: 14px; border: 2px solid rgba(0,214,143,0.3); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

/* ── Login page ────────────────────────────────────────────────────────── */
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; position: relative; }
.login-glow { position: fixed; top: -20%; left: 50%; transform: translateX(-50%); width: 600px; height: 400px; background: radial-gradient(ellipse, rgba(0,214,143,0.08) 0%, transparent 70%); pointer-events: none; }
.login-card { width: 100%; max-width: 400px; background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; padding: 36px 32px; animation: fadeUp 0.4s ease; position: relative; z-index: 1; }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; justify-content: center; }
.login-brand { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 24px; }
.login-tabs button { padding: 9px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--text-muted); transition: all 0.2s; }
.login-tabs button.active { background: var(--bg3); color: var(--accent); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.field input { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; outline: none; transition: border-color 0.2s; width: 100%; }
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--text-muted); }
.login-error { background: rgba(255,68,102,0.12); border: 1px solid rgba(255,68,102,0.3); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; color: var(--danger); margin-bottom: 4px; }
.btn-primary { background: var(--accent); color: #000; border-radius: var(--radius-sm); padding: 13px; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; transition: opacity 0.2s, transform 0.15s; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 12px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.tg-login-btn { display: flex; justify-content: center; min-height: 44px; }

/* ── Dashboard ─────────────────────────────────────────────────────────── */
.dash-wrap, .plans-wrap, .connect-wrap { min-height: 100dvh; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; position: relative; z-index: 1; }

.dash-header, .plans-header {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 16px 20px; padding-top: max(16px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(8,11,16,0.9); backdrop-filter: blur(12px); z-index: 10;
}
.plans-header { justify-content: flex-start; }
.plans-header h1 { font-size: 18px; font-weight: 800; }
.dash-logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; }

.btn-logout { font-size: 13px; color: var(--text-muted); padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); transition: all 0.2s; }
.btn-logout:hover { color: var(--danger); border-color: rgba(255,68,102,0.3); }
.btn-back { font-size: 20px; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; transition: color 0.2s; }
.btn-back:hover { color: var(--accent); }

.dash-main, .plans-main, .connect-main { padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 16px; flex: 1; }

.status-card { border-radius: 18px; padding: 24px; border: 1px solid var(--border); background: var(--bg2); position: relative; overflow: hidden; animation: fadeUp 0.3s ease; }
.status-card::before { content: ''; position: absolute; top: -50%; right: -20%; width: 200px; height: 200px; border-radius: 50%; pointer-events: none; }
.status-card.active::before { background: radial-gradient(ellipse, rgba(0,214,143,0.07) 0%, transparent 70%); }
.status-card.inactive::before { background: radial-gradient(ellipse, rgba(90,106,128,0.08) 0%, transparent 70%); }
.status-card.warn { border-color: rgba(255,179,71,0.3); }
.status-card.warn::before { background: radial-gradient(ellipse, rgba(255,179,71,0.08) 0%, transparent 70%); }
.status-indicator { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.active .status-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 2s infinite; }
.warn .status-dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.active .status-indicator { color: var(--accent); }
.days-big { display: flex; align-items: baseline; gap: 8px; }
.days-num { font-size: 64px; font-weight: 800; line-height: 1; color: var(--accent); font-family: var(--font-mono); }
.warn .days-num { color: var(--warn); }
.days-label { font-size: 18px; color: var(--text-dim); }
.status-exp { margin-top: 6px; font-size: 14px; color: var(--text-muted); }
.status-warn-text { margin-top: 10px; font-size: 13px; color: var(--warn); font-weight: 600; }
.no-sub p { color: var(--text-muted); font-size: 15px; margin-bottom: 16px; }
.btn-trial { background: linear-gradient(135deg, rgba(0,214,143,0.15), rgba(0,214,143,0.05)); border: 1px solid var(--border-hover); border-radius: 12px; padding: 14px 20px; font-size: 15px; font-weight: 700; color: var(--accent); width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; }
.btn-trial:hover { background: rgba(0,214,143,0.2); transform: translateY(-1px); }

.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; transition: all 0.2s; }
.action-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.action-card.accent-card { border-color: rgba(0,214,143,0.3); background: rgba(0,214,143,0.04); }
.action-card.accent-card:hover { background: rgba(0,214,143,0.08); }
.action-icon { font-size: 22px; }
.action-label { font-size: 13px; font-weight: 700; color: var(--text); }

.section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.section-title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }

.sub-url-row { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; }
.sub-url-text { flex: 1; font-size: 12px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-copy { font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; padding: 4px 8px; border-radius: 4px; transition: background 0.15s; }
.btn-copy:hover { background: var(--accent-dim); }

.promo-form { display: flex; gap: 8px; }
.promo-input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; outline: none; transition: border-color 0.2s; font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; }
.promo-input:focus { border-color: var(--accent); }
.promo-input::placeholder { text-transform: none; font-family: var(--font-sans); letter-spacing: 0; color: var(--text-muted); }
.btn-promo { background: var(--accent); color: #000; border-radius: var(--radius-sm); width: 44px; font-size: 20px; font-weight: 700; transition: opacity 0.2s; }
.promo-result { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; }
.promo-result.ok { background: rgba(0,214,143,0.1); color: var(--accent); border: 1px solid rgba(0,214,143,0.2); }
.promo-result.err { background: rgba(255,68,102,0.1); color: var(--danger); border: 1px solid rgba(255,68,102,0.2); }

.push-banner { display: flex; align-items: center; gap: 14px; background: var(--bg2); border: 1px solid rgba(0,207,255,0.2); border-radius: var(--radius); padding: 16px; text-align: left; transition: all 0.2s; width: 100%; cursor: pointer; position: relative; }
.push-banner:hover { border-color: rgba(0,207,255,0.4); background: rgba(0,207,255,0.05); }
.push-banner > span:first-child { font-size: 24px; flex-shrink: 0; }
.push-banner strong { display: block; font-size: 14px; color: var(--accent2); margin-bottom: 2px; }
.push-banner p { font-size: 12px; color: var(--text-muted); }
.push-arrow { font-size: 20px; color: var(--accent2); margin-left: auto; flex-shrink: 0; }
.push-banner.loading { opacity: 0.6; pointer-events: none; }
.push-banner.loading::after { content: ''; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border: 2px solid rgba(0,207,255,0.3); border-top-color: var(--accent2); border-radius: 50%; animation: spin 0.7s linear infinite; }

.user-info { text-align: center; margin-top: 4px; }
.user-email { font-size: 12px; color: var(--text-muted); }

.dash-footer { text-align: center; padding: 16px; border-top: 1px solid var(--border); margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.dash-footer .user-email { font-size: 13px; font-weight: 600; }
.dash-footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.dash-footer-links a { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.dash-footer-links a:hover { color: var(--accent); }

.notifications-list { display: flex; flex-direction: column; gap: 8px; }
.notification-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.notification-item .notif-body { flex: 1; }
.notification-item .notif-text { font-size: 13px; color: var(--text); }
.notification-item .notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-delete { font-size: 14px; color: var(--text-muted); padding: 2px 6px; border-radius: 4px; transition: color 0.2s; flex-shrink: 0; margin-top: 2px; }
.notif-delete:hover { color: var(--danger); }

.pay-pending-banner, .pay-success-banner {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
}
.pay-pending-banner { background: rgba(0,207,255,0.08); border: 1px solid rgba(0,207,255,0.25); color: var(--accent2); }
.pay-success-banner { background: rgba(0,214,143,0.1); border: 1px solid rgba(0,214,143,0.3); color: var(--accent); }

/* ── Plans page ────────────────────────────────────────────────────────── */
.plans-list { display: flex; flex-direction: column; gap: 10px; }
.plan-card { background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 18px; transition: all 0.2s; }
.plan-card:hover { border-color: var(--border-hover); }
.plan-card.popular { border-color: rgba(0,207,255,0.3); }
.popular-badge { position: absolute; bottom: 12px; right: 16px; background: rgba(0,207,255,0.15); color: var(--accent2); font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 100px; border: 1px solid rgba(0,207,255,0.3); letter-spacing: 0.05em; text-transform: uppercase; }
.plan-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.plan-label { font-size: 17px; font-weight: 800; color: var(--text); }
.plan-days { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.price-num { font-size: 30px; font-weight: 800; color: var(--text); font-family: var(--font-mono); }
.price-per { font-size: 13px; color: var(--text-muted); }
.plan-per-day { margin-top: 4px; font-size: 12px; color: var(--text-muted); }

.plans-features { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.feature { font-size: 14px; color: var(--text-dim); }

.btn-pay { background: var(--accent); color: #000; border-radius: var(--radius); padding: 16px; font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; transition: opacity 0.2s, transform 0.15s; width: 100%; margin-top: 4px; }
.btn-pay:hover { opacity: 0.9; transform: translateY(-1px); }
.pay-note { font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.5; }

/* ── Connect page ──────────────────────────────────────────────────────── */
.step-card { display: flex; gap: 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; animation: fadeUp 0.3s ease both; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-dim); border: 1px solid var(--border-hover); color: var(--accent); font-size: 14px; font-weight: 800; font-family: var(--font-mono); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-body { flex: 1; }
.step-title { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.step-desc { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.step-links { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.step-link { display: block; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--accent2); transition: border-color 0.2s; }
.step-link:hover { border-color: rgba(0,207,255,0.4); }
.sub-url-block { margin-top: 12px; }
.sub-url-value { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 11px; color: var(--text-dim); word-break: break-all; margin-bottom: 10px; line-height: 1.5; }
.btn-copy-big { background: var(--accent-dim); border: 1px solid var(--border-hover); color: var(--accent); border-radius: var(--radius-sm); padding: 11px 16px; font-size: 14px; font-weight: 700; width: 100%; transition: all 0.2s; }
.btn-copy-big:hover { background: rgba(0,214,143,0.2); }
.btn-copy-big.done { background: rgba(0,214,143,0.2); }
.no-url { font-size: 13px; color: var(--text-muted); }

.support-block { text-align: center; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.support-block p { font-size: 14px; color: var(--text-muted); }
.btn-support { background: rgba(0,207,255,0.1); border: 1px solid rgba(0,207,255,0.25); color: var(--accent2); border-radius: 100px; padding: 12px 24px; font-size: 14px; font-weight: 700; transition: all 0.2s; }
.btn-support:hover { background: rgba(0,207,255,0.18); }
.support-email { font-size: 13px; color: var(--text-muted); }

/* ── History page ──────────────────────────────────────────────────────── */
.history-row { display: flex; align-items: center; gap: 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.history-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.history-icon.succeeded { background: rgba(0,214,143,0.12); color: var(--accent); }
.history-icon.pending { background: rgba(255,179,71,0.12); color: var(--warn); }
.history-icon.canceled { background: rgba(255,68,102,0.12); color: var(--danger); }
.history-body { flex: 1; }
.history-title { font-size: 14px; font-weight: 700; }
.history-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.history-amount { font-size: 16px; font-weight: 800; font-family: var(--font-mono); }

/* ── Connect page: app download & import buttons ─────────────────────── */
.app-downloads-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.app-download-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.app-name { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.app-download-box .step-links { margin-top: 0; }
.app-download-box .step-link { padding: 8px 10px; font-size: 12px; }

.sub-import-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.import-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.import-title { font-size: 13px; font-weight: 700; }
.import-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

.btn-import {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; font-weight: 700;
  transition: all 0.2s; margin-top: 8px; text-align: center; text-decoration: none;
}
.btn-v2box { background: rgba(0,207,255,0.12); border: 1px solid rgba(0,207,255,0.3); color: var(--accent2); }
.btn-v2box:hover { background: rgba(0,207,255,0.2); border-color: rgba(0,207,255,0.5); }
.btn-happ { background: rgba(0,214,143,0.12); border: 1px solid rgba(0,214,143,0.3); color: var(--accent); }
.btn-happ:hover { background: rgba(0,214,143,0.2); border-color: rgba(0,214,143,0.5); }
.btn-import.disabled { opacity: 0.4; pointer-events: none; cursor: default; }

/* ── PWA page ────────────────────────────────────────────────────────── */
.legal-page .legal-content { max-width: 100%; }
.legal-page .legal-content h3 { font-size: 18px; font-weight: 800; margin-bottom: 16px; color: var(--text); }
.legal-page .legal-content p { font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-bottom: 10px; }
.legal-page .legal-content ul { list-style: disc; padding-left: 20px; margin-bottom: 10px; }
.legal-page .legal-content li { font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-bottom: 4px; }

/* ── Login: legal checkboxes ─────────────────────────────────────────── */
.legal-checkboxes { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.legal-checkbox {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 13px; color: var(--text-dim); line-height: 1.4;
}
.legal-checkbox input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0;
  accent-color: var(--accent); cursor: pointer;
}
.legal-checkbox a { color: var(--accent); text-decoration: underline; }
.legal-checkbox a:hover { color: var(--accent2); }
#register-btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.pwa-hero-card {
  background: linear-gradient(135deg, rgba(0,214,143,0.08), rgba(0,207,255,0.05));
  border: 1px solid var(--border-hover); border-radius: 18px; padding: 28px 24px;
  text-align: center; animation: fadeUp 0.3s ease both;
}
.pwa-hero-icon { font-size: 40px; margin-bottom: 10px; }
.pwa-hero-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.pwa-hero-card p { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.pwa-btn-install { margin-top: 14px; }

.pwa-guide-list { list-style: none; counter-reset: pwa-step; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pwa-guide-list li {
  counter-increment: pwa-step; font-size: 14px; color: var(--text-dim); line-height: 1.5;
  padding-left: 28px; position: relative;
}
.pwa-guide-list li::before {
  content: counter(pwa-step); position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent-dim);
  border: 1px solid var(--border-hover); color: var(--accent);
  font-size: 11px; font-weight: 800; font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center;
}
.pwa-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: var(--accent-dim); border: 1px solid var(--border-hover); color: var(--accent); font-size: 12px; font-weight: 800; vertical-align: middle; }

/* ── PWA install popup banner (global) ───────────────────────────────── */
.pwa-popup {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 999; width: calc(100% - 32px); max-width: 440px;
  background: var(--bg2); border: 1px solid var(--border-hover);
  border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: fadeUp 0.4s ease;
}
.pwa-popup-header { display: flex; align-items: flex-start; gap: 12px; }
.pwa-popup-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.pwa-popup-text { flex: 1; }
.pwa-popup-text strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.pwa-popup-text p { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin: 0; }
.pwa-popup-close {
  font-size: 16px; color: var(--text-muted); padding: 2px 6px; border-radius: 4px;
  transition: color 0.2s; flex-shrink: 0; line-height: 1;
}
.pwa-popup-close:hover { color: var(--danger); }
.pwa-popup-instructions { margin-top: 12px; }
.pwa-popup-instructions summary {
  font-size: 12px; color: var(--accent); font-weight: 600; cursor: pointer; user-select: none;
}
.pwa-popup-instructions summary:hover { color: var(--accent2); }
.pwa-popup-instructions ol { margin-top: 8px; padding-left: 18px; }
.pwa-popup-instructions li { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 2px; }
.pwa-popup-link { display: block; text-align: center; margin-top: 10px; }
.pwa-popup-link a { font-size: 12px; color: var(--accent); font-weight: 600; }
.pwa-popup-link a:hover { color: var(--accent2); }

.empty-state { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--text-muted); }
