/* Iris — estilos. Estética heredada del proyecto anterior: oscuro + violeta. */

@font-face { font-family: 'Outfit'; font-weight: 400; font-display: swap; src: url('../fonts/outfit-latin-400-normal.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: 'Outfit'; font-weight: 500; font-display: swap; src: url('../fonts/outfit-latin-500-normal.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: 'Outfit'; font-weight: 600; font-display: swap; src: url('../fonts/outfit-latin-600-normal.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: 'Outfit'; font-weight: 400; font-display: swap; src: url('../fonts/outfit-latin-ext-400-normal.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: 'Outfit'; font-weight: 500; font-display: swap; src: url('../fonts/outfit-latin-ext-500-normal.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: 'Outfit'; font-weight: 600; font-display: swap; src: url('../fonts/outfit-latin-ext-600-normal.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: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-display: swap; src: url('../fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); }

:root {
  --bg: #0a0a0f;
  --bg-2: #12121a;
  --bg-3: #1a1a28;
  --bg-input: #1e1e2e;
  --line: #2a2a3d;
  --accent: #6c5ce7;
  --accent-soft: rgba(108, 92, 231, 0.12);
  --accent-line: rgba(108, 92, 231, 0.38);
  --accent-text: #a99df2;
  --text: #e8e6f0;
  --text-2: #a6a4b5;
  --text-3: #8a8899;
  --ok: #00d68f;
  --read: #b8f0ff;
  --danger: #ff6b7a;
  --radius: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); }
.noscript { padding: 2rem; text-align: center; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.splash { flex: 1; display: flex; align-items: center; justify-content: center; }
.logo {
  font-family: 'JetBrains Mono', monospace; font-weight: 600; letter-spacing: 0.3em;
  color: var(--accent); text-shadow: 0 0 40px rgba(108, 92, 231, 0.35); font-size: 40px;
}
.logo.small { font-size: 18px; letter-spacing: 0.15em; text-shadow: none; }
.splash .logo { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* ── Pantallas de acceso ───────────────────────────────────── */
.auth {
  flex: 1; overflow-y: auto; padding: calc(56px + var(--safe-top)) 28px calc(28px + var(--safe-bottom));
  display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(ellipse at 20% 35%, rgba(108, 92, 231, 0.10) 0%, transparent 55%), var(--bg);
}
.auth .subtitle { font-size: 13px; color: var(--text-3); letter-spacing: 0.15em; margin-top: 6px; }
.auth form, .auth .stack { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.auth .center { text-align: center; }
.auth .grow { flex: 1; min-height: 24px; }
.auth h1 { font-size: 22px; font-weight: 500; text-align: center; margin-top: 18px; }
.auth p.lead { font-size: 14px; color: var(--text-2); text-align: center; line-height: 1.5; max-width: 300px; margin: 10px auto 0; }
.foot { font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.5; max-width: 320px; }

.badge-card {
  width: 100%; max-width: 360px; margin-top: 32px; display: flex; align-items: center; gap: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 14px; padding: 14px 16px;
  color: var(--accent-text);
}
.badge-card .t1 { font-size: 15px; font-weight: 500; color: var(--text); }
.badge-card .t2 { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.big-icon {
  width: 112px; height: 112px; border-radius: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(108, 92, 231, 0.45); background: var(--accent-soft); color: var(--accent);
  box-shadow: 0 0 60px rgba(108, 92, 231, 0.3);
}

label.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.field {
  width: 100%; background: var(--bg-input); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; font-size: 16px; outline: none; transition: border-color 0.2s;
}
.field:focus { border-color: var(--accent); }
.field::placeholder { color: var(--text-3); }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.error-text { font-size: 13px; color: var(--danger); text-align: center; min-height: 1.2em; }

.btn {
  height: 52px; border-radius: 12px; border: none; display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; font-size: 16px; font-weight: 500; padding: 0 18px; transition: transform 0.1s, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); height: 48px; font-size: 15px; font-weight: 400; }
.btn.danger { background: rgba(255, 71, 87, 0.1); border: 1px solid rgba(255, 71, 87, 0.45); color: var(--danger); }
.btn.block { width: 100%; }
.btn.link { background: none; height: 44px; color: var(--accent-text); font-size: 14px; font-weight: 400; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Cabeceras ─────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 4px; padding: calc(10px + var(--safe-top)) 10px 10px 8px;
  background: var(--bg-2); border-bottom: 1px solid var(--line); flex-shrink: 0; min-height: 64px;
}
.topbar .title { font-size: 18px; font-weight: 500; flex: 1; padding-left: 4px; }
.topbar .logo.small { flex: 1; padding-left: 12px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: none; background: none; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-btn:active { background: var(--bg-3); }
.conn-bar { font-size: 12px; text-align: center; padding: 4px; background: #3a2a1f; color: #f5c08a; }

/* ── Avatares ──────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
  overflow: hidden; flex-shrink: 0; position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.md { width: 50px; height: 50px; font-size: 17px; }
.avatar.hd { width: 40px; height: 40px; font-size: 15px; }
.avatar.xl { width: 104px; height: 104px; font-size: 34px; box-shadow: 0 0 40px rgba(108, 92, 231, 0.3); }
.tone-1 { background: #2a2440; color: #c9c1f8; }
.tone-2 { background: #1f3a33; color: #7ee8c4; }
.tone-3 { background: #3a2a1f; color: #f5c08a; }
.tone-4 { background: #1f2a3a; color: #8ac2f5; }
.tone-5 { background: #3a1f33; color: #f5a8d8; }
.tone-off { background: var(--bg-3); color: var(--text-3); }
.avatar-wrap { position: relative; display: inline-flex; }
.online-dot { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }

/* ── Lista de chats ────────────────────────────────────────── */
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--safe-bottom); }
.intro-card {
  margin: 12px 12px 4px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.intro-card p { font-size: 14px; line-height: 1.45; }
.intro-card b { font-weight: 600; }
.intro-card .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.intro-card .btn { height: 44px; font-size: 14px; }
.intro-card.waiting { background: var(--bg-2); border-color: var(--line); color: var(--text-2); }
.chat-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px 0; width: 100%; text-align: left;
  background: none; border: none;
}
.chat-row:active { background: var(--bg-2); }
.chat-row .body { flex: 1; min-width: 0; border-bottom: 1px solid var(--bg-3); padding-bottom: 12px; display: flex; flex-direction: column; gap: 3px; }
.chat-row .line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chat-row .name { flex: 1; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row .name.gone { color: var(--text-2); }
.chat-row .time { font-size: 12px; color: var(--text-2); }
.chat-row .time.fresh { color: var(--ok); }
.chat-row .preview { flex: 1; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.chat-row .preview.typing { color: var(--ok); }
.chat-row .preview.italic { font-style: italic; }
.unread {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.empty { padding: 48px 32px; text-align: center; color: var(--text-2); line-height: 1.6; font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* ── Chat abierto ──────────────────────────────────────────── */
.chat-head { cursor: default; display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.chat-head .who { display: flex; flex-direction: column; min-width: 0; }
.chat-head .n { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .s { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .s.on { color: var(--ok); }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; }
.day {
  align-self: center; font-size: 12px; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 10px; margin: 6px 0 2px;
}
.load-more { align-self: center; font-size: 13px; color: var(--accent-text); background: none; border: none; padding: 8px 12px; }
.msg-row { display: flex; transition: transform 0.15s; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.msg-row.mine { justify-content: flex-end; }
.bubble {
  max-width: 80%; border-radius: var(--radius); padding: 8px 12px 6px; font-size: 15px; line-height: 1.45;
  word-wrap: break-word; overflow-wrap: anywhere; animation: msgIn 0.22s ease-out; position: relative;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.theirs .bubble { background: var(--bg-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.mine .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble .text { white-space: pre-wrap; }
.bubble .meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; margin-top: 2px; color: var(--text-2); }
.mine .bubble .meta { color: #e6e2ff; }
.meta .read { color: var(--read); }
.meta .failed { color: #ffd0d5; }
.bubble.deleted { background: var(--bg-2) !important; border: 1px dashed var(--line) !important; color: var(--text-2) !important; font-style: italic; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.mine .bubble.deleted .meta { color: var(--text-2); }
.quote {
  background: rgba(10, 10, 15, 0.28); border-left: 3px solid var(--accent-text); border-radius: 8px; padding: 6px 10px;
  font-size: 13px; margin-bottom: 6px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mine .quote { border-left-color: #e6e2ff; color: #f0eeff; }
.quote b { display: block; font-size: 12px; font-weight: 600; color: var(--accent-text); }
.mine .quote b { color: #fff; }
.media { margin: -4px -8px 4px; border-radius: 12px; overflow: hidden; background: #23233a; position: relative; min-width: 160px; }
.media button { display: block; width: 100%; border: none; padding: 0; background: none; position: relative; }
.media img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.media .ph { height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-size: 12px; }
.media .play-badge { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; background: rgba(10, 10, 15, 0.6); color: #fff; display: flex; align-items: center; justify-content: center; }
.media .state { position: absolute; left: 8px; bottom: 8px; font-size: 11px; background: rgba(10, 10, 15, 0.65); color: #fff; padding: 3px 8px; border-radius: 6px; }
.voice { display: flex; align-items: center; gap: 10px; width: 230px; }
.voice .pbtn { width: 38px; height: 38px; border-radius: 50%; border: none; background: #fff; color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.theirs .voice .pbtn { background: var(--accent); color: #fff; }
.voice .wave { flex: 1; height: 28px; display: flex; align-items: center; gap: 2px; }
.voice .wave span { flex: 1; border-radius: 2px; background: currentColor; opacity: 0.45; min-height: 3px; }
.voice .wave span.on { opacity: 1; }
.voice-meta { display: flex; justify-content: space-between; font-size: 11px; margin-top: 2px; opacity: 0.85; }
.typing-bubble { align-self: flex-start; display: flex; gap: 5px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 4px; padding: 12px 14px; }
.typing-bubble span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); animation: dot 1.2s infinite; }
.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.composer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 8px 10px calc(10px + var(--safe-bottom)); flex-shrink: 0; }
.composer .bar { display: flex; align-items: flex-end; gap: 6px; }
.composer textarea {
  flex: 1; min-width: 0; resize: none; max-height: 120px; background: var(--bg-input); border: 1px solid var(--line);
  border-radius: 22px; padding: 11px 16px; font-size: 16px; line-height: 1.35; outline: none;
}
.composer textarea:focus { border-color: var(--accent); }
.round-btn { width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.round-btn.rec { background: #ff4757; }
.context-bar { display: flex; align-items: center; gap: 10px; padding: 6px 4px 8px; font-size: 13px; color: var(--text-2); }
.context-bar .ctx { flex: 1; min-width: 0; border-left: 3px solid var(--accent); padding-left: 10px; overflow: hidden; }
.context-bar .ctx b { display: block; color: var(--accent-text); font-size: 12px; }
.context-bar .ctx span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recording { display: flex; align-items: center; gap: 10px; flex: 1; height: 46px; padding: 0 6px; }
.recording .dot { width: 10px; height: 10px; border-radius: 50%; background: #ff4757; animation: pulse 1s infinite; }
.recording .time { font-family: 'JetBrains Mono', monospace; font-size: 15px; }
.recording .grow { flex: 1; font-size: 13px; color: var(--text-2); }
.readonly-bar { padding: 14px 16px calc(14px + var(--safe-bottom)); text-align: center; font-size: 14px; color: var(--text-2); background: var(--bg-2); border-top: 1px solid var(--line); }

/* ── Menús, diálogos y avisos ──────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(4, 4, 8, 0.78); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade 0.15s; }
.overlay.bottom { align-items: flex-end; padding: 16px 12px calc(16px + var(--safe-bottom)); }
@keyframes fade { from { opacity: 0; } }
.dialog { width: 100%; max-width: 360px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog h2 { font-size: 18px; font-weight: 500; }
.dialog p { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.dialog-actions .btn { height: 46px; font-size: 15px; }
.sheet { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.sheet .preview-bubble { align-self: flex-end; max-width: 85%; }
.sheet .preview-bubble.theirs { align-self: flex-start; }
.menu { background: var(--bg-3); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.menu button { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 18px; background: none; border: none; border-top: 1px solid var(--line); font-size: 15px; text-align: left; }
.menu button:first-child { border-top: none; }
.menu button .grow { flex: 1; }
.menu button .hint { font-size: 12px; }
.menu button.danger { color: var(--danger); }
.menu button:active { background: var(--bg-input); }
#toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translate(-50%, 20px); z-index: 80;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 12px;
  font-size: 14px; max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { border-color: rgba(255, 71, 87, 0.5); }
.viewer { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; }
.viewer .topbar { background: rgba(0, 0, 0, 0.6); border: none; }
.viewer .stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.viewer img, .viewer video { max-width: 100%; max-height: 100%; }

/* ── Perfil y QR ───────────────────────────────────────────── */
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 20px 10px; }
.avatar-edit { position: relative; border: none; background: none; padding: 0; border-radius: 50%; }
.avatar-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--bg); background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.section-title { font-size: 12px; color: var(--text-2); letter-spacing: 0.1em; padding: 22px 20px 8px; text-transform: uppercase; }
.card { margin: 0 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card .pad { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.row-btn { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; width: 100%; background: none; border: none; border-top: 1px solid var(--line); font-size: 15px; text-align: left; color: var(--text); }
.row-btn:first-child { border-top: none; }
.row-btn > .icon:first-child { color: var(--accent-text); }
.row-btn .grow { flex: 1; }
.row-btn .chev { color: var(--text-3); }
.toggle-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; }
.toggle-row .grow { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.toggle-row .grow small { font-size: 12px; color: var(--text-2); }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 15px; background: var(--line); transition: background 0.2s; }
.switch .track::after { content: ''; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.bottom-actions { padding: 24px 16px calc(28px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 10px; }

.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.segmented button { height: 44px; border: none; border-radius: 9px; background: none; color: var(--text-2); font-size: 14px; }
.segmented button[aria-pressed='true'] { background: var(--accent); color: #fff; font-weight: 500; }
.qr-pad { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.qr-pad p { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.pick { display: flex; flex-direction: column; }
.pick label { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); min-height: 56px; }
.pick label:first-child { border-top: none; }
.pick input { width: 20px; height: 20px; accent-color: var(--accent); }
.qr-box { margin: 4px auto 0; width: 264px; height: 264px; background: #fff; border-radius: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 60px rgba(108, 92, 231, 0.3); }
.qr-box canvas { width: 224px; height: 224px; image-rendering: pixelated; }
.countdown { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 600; }
.countdown + small { display: block; text-align: center; font-size: 12px; color: var(--text-2); margin-top: -8px; }
