/* QuizEarn — teal + coral, playful rounded quiz UI.
 * Full-screen / nav-bar rules (owner requirement):
 * - The APK wrapper must NOT draw edge-to-edge: the WebView is laid out
 *   ABOVE the Android system bars (fitsSystemWindows-style). The fixed
 *   bottom nav sits at bottom:0 of the WebView, i.e. directly above the
 *   system navigation bar, with no gap and no overlap.
 * - env(safe-area-inset-bottom) padding keeps content clear of gesture
 *   bars on edge-to-edge browsers too; the page shell adds explicit
 *   bottom padding (nav height + safe area + margin) so the lowest
 *   content always clears the nav bar. Nothing is positioned in the
 *   bottom system-bar area. No horizontal overflow at any width.
 */
:root {
  --teal: #00B8A9;
  --teal-dark: #00968A;
  --coral: #FF6B6B;
  --coral-dark: #E55252;
  --gold: #FFB800;
  --violet: #7C6CFF;
  --bg: #F6FBFA;
  --card: #FFFFFF;
  --ink: #16302C;
  --muted: #6B7C79;
  --line: #DCEBE8;
  --nav-h: 64px;
  --radius: 20px;
  --shadow: 0 6px 24px rgba(0, 184, 169, .12);
  --font-display: "Baloo Da 2", "Hind Siliguri", system-ui, sans-serif;
  --font-body: "Hind Siliguri", system-ui, sans-serif;
}
[data-theme="dark"] {
  --bg: #0E1B19;
  --card: #162825;
  --ink: #EDF6F4;
  --muted: #9DB4B0;
  --line: #27423D;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
@font-face { font-family: "Baloo Da 2"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/baloo-da-2-700-bengali.woff2") format("woff2"), url("../fonts/baloo-da-2-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Baloo Da 2"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/baloo-da-2-800-bengali.woff2") format("woff2"), url("../fonts/baloo-da-2-800-latin.woff2") format("woff2"); }
@font-face { font-family: "Hind Siliguri"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/hind-siliguri-400-bengali.woff2") format("woff2"), url("../fonts/hind-siliguri-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Hind Siliguri"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/hind-siliguri-500-bengali.woff2") format("woff2"), url("../fonts/hind-siliguri-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Hind Siliguri"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/hind-siliguri-600-bengali.woff2") format("woff2"), url("../fonts/hind-siliguri-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Hind Siliguri"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/hind-siliguri-700-bengali.woff2") format("woff2"), url("../fonts/hind-siliguri-700-latin.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
img { max-width: 100%; height: auto; }
a { color: var(--teal-dark); text-decoration: none; }
[data-theme="dark"] a { color: #4FD8CC; }
h1, h2, h3, .btn, .hero-big, .balance-big, .score-big { font-family: var(--font-display); }
h1 { font-size: 1.5rem; margin: .2em 0 .4em; }
h2 { font-size: 1.2rem; margin: 0 0 .5em; }
h3 { font-size: 1.05rem; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 8px; }

.app {
  max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); position: relative;
}
/* With bottom nav: explicit clearance = nav height + safe-area + margin,
   so the lowest content always ends above the Android nav bar. */
.app.has-nav { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 28px); }
.app.no-nav { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }

/* ---- header (guest + app) ---- */
.guest-header, .app-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.brand-txt small { color: var(--muted); font-size: .75rem; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang-toggle, .theme-toggle, .bell {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  font-weight: 700; font-size: .9rem; position: relative; padding: 0 8px;
}
.bell { font-size: 1.1rem; }
.bell-badge { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; background: var(--coral); color: #fff; font-size: .68rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ---- page / cards ---- */
.page { padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 14px; }
.page.narrow { max-width: 420px; margin: 0 auto; width: 100%; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card-title { margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.right { text-align: right; }
.ok-text { color: var(--teal-dark); font-weight: 600; }
[data-theme="dark"] .ok-text { color: #4FD8CC; }
.warn-text { color: var(--coral-dark); font-weight: 600; }
.money { color: var(--teal-dark); font-weight: 700; }
[data-theme="dark"] .money { color: #4FD8CC; }
.flash { border-radius: 14px; padding: 12px 14px; font-weight: 600; }
.flash-info { background: #E3ECFF; color: #2A4FA0; }
[data-theme="dark"] .flash-info { background: #1C2A4D; color: #9DB8FF; }
.flash-error { background: #FFE3E3; color: #A02A2A; }
[data-theme="dark"] .flash-success { background: #123B36; color: #7FE3D8; }
[data-theme="dark"] .flash-error { background: #3D1C1C; color: #FF9B9B; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 999px; padding: 13px 22px; font-weight: 700; font-size: 1rem; cursor: pointer; min-height: 48px; text-align: center; }
.btn-lg { padding: 15px 26px; font-size: 1.1rem; min-height: 54px; }
.btn-sm { padding: 8px 14px; min-height: 40px; font-size: .9rem; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-teal { background: linear-gradient(135deg, var(--teal), #00D4C3); color: #fff; box-shadow: 0 6px 16px rgba(0, 184, 169, .35); }
.btn-coral { background: linear-gradient(135deg, var(--coral), #FF8E53); color: #fff; box-shadow: 0 6px 16px rgba(255, 107, 107, .35); }
.btn-ghost { background: transparent; border: 2px solid var(--line); color: var(--ink); }
/* Dark mode: the generic dark `a` color rule must not recolor buttons,
   quick tiles, menu rows or tabs (specificity guard). */
[data-theme="dark"] .btn-teal, [data-theme="dark"] .btn-coral { color: #fff; }
[data-theme="dark"] .btn-ghost { color: var(--ink); }
[data-theme="dark"] .quick-item, [data-theme="dark"] .menu-row { color: var(--ink); }
[data-theme="dark"] .tab { color: var(--muted); }
[data-theme="dark"] .tab.active { color: #fff; }

/* ---- hero / landing ---- */
.hero { text-align: center; padding: 8px 4px; }
.hero-art { width: 100%; max-width: 360px; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-big { font-size: 1.9rem; line-height: 1.25; margin: 14px 0 6px; }
.hero-lead { color: var(--muted); margin: 0 0 14px; }
.hero-cta { display: flex; flex-direction: column; gap: 10px; }
.app-only-pill { display: inline-block; background: var(--card); border: 1px dashed var(--teal); border-radius: 999px; padding: 8px 14px; font-size: .85rem; margin-top: 14px; }
.stat-row, .stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-grid { grid-template-columns: repeat(2, 1fr); }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; text-align: center; }
.stat-box b { display: block; font-size: 1.3rem; font-family: var(--font-display); }
.stat-box small { color: var(--muted); font-size: .78rem; }
.stat-chip { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: 16px; padding: 12px; }
.stat-chip .chip-emoji { font-size: 1.5rem; }
.stat-chip .chip-body { display: flex; flex-direction: column; line-height: 1.25; }
.stat-chip .chip-body small { color: var(--muted); font-size: .8rem; }
.stat-chip .chip-body b { font-size: 1.1rem; font-family: var(--font-display); }
.stat-chip.coral { border-left-color: var(--coral); }
.stat-chip.gold { border-left-color: var(--gold); }
.stat-chip.violet { border-left-color: var(--violet); }
.step { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; }
.step-n { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--font-display); }
.step p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.reward-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.reward-row:last-child { border-bottom: none; }
.reward-row.total-row { border-top: 2px solid var(--line); font-size: 1.1rem; }
.teaser-q { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: 14px; padding: 12px; margin: 8px 0; text-align: left; }
.teaser-dot { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }

/* ---- forms ---- */
.fld { display: block; margin: 12px 0; }
.fld > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.fld input[type="text"], .fld input[type="tel"], .fld input[type="password"], .fld input[type="number"], .fld input[type="email"], .fld textarea, .fld select {
  width: 100%; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); padding: 13px 14px; min-height: 50px;
}
.fld textarea { min-height: 100px; resize: vertical; }
.phone-wrap { display: flex; align-items: stretch; }
.phone-prefix { display: flex; align-items: center; padding: 0 12px; background: var(--line); border-radius: 14px 0 0 14px; font-weight: 700; }
.phone-wrap input { border-radius: 0 14px 14px 0 !important; }
.bonus-pill { background: #FFF3D6; border: 1px solid var(--gold); border-radius: 14px; padding: 12px; text-align: center; }
[data-theme="dark"] .bonus-pill { background: #3A2E0A; }
.celebrate { text-align: center; }
.celebrate-emoji { font-size: 3.5rem; line-height: 1; }
.dl-logo { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow); margin-bottom: 10px; }
.coming-emoji { font-size: 3rem; }
.qr-label { margin: 16px 0 6px; font-weight: 600; }
.qr-box { display: inline-block; background: #fff; padding: 12px; border-radius: 16px; box-shadow: var(--shadow); }
.qr-box svg { display: block; width: 180px; height: 180px; }

/* ---- dashboard ---- */
.dash-hello { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hello-line { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin: 0; }
.hello-phone { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.streak-flame { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 1.1rem; white-space: nowrap; }
.balance-hero { background: linear-gradient(135deg, #00B8A9, #007A72); color: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.balance-hero small { opacity: .85; }
.balance-big { font-size: 2.2rem; font-weight: 800; line-height: 1.2; }
.balance-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .9rem; }
.quiz-cta-card { border: 2px solid var(--teal); }
.quiz-cta-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.quiz-cta-emoji { font-size: 2.2rem; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 6px; text-align: center; font-weight: 600; font-size: .85rem; color: var(--ink); min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.quick-item span { font-size: 1.4rem; }
.lb-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.lb-row:last-child { border-bottom: none; }
.lb-row.me { background: rgba(0, 184, 169, .08); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.lb-head { display: flex; justify-content: space-between; font-weight: 700; color: var(--muted); font-size: .85rem; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.lb-rank { font-size: 1.1rem; min-width: 34px; }
.lb-phone small { display: block; }

/* ---- quiz ---- */
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quiz-progress { font-weight: 700; font-family: var(--font-display); }
.quiz-cat { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .82rem; }
.progress-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 999px; transition: width .3s; }
.quiz-card { text-align: center; }
.timer-wrap { position: relative; width: 84px; height: 84px; margin: 0 auto 10px; }
.timer-ring { width: 84px; height: 84px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--teal); stroke-width: 7; stroke-linecap: round; }
.ring-fg.danger { stroke: var(--coral); }
.timer-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.timer-num b { font-size: 1.6rem; font-family: var(--font-display); }
.timer-num small { color: var(--muted); }
.quiz-q { font-size: 1.3rem; line-height: 1.4; margin: 6px 0 14px; }
.options { display: flex; flex-direction: column; gap: 10px; text-align: left; margin-bottom: 14px; }
.option { display: flex; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: 16px; padding: 13px 14px; cursor: pointer; min-height: 54px; background: var(--bg); }
.option:has(input:checked) { border-color: var(--teal); background: rgba(0, 184, 169, .1); }
.option input { position: absolute; opacity: 0; }
.option-letter { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.option-hidden { opacity: .35; text-decoration: line-through; pointer-events: none; }
.lifeline-form { margin-top: 10px; }
.score-ring { margin: 10px auto; }
.score-big { font-size: 3rem; font-weight: 800; line-height: 1; }
.score-big span { font-size: 1.4rem; color: var(--muted); }
.result-card { border: 2px solid var(--gold); }
.review-item { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.review-item:last-child { border-bottom: none; }
.review-item.ok { border-left: 4px solid var(--teal); padding-left: 10px; }
.review-item.bad { border-left: 4px solid var(--coral); padding-left: 10px; }
.review-q { margin: 0 0 4px; font-weight: 600; }
.review-a, .review-correct { margin: 2px 0; font-size: .92rem; }
.quiz-status-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.empty-state { text-align: center; }
.empty-emoji { font-size: 3rem; }
.streak-big { font-size: 4rem; line-height: 1; }
.streak-num { font-size: 3rem; font-weight: 800; font-family: var(--font-display); line-height: 1.1; }
.milestone.done { background: rgba(0, 184, 169, .08); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.pass-card { background: linear-gradient(135deg, #FFF3D6, #FFE8E8); border: 2px dashed var(--gold); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
[data-theme="dark"] .pass-card { background: #2A2510; }
.pass-emoji { font-size: 2.5rem; }
.pass-price { font-size: 2rem; font-weight: 800; font-family: var(--font-display); margin: 4px 0; color: var(--coral-dark); }

/* ---- money pages ---- */
.preview-box { background: var(--bg); border: 1px dashed var(--teal); border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-size: 1.05rem; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.method-card { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px solid var(--line); border-radius: 16px; padding: 14px 8px; cursor: pointer; font-weight: 600; background: var(--bg); min-height: 96px; justify-content: center; }
.method-card:has(input:checked) { border-color: var(--coral); background: rgba(255, 107, 107, .08); }
.method-card input { position: absolute; opacity: 0; }
.method-card img { width: 64px; height: 32px; object-fit: contain; }
.pay-box { text-align: center; }
.pay-img { max-height: 140px; border-radius: 14px; margin-bottom: 10px; }
.pay-num-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg); border-radius: 14px; padding: 12px; text-align: left; }
.pay-num { font-size: 1.25rem; letter-spacing: .5px; }
.pay-ins { text-align: left; background: #FFF8E1; border-radius: 12px; padding: 12px; font-size: .92rem; white-space: pre-wrap; }
[data-theme="dark"] .pay-ins { background: #2A2510; }
.status { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status-pending { background: #FFF3D6; color: #8A6D00; }
.status-approved, .status-answered { background: #D9F5F1; color: #0A6B61; }
.status-rejected, .status-closed { background: #FFE3E3; color: #A02A2A; }
.status-open { background: #E3ECFF; color: #2A4FA0; }
[data-theme="dark"] .status-pending { background: #3A2E0A; color: #FFD34D; }
[data-theme="dark"] .status-approved, [data-theme="dark"] .status-answered { background: #123B36; color: #7FE3D8; }
[data-theme="dark"] .status-rejected, [data-theme="dark"] .status-closed { background: #3D1C1C; color: #FF9B9B; }
[data-theme="dark"] .status-open { background: #1C2A4D; color: #9DB8FF; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1; text-align: center; padding: 11px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .88rem; white-space: nowrap; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.tab.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.invite-link-box { background: var(--bg); border: 1px dashed var(--teal); border-radius: 12px; padding: 12px; word-break: break-all; margin-bottom: 4px; }
.invite-link-box code { font-size: .85rem; }

/* ---- profile / menus ---- */
.profile-card .avatar { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--teal); }
.menu-card { padding: 6px 16px; }
.menu-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px dashed var(--line); color: var(--ink); font-weight: 600; min-height: 50px; }
.menu-row:last-child { border-bottom: none; }
.menu-row.danger { color: var(--coral-dark); }
.notice-item { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.notice-item:last-child { border-bottom: none; }
.admin-reply { background: rgba(0, 184, 169, .08); border-radius: 10px; padding: 10px; }
.about-logo { display: block; width: 90px; height: 90px; margin: 0 auto 12px; border-radius: 22px; }
.page-hero { text-align: center; }
.page-hero .hero-emoji { font-size: 2.4rem; line-height: 1; }
.page-hero .hero-title { margin: 6px 0 2px; }
.page-hero .hero-sub { margin: 0; color: var(--muted); }

/* ---- bottom nav: fixed directly above the system bar ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 50;
  display: flex; background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
  /* Sit directly above the system bar: safe-area padding goes INSIDE
     the nav so its buttons never sit in the gesture/nav-bar zone. */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav a.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: var(--nav-h); color: var(--muted); font-size: .72rem; font-weight: 600;
}
.bottom-nav a .nav-icon { font-size: 1.3rem; line-height: 1; }
.bottom-nav a.nav-item.active { color: var(--teal-dark); }
[data-theme="dark"] .bottom-nav a.nav-item.active { color: #4FD8CC; }
.bottom-nav a.nav-item.active .nav-icon { transform: scale(1.15); }

/* ---- floating support: above the bottom nav, never in the bar zone ---- */
.support-float {
  position: fixed; z-index: 45;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #00D4C3); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  box-shadow: 0 6px 18px rgba(0, 184, 169, .45);
}
.support-float.no-nav { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

/* ---- announcement modal ---- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { position: relative; background: var(--card); border-radius: var(--radius); padding: 22px; max-width: 400px; width: 100%; max-height: calc(100dvh - 60px); overflow-y: auto; text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.modal-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font-size: 1rem; }
.pop-badge { font-size: 2.4rem; line-height: 1; }
.pop-title { margin: 8px 0 4px; }
.pop-text { text-align: left; white-space: pre-wrap; }

@media (min-width: 481px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .hero-cta { flex-direction: row; justify-content: center; }
  .hero-cta .btn { flex: 1; max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* App welcome screen (app guests only): congrats + Login/Register side by side. */
.welcome-card { padding: 30px 20px; }
.welcome-card h1 { margin-top: 0; }
.welcome-cta { display: flex; gap: 10px; margin-top: 20px; }
.welcome-cta .btn { flex: 1; }

/* Scrolling headline ticker (admin-managed, hidden when empty). */
.ticker-wrap { display: flex; align-items: stretch; gap: 0; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--coral); border-radius: 12px; overflow: hidden; margin-bottom: 14px; box-shadow: 0 4px 16px rgba(255, 107, 107, .10); }
.ticker-label { flex: 0 0 auto; display: flex; align-items: center; background: var(--coral); color: #fff; font-weight: 800; font-size: .82rem; padding: 9px 12px; animation: ticker-blink 1.6s ease-in-out infinite; white-space: nowrap; }
@keyframes ticker-blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.ticker-track { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.ticker-scroll { display: inline-flex; white-space: nowrap; padding-left: 12px; animation: ticker-scroll 40s linear infinite; will-change: transform; }
.ticker-scroll span { padding-right: 12px; font-weight: 600; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
