:root {
  color-scheme: dark;
  --bg: #08111d;
  --bg-2: #0f2030;
  --glass: rgba(185, 214, 255, 0.14);
  --glass-strong: rgba(217, 235, 255, 0.2);
  --glass-bright: rgba(255, 255, 255, 0.28);
  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  --card-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.11));
  --border: rgba(255, 255, 255, 0.18);
  --border-strong: rgba(255, 255, 255, 0.3);
  --input-bg: rgba(6, 15, 28, 0.42);
  --modal-bg: linear-gradient(180deg, rgba(15, 26, 40, 0.88), rgba(11, 21, 33, 0.8));
  --ring-inner: rgba(8, 17, 29, 0.8);
  --header-bg: linear-gradient(180deg, rgba(14, 24, 36, 0.76), rgba(14, 24, 36, 0.18));
  --nav-bg: rgba(10, 18, 28, 0.58);
  --ring-track: rgba(255, 255, 255, 0.14);
  --ring-progress: #8fe7ff;
  --text: #f7fbff;
  --muted: rgba(241, 247, 255, 0.72);
  --muted-2: rgba(241, 247, 255, 0.48);
  --cyan: #88e8ff;
  --green: #7ff3b4;
  --red: #ff8fa1;
  --yellow: #ffd978;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.18);
  font-family: "SF Pro Display", "SF Pro Text", "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

body.light {
  color-scheme: light;
  --bg: #edf5ff;
  --bg-2: #d8ebff;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --glass-bright: rgba(255, 255, 255, 0.86);
  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.52));
  --card-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.66));
  --border: rgba(72, 103, 133, 0.16);
  --border-strong: rgba(255, 255, 255, 0.95);
  --input-bg: rgba(255, 255, 255, 0.62);
  --modal-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(241, 248, 255, 0.74));
  --ring-inner: rgba(244, 249, 255, 0.88);
  --header-bg: linear-gradient(180deg, rgba(245, 250, 255, 0.74), rgba(245, 250, 255, 0.2));
  --nav-bg: rgba(247, 251, 255, 0.62);
  --ring-track: rgba(22, 54, 82, 0.14);
  --ring-progress: #41bfff;
  --text: #13263a;
  --muted: rgba(19, 38, 58, 0.68);
  --muted-2: rgba(19, 38, 58, 0.44);
  --cyan: #22b7f0;
  --green: #33cf8b;
  --shadow: 0 26px 60px rgba(56, 92, 125, 0.18);
  --shadow-soft: 0 12px 28px rgba(89, 130, 170, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(18px);
}

body::before {
  top: -80px;
  left: -50px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(131, 233, 255, 0.28), rgba(131, 233, 255, 0.02) 68%);
}

body::after {
  right: -120px;
  bottom: 140px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(131, 255, 199, 0.2), rgba(131, 255, 199, 0.02) 65%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100svh;
  position: relative;
  background:
    radial-gradient(circle at 18% 16%, rgba(119, 216, 255, 0.18), transparent 0 30%),
    radial-gradient(circle at 82% 8%, rgba(112, 255, 195, 0.16), transparent 0 26%),
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.18), transparent 0 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 22%),
    var(--bg);
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 100vw);
  pointer-events: none;
  z-index: 0;
}

.app-shell::before {
  top: 0;
  height: 320px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 72%);
}

.app-shell::after {
  bottom: 0;
  height: 220px;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.06), transparent 76%);
}

.screen {
  width: min(100%, 980px);
  min-height: 100svh;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom));
}

.auth-screen {
  display: grid;
  align-content: center;
  gap: 18px;
  max-width: 480px;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
}

.hero {
  text-align: center;
  padding: 10px 8px 2px;
}

.hero-logo {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  margin: 0 auto 14px;
  border: 1px solid var(--border-strong);
  border-radius: 32px;
  background: var(--card-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -12px 30px rgba(255, 255, 255, 0.06),
    var(--shadow);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  position: relative;
  overflow: hidden;
}

.hero-logo::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 40%, rgba(255, 255, 255, 0.03));
  pointer-events: none;
  box-shadow: var(--shadow);
}

.logo-img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.hero h1,
.view-title {
  margin: 0;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 760;
}

.hero h2 {
  margin: 10px 0 0;
  font-size: 17px;
}

.hero p,
.muted {
  color: var(--muted);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.language-btn,
.icon-btn,
.pill-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  min-height: 38px;
  padding: 8px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -8px 18px rgba(0, 0, 0, 0.08),
    var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 46px;
  padding: 0;
  border-radius: 50%;
}

.card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -18px 36px rgba(255, 255, 255, 0.03),
    var(--shadow);
  backdrop-filter: blur(30px) saturate(165%);
  -webkit-backdrop-filter: blur(30px) saturate(165%);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 28%, transparent 52%);
  pointer-events: none;
}

.auth-card {
  padding: 24px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.segmented button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 10px;
  color: var(--muted);
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.segmented button.active {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px rgba(0, 0, 0, 0.1);
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.location-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(136, 232, 255, 0.16), rgba(127, 243, 180, 0.1)),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--input-bg);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.textarea {
  min-height: 108px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(39, 215, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(39, 215, 255, 0.14);
}

.primary-btn,
.secondary-btn,
.danger-btn {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -10px 20px rgba(0, 0, 0, 0.06),
    var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, rgba(83, 178, 255, 0.82), rgba(82, 214, 170, 0.82));
  color: white;
}

.secondary-btn {
  border: 1px solid var(--border);
  background: var(--card);
}

.danger-btn {
  border: 1px solid rgba(255, 143, 161, 0.38);
  background: linear-gradient(135deg, rgba(255, 143, 161, 0.22), rgba(255, 143, 161, 0.12));
  color: #ffe6eb;
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled {
  opacity: 0.55;
}

.error {
  margin-top: 12px;
  border: 1px solid rgba(255, 100, 115, 0.28);
  border-radius: 8px;
  background: rgba(255, 100, 115, 0.12);
  color: #ffd7dc;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.app-header {
  position: sticky;
  top: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  padding: max(12px, env(safe-area-inset-top)) 14px 14px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--header-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    var(--shadow-soft);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-weight: 820;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand .logo-img {
  width: 36px;
  height: 36px;
}

.header-spacer {
  flex: 1;
}

.view {
  display: grid;
  gap: 16px;
}

.progress-card,
.stats-grid,
.album-list,
.posts-list,
.matches-list,
.settings-list {
  display: grid;
  gap: 12px;
}

.map-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.map-surface {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 20% 18%, rgba(136, 232, 255, 0.2), transparent 0 24%),
    radial-gradient(circle at 84% 20%, rgba(127, 243, 180, 0.18), transparent 0 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(8, 17, 29, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.map-glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 44%),
    radial-gradient(circle at 50% 60%, rgba(136, 232, 255, 0.08), transparent 42%);
  filter: blur(12px);
}

.home-map {
  position: relative;
  z-index: 1;
  height: 320px;
  width: 100%;
  border-radius: 24px;
  background: #dbe7f2;
}

.home-map .leaflet-container,
.home-map.leaflet-container {
  height: 100%;
  width: 100%;
  border-radius: 24px;
  background: #dbe7f2;
}

.home-map .leaflet-pane,
.home-map .leaflet-control,
.home-map .leaflet-tile,
.home-map .leaflet-marker-icon,
.home-map .leaflet-marker-shadow {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.home-map .leaflet-control-attribution {
  border-radius: 12px;
  background: rgba(8, 17, 29, 0.52);
  color: rgba(255, 255, 255, 0.72);
}

.home-map .leaflet-control-attribution a {
  color: inherit;
}

.leaflet-pin {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 18px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.leaflet-pin span {
  font-size: 11px;
  font-weight: 900;
  color: #fff;
}

.leaflet-pin-self {
  background: linear-gradient(180deg, rgba(83, 178, 255, 0.94), rgba(50, 134, 255, 0.88));
}

.leaflet-pin-match {
  background: linear-gradient(180deg, rgba(127, 243, 180, 0.92), rgba(46, 183, 142, 0.86));
}

.leaflet-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 3px;
  filter: brightness(0.96);
}

.home-map .leaflet-popup-content-wrapper,
.home-map .leaflet-popup-tip {
  background: rgba(11, 21, 33, 0.82);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.self {
  background: #52b2ff;
}

.legend-dot.match {
  background: #57dca1;
}


.match-card {
  gap: 12px;
}

.match-card.expanded {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 34px rgba(0, 0, 0, 0.18);
}

.match-detail {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.progress-card {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 22px;
}

.ring {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring-progress) var(--angle), var(--ring-track) 0);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 12px 28px rgba(0, 0, 0, 0.14);
}

.ring-inner {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--ring-inner);
  font-size: 28px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.metric-row {
  display: grid;
  gap: 5px;
}

.metric {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.metric strong {
  min-width: 36px;
  color: var(--text);
}

.section-title {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.h-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 142px;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.repeat-card,
.post-card,
.match-card,
.stat-card,
.settings-card {
  padding: 18px;
}

.repeat-card {
  min-height: 150px;
  scroll-snap-align: start;
}

.stat-card {
  min-height: 118px;
}

.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-value {
  margin: 8px 0 2px;
  font-size: 28px;
  font-weight: 900;
}

.stat-label,
.caption {
  color: var(--muted);
  font-size: 13px;
}

.album-section {
  overflow: hidden;
}

.album-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 14px;
  text-align: left;
  font-weight: 900;
}

.album-toggle .count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  padding: 0 12px 14px;
}

.sticker-chip {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 118px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  padding: 0;
}

.sticker-circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  font-size: 11px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.sticker-chip.owned .sticker-circle {
  border-color: rgba(39, 215, 255, 0.92);
  background: rgba(39, 215, 255, 0.22);
}

.sticker-chip.repeated .sticker-circle {
  border-color: rgba(40, 212, 138, 0.92);
  background: rgba(40, 212, 138, 0.24);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 20px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 900;
}

.sticker-circle .badge {
  position: absolute;
  top: -6px;
  right: -8px;
}

.sticker-label {
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.toolbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.toolbar button {
  white-space: nowrap;
}

.search-row {
  display: grid;
  gap: 10px;
}

.post-card,
.match-card,
.settings-card {
  display: grid;
  gap: 10px;
}

.card-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(136, 232, 255, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qr-box {
  display: grid;
  place-items: center;
  min-height: 246px;
  padding: 20px;
}

.qr-frame {
  display: grid;
  place-items: center;
  width: min(220px, 72vw);
  aspect-ratio: 1;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96));
  color: #071826;
  text-align: center;
  padding: 18px;
  font-weight: 900;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
}

.qr-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-frame svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-summary {
  display: grid;
  gap: 10px;
  width: min(100%, 340px);
  margin-top: 12px;
  text-align: center;
}

.qr-summary .two-col {
  width: 100%;
}

.qr-summary span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.qr-summary b {
  font-size: 22px;
}

.qr-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scanner {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #000;
  aspect-ratio: 3 / 4;
}

.scanner video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.payload-box {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(calc(100% - 16px), 960px);
  margin: 0 auto;
  padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--nav-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 36px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}

.bottom-nav button {
  display: grid;
  gap: 3px;
  justify-items: center;
  min-width: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav button.active {
  color: var(--cyan);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(136, 232, 255, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bottom-nav .nav-icon {
  font-size: 19px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  background: rgba(3, 9, 16, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.modal {
  width: min(100%, 560px);
  max-height: 88svh;
  margin: 0 auto;
  overflow: auto;
  border-radius: 32px 32px 0 0;
  border: 1px solid var(--border);
  background: var(--modal-bg);
  padding: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 32px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(34px) saturate(170%);
  -webkit-backdrop-filter: blur(34px) saturate(170%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.hidden {
  display: none !important;
}

button:hover,
.card:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(1px) scale(0.99);
}

@media (prefers-reduced-motion: no-preference) {
  .screen > * {
    animation: riseIn 420ms ease both;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .screen {
    padding-inline: 24px;
  }

  .auth-screen {
    max-width: 520px;
  }

  .view {
    grid-template-columns: minmax(0, 1fr);
  }

  .desktop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .modal {
    border-radius: 32px;
  }
}
