@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('assets/fonts/roboto-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('assets/fonts/roboto-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url('assets/fonts/roboto-latin.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;
}

:root {
  --font: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --brand: #f26b0a;
  --brand-2: #ff8a1f;
  --brand-strong: #df5b00;
  --green: #18b354;
  --green-strong: #149646;
  --orange: #f59e0b;
  --red: #e5484d;
  --radius: 20px;
  --ease-out: cubic-bezier(.22, .86, .28, 1);
  --ease-spring: cubic-bezier(.34, 1.35, .64, 1);
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #fbf5ee;
  --bg-deep: #f7efe5;
  --surface: #fffdfa;
  --surface-2: #f7f1e9;
  --text: #1b2233;
  --muted: #7d8698;
  --muted-strong: #5f6a7d;
  --divider: #eee4d8;
  --card-border: #e9ddcf;
  --card-shadow: 0 12px 34px rgba(94, 59, 21, .055);
  --ambient: rgba(255, 168, 87, .16);
  --canvas: #eee5d9;
  --canvas-glow: rgba(242, 107, 10, .12);
  --brand-soft: #fff0e2;
  --brand-soft-border: #f7d7ba;
  --brand-halo: rgba(242, 107, 10, .13);
  --icon-tile: #fff0e2;
  --green-soft: #e9f8ee;
  --green-border: #c9ecd5;
  --danger: #e5484d;
  --danger-soft: #fdeced;
  --danger-border: #f6cacc;
  --warn: #f59e0b;
  --warn-soft: #fdf4e2;
  --warn-border: #f1dcb1;
  --nav-bg: #fffdfa;
  --nav-shadow: 0 -9px 30px rgba(94, 59, 21, .08);
  --toast-bg: #f1fbf4;
  --toast-border: #c9ebd4;
  --toast-text: #176b37;
  --sheet-backdrop: rgba(22, 18, 14, .44);
  --search-border: #f5cda8;
  --gauge-track: #d7efdd;
  --gauge-outer: #e7d8c5;
  --gauge-fill-1: #d9f1dd;
  --gauge-fill-2: #bde5c7;
  --gauge-label: #1c3d27;
  --gauge-number: #16a34a;
  --gauge-inner-border: rgba(255, 255, 255, .62);
  --green-glow: rgba(34, 197, 94, .15);
  --gauge-glow: rgba(255, 175, 94, .24);
  --empty-art: #ffb47b;
  --theme-fade: background-color .32s ease, color .32s ease, border-color .32s ease, fill .32s ease;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0c0e;
  --bg-deep: #08090b;
  --surface: #151619;
  --surface-2: #1c1d21;
  --text: #f1f2f4;
  --muted: #9097a5;
  --muted-strong: #b7bdc8;
  --divider: #24262b;
  --card-border: #292b31;
  --card-shadow: 0 14px 38px rgba(0, 0, 0, .24);
  --ambient: rgba(242, 107, 10, .075);
  --canvas: #070809;
  --canvas-glow: rgba(242, 107, 10, .08);
  --brand-soft: rgba(242, 107, 10, .12);
  --brand-soft-border: rgba(242, 107, 10, .27);
  --brand-halo: rgba(242, 107, 10, .18);
  --icon-tile: rgba(242, 107, 10, .12);
  --green-soft: rgba(34, 197, 94, .11);
  --green-border: rgba(34, 197, 94, .23);
  --danger: #ff666c;
  --danger-soft: rgba(239, 68, 68, .095);
  --danger-border: rgba(239, 68, 68, .23);
  --warn: #fbbf24;
  --warn-soft: rgba(245, 158, 11, .095);
  --warn-border: rgba(245, 158, 11, .23);
  --nav-bg: #121316;
  --nav-shadow: 0 -10px 34px rgba(0, 0, 0, .42);
  --toast-bg: #102116;
  --toast-border: #20502f;
  --toast-text: #90efaf;
  --sheet-backdrop: rgba(0, 0, 0, .66);
  --search-border: rgba(242, 107, 10, .28);
  --gauge-track: #193724;
  --gauge-outer: #273d2e;
  --gauge-fill-1: #113a23;
  --gauge-fill-2: #092416;
  --gauge-label: #e9f7ed;
  --gauge-number: #3ce270;
  --gauge-inner-border: rgba(112, 255, 154, .12);
  --green-glow: rgba(34, 197, 94, .18);
  --gauge-glow: rgba(34, 197, 94, .11);
  --empty-art: #d88650;
  --theme-fade: background-color .32s ease, color .32s ease, border-color .32s ease, fill .32s ease;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  height: 100%;
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background:
    radial-gradient(80% 60% at 50% -10%, var(--canvas-glow), transparent 64%),
    var(--canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button,
input {
  font: inherit;
}
button { color: inherit; }
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
button { -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }
::selection { background: rgba(242, 107, 10, .22); }

.stage {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(70% 55% at 50% 4%, var(--canvas-glow), transparent 65%),
    var(--canvas);
}

.app-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

@media (min-width: 700px) and (min-height: 740px) {
  .stage { padding: 26px; }
  .app-shell {
    height: min(920px, calc(100dvh - 52px));
    border-radius: 38px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow:
      0 40px 90px rgba(30, 18, 7, .28),
      0 8px 26px rgba(30, 18, 7, .12);
  }
}

.brand-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.logo-shield { display: block; width: 100%; height: 100%; overflow: visible; color: #ffb13b; }
.onboarding-mark .logo-shield,
.language-page .logo-shield,
.footer-mark .logo-shield { color: var(--brand); }

/* ============ Wordmark & icon buttons ============ */

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1px;
  white-space: nowrap;
}
.wordmark-dark { color: var(--text); }
.wordmark-orange { color: var(--brand); }

.icon-btn {
  width: 44px;
  height: 44px;
  margin-right: -7px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7d8aa2;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .18s ease;
  position: relative;
  overflow: hidden;
}
html[data-theme='dark'] .icon-btn { color: #a6adba; }
.icon-btn svg { width: 24px; height: 24px; fill: currentColor; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn:active { transform: scale(.92); }

/* ============ Main app shell ============ */

.main-app {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(115% 46% at 50% -9%, var(--ambient), transparent 68%),
    var(--bg);
  overflow: hidden;
}
.main-app.reveal { animation: appIn .52s var(--ease-out) both; }

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 20px 8px;
  position: relative;
  z-index: 12;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
}

.views {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  padding: 5px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.view::-webkit-scrollbar { display: none; }
.view-inner { min-height: 100%; display: flex; flex-direction: column; }

/* ============ Bottom navigation ============ */

.bottom-nav {
  flex: 0 0 auto;
  position: relative;
  z-index: 22;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  padding: 8px 18px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--nav-bg);
  border-radius: 27px 27px 0 0;
  box-shadow: var(--nav-shadow);
}
.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -.1px;
  cursor: pointer;
  padding: 2px 0 3px;
  transition: color .2s ease;
  overflow: visible;
}
.nav-icon-wrap {
  width: 48px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  transition: background-color .22s ease, transform .2s var(--ease-spring);
}
.nav-item svg { width: 23px; height: 23px; fill: currentColor; }
.nav-item.is-active { color: var(--brand); }
.nav-item.is-active .nav-icon-wrap { background: var(--brand-soft); }
.nav-item:focus-visible { outline: none; }
.nav-item:focus-visible .nav-icon-wrap { outline: 2px solid var(--brand); outline-offset: 2px; }
.nav-scan:focus-visible .nav-fab { box-shadow: 0 10px 24px rgba(242, 107, 10, .4), 0 0 0 3px var(--bg), 0 0 0 5px var(--brand); }
.nav-item:active .nav-icon-wrap { transform: scale(.9); }
.nav-label { line-height: 1.2; white-space: nowrap; }

.nav-scan { gap: 0; }
.nav-fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ff8d24 0%, #f26800 68%);
  box-shadow:
    0 9px 20px rgba(242, 107, 10, .32),
    inset 0 1px 0 rgba(255, 255, 255, .34);
  transition: transform .22s var(--ease-spring), box-shadow .22s ease;
}
.nav-fab svg {
  width: 29px;
  height: 29px;
  fill: #fff;
  filter: drop-shadow(0 1px 1px rgba(166, 66, 0, .22));
}
.nav-fab .logo-shield { color: #fff; }
.nav-scan .nav-label { margin-top: 5px; }
.nav-scan.is-active .nav-fab {
  box-shadow:
    0 10px 24px rgba(242, 107, 10, .4),
    0 0 0 4px var(--brand-halo),
    inset 0 1px 0 rgba(255, 255, 255, .34);
}
.nav-scan:active .nav-fab { transform: scale(.92); }

/* ============ Typography helpers / buttons ============ */

.primary-btn {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 0 22px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff8a1f, #ef6400 78%);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .1px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(242, 107, 10, .3);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.primary-btn:hover { filter: brightness(1.035); }
.primary-btn:active { transform: scale(.982); box-shadow: 0 6px 16px rgba(242, 107, 10, .24); }

.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0);
  background: currentColor;
  opacity: .16;
  animation: ripple .6s ease-out forwards;
}

.safe-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.1;
}
.safe-chip svg { width: 14px; height: 14px; }

/* ============ Shared stat cards ============ */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 97px;
  padding: 11px 6px 10px;
  border-radius: 17px;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .2s ease, background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.stat-card:active { transform: scale(.965); }
.stat-card.is-active { box-shadow: 0 0 0 2px currentColor inset; }
.stat-icon { display: grid; place-items: center; width: 24px; height: 24px; }
.stat-icon svg { width: 24px; height: 24px; }
.stat-number { font-size: 24px; line-height: 1; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; line-height: 1.1; font-weight: 500; }

.stat-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
}
.stat-danger .stat-number,
.stat-danger .stat-label { color: var(--danger); }
.stat-suspicious {
  color: var(--warn);
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
}
.stat-suspicious .stat-number,
.stat-suspicious .stat-label { color: var(--warn); }
.stat-safe {
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid var(--green-border);
}
.stat-safe .stat-number,
.stat-safe .stat-label { color: var(--green); }

/* ============ Scan screen ============ */

.scan-inner { padding-top: 7px; }

.analysis-block {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 5px 0 21px;
}
.analysis-block::before {
  content: '';
  position: absolute;
  width: 82%;
  aspect-ratio: 1;
  top: 5%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gauge-glow), transparent 66%);
  filter: blur(22px);
  pointer-events: none;
}
.analysis-ring {
  position: relative;
  z-index: 1;
  width: min(68vw, 278px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 18px 34px var(--green-glow));
}
.analysis-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--gauge-outer);
  opacity: .85;
}
.gauge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.gauge-track {
  fill: none;
  stroke: var(--gauge-track);
  stroke-width: 8;
}
.gauge-progress {
  fill: none;
  stroke: url(#gaugeGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.45s cubic-bezier(.2, .85, .25, 1);
}
.analysis-core {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, var(--gauge-fill-1), var(--gauge-fill-2) 74%);
  box-shadow:
    inset 0 0 0 1px var(--gauge-inner-border),
    inset 0 -24px 44px rgba(0, 60, 25, .055);
}
.analysis-shield {
  width: 52px;
  height: 52px;
  display: grid;
  margin-bottom: 7px;
  filter: drop-shadow(0 4px 8px rgba(174, 72, 0, .18));
}
.analysis-label {
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: -.25px;
  color: var(--gauge-label);
}
.analysis-value {
  font-size: clamp(48px, 14.2vw, 58px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -2.2px;
  color: var(--gauge-number);
  font-variant-numeric: tabular-nums;
}

.status-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--card-shadow);
}
.status-head { display: flex; align-items: center; gap: 14px; }
.status-icon {
  flex: 0 0 auto;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
}
.status-icon svg { width: 27px; height: 27px; fill: currentColor; }
.status-copy h2 {
  margin: 0;
  font-size: 18.5px;
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.35px;
}
.clear-state {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  color: var(--green);
  font-size: 14.5px;
  line-height: 1.2;
  font-weight: 500;
}
.clear-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.score-block { margin-top: 16px; }
.score-eyebrow { display: block; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.score-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 1px;
  line-height: 1.1;
  margin-top: 1px;
  color: var(--green);
}
.score-number { font-size: 34px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.score-percent { font-size: 26px; font-weight: 700; margin-right: 8px; }
.score-safe { font-size: 26px; font-weight: 700; letter-spacing: -.4px; }
.monitored-count { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.status-card .stat-row { margin-top: 16px; }

/* ============ Apps screen ============ */

.apps-inner { padding-top: 11px; }
.apps-stats { margin-bottom: 16px; }
.apps-stats .stat-card { min-height: 88px; border-radius: 17px; }
.apps-stats .stat-icon, .apps-stats .stat-icon svg { width: 21px; height: 21px; }
.apps-stats .stat-number { font-size: 22px; }
.apps-stats .stat-label { font-size: 12.5px; }

.search-wrap { margin-bottom: 16px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 53px;
  padding: 0 15px 0 17px;
  border: 1px solid var(--search-border);
  border-radius: 999px;
  background: var(--surface-2);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.search-field:focus-within {
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(242, 107, 10, .1);
}
.search-icon { flex: 0 0 auto; width: 22px; height: 22px; color: var(--muted); }
#appSearch {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  color: var(--text);
}
#appSearch::placeholder { color: var(--muted); opacity: 1; }
#appSearch::-webkit-search-cancel-button { display: none; }
.search-clear {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.search-clear:hover { background: var(--brand-soft); color: var(--brand); }
.search-clear svg { width: 17px; height: 17px; }

.apps-list { display: flex; flex-direction: column; gap: 10px; }
.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 67px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 5px 16px rgba(84, 53, 21, .025);
  animation: rowIn .38s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 18ms);
}
.app-icon {
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--c1, #f97316), var(--c2, #dc4c00));
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 3px 9px rgba(35, 20, 5, .13);
}
.app-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-name { font-size: 15.5px; font-weight: 600; line-height: 1.2; letter-spacing: -.15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-meta { font-size: 12.5px; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty-state {
  flex: 1;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 18px 70px;
  animation: fadeIn .35s ease both;
}
.empty-art {
  width: 104px;
  height: 104px;
  color: var(--empty-art);
  opacity: .8;
  margin-bottom: 22px;
}
.empty-art svg { width: 100%; height: 100%; }
.empty-state h2 { margin: 0; font-size: 23px; font-weight: 700; color: var(--muted); letter-spacing: -.4px; }
.empty-state p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.35; color: var(--muted); }

/* ============ Memory screen ============ */

.memory-inner { padding-top: 11px; }
.memory-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 26px;
  box-shadow: var(--card-shadow);
}
.memory-hero::before {
  content: '';
  position: absolute;
  top: -115px;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 107, 10, .14), transparent 68%);
  pointer-events: none;
}
.memory-art {
  position: relative;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.memory-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px dashed rgba(242, 107, 10, .33);
  animation: slowSpin 18s linear infinite;
}
.memory-file { width: 55px; height: 55px; }
.memory-file svg { width: 100%; height: 100%; }
.memory-title { margin: 15px 0 0; font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -.5px; }
.memory-subtitle { margin: 6px 0 0; max-width: 290px; font-size: 14.5px; line-height: 1.35; color: var(--muted); }
.memory-success {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid var(--green-border);
  border-radius: 14px;
  background: var(--green-soft);
  text-align: left;
}
.memory-success.flash { animation: successFlash .7s var(--ease-out); }
.memory-success-icon { flex: 0 0 auto; width: 26px; height: 26px; color: var(--green); }
.memory-success-icon svg { width: 100%; height: 100%; }
.memory-success div { display: flex; flex-direction: column; gap: 2px; }
.memory-success strong { font-size: 13px; line-height: 1.2; font-weight: 600; color: var(--green); }
.memory-success span { font-size: 11.5px; line-height: 1.2; color: var(--muted); }
.memory-btn { min-height: 50px; margin-top: 16px; font-size: 16px; border-radius: 15px; }
.memory-btn svg { width: 20px; height: 20px; }

.recent-section { margin-top: 19px; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 9px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.2px;
}
.last-check { font-size: 11.5px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.location-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}
.location-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
}
.location-row:last-child { border-bottom: 0; }
.location-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}
.location-icon svg { width: 22px; height: 22px; }
.location-icon.folder { background: var(--brand-soft); color: var(--brand); }
.location-icon.telegram { background: rgba(41, 161, 216, .12); color: #29a1d8; }
.location-icon.whatsapp { background: rgba(37, 211, 102, .12); color: #1fba5b; }
.location-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.location-copy strong { font-size: 14.5px; line-height: 1.2; font-weight: 600; }
.location-copy span { font-size: 11.5px; line-height: 1.2; color: var(--muted); }

/* ============ Onboarding ============ */

.onboarding {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f7f7f8;
  background: #0b0c0e;
  transition: opacity .38s ease, transform .38s var(--ease-out);
}
.onboarding.is-leaving { opacity: 0; transform: scale(1.015); pointer-events: none; }
.onboarding-aura {
  position: absolute;
  top: -24%;
  left: 50%;
  width: 150%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 107, 10, .23), rgba(242, 107, 10, .055) 42%, transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}
.onboarding-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  scrollbar-width: none;
  padding: max(40px, calc(env(safe-area-inset-top, 0px) + 34px)) 24px 22px;
}
.onboarding-content::-webkit-scrollbar { display: none; }
.onboarding-mark {
  flex: 0 0 auto;
  width: 116px;
  height: 116px;
  margin-top: 2vh;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 45% 30%, #3b2415, #17120e 73%);
  border: 1px solid rgba(255, 154, 68, .16);
  box-shadow: 0 0 54px rgba(242, 107, 10, .17), inset 0 1px 0 rgba(255, 255, 255, .05);
  animation: markIn .65s var(--ease-out) both;
}
.onboarding-mark .logo-shield { width: 58px; height: 58px; }
.onboarding-title {
  margin: 29px 0 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -1.1px;
  text-align: center;
  animation: fadeUp .55s .06s var(--ease-out) both;
}
.onboarding-subtitle {
  margin: 9px 0 0;
  color: #9ba1ad;
  font-size: 16.5px;
  line-height: 1.35;
  text-align: center;
  animation: fadeUp .55s .1s var(--ease-out) both;
}
.lang-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 42px;
  animation: fadeUp .55s .14s var(--ease-out) both;
}
.lang-card {
  position: relative;
  width: 100%;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 15px;
  border-radius: 18px;
  border: 1.5px solid #2a2b30;
  background: #15161a;
  color: #f7f7f8;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .22s ease, background-color .22s ease, transform .18s ease;
}
.lang-card:active { transform: scale(.987); }
.lang-card[aria-checked='true'] {
  border-color: #f97316;
  background: rgba(249, 115, 22, .075);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, .14);
}
.lang-flag { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 9px rgba(0, 0, 0, .32); }
.lang-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lang-native { font-size: 19px; line-height: 1.2; font-weight: 600; letter-spacing: -.25px; }
.lang-label { font-size: 14px; line-height: 1.2; color: #9ba1ad; }
.lang-check {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f97316;
  color: #fff;
  opacity: 0;
  transform: scale(.55);
  transition: opacity .22s ease, transform .3s var(--ease-spring);
}
.lang-check svg { width: 19px; height: 19px; }
.lang-card[aria-checked='true'] .lang-check { opacity: 1; transform: scale(1); }
.onboarding-footer {
  flex: 0 0 auto;
  padding: 18px 24px calc(26px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, #0b0c0e 52%, rgba(11, 12, 14, 0));
  position: relative;
  z-index: 2;
}
.onboarding-footer .primary-btn { animation: fadeUp .55s .19s var(--ease-out) both; }

/* ============ Settings overlay ============ */

.overlay-page {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(100% 34% at 50% -10%, var(--ambient), transparent 65%),
    var(--bg);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .4s cubic-bezier(.3, .76, .27, 1), visibility 0s linear .4s;
  box-shadow: -18px 0 40px rgba(0, 0, 0, .15);
}
.overlay-page.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform .4s cubic-bezier(.3, .76, .27, 1), visibility 0s linear 0s;
}
.page-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 67px;
  padding: calc(env(safe-area-inset-top, 0px) + 9px) 20px 9px 13px;
}
.overlay-page:focus,
.sheet:focus { outline: none; }
.page-topbar h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.85px;
}
.back-btn { margin-right: 0; color: var(--text); }
html[data-theme='dark'] .back-btn { color: var(--text); }
.overlay-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 2px 20px calc(26px + env(safe-area-inset-bottom, 0px));
}
.overlay-scroll::-webkit-scrollbar { display: none; }

.settings-section {
  padding: 9px 0 7px;
  border-bottom: 1px solid var(--divider);
  animation: fadeUp .42s var(--ease-out) both;
}
.settings-section:nth-child(2) { animation-delay: .04s; }
.settings-section:nth-child(3) { animation-delay: .08s; }
.settings-section:nth-child(4) { animation-delay: .12s; }
.settings-section:last-of-type { border-bottom: 0; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 4px;
  color: var(--brand);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.section-title svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }
.setting-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-family: inherit;
  overflow: hidden;
}
button.setting-row { cursor: pointer; }
.setting-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--icon-tile);
  color: var(--brand);
}
.setting-icon svg { width: 24px; height: 24px; fill: currentColor; }
.setting-icon svg.stroke-icon { fill: none; }
.setting-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setting-copy strong { font-size: 17px; line-height: 1.25; font-weight: 600; letter-spacing: -.2px; }
.setting-copy > span { font-size: 14px; line-height: 1.3; color: var(--muted); }
.setting-sub { max-width: 280px; }
.chevron { flex: 0 0 auto; width: 21px; height: 21px; color: #8a94a7; }
html[data-theme='dark'] .chevron { color: #727a89; }

.toggle {
  flex: 0 0 auto;
  position: relative;
  width: 54px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: #d6d8de;
  cursor: pointer;
  transition: background-color .24s ease, box-shadow .24s ease;
  overflow: hidden;
}
html[data-theme='dark'] .toggle { background: #383b42; }
.toggle[aria-checked='true'] { background: linear-gradient(120deg, #ff8a1f, #f06400); box-shadow: 0 3px 9px rgba(242, 107, 10, .22); }
html[data-theme='dark'] .toggle[aria-checked='true'] { background: linear-gradient(120deg, #ff8a1f, #f06400); }
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  transition: transform .26s var(--ease-spring);
}
.toggle[aria-checked='true'] .toggle-knob { transform: translateX(22px); }
.setting-lang-value { display: inline-flex; align-items: center; gap: 7px; }
.setting-lang-value img { width: 19px; height: 19px; border-radius: 50%; display: block; }

.settings-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 42px 10px 22px;
}
.footer-mark {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.footer-mark svg { width: 34px; height: 34px; fill: currentColor; }
.footer-wordmark {
  display: flex;
  gap: 2px;
  margin-top: 13px;
  font-size: 19.5px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.55px;
}
.footer-wordmark span:first-child { color: var(--text); }
.footer-wordmark span:last-child { color: var(--brand); }
.settings-footer p { margin: 7px 0 0; color: var(--muted); font-size: 13.5px; }

/* ============ Language overlay ============ */

.language-page { z-index: 46; }
.language-page-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 8px 24px 20px;
}
.language-page-body::-webkit-scrollbar { display: none; }
.language-page .onboarding-mark {
  margin-top: 16px;
  width: 104px;
  height: 104px;
  background: var(--brand-soft);
  border-color: var(--brand-soft-border);
  box-shadow: none;
  animation: none;
}
.language-page .onboarding-mark .logo-shield { width: 52px; height: 52px; }
.language-heading {
  margin: 24px 0 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.9px;
  text-align: center;
}
.language-subheading {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.35;
  text-align: center;
}
.language-page .lang-list { margin-top: 32px; animation: none; }
.language-page .lang-card {
  border-color: var(--card-border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(76, 48, 17, .025);
}
.language-page .lang-card[aria-checked='true'] {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: none;
}
.language-page .lang-label { color: var(--muted); }
.language-page .lang-check { background: var(--brand); }
.language-footer {
  flex: 0 0 auto;
  padding: 14px 24px calc(26px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 55%, transparent);
}

/* ============ Theme sheet ============ */

.sheet-layer {
  position: absolute;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  pointer-events: none;
}
.sheet-layer.is-open { visibility: visible; pointer-events: auto; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: var(--sheet-backdrop);
  opacity: 0;
  transition: opacity .3s ease;
  cursor: default;
}
.sheet-layer.is-open .sheet-backdrop { opacity: 1; }
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 20px calc(23px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .22);
  transform: translateY(104%);
  transition: transform .38s cubic-bezier(.32, .76, .28, 1);
}
.sheet-layer.is-open .sheet { transform: translateY(0); }
.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 3px;
  background: var(--muted);
  opacity: .28;
}
.sheet h2 { margin: 0 0 15px; font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -.5px; }
.theme-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
  overflow: hidden;
}
.theme-option + .theme-option { margin-top: 5px; }
.theme-option.is-selected { background: var(--brand-soft); border-color: var(--brand-soft-border); color: var(--brand); }
.theme-icon {
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted-strong);
}
.theme-icon svg { width: 23px; height: 23px; fill: currentColor; }
.theme-option.is-selected .theme-icon { background: var(--brand); color: #fff; }
.theme-check {
  flex: 0 0 auto;
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  display: grid;
  place-items: center;
  color: transparent;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.theme-option.is-selected .theme-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.theme-check svg { width: 15px; height: 15px; }

/* ============ Scan overlay ============ */

.scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.scan-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease, visibility 0s linear 0s;
}
.scan-aura {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 37%, rgba(242, 107, 10, .13), transparent 38%),
    radial-gradient(circle at 50% 42%, var(--green-glow), transparent 52%);
  opacity: 0;
  transition: opacity .4s ease;
}
.scan-overlay.is-open .scan-aura { opacity: 1; }
.scan-stage {
  position: relative;
  width: 100%;
  max-width: 410px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(12px) scale(.985);
  opacity: 0;
  transition: transform .45s var(--ease-out), opacity .35s ease;
}
.scan-overlay.is-open .scan-stage { transform: none; opacity: 1; }
.scan-emblem {
  position: relative;
  width: 188px;
  height: 188px;
  display: grid;
  place-items: center;
  margin-bottom: 36px;
}
.scan-orbit {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: opacity .35s ease;
}
.orbit-one {
  inset: 0;
  border-top-color: rgba(242, 107, 10, .78);
  border-right-color: rgba(242, 107, 10, .18);
  animation: spin 2.1s linear infinite;
}
.orbit-two {
  inset: 18px;
  border-bottom-color: rgba(34, 197, 94, .55);
  border-left-color: rgba(34, 197, 94, .1);
  animation: spin 3s linear infinite reverse;
}
.scan-emblem-core {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 50px rgba(30, 22, 12, .14), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: background-color .35s ease, border-color .35s ease, transform .5s var(--ease-spring);
}
html[data-theme='dark'] .scan-emblem-core { box-shadow: 0 18px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05); }
.scan-emblem-core .logo-shield { width: 60px; height: 60px; transition: opacity .3s ease, transform .3s ease; }
.scan-check {
  position: absolute;
  width: 74px;
  height: 74px;
  color: var(--green);
  opacity: 0;
  transform: scale(.55);
  transition: opacity .35s ease, transform .55s var(--ease-spring);
}
.scan-title { margin: 0; font-size: 27px; line-height: 1.2; font-weight: 700; letter-spacing: -.65px; }
.scan-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
.scan-progress {
  width: min(76%, 260px);
  height: 5px;
  margin-top: 26px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.scan-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff9b3d, #f26600);
  transition: width .12s linear, background-color .3s ease;
}
.scan-steps {
  width: 100%;
  margin-top: 27px;
  padding: 5px 16px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 19px;
  box-shadow: var(--card-shadow);
  transition: opacity .35s ease, transform .35s ease;
}
.scan-step {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--divider);
  transition: color .25s ease, opacity .25s ease;
  opacity: .55;
  text-align: left;
}
.scan-step:last-child { border-bottom: 0; }
.scan-step.is-active { opacity: 1; color: var(--text); }
.scan-step.is-done { opacity: 1; color: var(--text); }
.scan-step-label { flex: 1; }
.scan-step-status {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.7px solid var(--divider);
  display: grid;
  place-items: center;
  color: transparent;
}
.scan-step.is-active .scan-step-status {
  border-color: rgba(242, 107, 10, .2);
  border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
.scan-step.is-done .scan-step-status {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  animation: none;
}
.scan-step-status svg { width: 11px; height: 11px; opacity: 0; }
.scan-step.is-done .scan-step-status svg { opacity: 1; }

.scan-overlay[data-state='done'] .orbit-one,
.scan-overlay[data-state='done'] .orbit-two { opacity: 0; animation-play-state: paused; }
.scan-overlay[data-state='done'] .scan-emblem-core {
  background: var(--green-soft);
  border-color: var(--green-border);
  transform: scale(1.04);
}
.scan-overlay[data-state='done'] .scan-emblem-core .logo-shield { opacity: 0; transform: scale(.6); }
.scan-overlay[data-state='done'] .scan-check { opacity: 1; transform: scale(1); }
.scan-overlay[data-state='done'] .scan-progress span { background: linear-gradient(90deg, #48d97c, #18b354); }
.scan-overlay[data-state='done'] .scan-title { color: var(--green); }
.scan-overlay[data-state='done'] .scan-steps { opacity: 0; transform: translateY(8px); pointer-events: none; }
.scan-overlay[data-state='done'] .scan-subtitle { color: var(--muted-strong); }

/* ============ Toast ============ */

.toast {
  position: absolute;
  z-index: 80;
  left: 20px;
  right: 20px;
  bottom: calc(103px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  background: var(--toast-bg);
  border: 1px solid var(--toast-border);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(20, 50, 30, .13);
  color: var(--toast-text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.985);
  transition: opacity .3s ease, transform .35s var(--ease-out), visibility 0s linear .35s;
}
.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .3s ease, transform .35s var(--ease-out), visibility 0s linear 0s;
}
.toast-icon { flex: 0 0 auto; width: 25px; height: 25px; color: var(--green); }
.toast-icon svg { width: 100%; height: 100%; }

/* ============ Animations ============ */

@keyframes appIn {
  from { opacity: 0; transform: translateY(9px) scale(.994); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: none; }
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes markIn {
  from { opacity: 0; transform: scale(.82) translateY(9px); }
  to { opacity: 1; transform: none; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes slowSpin {
  to { transform: rotate(360deg); }
}
@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}
@keyframes successFlash {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .32); }
  100% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
}
@keyframes viewInRight {
  from { opacity: 0; transform: translateX(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes viewInLeft {
  from { opacity: 0; transform: translateX(-26px); }
  to { opacity: 1; transform: none; }
}
@keyframes viewOutRight {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateX(-18px); }
}
@keyframes viewOutLeft {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateX(18px); }
}
.view.anim-in-right { animation: viewInRight .34s var(--ease-out) both; }
.view.anim-in-left { animation: viewInLeft .34s var(--ease-out) both; }
.view.anim-out-right { animation: viewOutRight .18s ease both; pointer-events: none; }
.view.anim-out-left { animation: viewOutLeft .18s ease both; pointer-events: none; }

/* ============ Responsive / density ============ */

@media (max-height: 790px) {
  .analysis-ring { width: min(58vw, 238px); }
  .analysis-block { padding: 0 0 16px; }
  .analysis-core { inset: 13px; }
  .analysis-shield { width: 45px; height: 45px; margin-bottom: 5px; }
  .analysis-label { font-size: 16.5px; }
  .analysis-value { font-size: 47px; }
  .status-card { padding: 16px; border-radius: 22px; }
  .status-icon { width: 50px; height: 50px; }
  .status-copy h2 { font-size: 17.5px; }
  .score-block { margin-top: 13px; }
  .status-card .stat-row { margin-top: 13px; }
  .stat-card { min-height: 89px; }
  .stat-number { font-size: 22px; }
  .onboarding-content { padding-top: max(28px, calc(env(safe-area-inset-top, 0px) + 22px)); }
  .onboarding-mark { width: 100px; height: 100px; margin-top: 0; }
  .onboarding-mark .logo-shield { width: 50px; height: 50px; }
  .onboarding-title { margin-top: 24px; font-size: 31px; }
  .lang-list { margin-top: 30px; gap: 12px; }
  .lang-card { min-height: 72px; padding: 11px 14px; }
  .lang-flag { width: 48px; height: 48px; }
  .onboarding-footer { padding-top: 12px; }
}

@media (max-height: 700px) {
  .analysis-ring { width: min(52vw, 210px); }
  .analysis-shield { width: 38px; height: 38px; }
  .analysis-label { font-size: 15px; }
  .analysis-value { font-size: 40px; }
  .status-head { gap: 12px; }
  .status-icon { width: 46px; height: 46px; }
  .status-icon svg { width: 24px; height: 24px; }
  .status-copy h2 { font-size: 16.5px; }
  .stat-card { min-height: 82px; }
  .score-number { font-size: 31px; }
  .score-safe, .score-percent { font-size: 24px; }
  .onboarding-mark { width: 88px; height: 88px; }
  .onboarding-title { font-size: 28px; }
  .onboarding-subtitle { font-size: 15px; }
  .lang-list { margin-top: 24px; }
}

@media (max-width: 370px) {
  .wordmark { font-size: 27px; }
  .topbar { padding-left: 17px; padding-right: 17px; }
  .view { padding-left: 17px; padding-right: 17px; }
  .stat-number { font-size: 22px; }
  .stat-label { font-size: 11.5px; }
  .status-copy h2 { font-size: 17px; }
  .analysis-label { font-size: 17px; }
  .analysis-value { font-size: 48px; }
  .app-name { font-size: 14.5px; }
  .safe-chip { padding-right: 6px; }
  .onboarding-title { font-size: 30px; }
  .lang-native { font-size: 18px; }
  .nav-label { font-size: 11.5px; }
  .settings-section .setting-copy strong { font-size: 16px; }
  .setting-copy > span { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .memory-ring { animation: none; }
}

.theme-fade,
.theme-fade .main-app,
.theme-fade .bottom-nav,
.theme-fade .status-card,
.theme-fade .stat-card,
.theme-fade .app-row,
.theme-fade .location-list,
.theme-fade .settings-section,
.theme-fade .sheet,
.theme-fade .toggle,
.theme-fade .search-field {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
