/* =========================================================================
   СВОБОДНО — design tokens
   Палитра:  --void #0B0B14 · --deep #15121F · --violet #A78BFA
             --cyan #67E8F9 · --hot #FF6EC7 (аномальный акцент) · --ink #F5F3FF
   Шрифты:   Space Grotesk (display) · Inter (текст) · JetBrains Mono (данные)
   Движение: пружинный bounce cubic-bezier(.34,1.56,.64,1)
   ========================================================================= */

:root {
--void: #1e1e1e;
    --deep: #15121f;
    --deep2: #1c1730;
    --violet: rgb(255 197 135);
    --violet-dim: #8b6fe0;
    --cyan: rgb(230, 119, 0);
    --hot: #ff6ec7;
  --ink: #f5f3ff;
  --ink-dim: rgba(245, 243, 255, 0.62);
  --ink-faint: rgba(245, 243, 255, 0.38);

  --glass-fill: rgba(255, 255, 255, 0.055);
  --glass-fill-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-strong: rgba(255, 255, 255, 0.24);

  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bounce-soft: cubic-bezier(0.22, 1.15, 0.4, 1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

/* [hidden] должен побеждать любые display:flex/grid у компонентов ниже —
   без этого правила все экраны/модалки показываются одновременно друг на друге */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  overscroll-behavior-y: none;
}

body {
  background: var(--void);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3 { font-family: 'Space Grotesk', 'Inter', sans-serif; margin: 0; letter-spacing: -0.01em; }

::selection { background: var(--violet); color: var(--void); }

button, input, select {
  font-family: inherit;
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------------------------------------------------------------
   liquid background: goo-blended drifting blobs (сигнатурный элемент)
   --------------------------------------------------------------------- */

.goo-defs { position: absolute; width: 0; height: 0; }

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  filter: url(#goo);
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  will-change: transform;
}

.blob.b1 {
  width: 46vmax; height: 46vmax;
  left: -14vmax; top: -10vmax;
  background: radial-gradient(circle at 35% 35%, var(--violet), transparent 70%);
  animation: drift1 26s var(--ease) infinite alternate;
}
.blob.b2 {
  width: 38vmax; height: 38vmax;
  right: -12vmax; top: 8vmax;
  background: radial-gradient(circle at 60% 40%, var(--cyan), transparent 70%);
  animation: drift2 32s var(--ease) infinite alternate;
}
.blob.b3 {
  width: 34vmax; height: 34vmax;
  left: 6vmax; bottom: -14vmax;
  background: radial-gradient(circle at 50% 50%, var(--hot), transparent 72%);
  opacity: 0.32;
  animation: drift3 22s var(--ease) infinite alternate;
}
.blob.b4 {
  width: 26vmax; height: 26vmax;
  right: 4vmax; bottom: -6vmax;
  background: radial-gradient(circle, var(--violet-dim), transparent 70%);
  opacity: 0.4;
  animation: drift4 19s var(--ease) infinite alternate;
}

@keyframes drift1 { to { transform: translate(8vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-10vmax, 6vmax) scale(0.9); } }
@keyframes drift3 { to { transform: translate(6vmax, -8vmax) scale(1.1); } }
@keyframes drift4 { to { transform: translate(-6vmax, -10vmax) scale(1.2); } }

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* ---------------------------------------------------------------------
   glass primitives
   --------------------------------------------------------------------- */

.glass-card {
  position: relative;
  z-index: 2;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 20px;
}

.btn-bouncy {
  transition: transform 0.32s var(--bounce), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-bouncy:active { transform: scale(0.92); }

/* ---------------------------------------------------------------------
   toasts
   --------------------------------------------------------------------- */

.toast-root {
  position: fixed;
  top: calc(var(--safe-top) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--glass-fill-strong);
  border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.5s var(--bounce);
}
.toast.error { border-color: rgba(255, 110, 199, 0.5); }
.toast.leaving { animation: toast-out 0.3s var(--ease) forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* =========================================================================
   AUTH VIEW
   ========================================================================= */

.view-auth {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px calc(24px + var(--safe-bottom));
}

.auth-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand { text-align: center; }

.brand-mark {
  font-size: 40px;
  margin-bottom: 6px;
  color: var(--violet);
  text-shadow: 0 0 30px rgba(167, 139, 250, 0.6);
}

/* аномалия: редкий хроматический глитч на логотипе */
.brand-glitch { position: relative; display: inline-block; }
.brand-glitch::before, .brand-glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  opacity: 0;
}
.brand-glitch::before { color: var(--hot); }
.brand-glitch::after { color: var(--cyan); }
.brand-glitch {
  animation: glitch-trigger 7s steps(1) infinite;
}
.brand-glitch::before { animation: glitch-shift-a 7s steps(1) infinite; }
.brand-glitch::after { animation: glitch-shift-b 7s steps(1) infinite; }

@keyframes glitch-trigger {
  0%, 96%, 100% { transform: translate(0, 0); }
  97% { transform: translate(-1px, 0.5px); }
  98% { transform: translate(1.5px, -0.5px); }
  99% { transform: translate(-0.5px, 0); }
}
@keyframes glitch-shift-a {
  0%, 96%, 100% { opacity: 0; transform: translate(0, 0); }
  97% { opacity: 0.7; transform: translate(2px, 0); }
  98% { opacity: 0; }
}
@keyframes glitch-shift-b {
  0%, 96%, 100% { opacity: 0; transform: translate(0, 0); }
  97.5% { opacity: 0.6; transform: translate(-2px, 0); }
  98.5% { opacity: 0; }
}

.brand-title {
  font-size: 30px;
  font-weight: 700;
}
.brand-sub {
  margin: 4px 0 0;
  color: var(--ink-dim);
  font-size: 14px;
}

.auth-card { padding: 22px; }

.segmented {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}
.seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink-dim);
  padding: 10px 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color 0.25s var(--ease);
}
.seg-btn.is-active { color: var(--void); }
.seg-thumb {
  position: absolute;
  top: 4px; left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  border-radius: 999px;
  transition: transform 0.42s var(--bounce);
  z-index: 1;
}
.segmented[data-active="register"] .seg-thumb { transform: translateX(100%); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-dim); }
.field input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--bounce);
}
.field input::placeholder { color: var(--ink-faint); }
.field input:focus {
  border-color: var(--violet);
  background: rgba(167, 139, 250, 0.08);
  transform: scale(1.01);
}

.btn {
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 18px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: var(--void);
  box-shadow: 0 8px 24px rgba(230, 119, 0, 0.35);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  color: var(--ink);
}
.btn-danger-ghost {
    background: rgb(255 110 110 / 8%);
    border: 1px solid rgb(255 110 110 / 35%);
    color: #ffb3b3;
    width: 100%;
    margin-top: 14px;
}
.btn-sm { padding: 10px 14px; font-size: 13px; white-space: nowrap; }

/* =========================================================================
   APP SHELL
   ========================================================================= */

.view-app {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(92px + var(--safe-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 16px) 20px 12px;
}
.topbar-user { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 42px; height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: var(--void);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(230, 119, 0, 0.4);
}
.avatar-lg { width: 68px; height: 68px; border-radius: 20px; font-size: 22px; margin: 0 auto 12px; }

.topbar-text { display: flex; flex-direction: column; line-height: 1.25; }
.hello { font-size: 12px; color: var(--ink-faint); }
.who { font-size: 15px; font-weight: 600; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
      border: none;
    background: none;
}

.screen {
    flex: 1;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: screen-in 0.42s var(--bounce-soft);
}
@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.screen-head h2 { font-size: 22px; }
.screen-head { display: flex; flex-direction: column; gap: 4px; }
.screen-head.with-back { flex-direction: row; align-items: center; gap: 12px; }
.screen-hint { margin: 0; font-size: 13px; color: var(--ink-dim); }

/* ---------------------------------------------------------------------
   calendar
   --------------------------------------------------------------------- */

.cal-card { padding: 18px; }

.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.cal-month {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 17px;
  text-transform: capitalize;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-dim);
  cursor: pointer;
  border: none;
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.28s var(--bounce), background 0.25s var(--ease), color 0.25s var(--ease);
}
.cal-day.is-empty { visibility: hidden; cursor: default; }
.cal-day:active { transform: scale(0.86); }
.cal-day.is-past { opacity: 0.32; cursor: default; }
.cal-day.is-today { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--cyan); }
.cal-day.is-free {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: var(--void);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(230, 119, 0, 0.4);
}
.cal-day.is-free.is-today { box-shadow: 0 6px 16px rgba(230, 119, 0, 0.4), inset 0 0 0 1.5px var(--void); }

.cal-legend { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--ink-faint); }
.legend-dot { width: 10px; height: 10px; border-radius: 4px; display: inline-block; margin-left: 6px; }
.legend-dot:first-child { margin-left: 0; }
.dot-free { background: linear-gradient(135deg, var(--violet), var(--cyan)); }
.dot-today { box-shadow: inset 0 0 0 1.5px var(--cyan); }

.quick-actions {
    margin-top: 14px;
}
.chip {
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  color: var(--ink-dim);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12.5px;
  cursor: pointer;
  float: right;
}

.stat-card { display: flex; justify-content: space-around; text-align: center; padding: 18px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; color: var(--cyan); }
.stat-label { font-size: 11px; color: var(--ink-faint); max-width: 110px; }

/* ---------------------------------------------------------------------
   groups
   --------------------------------------------------------------------- */

.group-list { display: flex; flex-direction: column; gap: 12px; }

.group-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.3s var(--bounce), background 0.25s var(--ease);
}
.group-item:active { transform: scale(0.97); }

.group-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, rgba(230, 119, 0, 0.4), rgb(230, 119, 0));
  flex-shrink: 0;
}
.group-info { flex: 1; min-width: 0; }
.group-name { font-weight: 600; font-size: 15px; }
.group-meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.group-arrow { color: var(--ink-faint); font-size: 20px; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-dim);
  font-size: 14px;
}
.empty-blob {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--violet), var(--hot) 120%);
  opacity: 0.5;
  filter: blur(2px);
  animation: pulse-blob 3s var(--ease) infinite;
}
@keyframes pulse-blob {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.12); opacity: 0.6; }
}

/* ---------------------------------------------------------------------
   group detail
   --------------------------------------------------------------------- */

.tabbar-inline {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.tab-inline {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink-dim);
  padding: 9px 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s var(--bounce), color 0.25s var(--ease);
}
.tab-inline.is-active {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: var(--void);
}

.gd-panel { display: flex; flex-direction: column; gap: 14px; }

.sort-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-dim); }
.mini-select {
  flex: 1;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-size: 13px;
  color: var(--ink);
}

.dates-list { display: flex; flex-direction: column; gap: 10px; }

.date-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: card-pop 0.4s var(--bounce-soft) backwards;
}
.date-card.is-full { border-color: rgba(103, 232, 249, 0.45); }

.date-card-top { display: flex; align-items: center; justify-content: space-between; }
.date-main { display: flex; flex-direction: column; }
.date-day { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 700; text-transform: capitalize; }
.date-rel { font-size: 12px; color: var(--ink-faint); }

.date-score {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
}
.date-score.full { background: linear-gradient(135deg, var(--violet), var(--cyan)); color: var(--void); }

.date-bar-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.date-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--violet), var(--cyan)); transition: width 0.6s var(--bounce-soft); }

.date-people { display: flex; flex-wrap: wrap; gap: 6px; }
.people-chip {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--ink-dim);
}
.people-chip.is-available { background: rgba(167, 139, 250, 0.22); color: var(--ink); }
.people-chip.is-missing { opacity: 0.5; text-decoration: line-through; }

@keyframes card-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.add-member-row { display: flex; gap: 10px; }
.add-member-row input {
  flex: 1;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
  font-size: 14px;
}
.add-member-row input:focus { border-color: var(--violet); }

.member-suggest { display: flex; flex-direction: column; gap: 6px; }
.suggest-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
}
.suggest-item:active { transform: scale(0.97); }

.member-list { display: flex; flex-direction: column; gap: 10px; }
.member-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
}
.member-item .avatar { width: 36px; height: 36px; font-size: 12px; border-radius: 11px; }
.member-info { flex: 1; }
.member-name { font-size: 14px; font-weight: 600; }
.member-owner-badge {
  font-size: 10px;
  color: var(--void);
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.member-remove {
  border: none;
  background: transparent;
  color: var(--ink-faint);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.member-remove:hover { color: var(--hot); }

/* ---------------------------------------------------------------------
   profile
   --------------------------------------------------------------------- */

.profile-card { text-align: center; }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-username { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.profile-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 4px;
  font-size: 14px;
  color: var(--ink-dim);
}
.profile-row b { color: var(--ink); font-family: 'JetBrains Mono', monospace; }
.app-version { text-align: center; font-size: 11px; color: var(--ink-faint); margin-top: auto; padding-top: 10px; }

/* ---------------------------------------------------------------------
   bottom tabbar
   --------------------------------------------------------------------- */

.tabbar {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(14px + var(--safe-bottom));
  display: flex;
  padding: 8px;
  z-index: 50;
  border-radius: 24px;
}

.tab-btn {
  flex: 1;
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0;
  font-size: 10.5px;
  cursor: pointer;
  transition: color 0.3s var(--ease), transform 0.3s var(--bounce);
}
.tab-btn.is-active { color: var(--void); }
.tab-btn:active { transform: scale(0.9); }
.tab-ico { font-size: 18px; }

.tab-thumb {
  position: absolute;
  top: 8px; bottom: 8px;
  left: 8px;
  width: calc(33.333% - 5.33px);
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  border-radius: 18px;
  z-index: 1;
  transition: transform 0.46s var(--bounce);
  box-shadow: 0 6px 18px rgba(230, 119, 0, 0.45);
}
.tabbar[data-active="groups"] .tab-thumb { transform: translateX(100%); }
.tabbar[data-active="profile"] .tab-thumb { transform: translateX(200%); }

/* ---------------------------------------------------------------------
   modal
   --------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgb(0 0 0 / 60%);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fade-in 0.25s var(--ease);
}
.modal-card {
  width: 100%; max-width: 380px;
  animation: modal-pop 0.4s var(--bounce);
}
.modal-card h3 { margin-bottom: 16px; font-size: 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------------------------------------------------------------------
   focus visibility (accessibility)
   --------------------------------------------------------------------- */

button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   responsive: tablet / desktop widen the shell
   --------------------------------------------------------------------- */

@media (min-width: 640px) {
  .view-app { max-width: 480px; margin: 0 auto; }
  .tabbar { max-width: 448px; margin: 0 auto; left: 0; right: 0; }
  .auth-wrap { max-width: 380px; }
}

.empty-blob {
    display: none;
}

.bg-blobs {
    display: none;
}
