/* ============================================================
   TON TAP — «TON-космос»
   Шрифт цифр и заголовков — Unbounded (фирменный шрифт TON).
   Денежный акцент — «плазма»: циан → синий → фиолет.
   Сигнатура — иридисцентное кольцо вокруг парящей монеты.
   ============================================================ */

:root {
  --void: #05070f;
  --space: #0b1224;
  --panel: #0d1528;
  --panel-2: #131c33;
  --stroke: rgba(126, 138, 173, 0.18);
  --stroke-2: rgba(126, 138, 173, 0.34);
  --ink: #eaf2ff;
  --dim: #7e8aad;
  --ton: #0098ea;
  --cyan: #3ee6ff;
  --violet: #8a63ff;
  --pink: #ff5cdc;
  --mint: #3ddc97;
  --amber: #ffc24b;
  --red: #ff6b7a;
  --plasma: linear-gradient(100deg, var(--cyan), var(--ton) 45%, var(--violet));
  --radius: 20px;
  --display: "Unbounded", "Manrope", sans-serif;
  --body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html, body {
  height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(180deg, #070c1a 0%, var(--void) 55%);
  overflow: hidden;
}

/* ===== АВРОРА-ФОН ===== */
#app::before, #app::after {
  content: "";
  position: absolute;
  width: 70vmin; height: 70vmin;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
#app::before {
  top: -25vmin; left: -15vmin;
  background: radial-gradient(circle, rgba(0, 152, 234, 0.32), transparent 65%);
  animation: drift1 16s ease-in-out infinite alternate;
}
#app::after {
  bottom: -30vmin; right: -20vmin;
  background: radial-gradient(circle, rgba(138, 99, 255, 0.22), transparent 65%);
  animation: drift2 20s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(10vmin, 6vmin) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-8vmin, -8vmin) scale(1.1); } }

.bg-fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-fx span {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  background: var(--c, rgba(62, 230, 255, 0.5));
  filter: blur(1px);
  animation: rise linear infinite;
  opacity: 0;
}
@keyframes rise {
  0%   { transform: translateY(0); opacity: 0; }
  12%  { opacity: 0.65; }
  85%  { opacity: 0.2; }
  100% { transform: translateY(-105vh); opacity: 0; }
}

.header, .screen, .tabbar, .toast { position: relative; z-index: 1; }

/* ===== ШАПКА ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.user-info { display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 42px; height: 42px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--cyan), var(--ton) 55%, var(--violet));
  box-shadow: 0 4px 18px rgba(0, 152, 234, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 700; font-size: 16px;
  color: #fff;
}

.user-name { font-size: 14px; font-weight: 700; letter-spacing: 0.1px; }
.user-league {
  font-size: 11.5px; font-weight: 800;
  background: var(--plasma);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-pill {
  background: rgba(13, 21, 40, 0.7);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px;
  padding: 7px 14px;
  display: flex; flex-direction: column; align-items: center;
}
.stat-label { font-size: 10px; color: var(--dim); font-weight: 600; letter-spacing: 0.3px; }
.stat-value {
  font-family: var(--display);
  font-size: 12.5px; font-weight: 700;
  color: var(--mint);
  text-shadow: 0 0 14px rgba(61, 220, 151, 0.5);
}

/* ===== ЭКРАНЫ ===== */
.screen {
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 8px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.screen.active { display: flex; animation: screenIn 0.28s ease; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screen-title {
  font-family: var(--display);
  font-size: 20px; font-weight: 700;
  letter-spacing: 0.2px;
  margin: 10px 0 6px;
}
.screen-sub { font-size: 13px; color: var(--dim); margin-bottom: 12px; }
.section-title {
  font-family: var(--display);
  font-size: 14px; font-weight: 700;
  margin: 24px 0 10px;
}

/* ===== ГЛАВНЫЙ ЭКРАН ===== */
.balance-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  margin: 10px 0 6px;
}
.balance-row.small { margin: 4px 0 14px; }
.balance-row.small .balance { font-size: 20px; }
.balance-row.small .coin-mini { width: 26px; height: 26px; }

.coin-mini {
  width: 38px; height: 38px;
  filter: drop-shadow(0 4px 14px rgba(0, 152, 234, 0.6));
}
.balance {
  font-family: var(--display);
  font-size: 34px; font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 25%, #9fd4ff 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.league-progress {
  margin: 6px 0 8px;
  background: rgba(13, 21, 40, 0.65);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 10px 14px 12px;
}
.league-progress-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--dim); font-weight: 600;
  margin-bottom: 8px;
}
.league-progress-top span:first-child {
  font-family: var(--display);
  font-size: 12px; font-weight: 700;
  background: var(--plasma);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.progress-bar {
  height: 9px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--stroke);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--plasma);
  box-shadow: 0 0 14px rgba(62, 230, 255, 0.6);
  transition: width 0.25s;
}

/* ----- ЧИПЫ ЗАДАНИЙ ----- */
.quest-row {
  display: flex;
  gap: 8px;
  margin: 2px 0 4px;
}
.quest-chip {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--stroke);
  background: linear-gradient(120deg, rgba(62, 230, 255, 0.1), rgba(138, 99, 255, 0.1));
  color: var(--ink);
  font-family: var(--body);
  font-size: 13px; font-weight: 700;
  padding: 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.2s;
}
.quest-chip:active { transform: scale(0.97); border-color: var(--stroke-2); }
.quest-chip span { font-size: 16px; }

/* ----- МОНЕТА: сигнатурное иридисцентное кольцо ----- */
.coin-wrap {
  position: relative;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
  padding: 10px 0;
}

.coin-halo {
  position: absolute;
  width: min(88vw, 370px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 152, 234, 0.35) 0%, rgba(138, 99, 255, 0.14) 45%, transparent 70%);
  animation: haloPulse 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes haloPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.07); opacity: 1; }
}

/* кольцо-призма */
.coin-rays {
  position: absolute;
  width: min(76vw, 318px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    var(--cyan), var(--ton) 25%, var(--violet) 50%, var(--pink) 72%, var(--cyan)
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  animation: ringSpin 9s linear infinite;
  filter: drop-shadow(0 0 16px rgba(138, 99, 255, 0.55));
  pointer-events: none;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

.coin-btn {
  position: relative;
  width: min(64vw, 268px);
  aspect-ratio: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  perspective: 700px;
  touch-action: manipulation;
  animation: levitate 5.5s ease-in-out infinite;
}
@keyframes levitate {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.coin-svg {
  width: 100%; height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 22px 50px rgba(2, 40, 90, 0.7)) drop-shadow(0 0 32px rgba(0, 152, 234, 0.45));
  transition: transform 0.12s ease;
  will-change: transform;
}

/* ----- НИЗ ГЛАВНОГО ----- */
.bottom-info {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px; font-weight: 800;
}
.energy-row {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--display);
  font-size: 12.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.energy-flash { font-size: 16px; filter: drop-shadow(0 0 8px rgba(255, 194, 75, 0.8)); }
.tap-power {
  font-family: var(--display);
  font-size: 12.5px; font-weight: 700;
  background: var(--plasma);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.energy-bar { height: 13px; }
.energy-fill {
  background: linear-gradient(90deg, #ff9d3d, var(--amber) 70%, #ffe9b8);
  box-shadow: 0 0 16px rgba(255, 194, 75, 0.5);
  transition: width 0.15s;
}

/* цифры, вылетающие при тапе */
.float-num {
  position: fixed;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 10px rgba(0, 20, 50, 0.7));
  pointer-events: none;
  z-index: 50;
  animation: floatUp 0.95s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}
@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-130px) scale(1.2); }
}

/* ===== АПГРЕЙДЫ ===== */
.upgrade-tabs {
  display: flex; gap: 6px;
  background: rgba(13, 21, 40, 0.65);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 14px;
}
.upgrade-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--dim);
  font-family: var(--body);
  font-size: 13px; font-weight: 700;
  padding: 9px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.upgrade-tab.active {
  background: linear-gradient(120deg, rgba(62, 230, 255, 0.16), rgba(138, 99, 255, 0.16));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--stroke-2);
}

.cards { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.cards.hidden { display: none; }

.card {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel) 60%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 13px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s, opacity 0.2s, border-color 0.2s;
}
.card:active { transform: scale(0.975); border-color: var(--stroke-2); }
.card.disabled { opacity: 0.42; pointer-events: none; }

.card-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(62, 230, 255, 0.14), rgba(138, 99, 255, 0.1));
  border: 1px solid var(--stroke);
  display: flex; align-items: center; justify-content: center;
  font-size: 25px;
  flex-shrink: 0;
}

.card-body { flex: 1; min-width: 0; }
.card-name { font-size: 14.5px; font-weight: 800; }
.card-desc { font-size: 12px; color: var(--dim); margin-top: 2px; }
.card-effect { font-size: 12px; color: var(--mint); font-weight: 700; margin-top: 5px; }

.card-right { text-align: right; flex-shrink: 0; }
.card-level {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  color: var(--dim);
  background: rgba(126, 138, 173, 0.1);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 2px 8px;
}
.card-price {
  display: flex; align-items: center; justify-content: flex-end; gap: 5px;
  font-family: var(--display);
  font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
  background: var(--plasma);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.card-price svg { width: 16px; height: 16px; filter: drop-shadow(0 2px 6px rgba(0, 152, 234, 0.5)); }

/* ===== РЕЙТИНГ ===== */
.rating-list { display: flex; flex-direction: column; gap: 9px; }

.rating-item {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel) 60%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 11px 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

/* пьедестал */
.rating-list .rating-item:nth-child(1) {
  border-color: rgba(255, 209, 128, 0.4);
  background: linear-gradient(160deg, rgba(255, 209, 128, 0.1), var(--panel) 65%);
}
.rating-list .rating-item:nth-child(2) {
  border-color: rgba(198, 214, 240, 0.35);
  background: linear-gradient(160deg, rgba(198, 214, 240, 0.08), var(--panel) 65%);
}
.rating-list .rating-item:nth-child(3) {
  border-color: rgba(226, 148, 90, 0.4);
  background: linear-gradient(160deg, rgba(226, 148, 90, 0.09), var(--panel) 65%);
}

.rating-item.me {
  border-color: transparent;
  background:
    linear-gradient(160deg, var(--panel-2), var(--panel) 60%) padding-box,
    var(--plasma) border-box;
  border: 1px solid transparent;
  box-shadow: 0 0 22px rgba(0, 152, 234, 0.25);
}

.rating-place {
  width: 30px;
  font-family: var(--display);
  font-size: 13px; font-weight: 700;
  color: var(--dim);
  text-align: center;
  flex-shrink: 0;
}
.rating-list .rating-item:nth-child(-n+3) .rating-place { font-size: 18px; }

.rating-ava {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 700; font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.35);
}

.rating-body { flex: 1; min-width: 0; }
.rating-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating-league { font-size: 11px; color: var(--dim); font-weight: 600; }

.rating-score {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--display);
  font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rating-score svg { width: 14px; height: 14px; }

.my-rank { margin-top: 14px; }
.my-rank-label { font-size: 12px; color: var(--dim); font-weight: 600; margin-bottom: 6px; }

/* ===== ВЫВОД ===== */
.withdraw-card {
  background: linear-gradient(165deg, rgba(0, 152, 234, 0.12), var(--panel) 55%);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 13px;
  margin-top: 8px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.withdraw-balance { text-align: center; padding-bottom: 2px; }
.wd-label { font-size: 12px; color: var(--dim); font-weight: 600; }
.wd-amount {
  font-family: var(--display);
  font-size: 30px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 2px;
  background: var(--plasma);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wd-amount small { font-size: 16px; }
.wd-usd {
  font-family: var(--display);
  font-size: 12.5px; font-weight: 600;
  color: var(--mint);
  text-shadow: 0 0 14px rgba(61, 220, 151, 0.45);
  margin-bottom: 5px;
}
.wd-rate { font-size: 12px; color: var(--dim); }
.wd-rate b { color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; color: var(--dim); font-weight: 600; }
.field input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(62, 230, 255, 0.16);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 16px;
  background: linear-gradient(100deg, var(--cyan) -20%, var(--ton) 45%, var(--violet) 120%);
  color: #fff;
  font-family: var(--display);
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.4px;
  padding: 15px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 152, 234, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.1s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shine 3.5s ease-in-out infinite;
}
@keyframes shine {
  0%, 60% { left: -80%; }
  100%    { left: 160%; }
}

.wd-note { font-size: 11px; color: var(--dim); text-align: center; }

.tx-list { display: flex; flex-direction: column; gap: 9px; padding-bottom: 8px; }
.tx-empty { color: var(--dim); font-size: 13px; text-align: center; padding: 20px 0; }

.tx-item {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel) 60%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 11px 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.tx-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(62, 230, 255, 0.14), rgba(138, 99, 255, 0.1));
  border: 1px solid var(--stroke);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tx-body { flex: 1; min-width: 0; }
.tx-title { font-size: 14px; font-weight: 700; }
.tx-addr { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-right { text-align: right; flex-shrink: 0; }
.tx-sum {
  font-family: var(--display);
  font-size: 12.5px; font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.tx-status { font-size: 11px; font-weight: 700; margin-top: 3px; }
.tx-status.pending { color: var(--amber); }
.tx-status.done { color: var(--mint); }
.tx-date { font-size: 11px; color: var(--dim); }

/* ===== ИНФО / FAQ ===== */
.info-card {
  background: linear-gradient(165deg, rgba(0, 152, 234, 0.12), var(--panel) 55%);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 22px 16px;
  text-align: center;
  margin-top: 8px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.info-logo svg {
  width: 66px; height: 66px;
  filter: drop-shadow(0 8px 26px rgba(0, 152, 234, 0.6));
}
.info-card h3 {
  font-family: var(--display);
  font-size: 18px; font-weight: 700;
  margin: 12px 0 8px;
}
.info-card p { font-size: 13px; color: var(--dim); line-height: 1.6; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}
.info-stat {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 13px 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.info-stat b {
  font-family: var(--display);
  font-size: 15px; font-weight: 700;
  background: var(--plasma);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.info-stat span { font-size: 11px; color: var(--dim); font-weight: 600; }

.faq { display: flex; flex-direction: column; gap: 9px; padding-bottom: 8px; }

.faq-item {
  background: linear-gradient(160deg, var(--panel-2), var(--panel) 60%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 0 14px;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--stroke-2); }
.faq-item summary {
  font-size: 14px; font-weight: 700;
  padding: 15px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 26px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  color: var(--cyan);
  font-size: 20px; font-weight: 400;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { font-size: 13px; color: var(--dim); line-height: 1.55; padding-bottom: 15px; }

/* ===== НИЖНЯЯ НАВИГАЦИЯ ===== */
.tabbar {
  display: flex;
  gap: 4px;
  margin: 8px 12px calc(10px + env(safe-area-inset-bottom));
  padding: 7px;
  background: rgba(9, 14, 28, 0.82);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--dim);
  font-family: var(--body);
  font-size: 10px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 2px 8px;
  border-radius: 17px;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-icon { width: 21px; height: 21px; transition: transform 0.2s; }
.tab.active {
  background: linear-gradient(120deg, rgba(62, 230, 255, 0.16), rgba(0, 152, 234, 0.18), rgba(138, 99, 255, 0.16));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--stroke-2), 0 6px 18px rgba(0, 152, 234, 0.25);
}
.tab.active .tab-icon { transform: translateY(-1px) scale(1.1); color: var(--cyan); }

/* ===== БЛОК МЕНЕДЖЕРА (после заявки на вывод) ===== */
.wd-manager {
  margin-top: 12px;
  background: linear-gradient(165deg, rgba(61, 220, 151, 0.12), var(--panel) 55%);
  border: 1px solid rgba(61, 220, 151, 0.35);
  border-radius: 22px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  text-align: center;
  animation: screenIn 0.3s ease;
}
.wd-manager.hidden { display: none; }
.wd-manager-title {
  font-family: var(--display);
  font-size: 14px; font-weight: 700;
  color: var(--mint);
}
.wd-manager p { font-size: 13px; color: var(--dim); line-height: 1.5; }

/* ===== ШТОРКА ЗАДАНИЙ ===== */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 12, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 90;
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }

.sheet {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, var(--panel-2), var(--space));
  border: 1px solid var(--stroke-2);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
}
.sheet-overlay.open .sheet { transform: translateY(0); }

.sheet-handle {
  width: 44px; height: 4px;
  border-radius: 99px;
  background: var(--stroke-2);
  margin: 4px auto 14px;
}
.sheet-title {
  font-family: var(--display);
  font-size: 17px; font-weight: 700;
  text-align: center;
}
.sheet-sub {
  font-size: 12.5px; color: var(--dim);
  text-align: center;
  margin: 4px 0 14px;
}

.task {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 11px 12px;
  margin-bottom: 9px;
}
.task-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(62, 230, 255, 0.14), rgba(138, 99, 255, 0.1));
  border: 1px solid var(--stroke);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.task-body { flex: 1; min-width: 0; }
.task-name { font-size: 14px; font-weight: 700; }
.task-reward {
  font-family: var(--display);
  font-size: 11px; font-weight: 600;
  margin-top: 3px;
  background: var(--plasma);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.task-btn {
  border: none;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--cyan) -20%, var(--ton) 45%, var(--violet) 120%);
  color: #fff;
  font-family: var(--body);
  font-size: 12.5px; font-weight: 800;
  padding: 9px 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s, opacity 0.2s;
}
.task-btn:active { transform: scale(0.96); }
.task-btn.claim { background: linear-gradient(100deg, #2bbd7e, var(--mint)); }
.task-btn.done { background: rgba(126, 138, 173, 0.2); color: var(--dim); cursor: default; }

.code-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 13px 12px;
}
.code-hint { font-size: 12px; color: var(--dim); line-height: 1.5; margin: 6px 0 10px; }
.code-row { display: flex; gap: 8px; }
.code-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 11px 13px;
  outline: none;
  text-transform: uppercase;
  min-width: 0;
}
.code-row input:focus { border-color: var(--cyan); }
.code-btn {
  border: none;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--cyan) -20%, var(--ton) 45%, var(--violet) 120%);
  color: #fff;
  font-family: var(--display);
  font-size: 12px; font-weight: 700;
  padding: 0 18px;
  cursor: pointer;
  transition: transform 0.1s;
}
.code-btn:active { transform: scale(0.96); }

/* ===== ТОСТ ===== */
.toast {
  position: fixed;
  left: 50%; bottom: 104px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(13, 21, 40, 0.92);
  border: 1px solid var(--stroke-2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 14px;
  padding: 11px 20px;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  max-width: 90%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== ДОСТУПНОСТЬ ===== */
button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #app::before, #app::after,
  .bg-fx span,
  .coin-halo, .coin-rays, .coin-btn,
  .btn-primary::after {
    animation: none !important;
  }
  .screen.active { animation: none; }
}
