/* Inter, self-hosted. Previously pulled from fonts.googleapis.com, which handed every
   visitor's IP to Google on page load — awkward next to the privacy panel's "no third
   parties" promise. One variable file covers weights 300–700. Arabic falls back to the
   system font either way; the Google subset never carried it. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-latin-var.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;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: #eeeeec !important;
  -webkit-text-fill-color: #eeeeec !important;
}
* { -webkit-tap-highlight-color: transparent; }

button, input, select, textarea {
  font: inherit;
  background: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
}

button, .donate-btn, .gate-request-btn, .replay-btn, .pair-opt, .more-opt, a.hdr-btn {
  transition: opacity 0.12s ease, background-color 0.12s ease;
}
button:active, .donate-btn:active, .gate-request-btn:active, .replay-btn:active,
.pair-opt:active, .more-opt:active, a.hdr-btn:active {
  opacity: 0.6;
}
.mic-btn:active { opacity: 1; transform: scale(0.97); }

@media (forced-colors: active) {
  * { forced-color-adjust: none; }
}

:root {
  --bg:        #0b0b0a;
  --ink:       #eeeeec;
  --ink2:      rgba(238,238,236,0.58);
  --ink3:      rgba(238,238,236,0.34);
  --line:      rgba(238,238,236,0.14);
  --line2:     rgba(238,238,236,0.22);
  --panel:     #131311;

  /* single considered accent — warm paper-white gold, used sparingly */
  --accent:    #c9a24a;
  --accent-dim: rgba(201,162,74,0.14);

  --danger:    #c96b5a;
  --good:      #7fae7f;
}

html { height: 100%; background: var(--bg); }

body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

#app {
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── HEADER ─── */
header {
  flex-shrink: 0;
  padding-top: max(env(safe-area-inset-top, 20px), 20px);
  padding-right: 18px;
  padding-bottom: 16px;
  padding-left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

@media (max-width: 380px) {
  .brand-sub { display: none; }
}

.brand { display: flex; align-items: baseline; gap: 9px; }
.brand-icon { display: none; }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--ink);
  white-space: nowrap;
  font-variant: small-caps;
}
.brand-sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink3);
}
.brand-sub-sub {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--ink3);
  vertical-align: baseline;
  position: relative;
  top: 1px;
  margin-left: 2px;
}

.hdr-actions { display: flex; gap: 4px; align-items: center; }

/* ─── PAIR DROPDOWN ─── */
.pair-select { position: relative; }
.pair-btn {
  height: 30px;
  padding: 0 4px;
  border: none;
  background: none;
  color: var(--ink2);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pair-btn-flag { font-size: 13px; line-height: 1; filter: grayscale(0.3); opacity: 0.85; }
.pair-btn-chevron { font-size: 8px; opacity: 0.5; margin-left: 0; }

.pair-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 250px;
  white-space: nowrap;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 3px;
  padding: 4px;
  z-index: 60;
  display: none;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.pair-menu.open { display: flex; animation: menuIn 0.12s ease both; }
@keyframes menuIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.pair-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 2px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--ink2);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}
.pair-opt:hover, .pair-opt:active { background: rgba(238,238,236,0.05); }
.pair-opt.current { color: var(--ink); }
.pair-opt-flags { font-size: 14px; line-height: 1; flex-shrink: 0; opacity: 0.85; }
.pair-opt-label { flex: 1; }
.pair-opt-check { font-size: 11px; color: var(--accent); opacity: 0; }
.pair-opt.current .pair-opt-check { opacity: 1; }

/* ─── KEBAB MENU ─── */
.more-select { position: relative; }
.more-btn {
  width: 30px; height: 30px;
  border: none;
  background: none;
  color: var(--ink2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.more-btn svg { display: block; }

.more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 0;
  width: max-content;
  white-space: nowrap;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 3px;
  padding: 4px;
  z-index: 60;
  display: none;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.more-menu.open { display: flex; animation: menuIn 0.12s ease both; }
.more-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 2px;
  background: transparent;
  border: none;
  color: var(--ink2);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  width: 100%;
  white-space: nowrap;
}
.more-opt span:last-child { flex: 1; }
.more-opt:active { background: rgba(238,238,236,0.05); }
.more-opt-ico { font-size: 13px; line-height: 1; width: 16px; text-align: center; opacity: 0.7; }
.more-opt-danger { color: var(--danger); }
.more-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 6px;
}
.hdr-btn {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line2);
  border-radius: 2px;
  background: none;
  color: var(--ink2);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
}

/* ─── SCROLL AREA ─── */
.feed {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.feed::-webkit-scrollbar { display: none; }

/* ─── EMPTY STATE ─── */
.empty {
  margin: auto;
  text-align: center;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.empty-orb {
  width: 56px;
  height: 56px;
  display: block;
  opacity: 0.9;
}
.empty-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink2);
  min-height: 1.2em;
  transition: opacity 0.2s ease;
  letter-spacing: -0.1px;
}
.empty-hint {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.7;
  min-height: 2.6em;
  transition: opacity 0.2s ease;
}
.empty-title.fading,
.empty-hint.fading {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .empty-title, .empty-hint { transition: none; }
}

/* ─── THINKING ─── */
.thinking {
  align-self: center;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink3);
  letter-spacing: 0.3px;
  padding: 4px 0;
}
.thinking.on { display: flex; }

/* ─── STAGE-FLOW LOADING INDICATOR ─── */
.stage-flow {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  max-width: 100%;
}
.stage {
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.25s ease;
  opacity: 0.32;
  flex-shrink: 0;
}
.stage.active { opacity: 1; }
.stage.done { opacity: 0.5; }
.stage-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink3);
  transition: background 0.25s ease, transform 0.25s ease;
}
.stage.active .stage-dot {
  background: var(--accent);
  animation: stageDotPulse 1.3s ease-in-out infinite;
}
.stage.done .stage-dot {
  background: var(--ink2);
}
.stage-lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink3);
  white-space: nowrap;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, width 0.25s ease;
}
.stage.active .stage-lbl {
  color: var(--ink);
  opacity: 1;
  width: auto;
}
.stage-line {
  flex: 0 0 10px;
  height: 1px;
  background: var(--line2);
}
@keyframes stageDotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
  .stage.active .stage-dot { animation: none; }
}

/* ─── BUBBLES ───
   Type-only distinction between speakers: label + alignment + a left/right
   rule. No color-coding, no tinted fills. */
.bubble {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  animation: bubbleIn 0.22s ease both;
}
.bubble.en { align-self: flex-start; }
.bubble.es { align-self: flex-end; }

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; }
}

.bubble-who {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding: 0 1px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink3);
}
.bubble.es .bubble-who { justify-content: flex-end; }

.bubble-body {
  padding: 3px 0 3px 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  position: relative;
  border-left: 2px solid var(--line2);
}
.bubble.es .bubble-body {
  padding: 3px 12px 3px 0;
  border-left: none;
  border-right: 2px solid var(--line2);
  text-align: right;
}

.bubble-tr {
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  color: var(--ink3);
  line-height: 1.5;
  padding: 8px 0 3px 12px;
  margin-top: 2px;
}
.bubble.es .bubble-tr { padding: 8px 12px 3px 0; text-align: right; }

.bubble-foot { display: flex; padding: 5px 0 0 12px; }
.bubble.es .bubble-foot { justify-content: flex-end; padding: 5px 12px 0 0; }
.replay-btn {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--ink3);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 2px 0;
}
.replay-btn:active { color: var(--ink2); }
.replay-btn svg { width: 8px; height: 8px; fill: currentColor; }

/* ─── BOTTOM ─── */
.bottom {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 18px 18px max(env(safe-area-inset-bottom, 24px), 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── SPEAKER TOGGLE ───
   A single hairline-bordered switch, not two competing colored pills. */
.speakers {
  display: flex;
  border: 1px solid var(--line2);
  border-radius: 3px;
  overflow: hidden;
}
.spk {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 8px;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink3);
  cursor: pointer;
  letter-spacing: 0.1px;
}
.spk:first-child { border-right: 1px solid var(--line2); }
.spk-flag { font-size: 15px; line-height: 1; opacity: 0.7; filter: grayscale(0.4); }
.spk.sel-en, .spk.sel-es {
  color: var(--ink);
  background: rgba(238,238,236,0.045);
}
.spk.sel-en .spk-flag, .spk.sel-es .spk-flag { opacity: 1; filter: none; }

/* ─── AUDIO RING ─── */
.mic-ring {
  position: absolute;
  width: 160px;
  height: 160px;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mic-ring.on { opacity: 1; }

/* ─── MIC ROW ─── */
.mic-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6px 0;
}

.mic-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mic-wrap::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.mic-wrap.recording::before {
  opacity: 0.18;
  animation: ring 1.6s ease-out infinite;
}
@keyframes ring {
  0%   { transform: scale(0.9); opacity: 0.18; }
  100% { transform: scale(1.25); opacity: 0; }
}

.mic-btn {
  width: 74px; height: 74px;
  border-radius: 50%;
  border: 1px solid var(--line2);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 0.15s ease;
  z-index: 1;
}
.mic-btn.recording {
  border-color: var(--ink);
  background: var(--ink);
}

.mic-ico {
  position: relative;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mic-ico-svg {
  position: absolute;
  inset: 0;
  margin: auto;
  fill: var(--ink);
  transition: opacity 0.15s ease;
}
.mic-btn.recording .mic-ico-svg { fill: var(--bg); }
/* When recording, the button fills near-white — flip the STOP label to dark so it stays legible */
.mic-btn.recording .mic-lbl {
  color: var(--bg) !important;
  -webkit-text-fill-color: var(--bg) !important;
}
.mic-ico-svg-mic {
  width: 24px; height: 24px;
  opacity: 1;
}
.mic-ico-svg-stop {
  width: 15px; height: 15px;
  opacity: 0;
}
.mic-btn.recording .mic-ico-svg-mic { opacity: 0; }
.mic-btn.recording .mic-ico-svg-stop { opacity: 1; }

.mic-lbl {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink3);
  font-family: 'Inter', sans-serif;
  max-width: 60px;
  text-align: center;
  white-space: nowrap;
}

/* ─── STATUS ─── */
.status {
  text-align: center;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink3);
  letter-spacing: 0.2px;
  min-height: 14px;
  transition: color 0.2s;
}
.status.err { color: var(--danger); }

.disclaimer {
  text-align: center;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--ink3);
  margin-top: 2px;
  opacity: 0.6;
}

/* ─── INSTALL BANNER ─── */
.install-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink2);
  line-height: 1.4;
}
.install-banner.show { display: flex; }
.install-banner.banner-warn {
  color: var(--accent);
  border-bottom-color: var(--accent-dim);
}
.install-banner.banner-warn strong { color: var(--accent); }
.install-banner.banner-warn .install-banner-close { color: var(--accent); }
.install-banner-icon { font-size: 15px; flex-shrink: 0; opacity: 0.8; }
.install-banner-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--ink3);
  font-size: 15px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}

/* ─── MODAL ─── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.overlay.open { display: flex; }

.sheet {
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 0 22px max(env(safe-area-inset-bottom, 28px), 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: sheetUp 0.2s ease;
}
@keyframes sheetUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.sheet-drag {
  width: 32px; height: 3px;
  border-radius: 2px;
  background: var(--line2);
  margin: 12px auto 8px;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.sheet-title { font-size: 16px; font-weight: 600; letter-spacing: -0.1px; }
.sheet-close {
  width: 26px; height: 26px;
  border: 1px solid var(--line2);
  border-radius: 50%;
  background: none;
  color: var(--ink2);
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink3);
}
.field-input {
  padding: 12px 13px;
  border-radius: 3px;
  border: 1px solid var(--line2);
  background: none;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.15s;
  letter-spacing: 0.1px;
}
.field-input::placeholder { color: var(--ink3); }
.field-input:focus { border-color: var(--accent); }
.field-hint { font-size: 10px; color: var(--ink3); padding: 0 2px; line-height: 1.5; }

.sheet-save {
  padding: 14px;
  border-radius: 3px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg) !important;
  -webkit-text-fill-color: var(--bg) !important;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
}
.sheet-save:active { opacity: 0.85; }

/* ─── SUPPORT CARD (in modals) ─── */
.modal-support-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 3px;
  border: 1px solid var(--line2);
  background: none;
  text-decoration: none;
  cursor: pointer;
}
.modal-support-card:active { opacity: 0.8; }
.modal-support-heart {
  font-size: 18px;
  line-height: 1;
  color: var(--ink3);
  flex-shrink: 0;
}
.modal-support-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.modal-support-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.1px;
}
.modal-support-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink3);
}

/* ─── INVITE CODE GATE ─── */
.gate {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 500;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
}
.gate.show { display: flex; }
.gate-logo {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--ink3);
  text-transform: uppercase;
  margin-bottom: 26px;
}
.gate-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
  font-variant: small-caps;
}
.gate-sub {
  font-size: 13px;
  color: var(--ink2);
  max-width: 320px;
  line-height: 1.6;
  margin-bottom: 30px;
}
.gate-form { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 10px; }
.gate-input {
  padding: 14px 16px;
  border-radius: 3px;
  border: 1px solid var(--line2);
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  text-align: center;
  letter-spacing: 0.3px;
  transition: border-color 0.15s;
}
.gate-input:focus { border-color: var(--accent); }
.gate-btn {
  padding: 14px;
  border-radius: 3px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg) !important;
  -webkit-text-fill-color: var(--bg) !important;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
}
.gate-btn:active { opacity: 0.85; }
.gate-request-btn {
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 3px;
  border: 1px solid var(--line2);
  background: none;
  color: var(--ink2) !important;
  -webkit-text-fill-color: var(--ink2) !important;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ─── TIER BADGE ─── */
.tier-badge {
  display: none;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 4px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink3);
  white-space: nowrap;
}
.tier-badge:not(:empty) { display: inline-flex; }
.tier-text { font-variant-numeric: tabular-nums; }
.tier-tick {
  position: relative;
  display: inline-block;
  height: 14px;
  min-width: 18px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.tier-tick-old, .tier-tick-new {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.tier-tick-old { transform: translateY(0); opacity: 1; }
.tier-tick-new { transform: translateY(100%); opacity: 0; }
.tier-tick.animate .tier-tick-old { transform: translateY(-100%); opacity: 0; }
.tier-tick.animate .tier-tick-new { transform: translateY(0); opacity: 1; }
.tier-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--ink3);
}
.tier-dot-unlimited { background: var(--good); }
.tier-badge.tier-low { color: var(--danger) !important; -webkit-text-fill-color: var(--danger) !important; }
.tier-badge.tier-low .tier-dot-beta { background: var(--danger); }

.gate-error {
  font-size: 12px;
  color: var(--danger) !important;
  -webkit-text-fill-color: var(--danger) !important;
  min-height: 16px;
  margin-top: 4px;
}
.gate-foot {
  margin-top: 28px;
  font-size: 11px;
  color: var(--ink3);
  line-height: 1.6;
  max-width: 300px;
}
.gate-foot a { color: var(--ink2); text-decoration: underline; }

/* ─── DONATE BUTTON ─── */
.donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line2);
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
  color: var(--ink2);
  -webkit-text-fill-color: var(--ink2) !important;
  text-decoration: none;
  overflow: hidden;
  position: relative;
}
.donate-btn-heart {
  font-size: 10px;
  line-height: 1;
  color: var(--ink3);
  -webkit-text-fill-color: var(--ink3) !important;
}
.donate-flip {
  display: inline-block;
  position: relative;
  height: 14px;
  min-width: 44px;
  text-align: left;
  overflow: hidden;
}
.donate-flip span {
  display: block;
  position: absolute;
  inset: 0;
  animation: donateFlip 14s infinite;
  opacity: 0;
  color: var(--ink2) !important;
  -webkit-text-fill-color: var(--ink2) !important;
}
.donate-flip span:nth-child(1) { animation-delay: 0s; }
.donate-flip span:nth-child(2) { animation-delay: 7s; }
@keyframes donateFlip {
  0%   { transform: translateY(100%); opacity: 0; }
  3%   { transform: translateY(0);    opacity: 1; }
  47%  { transform: translateY(0);    opacity: 1; }
  50%  { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(-100%); opacity: 0; }
}

/* ─── INSTALL INSTRUCTIONS MODAL ─── */
.install-toggle {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  letter-spacing: 0.2px;
  text-decoration: underline;
  text-underline-offset: 2px;
  -webkit-text-fill-color: var(--ink2) !important;
}

.install-lang-toggle {
  display: flex;
  border: 1px solid var(--line2);
  border-radius: 3px;
  padding: 2px;
  align-self: center;
  margin-bottom: 4px;
}
.install-lang-btn {
  padding: 6px 14px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink3);
  -webkit-text-fill-color: var(--ink3) !important;
}
.install-lang-btn.active {
  background: var(--ink);
  color: var(--bg) !important;
  -webkit-text-fill-color: var(--bg) !important;
}

#install-content, #privacy-content { min-height: 360px; }

.install-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.install-step:last-child { border-bottom: none; }
.install-step-num {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 1px solid var(--line2);
  border-radius: 50%;
  color: var(--ink2) !important;
  -webkit-text-fill-color: var(--ink2) !important;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.install-step-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink2);
}
.install-step-text strong { color: var(--ink); font-weight: 600; }
