/* ==========================================================================
   Крипто-Френды — стили Mini App
   Мобильный first, тёмная «крипто»-тема, поддержка Telegram theme params.
   ========================================================================== */

:root {
  --bg: #060912;
  --bg-soft: #0b1020;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2ff;
  --muted: #8b95b5;
  --muted-2: #626c8a;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --accent-3: #ff4d9d;
  --success: #2ee6a8;
  --danger: #ff5c7c;
  --gold: #ffc94d;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9);
  --tabbar-h: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(124, 92, 255, 0.28), transparent 62%),
    radial-gradient(900px 460px at 96% 4%, rgba(0, 212, 255, 0.16), transparent 60%),
    radial-gradient(700px 500px at 50% 108%, rgba(255, 77, 157, 0.12), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding-top: var(--safe-top);
}

/* ------------------------------------------------------------- top bar --- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 10px;
  background: linear-gradient(180deg, rgba(6, 9, 18, 0.96) 55%, rgba(6, 9, 18, 0));
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px -8px rgba(124, 92, 255, 0.9);
  font-size: 17px;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: -2px;
}

.balance-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(0, 212, 255, 0.14));
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
}

.balance-pill .coin {
  font-size: 13px;
  opacity: 0.85;
}

/* --------------------------------------------------------------- views --- */

#views {
  flex: 1;
  padding: 4px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 22px);
}

.view {
  display: none;
  animation: fade-in 0.22s ease;
}

.view.is-active {
  display: block;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 22px 2px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title .hint {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-2);
  font-weight: 500;
}

.card {
  position: relative;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card + .card {
  margin-top: 12px;
}

/* -------------------------------------------------------- token hero ----- */

.hero {
  padding: 18px;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(0, 212, 255, 0.2), transparent 55%),
    radial-gradient(120% 130% at 0% 100%, rgba(124, 92, 255, 0.26), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
}

.hero-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, hsl(var(--hue, 260) 90% 62%), hsl(calc(var(--hue, 260) + 60) 90% 55%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.sm {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-size: 14px;
}

.avatar.self::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 19px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.hero-name {
  min-width: 0;
  flex: 1;
}

.hero-name .name {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-name .status {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-price {
  text-align: right;
}

.hero-price .label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.hero-price .value {
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #fff, #b9c7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-price .value small {
  font-size: 11px;
  font-weight: 600;
  -webkit-text-fill-color: var(--muted);
  margin-left: 3px;
}

.owner-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--muted);
}

.owner-line b {
  color: var(--text);
  font-weight: 650;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: rgba(46, 230, 168, 0.14);
  color: var(--success);
  border: 1px solid rgba(46, 230, 168, 0.25);
}

.tag.neutral {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--muted);
}

/* ------------------------------------------------------------- income ---- */

.income-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(46, 230, 168, 0.16), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.income-main {
  flex: 1;
  min-width: 0;
}

.income-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.income-value {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

.income-value small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 4px;
}

.income-rate {
  margin-top: 4px;
  font-size: 12px;
  color: var(--success);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  border-radius: 13px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.12s ease, opacity 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.4);
  pointer-events: none;
}

.btn-primary {
  color: #0a0a14;
  background: linear-gradient(135deg, var(--success), #9bffd9);
  box-shadow: 0 12px 26px -14px rgba(46, 230, 168, 0.9);
}

.btn-accent {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #b06bff 60%, var(--accent-2));
  box-shadow: 0 14px 30px -16px rgba(124, 92, 255, 0.95);
}

.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-sm {
  padding: 8px 12px;
  font-size: 12.5px;
  border-radius: 11px;
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------- stats --- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stat {
  padding: 12px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.stat .k {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
}

.stat .v {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----------------------------------------------------------- tap zone ---- */

.energy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.energy-bar {
  position: relative;
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.energy-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3));
  transition: width 0.25s ease;
  box-shadow: 0 0 16px rgba(124, 92, 255, 0.65);
}

.energy-text {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}

.tap-stage {
  display: grid;
  place-items: center;
  padding: 6px 0 2px;
  position: relative;
}

.tap-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.28), transparent 55%),
    linear-gradient(160deg, var(--accent), #4c2bd6 55%, #0a86ff);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 22px 50px -18px rgba(124, 92, 255, 0.95),
    inset 0 -18px 34px rgba(0, 0, 0, 0.28);
  user-select: none;
  touch-action: manipulation;
}

.tap-button::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px solid rgba(124, 92, 255, 0.35);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.94);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.08);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.tap-button:active {
  transform: scale(0.96);
}

.tap-button .tap-icon {
  font-size: 46px;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.tap-button .tap-label {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.tap-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
}

.float-coin {
  position: absolute;
  pointer-events: none;
  font-weight: 800;
  font-size: 15px;
  color: #b6ffe6;
  text-shadow: 0 2px 10px rgba(46, 230, 168, 0.8);
  animation: float-up 0.9s ease-out forwards;
}

@keyframes float-up {
  from {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -70px) scale(1.15);
  }
}

/* ---------------------------------------------------------------- rows --- */

.row-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.row:active {
  background: var(--surface-2);
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-price {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row-price .p {
  font-weight: 750;
  font-size: 14px;
}

.row-price .d {
  font-size: 10.5px;
  color: var(--muted-2);
}

.badge-rank {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--muted);
  flex: 0 0 auto;
}

.badge-rank.gold {
  background: linear-gradient(135deg, #ffd970, #ffb020);
  color: #3a2400;
}

.badge-rank.silver {
  background: linear-gradient(135deg, #e8eefc, #b9c6e4);
  color: #26303f;
}

.badge-rank.bronze {
  background: linear-gradient(135deg, #f0b183, #c47a45);
  color: #3b1f08;
}

/* -------------------------------------------------------------- search --- */

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
}

.search input::placeholder {
  color: var(--muted-2);
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.segmented button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  transition: all 0.15s ease;
}

.segmented button.is-active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.9), rgba(0, 212, 255, 0.75));
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(124, 92, 255, 0.9);
}

/* ------------------------------------------------------------ upgrades --- */

.upgrade {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.upgrade + .upgrade {
  margin-top: 10px;
}

.upgrade-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 21px;
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(124, 92, 255, 0.3);
  flex: 0 0 auto;
}

.upgrade-body {
  flex: 1;
  min-width: 0;
}

.upgrade-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.upgrade-name {
  font-weight: 700;
  font-size: 14.5px;
}

.upgrade-level {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.upgrade-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.level-bar {
  height: 6px;
  margin: 9px 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.level-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.upgrade-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upgrade-cost {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.upgrade-cost b {
  color: var(--text);
}

/* ------------------------------------------------------------ referrals -- */

.ref-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(124, 92, 255, 0.08);
  font-size: 13px;
  word-break: break-all;
  color: #cfd8ff;
}

.ref-actions {
  display: flex;
  gap: 9px;
  margin-top: 12px;
}

.ref-actions .btn {
  flex: 1;
}

.ref-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

/* --------------------------------------------------------------- misc ---- */

.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.skeleton {
  height: 62px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.muted {
  color: var(--muted);
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: flex;
  width: 100%;
  max-width: 520px;
  transform: translateX(-50%);
  padding: 6px 10px calc(6px + var(--safe-bottom));
  background: rgba(8, 11, 22, 0.88);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}

.tabbar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px 5px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted-2);
  transition: color 0.15s ease, background 0.15s ease;
}

.tabbar button svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabbar button.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.22), rgba(124, 92, 255, 0.06));
}

.tabbar button.is-active svg {
  stroke: url(#tab-gradient);
  filter: drop-shadow(0 0 8px rgba(124, 92, 255, 0.8));
}

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

.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(460px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(20, 26, 44, 0.96);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.95);
  animation: toast-in 0.2s ease;
}

.toast.ok {
  border-color: rgba(46, 230, 168, 0.4);
  color: #b9ffe6;
}

.toast.err {
  border-color: rgba(255, 92, 124, 0.45);
  color: #ffc2cf;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: end center;
  padding: 0;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 12, 0.72);
  backdrop-filter: blur(4px);
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 20px 18px calc(20px + var(--safe-bottom));
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  background: linear-gradient(180deg, #131a2e, #0a0f1d);
  animation: sheet-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sheet-in {
  from {
    transform: translateY(18px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.sheet h3 {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.sheet .sheet-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.breakdown {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.breakdown .line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.breakdown .line b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.breakdown .line.total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 14px;
  color: var(--text);
}

.sheet-actions {
  display: flex;
  gap: 10px;
}

.sheet-actions .btn {
  flex: 1;
}

/* ---------------------------------------------------------------- boot --- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(124, 92, 255, 0.3), transparent 65%),
    var(--bg);
}

.boot[hidden] {
  display: none;
}

.boot-inner {
  width: min(420px, 100%);
}

.boot-logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 24px 50px -20px rgba(124, 92, 255, 0.95);
}

.boot h1 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.boot p {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--muted);
}

.boot .spinner {
  width: 26px;
  height: 26px;
  margin: 18px auto 0;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  text-align: left;
}

.field label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
}

.field input {
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.field input:focus {
  border-color: rgba(124, 92, 255, 0.7);
}

.status-edit {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.status-edit input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  font-size: 13px;
}

/* --------------------------------------------------- desktop preview ----- */

@media (min-width: 560px) {
  body {
    padding: 18px 0;
  }

  .app {
    min-height: calc(100dvh - 36px);
    border-radius: 26px;
    border: 1px solid var(--border);
    background: rgba(8, 11, 22, 0.55);
    overflow: hidden;
    box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 1);
  }

  .tabbar {
    position: sticky;
    bottom: 0;
    transform: none;
    left: auto;
    margin-top: auto;
  }

  #views {
    padding-bottom: 18px;
  }

  .toast-host {
    bottom: 90px;
  }
}

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