/* ============================================================
   WANE CONSOLE — app layout
   ============================================================ */

body.app {
  background: var(--bg-0);
  min-height: 100vh;
}

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.75; }

/* ======================= TOPBAR ======================= */
.topbar {
  position: sticky; top: 12px; z-index: 100;
  width: min(1420px, calc(100% - 28px));
  margin: 12px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 14px 10px 18px;
  border-radius: 18px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 14px; font-weight: 800; letter-spacing: 0.06em;
}
.brand b { color: var(--brand-hot); font-weight: 400; }
.brand-mark { height: 24px; width: auto; display: block; }
.top-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.top-actions { display: flex; align-items: center; gap: 10px; }
#btn-reset { padding: 9px 13px; font-size: 15px; }

/* ======================= GRID ======================= */
.grid {
  position: relative; z-index: 1;
  width: min(1420px, calc(100% - 28px));
  margin: 22px auto;
  display: grid; gap: 18px;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: min-content;
}
.card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px) saturate(1.2);
  padding: 24px 26px;
  box-shadow: 0 22px 54px -30px rgba(0,0,0,0.75);
  overflow: hidden;
}
.card-burn { grid-column: span 7; padding: 0; }
.card-burn .card-in { position: relative; z-index: 1; padding: 24px 26px; }
.card-embers { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }
.card:nth-child(2) { grid-column: span 5; }
.card-vote { grid-column: span 5; }
.card:nth-child(4) { grid-column: span 4; }
.card:nth-child(5) { grid-column: span 3; }
.card-feed { grid-column: span 12; }

.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.card-head h2 {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: 0.02em;
}

/* ======================= BURN CARD ======================= */
.burn-hero { display: flex; gap: 22px; align-items: center; justify-content: space-between; }
.burn-big {
  font-size: clamp(38px, 4.6vw, 62px);
  font-weight: 600; line-height: 1.05; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.burn-sub { font-size: 13px; margin-top: 4px; }
.burn-row { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.bstat { display: flex; flex-direction: column; gap: 1px; }
.bstat span { font-size: 17px; font-weight: 600; }
.bstat i { font-style: normal; font-size: 11.5px; color: var(--ink-faint); }
.burn-moon { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.burn-moon span { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.5; }
#mini-moon { width: 150px; height: 150px; }

.spark { width: 100%; height: 52px; margin-top: 16px; opacity: 0.9; }
.spark-cap { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 4px; }

.milestones { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ms {
  padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px;
  border: 1px solid var(--stroke-soft); color: var(--ink-faint);
  transition: all 0.4s;
}
.ms.hit {
  border-color: rgba(245,177,76,0.5); color: var(--gold);
  background: rgba(245,177,76,0.08);
  box-shadow: 0 0 16px -4px rgba(245,177,76,0.4);
}

/* ======================= FEE PIPE ======================= */
.fee-pipe { display: flex; flex-direction: column; gap: 12px; }
.fp-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.fp-l { font-size: 13px; }
.fp-bar { display: flex; height: 40px; border-radius: 11px; overflow: hidden; font-size: 12px; font-weight: 700; }
.fp-floor {
  background: var(--ember);
  color: #1c0a02; display: flex; align-items: center; padding: 0 14px;
}
.fp-dao {
  flex: 1;
  background: rgba(96,96,252,0.32);
  display: flex; align-items: center; padding: 0 14px;
}

/* ======================= VOTE ======================= */
.ep-pool-line { font-size: 14px; margin-bottom: 16px; }
.vote-bars { display: flex; flex-direction: column; gap: 14px; }
.vb-head { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.vb-track { height: 12px; border-radius: 99px; background: rgba(0,0,0,0.4); border: 1px solid var(--stroke-soft); overflow: hidden; }
.vb-fill { height: 100%; width: 0%; border-radius: 99px; transition: width 0.7s var(--ease-spring); }
.vb-burn { background: var(--ember); }
.vb-yield { background: var(--night); }
.vote-actions { display: flex; gap: 10px; margin: 18px 0 10px; }
.vote-actions .btn { flex: 1; padding: 12px 10px; font-size: 14px; }
.vote-me { font-size: 12px; }
.skip { margin-top: 12px; width: 100%; font-size: 12.5px; color: var(--ink-faint); }

/* ======================= STAKE ======================= */
.stake-form { display: flex; flex-direction: column; gap: 12px; }
.amt-wrap { position: relative; }
.amt {
  width: 100%; padding: 13px 66px 13px 16px;
  border-radius: 13px; border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.35); color: var(--ink);
  font-size: 17px; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.amt:focus { border-color: rgba(96,96,252,0.6); box-shadow: 0 0 0 3px rgba(96,96,252,0.15); }
.amt::-webkit-outer-spin-button, .amt::-webkit-inner-spin-button { -webkit-appearance: none; }
.max {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--stroke);
  background: var(--glass-strong); color: var(--brand-hot); font-size: 11px; font-weight: 600;
}
.lock-row .seg { width: 100%; justify-content: space-between; }
.lock-row .seg button { flex: 1; padding: 8px 6px; font-size: 12px; }
.ve-preview { font-size: 13px; }
#btn-stake { width: 100%; }

.stake-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.stk {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-radius: 12px;
  background: rgba(0,0,0,0.28); border: 1px solid var(--stroke-soft);
  font-size: 13px;
  animation: toast-in 0.4s var(--ease-spring);
}
.stk .mono { font-size: 12.5px; }
.stk button {
  padding: 5px 11px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--stroke); background: var(--glass); color: var(--ink-dim);
  transition: all 0.2s;
}
.stk button:not(:disabled):hover { color: var(--ink); border-color: rgba(255,255,255,0.25); }
.stk button:disabled { opacity: 0.4; cursor: default; }

/* ======================= REWARDS ======================= */
.reward-hero { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 18px; }
.reward-big { font-size: 30px; font-weight: 600; text-shadow: 0 0 30px rgba(96,96,252,0.4); }
.reward-hero .dim { font-size: 12.5px; }
#btn-claim { width: 100%; margin-top: 8px; }
.ep-history { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; max-height: 180px; overflow-y: auto; }
.eph {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; font-family: var(--font-mono);
  padding: 8px 11px; border-radius: 9px;
  background: rgba(0,0,0,0.25); border: 1px solid var(--stroke-soft);
}
.eph .r-burn { color: var(--ember); }
.eph .r-yield { color: var(--moon-glow); }
.eph-empty { font-size: 12px; }

/* ======================= FEED ======================= */
.feed {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 240px; overflow-y: auto;
  font-family: var(--font-mono); font-size: 12.5px;
}
.fe {
  display: flex; gap: 12px; align-items: baseline;
  padding: 7px 12px; border-radius: 9px;
  background: rgba(0,0,0,0.22);
  border-left: 2px solid var(--stroke);
  animation: feed-in 0.35s var(--ease-spring);
}
@keyframes feed-in { from { opacity: 0; transform: translateY(-8px); } }
.fe time { color: var(--ink-faint); font-size: 11px; flex: 0 0 54px; }
.fe.burn { border-left-color: var(--ember); }
.fe.keeper { border-left-color: var(--gold); }
.fe.epoch { border-left-color: var(--night); }
.fe.user { border-left-color: var(--ok); }

/* burn flash on the counter */
.flash { animation: burn-flash 0.9s ease; }
@keyframes burn-flash {
  0%, 100% { color: var(--ember); }
  25% { color: var(--ember-hot); }
}

.app-foot {
  position: relative; z-index: 1;
  width: min(1420px, calc(100% - 28px));
  margin: 6px auto 26px;
  font-size: 11px; letter-spacing: 0.06em; text-align: center;
  color: var(--ink-faint);
}

/* ======================= RESPONSIVE ======================= */
@media (max-width: 1180px) {
  .card-burn { grid-column: span 12; }
  .card:nth-child(2) { grid-column: span 6; }
  .card-vote { grid-column: span 6; }
  .card:nth-child(4) { grid-column: span 6; }
  .card:nth-child(5) { grid-column: span 6; }
}
@media (max-width: 760px) {
  .grid > .card { grid-column: span 12 !important; }
  .burn-hero { flex-direction: column; align-items: flex-start; }
  .burn-moon { align-self: center; }
  .top-chips { display: none; }
}
