:root {
  --bg: #0b1230; --card: rgba(255,255,255,.07); --text: #eef3ff; --muted: #9db0e0;
  --gold: #f5c542; --blue: #2b5cff; --red: #d64550; --radius: 16px;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f4f7ff; --card: rgba(255,255,255,.85); --text: #10204f; --muted: #50618f; }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Vazirmatn", sans-serif; font-size: 16px; line-height: 1.5; }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 12px 14px calc(76px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 4px; }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--card); display: grid; place-items: center; }
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; font-weight: 600; }
.balance { background: var(--card); border: 1px solid rgba(245,197,66,.4); color: var(--gold); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.icon-btn { min-width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.screen { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; }
.screen[hidden] { display: none; }
.gem { width: 180px; height: 180px; filter: drop-shadow(0 12px 24px rgba(43,92,255,.45)); animation: float 3.2s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(2deg); } }
.reduce-motion .gem, .reduce-motion * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .gem, * { animation: none !important; transition: none !important; } }
.primary { min-height: 52px; padding: 0 28px; font-size: 18px; font-weight: 700; border: 0; border-radius: var(--radius); background: linear-gradient(135deg, var(--gold), #e0a800); color: #2a2000; cursor: pointer; }
.primary:disabled { opacity: .55; cursor: not-allowed; }
.secondary, .danger { min-height: 48px; width: 100%; border-radius: var(--radius); border: 1px solid var(--muted); background: var(--card); color: var(--text); font-size: 16px; cursor: pointer; }
.danger { border-color: var(--red); color: var(--red); }
.row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 0 12px; background: var(--card); border-radius: var(--radius); }
.row select { min-height: 40px; font-size: 16px; }
.row input[type=checkbox] { width: 24px; height: 24px; }
.muted { color: var(--muted); margin: 0; }
.note { color: var(--muted); font-size: 13px; text-align: center; margin-top: auto; padding-top: 16px; }
.reward { font-size: 28px; font-weight: 800; color: var(--gold); }
.status { width: 100%; background: var(--card); border-radius: var(--radius); padding: 10px 12px; text-align: center; }
.status button { margin-inline-start: 8px; min-height: 44px; }
.soon { color: var(--muted); font-size: 18px; margin-top: 40px; }
.tabs { position: fixed; bottom: 0; inset-inline: 0; max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); backdrop-filter: blur(12px); border-top: 1px solid rgba(255,255,255,.1); padding-bottom: env(safe-area-inset-bottom); }
.tab { min-height: 56px; min-width: 44px; border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; cursor: pointer; }
.tab.active { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
