/* =====================================================================
   Bitomics — TMA demo · design system (mobile-first, dark space theme)
   ===================================================================== */
:root {
  --bg0: #05060f;
  --bg1: #0a0d22;
  --bg2: #10163a;
  --card: rgba(22, 30, 72, 0.55);
  --card2: rgba(12, 16, 42, 0.62);
  --stroke: rgba(140, 170, 255, 0.13);
  --stroke2: rgba(140, 170, 255, 0.24);
  --text: #eef2ff;
  --muted: #8f9acb;
  --dim: #5d6694;
  --cyan: #35e0ff;
  --blue: #3d7bff;
  --ton: #0098ea;
  --violet: #4aa3ff;
  --pink: #ff4fd8;
  --gold: #ffc94a;
  --orange: #ff9a2e;
  --green: #3dffa8;
  --red: #ff4d6d;
  --grad: linear-gradient(120deg, #35e0ff 0%, #2f8cff 100%);
  --accent: #2f8cff;
  --accent-press: #2475d6;
  --grad-gold: linear-gradient(135deg, #ffe27a 0%, #ffb23f 55%, #ff8a1f 100%);
  --r: 20px;
  --r-sm: 14px;
  --safe-t: max(env(safe-area-inset-top, 0px), var(--tg-top, 0px));
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-bottom, 0px));
  --tab-h: 70px;
  --f-display: 'Unbounded', 'Vazirmatn', 'Inter', system-ui, sans-serif;
  --f-body: 'Inter', 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; background: var(--bg0); }
body {
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  background:
    radial-gradient(120% 60% at 10% -10%, rgba(47, 140, 255, 0.2), transparent 60%),
    radial-gradient(90% 50% at 110% 10%, rgba(0, 152, 234, 0.25), transparent 60%),
    radial-gradient(80% 50% at 50% 110%, rgba(53, 224, 255, 0.08), transparent 60%),
    var(--bg0);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
b, strong { font-weight: 700; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------------------------------------------------------------- helpers */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: -0.02em; }
.t-good { color: var(--green); }
.t-red { color: var(--red); }
.t-gold { color: var(--gold); }
.t-cyan { color: var(--cyan); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(61, 255, 168, 0.7); animation: ping 1.6s infinite; display: inline-block; flex: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61, 255, 168, 0.6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(61, 255, 168, 0); } }
.dot-pulse { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: blink 1s infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: 0.2; } }
.link { color: var(--cyan); font-weight: 600; font-size: 13px; }
.glass {
  background: linear-gradient(180deg, rgba(28, 38, 92, 0.5), rgba(12, 16, 44, 0.6));
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke); white-space: nowrap; }
.chip-good { background: rgba(61, 255, 168, 0.13); color: var(--green); border-color: rgba(61, 255, 168, 0.3); }
.chip-bad { background: rgba(255, 77, 109, 0.13); color: #ff8aa0; border-color: rgba(255, 77, 109, 0.3); }
.chip .dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar.thin { height: 5px; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); box-shadow: 0 0 12px rgba(53, 224, 255, 0.5); transition: width 0.5s; }
.section-h { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty i { font-size: 44px; color: var(--dim); }
.empty.small { padding: 16px; }
.tipline { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); background: rgba(53, 224, 255, 0.06); border: 1px solid rgba(53, 224, 255, 0.14); border-radius: 12px; padding: 10px 12px; margin-top: 12px; line-height: 1.45; }
.tipline i { color: var(--cyan); font-size: 16px; flex: none; margin-top: 1px; }
.tipline.warn { background: rgba(255, 201, 74, 0.07); border-color: rgba(255, 201, 74, 0.2); }
.tipline.warn i { color: var(--gold); }
.foot-note { text-align: center; color: var(--dim); font-size: 11px; margin: 26px 0 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid2.tight { gap: 8px; margin-top: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 12.5px; margin-top: 10px; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }
.kv.big { font-size: 14px; gap: 10px 14px; margin: 14px 2px 4px; }
.stats3, .stats4 { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 14px 6px; margin-top: 10px; }
.stats4 { grid-template-columns: repeat(4, 1fr); padding: 0; margin: 0 0 12px; gap: 6px; }
.stats3 > div, .stats4 > div { display: flex; flex-direction: column; gap: 2px; }
.stats3 b { font-family: var(--f-display); font-size: 18px; }
.stats3 span, .stats4 span { font-size: 11px; color: var(--muted); }
.stats4 > div { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); border-radius: 12px; padding: 8px 4px; }
.stats4 b { font-size: 13px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--stroke); font-size: 18px; flex: none; }
.icon-btn:active { transform: scale(0.94); }
.addr-box { background: rgba(0, 0, 0, 0.3); border: 1px dashed var(--stroke2); border-radius: 12px; padding: 10px 12px; margin: 12px 0; word-break: break-all; font-size: 12px; color: #bcd3ff; user-select: text; -webkit-user-select: text; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.1); border-top-color: var(--cyan); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bdot { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); display: none; }
.seg-tabs .bdot { display: block; position: static; margin-left: 5px; }

/* ---------------------------------------------------------------- icons */
.ton-ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.bits-ic { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.22em; filter: drop-shadow(0 0 6px rgba(53, 224, 255, 0.45)); }
.star { filter: drop-shadow(0 0 6px rgba(255, 201, 74, 0.6)); }
.w-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 18px; flex: none; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
.w-ic.big { width: 64px; height: 64px; border-radius: 18px; font-size: 28px; }

/* ---------------------------------------------------------------- buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 14px; font-weight: 700; font-size: 14px; transition: transform 0.12s, filter 0.2s, opacity 0.2s; overflow: hidden; white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:disabled { opacity: 0.42; filter: grayscale(0.4); }
.btn i { font-size: 1.15em; }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 11px; }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn-xl { min-height: 58px; font-size: 16px; font-family: var(--f-display); letter-spacing: 0.02em; width: 100%; border-radius: 18px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active:not(:disabled) { background: var(--accent-press); }
.btn-ghost { background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke2); color: var(--text); }
.btn-gold { background: var(--gold); color: #241500; }
.btn-stars { background: var(--gold); color: #241500; }
.btn-danger { background: rgba(255, 77, 109, 0.14); color: #ff8aa0; border: 1px solid rgba(255, 77, 109, 0.35); }
.btn-link { background: none; color: var(--muted); min-height: 36px; font-weight: 600; }
.btn .cost { margin-left: 4px; padding: 3px 8px; border-radius: 99px; background: rgba(0, 0, 40, 0.28); font-family: var(--f-body); font-size: 12px; }
.mini { display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 9px; border-radius: 9px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke2); white-space: nowrap; }
.mini.go { background: rgba(47, 140, 255, 0.2); border-color: rgba(47, 140, 255, 0.55); color: #e3f0ff; }
.mini.warn { color: var(--gold); border-color: rgba(255, 201, 74, 0.35); }
.mini.off { opacity: 0.45; }
.mini:active { transform: scale(0.94); }

/* ---------------------------------------------------------------- app shell */
.app { position: relative; z-index: 1; height: 100%; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; transition: opacity 0.3s, transform 0.3s; }
.app.away { opacity: 0; pointer-events: none; transform: scale(0.98); }
#view { position: relative; flex: 1; min-height: 0; }
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 28px); transition: opacity 0.28s, transform 0.28s; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.screen.enter { opacity: 0; transform: translateY(10px); }
.pad { padding: 4px 16px 0; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--safe-t) + 10px) 16px 10px; background: linear-gradient(180deg, rgba(5, 6, 15, 0.92) 55%, rgba(5, 6, 15, 0)); }
.me-chip { display: flex; align-items: center; gap: 9px; min-width: 0; text-align: left; }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: radial-gradient(circle at 30% 25%, #2a3a8a, #10163a); border: 2px solid rgba(53, 224, 255, 0.55); box-shadow: 0 0 14px rgba(53, 224, 255, 0.35); overflow: hidden; flex: none; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.big { width: 72px; height: 72px; font-size: 40px; }
.me-meta { display: flex; flex-direction: column; min-width: 0; }
.me-meta b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.lvl { display: flex; align-items: center; gap: 6px; }
.lvl em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--gold); }
.xpbar { width: 58px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.xpbar i { display: block; height: 100%; background: var(--grad-gold); }
.cur { display: flex; gap: 6px; flex: none; }
.cur-chip { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 99px; background: rgba(12, 16, 44, 0.8); border: 1px solid var(--stroke2); font-size: 13px; }
.cur-chip b { font-variant-numeric: tabular-nums; }
.cur-chip .ph-plus { font-size: 11px; background: var(--accent); border-radius: 50%; padding: 2px; color: #fff; }
.subbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 16px 10px; background: linear-gradient(180deg, rgba(5, 6, 15, 0.94) 60%, rgba(5, 6, 15, 0)); }
.subbar > b { font-family: var(--f-display); font-size: 17px; flex: 1; }
.sb-x { display: flex; align-items: center; gap: 6px; }

/* tab bar */
.tabbar { position: absolute; left: 10px; right: 10px; bottom: calc(var(--safe-b) + 10px); height: var(--tab-h); z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; border-radius: 24px; background: rgba(10, 13, 34, 0.82); border: 1px solid var(--stroke2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.tabbar button { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--dim); font-size: 10.5px; font-weight: 600; transition: color 0.2s; }
.tabbar button > i:first-child { font-size: 23px; transition: transform 0.2s; }
.tabbar button.on { color: #fff; }
.tabbar button.on > i:first-child { color: var(--cyan); transform: translateY(-1px); filter: drop-shadow(0 0 8px rgba(53, 224, 255, 0.7)); }
.tabbar .fab { color: #fff; }
.fab-in { position: relative; z-index: 1; width: 58px; height: 58px; margin-top: -30px; border-radius: 20px; display: grid; place-items: center; background: var(--accent); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45); font-size: 30px; transform: rotate(45deg); }
.fab-in i { transform: rotate(-45deg); }
.fab-ring { display: none; }
@keyframes fabspin { to { transform: rotate(405deg); } }
.fab:active .fab-in { transform: rotate(45deg) scale(0.92); }
.fab > span:last-child { margin-top: 2px; }

/* ---------------------------------------------------------------- overlays */
#overlays { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.ov { position: fixed; inset: 0; pointer-events: auto; display: flex; justify-content: center; }
.ov-bg { position: absolute; inset: 0; background: rgba(2, 3, 10, 0.62); opacity: 0; transition: opacity 0.25s; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.ov.in .ov-bg { opacity: 1; }
.sheet-wrap { align-items: flex-end; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: calc(92dvh - var(--safe-t)); display: flex; flex-direction: column; background: linear-gradient(180deg, #141b45 0%, #0b0f2a 100%); border: 1px solid var(--stroke2); border-bottom: 0; border-radius: 28px 28px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08); transform: translateY(105%); transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.25, 1); padding-bottom: calc(var(--safe-b) + 14px); }
.ov.in .sheet { transform: none; }
.ov.out .sheet { transform: translateY(105%); transition-duration: 0.26s; }
.ov.out .ov-bg { opacity: 0; }
.sheet.tall, .tall .sheet { min-height: 62dvh; }
.sheet-grab { width: 42px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, 0.2); margin: 9px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 18px 6px; flex: none; }
.sheet-title { font-family: var(--f-display); font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sheet-title i { color: var(--cyan); }
.sheet-body { padding: 8px 18px 4px; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-actions { display: flex; gap: 10px; padding: 12px 18px 0; flex: none; }
.sheet-actions .btn { flex: 1; min-height: 50px; }
.modal-wrap { align-items: center; padding: 20px; }
.modal { position: relative; width: 100%; max-width: 380px; max-height: 88dvh; display: flex; flex-direction: column; background: linear-gradient(180deg, #161e4c, #0b0f2a); border: 1px solid var(--stroke2); border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08); padding: 14px 0 18px; transform: scale(0.86); opacity: 0; transition: transform 0.3s cubic-bezier(0.2, 1.3, 0.4, 1), opacity 0.2s; }
.ov.in .modal { transform: none; opacity: 1; }
.ov.out .modal { transform: scale(0.94); opacity: 0; }
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 64px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 8px; max-width: 440px; padding: 10px 14px; border-radius: 14px; font-size: 13px; font-weight: 600; background: rgba(16, 22, 58, 0.95); border: 1px solid var(--stroke2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); transform: translateY(-12px); opacity: 0; transition: all 0.28s; }
.toast.in { transform: none; opacity: 1; }
.toast i { font-size: 18px; color: var(--cyan); flex: none; }
.toast.good i { color: var(--green); }
.toast.bad i { color: var(--red); }
.toast.warn i { color: var(--gold); }
.toast.gold { border-color: rgba(255, 201, 74, 0.45); }
.toast.gold i { color: var(--gold); }

/* form bits */
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--stroke); }
.seg button { min-width: 44px; height: 32px; padding: 0 10px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: all 0.2s; }
.seg button.on { background: var(--accent); color: #fff; }
.seg-tabs { display: flex; padding: 4px; border-radius: 16px; background: rgba(10, 13, 34, 0.7); border: 1px solid var(--stroke); margin: 4px 0 14px; }
.seg-tabs button { flex: 1; height: 38px; border-radius: 12px; font-weight: 700; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.seg-tabs button.on { background: rgba(53, 224, 255, 0.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(53, 224, 255, 0.35); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--stroke); font-weight: 600; font-size: 14px; }
.set-row > span { display: flex; align-items: center; gap: 9px; }
.set-row > span i { color: var(--cyan); font-size: 18px; }
.sw { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); position: relative; transition: background 0.2s; cursor: pointer; flex: none; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.sw:checked { background: var(--accent); }
.sw:checked::after { transform: translateX(18px); }
.menu .btn-block { margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.inp { height: 46px; border-radius: 12px; border: 1px solid var(--stroke2); background: rgba(0, 0, 0, 0.3); padding: 0 14px; font-size: 15px; color: var(--text); outline: none; user-select: text; -webkit-user-select: text; }
.inp:focus { border-color: var(--cyan); }
.av-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 14px; }
.av-grid button { aspect-ratio: 1; border-radius: 12px; font-size: 22px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke); }
.av-grid button.on { border-color: var(--cyan); background: rgba(53, 224, 255, 0.15); box-shadow: 0 0 12px rgba(53, 224, 255, 0.4); }

/* ---------------------------------------------------------------- splash & onboarding */
#splash { position: fixed; inset: 0; z-index: 200; overflow: hidden; background: #04050d; transition: opacity 0.45s ease, transform 0.45s ease; }
#splash.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
/* full-bleed art: the crystal sits in the upper half of the image, text lives in the calm lower half */
.spl-bg { position: absolute; inset: 0; background: center top / cover no-repeat; opacity: 0; transform: scale(1.08); transition: opacity 0.6s ease, transform 2.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
#splash.art .spl-bg { opacity: 1; transform: none; }
#splash::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(4, 5, 13, 0) 38%, rgba(4, 5, 13, 0.72) 64%, #04050d 92%); }
/* no art (or not decoded yet): a quiet glowing gem in the same spot */
.spl-gem { position: absolute; left: 50%; top: 30%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 14px; background: linear-gradient(135deg, #7fe9ff, #2f8cff); transform: rotate(45deg); box-shadow: 0 0 60px rgba(47, 140, 255, 0.55); animation: splGem 2.4s ease-in-out infinite; transition: opacity 0.4s; }
#splash.art .spl-gem { opacity: 0; }
@keyframes splGem { 50% { transform: rotate(45deg) scale(0.9); box-shadow: 0 0 90px rgba(47, 140, 255, 0.75); } }
.spl-foot { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: calc(var(--safe-b) + 16vh); display: flex; flex-direction: column; align-items: center; text-align: center; animation: splUp 0.7s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes splUp { from { opacity: 0; transform: translateY(14px); } }
.spl-name { font-family: var(--f-display); font-size: 38px; font-weight: 800; letter-spacing: 0.14em; color: #fff; text-shadow: 0 0 28px rgba(53, 224, 255, 0.45), 0 2px 0 rgba(0, 0, 0, 0.35); margin-inline-start: 0.14em; }
.spl-tag { margin-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.32em; color: rgba(214, 224, 255, 0.72); margin-inline-start: 0.32em; }
.spl-bar { position: relative; width: 168px; height: 3px; margin-top: 30px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.spl-bar i { position: absolute; inset: 0 auto 0 0; width: 8%; border-radius: inherit; background: #fff; box-shadow: 0 0 10px rgba(127, 233, 255, 0.9); transition: width 0.9s ease; }
[dir='rtl'] .spl-bar i { inset: 0 0 0 auto; }
[dir='rtl'] .spl-tag { letter-spacing: 0; margin-inline-start: 0; font-size: 12.5px; }
.spl-err { margin-top: 16px; max-width: 290px; color: rgba(214, 224, 255, 0.8); line-height: 1.55; }
.spl-retry { margin-top: 14px; min-width: 160px; }
@media (max-height: 640px) { .spl-foot { bottom: calc(var(--safe-b) + 10vh); } .spl-name { font-size: 32px; } }

.onboarding { position: fixed; inset: 0; z-index: 150; background: radial-gradient(80% 50% at 50% 30%, rgba(61, 123, 255, 0.25), transparent 70%), #05060f; display: flex; justify-content: center; transition: opacity 0.35s; }
.onboarding.out { opacity: 0; }
.ob { width: 100%; max-width: 480px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; padding: calc(var(--safe-t) + 20px) 24px calc(var(--safe-b) + 28px); gap: 14px; animation: obIn 0.45s ease; }
@keyframes obIn { from { opacity: 0; transform: translateX(24px); } }
.ob h1 { font-size: 30px; }
.ob p { font-size: 15px; max-width: 340px; }
.ob-skip { position: absolute; top: calc(var(--safe-t) + 16px); right: 20px; }
.ob-art { flex: 1; width: 100%; max-height: 380px; display: grid; place-items: center; position: relative; }
.ob-dice { font-size: 120px; filter: drop-shadow(0 20px 40px rgba(61, 123, 255, 0.6)); animation: floaty 3s ease-in-out infinite; }
.ob-orbit { position: absolute; width: 250px; height: 250px; border-radius: 50%; border: 1px dashed rgba(53, 224, 255, 0.35); animation: spin 18s linear infinite; }
.ob-orbit::after { content: '💎'; position: absolute; top: -14px; left: 50%; font-size: 26px; }
.a2 { display: flex; gap: 14px; }
.a2 span { font-size: 46px; padding: 16px; border-radius: 26px; background: linear-gradient(160deg, rgba(53, 224, 255, 0.18), rgba(47, 140, 255, 0.12)); border: 1px solid var(--stroke2); animation: floaty 3s ease-in-out infinite; }
.a2 span:nth-child(2) { animation-delay: 0.3s; transform: translateY(-18px); }
.a2 span:nth-child(3) { animation-delay: 0.6s; }
.a3 .ton-ic { width: 110px; height: 110px; position: relative; z-index: 2; filter: drop-shadow(0 16px 40px rgba(0, 152, 234, 0.7)); animation: floaty 3s ease-in-out infinite; }
.ob-planet { position: absolute; }
.ob-planet .planet { width: 250px !important; height: 250px !important; opacity: 0.55; }
.ob-dots { display: flex; gap: 6px; margin: 6px 0 6px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 9px; background: rgba(255, 255, 255, 0.2); transition: all 0.3s; }
.ob-dots i.on { width: 24px; background: var(--cyan); }
@keyframes floaty { 50% { transform: translateY(-12px); } }

/* ---------------------------------------------------------------- home */
.hero { position: relative; overflow: hidden; padding: 18px 16px 16px; margin-top: 2px; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 85% 20%, rgba(47, 140, 255, 0.35), transparent 70%), radial-gradient(60% 60% at 0% 100%, rgba(0, 152, 234, 0.25), transparent 70%); pointer-events: none; }
.hero-txt { position: relative; max-width: 62%; margin-bottom: 16px; }
.hero-txt h1 { margin: 8px 0 8px; font-size: 25px; }
.hero-txt p { color: var(--muted); font-size: 12.5px; }
.hero .btn-xl { position: relative; }
.energy-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.energy { display: flex; gap: 4px; align-items: center; }
.energy i { width: 16px; height: 8px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); transform: skewX(-15deg); }
.energy i.on { background: linear-gradient(90deg, #ffe27a, #ffb23f); box-shadow: 0 0 8px rgba(255, 201, 74, 0.7); }
.energy b { font-size: 11px; color: var(--gold); margin-left: 4px; }
.iso { position: absolute; right: -18px; top: 0; width: 170px; height: 170px; perspective: 600px; pointer-events: none; }
.iso-plane { position: absolute; left: 30px; top: 18px; width: 120px; height: 120px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; transform: rotateX(58deg) rotateZ(45deg); transform-style: preserve-3d; animation: isoSpin 16s linear infinite; }
@keyframes isoSpin { to { transform: rotateX(58deg) rotateZ(405deg); } }
.iso-plane i { border-radius: 4px; background: var(--c); box-shadow: 0 0 12px var(--c), inset 0 -3px 0 rgba(0, 0, 0, 0.3); opacity: 0.9; }
.iso-plane i.in { background: rgba(20, 28, 70, 0.8); box-shadow: inset 0 0 0 1px rgba(53, 224, 255, 0.15); }
.iso-token { position: absolute; left: 76px; top: 38px; width: 28px; height: 40px; animation: floaty 2.2s ease-in-out infinite; }
.iso-token span { position: absolute; inset: 0; background: linear-gradient(160deg, #bff4ff, #35e0ff 40%, #3d7bff); clip-path: polygon(50% 0, 100% 45%, 50% 100%, 0 45%); filter: drop-shadow(0 0 12px rgba(53, 224, 255, 0.9)); }
.iso-glow { position: absolute; left: 50px; top: 70px; width: 80px; height: 30px; border-radius: 50%; background: radial-gradient(closest-side, rgba(53, 224, 255, 0.55), transparent); filter: blur(4px); }

.streak { padding: 14px; margin-top: 12px; }
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.st-head > div { display: flex; flex-direction: column; gap: 2px; }
.st-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.sd { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); font-size: 10px; color: var(--muted); }
.sd b { font-size: 10.5px; color: var(--text); white-space: nowrap; }
.sd.done { background: rgba(61, 255, 168, 0.1); border-color: rgba(61, 255, 168, 0.3); }
.sd.done b { color: var(--green); }
.sd.today { border-color: var(--gold); background: rgba(255, 201, 74, 0.14); box-shadow: 0 0 14px rgba(255, 201, 74, 0.35); animation: pulseB 1.6s infinite; }
.sd.big { background: linear-gradient(160deg, rgba(47, 140, 255, 0.25), rgba(255, 79, 216, 0.15)); }
@keyframes pulseB { 50% { box-shadow: 0 0 22px rgba(255, 201, 74, 0.6); } }

.grid2 > .mode-card { min-height: 128px; }
.mode-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; text-align: left; border-radius: var(--r); border: 1px solid var(--stroke); background: linear-gradient(160deg, rgba(28, 38, 92, 0.6), rgba(12, 16, 44, 0.7)); margin-top: 0; transition: transform 0.15s; }
.mode-card:active { transform: scale(0.97); }
.mode-card b { font-family: var(--f-display); font-size: 14px; margin-top: 6px; }
.mode-card > span:not(.mc-ic):not(.mc-live):not(.planet) { font-size: 12px; color: var(--muted); }
.mc-ic { font-size: 30px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5)); }
.mc-live { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text); }
.mc-live b { font-family: var(--f-body); font-size: 12px; margin: 0; }
.mode-card.arena { background: linear-gradient(160deg, rgba(0, 152, 234, 0.35), rgba(12, 16, 44, 0.8)); border-color: rgba(0, 152, 234, 0.4); }
.mode-card.galaxy { background: linear-gradient(160deg, rgba(47, 140, 255, 0.32), rgba(12, 16, 44, 0.8)); border-color: rgba(47, 140, 255, 0.4); }
.mode-card.spin { background: linear-gradient(160deg, rgba(255, 79, 216, 0.25), rgba(12, 16, 44, 0.8)); }
.mode-card.pass { background: linear-gradient(160deg, rgba(255, 201, 74, 0.22), rgba(12, 16, 44, 0.8)); }
.grid2:has(.mode-card) { margin-top: 12px; }
.mc-planet { width: 34px !important; height: 34px !important; }

.ticker { margin-top: 12px; overflow: hidden; padding: 10px 0; border-radius: 14px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tk-track { display: flex; gap: 28px; width: max-content; animation: marquee 50s linear infinite; }
.tk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tk b { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

.lb { padding: 6px 12px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--stroke); font-size: 13.5px; }
.lb-row:last-child { border-bottom: 0; }
.lb-row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.lb-row.me { background: rgba(53, 224, 255, 0.07); margin: 4px -12px -6px; padding: 10px 12px; border-radius: 0 0 var(--r) var(--r); }
.lb-rank { width: 28px; text-align: center; font-family: var(--f-display); font-size: 12px; color: var(--muted); flex: none; }
.lb-rank.r1 { color: var(--gold); text-shadow: 0 0 10px rgba(255, 201, 74, 0.7); }
.lb-rank.r2 { color: #cfd8ff; }
.lb-rank.r3 { color: #ff9a5e; }
.lb-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); font-size: 17px; flex: none; }
.av.lb-av { width: 32px; height: 32px; font-size: 17px; border-width: 1.5px; }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learn-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; }
.learn-card > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.learn-card span { font-size: 12px; color: var(--muted); }
.lc-ic { font-size: 30px !important; color: inherit !important; }

/* planet */
.planet { position: relative; display: inline-block; width: 52px; height: 52px; border-radius: 50%; flex: none; background: radial-gradient(circle at 32% 28%, #fff 0%, var(--c2) 18%, var(--c1) 55%, #0a0a2a 100%); box-shadow: 0 0 24px color-mix(in srgb, var(--c1) 60%, transparent), inset -8px -10px 20px rgba(0, 0, 0, 0.55); }
.planet i { position: absolute; left: -22%; top: 42%; width: 144%; height: 18%; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c2) 70%, transparent); transform: rotate(-18deg); opacity: 0.8; }
.planet.big { width: 86px; height: 86px; }

/* ---------------------------------------------------------------- galaxy */
.gal-head { padding: 16px; margin-top: 2px; }
.gh-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gh-top > div { display: flex; flex-direction: column; gap: 3px; }
.gh-amt { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-size: 28px; }
.gh-amt .bits-ic { width: 30px; height: 30px; }
.vault { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.perks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sector { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 10px; text-align: left; position: relative; overflow: hidden; transition: transform 0.15s; }
.sector::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 90% at 0% 50%, color-mix(in srgb, var(--c1) 30%, transparent), transparent 70%); pointer-events: none; }
.sector:active { transform: scale(0.98); }
.sec-info { position: relative; flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sec-info b { font-family: var(--f-display); font-size: 15px; }
.sec-info .bar { margin-top: 5px; }
.tier { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.t-legendary { color: var(--gold); }
.t-epic { color: #b58cff; }
.t-rare { color: var(--cyan); }
.t-common { color: #9fb2ff; }
.sec-hero { display: flex; gap: 14px; align-items: center; padding: 16px; font-size: 13px; }
.sec-hero p { color: var(--muted); }
.sec-hero > div { flex: 1; min-width: 0; }
.hexmap { margin-top: 12px; padding: 12px 8px 12px; }
.hexsvg { width: 100%; height: auto; display: block; overflow: visible; }
.hx polygon { stroke-width: 1.4; transition: transform 0.2s; cursor: pointer; }
.hx text { font-size: 8.5px; font-weight: 800; text-anchor: middle; fill: #fff; pointer-events: none; font-family: var(--f-body); }
.h-free polygon { fill: color-mix(in srgb, var(--c1) 22%, transparent); stroke: var(--c2); animation: hexPulse 2.4s ease-in-out infinite; }
.h-sold polygon { fill: #151b40; stroke: #2a3468; }
.h-you polygon { fill: url(#gy); stroke: #bff4ff; filter: drop-shadow(0 0 6px rgba(53, 224, 255, 0.8)); }
.hx.d0 polygon { stroke: var(--gold); stroke-width: 2.2; }
@keyframes hexPulse { 50% { fill: color-mix(in srgb, var(--c1) 40%, transparent); } }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.lg-you { background: var(--grad); }
.lg-free { background: color-mix(in srgb, var(--c1) 35%, transparent); border: 1px solid var(--c2); }
.lg-sold { background: #151b40; border: 1px solid #2a3468; }
.lg-leg { border: 2px solid var(--gold); }
.plot-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; text-align: left; }
.plot-row > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pr-hex { font-size: 26px; color: var(--c); filter: drop-shadow(0 0 8px var(--c)); }
.plot-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 35%, #0b0f2a), #0b0f2a 70%); border: 1px solid color-mix(in srgb, var(--rc) 50%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--c1) 25%, transparent); }
.pc-art { position: relative; }
.pc-hex { position: absolute; right: -6px; bottom: -6px; font-size: 26px; color: var(--rc); filter: drop-shadow(0 0 8px var(--rc)); }
.pc-info { display: flex; flex-direction: column; gap: 3px; }
.pc-info b { font-family: var(--f-display); font-size: 17px; }
.minted { text-align: center; padding: 0 2px; }
.minted .eyebrow { margin-bottom: 10px; }
.minted .plot-card { text-align: left; }

/* ---------------------------------------------------------------- earn */
.spin-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; margin-top: 10px; text-align: left; }
.spin-card > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sc-cube { font-size: 32px; animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg) scale(1.05); } 75% { transform: rotate(10deg); } }
.quest { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; }
.quest.claimed { opacity: 0.55; }
.q-ic { font-size: 24px; color: var(--cyan); flex: none; }
.q-mid { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.q-mid b { font-size: 13.5px; }
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 12px 6px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); filter: grayscale(1); opacity: 0.45; }
.ach span { font-size: 26px; }
.ach b { font-size: 11.5px; }
.ach small { font-size: 9.5px; color: var(--muted); line-height: 1.25; }
.ach.on { filter: none; opacity: 1; border-color: rgba(255, 201, 74, 0.35); background: linear-gradient(160deg, rgba(255, 201, 74, 0.12), rgba(255, 255, 255, 0.02)); }
.acad-hero { display: flex; gap: 12px; padding: 14px; margin-bottom: 10px; align-items: center; }
.acad-hero > span { font-size: 38px; }
.lesson { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-bottom: 8px; text-align: left; }
.lesson > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lesson > i { font-size: 20px; color: var(--muted); }
.lesson.done { border-color: rgba(61, 255, 168, 0.25); }
.ls-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: rgba(255, 255, 255, 0.06); flex: none; }
.lesson-flow { text-align: center; padding-bottom: 6px; }
.lf-dots { display: flex; gap: 5px; justify-content: center; margin-bottom: 14px; }
.lf-dots i { width: 22px; height: 4px; border-radius: 9px; background: rgba(255, 255, 255, 0.15); }
.lf-dots i.on { background: var(--cyan); }
.lf-ic { font-size: 64px; margin: 6px 0 12px; animation: floaty 3s ease-in-out infinite; }
.lf-txt, .lf-q { font-size: 16px; line-height: 1.5; margin-bottom: 20px; min-height: 96px; }
.lf-q { font-weight: 700; min-height: 0; }
.lf-opts { display: flex; flex-direction: column; gap: 8px; }
.lf-opts .btn { white-space: normal; min-height: 50px; line-height: 1.25; }
.btn.right { background: rgba(61, 255, 168, 0.18); border-color: var(--green); color: var(--green); }
.btn.wrong { background: rgba(255, 77, 109, 0.15); border-color: var(--red); color: #ff8aa0; animation: shake 0.4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ref-hero { padding: 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ref-art { font-size: 50px; }
.ref-hero .grid2 { width: 100%; }
.friend { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; width: 100%; text-align: left; }
.friend > div { flex: 1; display: flex; flex-direction: column; }
.friend.add { border-style: dashed; }

/* ---------------------------------------------------------------- wallet */
.wal-empty { padding: 24px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.we-art .ton-ic { width: 76px; height: 76px; filter: drop-shadow(0 12px 30px rgba(0, 152, 234, 0.6)); animation: floaty 3s ease-in-out infinite; }
.checks { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; font-size: 13.5px; }
.checks li { display: flex; gap: 8px; align-items: center; }
.checks i { color: var(--green); font-size: 18px; }
.wal-card { position: relative; overflow: hidden; padding: 18px; border-radius: 24px; background: linear-gradient(140deg, #0a6fc2 0%, #0b3f8a 100%); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18); margin-top: 2px; }
.wal-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.25), transparent); }
.wc-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.wc-top .icon-btn { background: rgba(0, 0, 0, 0.2); }
.addr-chip { flex: 1; text-align: left; font-size: 13px; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.wc-bal { display: flex; align-items: center; gap: 8px; margin: 18px 0 2px; font-family: var(--f-display); position: relative; z-index: 1; }
.wc-bal .ton-ic { width: 32px; height: 32px; }
.wc-bal b { font-size: 36px; }
.wc-bal span { font-size: 16px; opacity: 0.8; }
.wal-card .muted { color: rgba(255, 255, 255, 0.7); position: relative; z-index: 1; }
.wc-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.wc-acts button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 0; border-radius: 14px; background: rgba(0, 0, 0, 0.18); font-size: 11.5px; font-weight: 700; }
.wc-acts i { font-size: 20px; }
.assets { padding: 4px 14px; }
.as { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--stroke); }
.as:last-child { border: 0; }
.as > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.as-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); font-size: 18px; flex: none; }
.tge { display: flex; gap: 12px; padding: 14px; margin-top: 10px; align-items: center; background: linear-gradient(135deg, rgba(47, 140, 255, 0.25), rgba(255, 79, 216, 0.12)); }
.tge > span { font-size: 32px; }
.txs { padding: 4px 14px; }
.tx { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--stroke); font-size: 13px; }
.tx:last-child { border: 0; }
.tx > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tx > div b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 77, 109, 0.12); color: #ff8aa0; flex: none; }
.tx-ic.in { background: rgba(61, 255, 168, 0.12); color: var(--green); }
.tc-sheet .tc { text-align: center; }
.tc-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 16px; }
.tc-head .ton-ic { width: 52px; height: 52px; }
.tc-head b { font-size: 19px; font-family: var(--f-display); }
.tc-head p { color: var(--muted); font-size: 13px; max-width: 280px; }
.tc-main { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(42, 171, 238, 0.25), rgba(42, 171, 238, 0.08)); border: 1px solid rgba(42, 171, 238, 0.45); font-weight: 700; text-align: left; }
.tc-main span:nth-child(2) { flex: 1; }
.tc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0; }
.tc-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px; border-radius: 14px; }
.tc-grid button:active { background: rgba(255, 255, 255, 0.06); }
.tc-grid small { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.tc-foot { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.5; }
.tc-foot i { color: var(--green); }
.tx-wait { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 20px 6px; text-align: center; }
.tx-wait b { font-size: 17px; font-family: var(--f-display); }
.okmark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(61, 255, 168, 0.15); color: var(--green); font-size: 32px; box-shadow: 0 0 30px rgba(61, 255, 168, 0.4); animation: pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { from { transform: scale(0.4); } }
.txm { text-align: center; }
.txm-app { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--muted); }
.txm-app .w-ic { width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }
.txm-amt { font-family: var(--f-display); font-size: 34px; margin-top: 14px; }
.txm-amt small { font-size: 16px; color: var(--muted); }
.txm-usd { color: var(--muted); font-size: 13px; }
.txm-rows { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin-top: 18px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.25); text-align: left; font-size: 13px; }
.txm-rows span { color: var(--muted); }
.txm-rows b { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.inv-ic { font-size: 52px; filter: drop-shadow(0 0 20px rgba(255, 201, 74, 0.7)); }
.inv b { font-size: 18px; }
.inv p { color: var(--muted); font-size: 14px; }
.inv-bal { font-size: 12.5px; padding: 6px 12px; border-radius: 99px; background: rgba(255, 201, 74, 0.1); color: var(--gold); font-weight: 700; }

/* ---------------------------------------------------------------- shop / pass */
.offer.glass { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 16px 14px; margin-top: 2px; background: linear-gradient(135deg, rgba(255, 79, 216, 0.28), rgba(47, 140, 255, 0.25) 50%, rgba(12, 16, 44, 0.8)); border-color: rgba(255, 79, 216, 0.4); }
.offer.glass > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.offer.glass b { font-family: var(--f-display); font-size: 16px; }
.of-art { font-size: 42px; animation: floaty 2.4s ease-in-out infinite; }
.of-badge { position: absolute; top: 0; right: 0; padding: 4px 12px; border-radius: 0 0 0 12px; background: var(--red); font-weight: 800; font-size: 11px; }
.shop-it { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 12px; text-align: center; font-size: 13px; transition: transform 0.15s; }
.shop-it:active { transform: scale(0.96); }
.si-art { font-size: 30px; margin-bottom: 2px; }
.si-art .bits-ic { width: 34px; height: 34px; }
.shop-it .price { margin-top: 4px; padding: 5px 10px; border-radius: 99px; background: rgba(255, 201, 74, 0.13); color: var(--gold); font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.si-tag { position: absolute; top: -7px; right: -4px; padding: 3px 7px; border-radius: 8px; background: var(--green); color: #032; font-size: 10px; font-weight: 800; }
.skins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skin { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; }
.skin.eq { border-color: var(--c); box-shadow: 0 0 20px color-mix(in srgb, var(--c) 40%, transparent); }
.sk-art { font-size: 40px; filter: drop-shadow(0 0 14px var(--c)); }
.skin .chip { margin-top: 4px; }
.pass-cta { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; margin-top: 14px; text-align: left; }
.pass-cta > span:first-child { font-size: 30px; }
.pass-cta > div { flex: 1; display: flex; flex-direction: column; }
.pass-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; background: linear-gradient(135deg, rgba(255, 201, 74, 0.22), rgba(12, 16, 44, 0.8)); }
.pass-hero h2 { margin: 4px 0; }
.pass-cols { display: grid; grid-template-columns: 1fr 64px 1fr; text-align: center; margin: 16px 0 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pass-row { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; gap: 0; margin-bottom: 8px; }
.pr-cell { height: 54px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); font-weight: 800; font-size: 13px; }
.pr-cell.prem { background: rgba(255, 201, 74, 0.07); border-color: rgba(255, 201, 74, 0.2); }
.pass-row.open .pr-cell:not(:disabled) { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 201, 74, 0.35); background: rgba(255, 201, 74, 0.14); }
.pr-mid { display: flex; flex-direction: column; align-items: center; }
.pr-mid b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); font-family: var(--f-display); font-size: 13px; }
.pass-row.open .pr-mid b { background: var(--grad-gold); color: #2a1600; }
.pr-mid small { font-size: 9.5px; color: var(--muted); margin-top: 2px; }

/* ---------------------------------------------------------------- arena */
.arena-hero { display: flex; gap: 14px; align-items: center; padding: 16px; background: linear-gradient(135deg, rgba(0, 152, 234, 0.35), rgba(12, 16, 44, 0.8)); }
.ah-art { font-size: 46px; }
.arena-hero h2 { margin-bottom: 4px; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; margin: 12px 0; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.trust span { display: flex; align-items: center; gap: 4px; }
.trust i { color: var(--green); }
.table { padding: 14px; margin-bottom: 10px; border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.tb-top { display: flex; align-items: center; gap: 12px; }
.tb-top > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.tb-top b { font-family: var(--f-display); font-size: 16px; }
.tb-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.tb-stake { display: flex; align-items: center; gap: 5px; font-family: var(--f-display); font-size: 20px; }
.tb-mid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.tb-mid > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.tb-mid b { font-size: 13px; display: flex; align-items: center; gap: 5px; }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 8px; margin: 6px 0 14px; }
.pd { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; font-size: 12px; min-width: 0; }
.pd b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-av { font-size: 30px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); border: 2px solid var(--stroke2); }
.pd-bar { width: 100%; border-radius: 14px 14px 4px 4px; display: grid; place-items: center; font-family: var(--f-display); font-size: 20px; margin-top: 6px; }
.p1 { order: 2; }
.p1 .pd-av { border-color: var(--gold); box-shadow: 0 0 20px rgba(255, 201, 74, 0.5); width: 64px; height: 64px; }
.p1 .pd-bar { height: 88px; background: linear-gradient(180deg, rgba(255, 201, 74, 0.45), rgba(255, 201, 74, 0.05)); }
.p2 { order: 1; }
.p2 .pd-bar { height: 64px; background: linear-gradient(180deg, rgba(207, 216, 255, 0.35), rgba(207, 216, 255, 0.04)); }
.p3 { order: 3; }
.p3 .pd-bar { height: 48px; background: linear-gradient(180deg, rgba(255, 154, 94, 0.35), rgba(255, 154, 94, 0.04)); }
.lb-me { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-top: 10px; position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 20px); border-color: rgba(53, 224, 255, 0.4); }
.lb-me b { margin-left: auto; }

/* profile */
.prof { display: flex; align-items: center; gap: 14px; padding: 16px; }
.prof > div { flex: 1; min-width: 0; }
.prof h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* play sheet */
.play-card { padding: 14px; border-radius: 20px; background: linear-gradient(160deg, rgba(61, 123, 255, 0.22), rgba(47, 140, 255, 0.1)); border: 1px solid rgba(61, 123, 255, 0.4); }
.pc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pc-top > div { flex: 1; display: flex; flex-direction: column; }
.pc-top b { font-family: var(--f-display); font-size: 16px; }
.pc-ic { font-size: 34px; }
.opt { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 13.5px; font-weight: 600; }
.play-card .btn { margin-top: 10px; }
.play-mini { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke2); }
.play-mini span { font-size: 28px; }
.play-mini small { color: var(--muted); font-size: 11.5px; }
.refill { text-align: center; }
.rf-art { font-size: 60px; filter: drop-shadow(0 0 20px rgba(255, 201, 74, 0.7)); margin-bottom: 8px; }

/* spin wheel */
.spinbox { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 6px; }
.wheel-wrap { position: relative; width: min(280px, 78vw); aspect-ratio: 1; margin: 6px auto 2px; }
.wheel { width: 100%; height: 100%; filter: drop-shadow(0 0 24px rgba(53, 224, 255, 0.35)); }
.wheel-g { transform-origin: 0 0; }
.wl { fill: #fff; font-size: 13px; font-weight: 800; text-anchor: middle; font-family: var(--f-body); dominant-baseline: middle; }
.wc { fill: var(--cyan); font-size: 10px; font-weight: 800; text-anchor: middle; font-family: var(--f-display); }
.wheel-ptr { position: absolute; top: -6px; left: 50%; margin-left: -12px; width: 24px; height: 30px; z-index: 2; background: var(--grad-gold); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }

/* level up, gift, matchmaking */
.lvlup, .gift { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 20px; }
.lu-badge { width: 90px; height: 90px; display: grid; place-items: center; font-family: var(--f-display); font-size: 38px; color: #2a1600; background: var(--grad-gold); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); filter: drop-shadow(0 0 20px rgba(255, 201, 74, 0.8)); animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.lu-rw { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0 4px; }
.lu-rw span { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke2); font-weight: 700; font-size: 13px; }
.gift-box { font-size: 72px; animation: wobble 1.6s ease-in-out infinite; filter: drop-shadow(0 10px 30px rgba(255, 79, 216, 0.6)); }
.mm { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 18px; }
.mm-radar { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.mm-radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(53, 224, 255, 0.5); animation: radar 2.1s ease-out infinite; }
.mm-radar i:nth-child(2) { animation-delay: 0.7s; }
.mm-radar i:nth-child(3) { animation-delay: 1.4s; }
.mm-radar span { font-size: 44px; }
@keyframes radar { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }
.mm-title { font-family: var(--f-display); font-size: 18px; }
.mm-slots { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mm-av { position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: rgba(255, 255, 255, 0.07); border: 2px solid var(--cyan); animation: pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.mm-av small { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 9.5px; color: var(--muted); white-space: nowrap; max-width: 76px; overflow: hidden; text-overflow: ellipsis; }
.mm-av.empty { border: 2px dashed var(--stroke2); color: var(--dim); font-size: 20px; animation: blink 1.2s infinite; }
.mm-info { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 16px; }
.fair { font-size: 11px; padding: 10px 12px; border-radius: 12px; background: rgba(61, 255, 168, 0.06); border: 1px solid rgba(61, 255, 168, 0.2); color: #9fe9c8; line-height: 1.5; text-align: left; width: 100%; margin-top: 10px; word-break: break-all; }
.fair i { color: var(--green); }

/* =====================================================================
   MATCH
   ===================================================================== */
.match { position: fixed; inset: 0; z-index: 30; background: #04050d; overflow: hidden; }
.match[hidden] { display: none; }
.board3d { position: absolute; inset: 0; }
.board3d canvas { display: block; width: 100% !important; height: 100% !important; }
.nogl { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 40px; }
.hud { position: absolute; inset: 0; pointer-events: none; max-width: 640px; margin: 0 auto; }
.hud > * { pointer-events: auto; }
/* soft top scrim: keeps the menu, players and event card readable over the board (dark at the screen edge → transparent) */
.hud::before { content: ''; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); height: calc(var(--safe-t) + 200px); background: linear-gradient(180deg, rgba(4, 5, 13, 0.78) 0%, rgba(4, 5, 13, 0.55) 40%, rgba(4, 5, 13, 0.22) 72%, rgba(4, 5, 13, 0) 100%); pointer-events: none; }
.hud-top { position: absolute; top: calc(var(--safe-t) + 8px); left: 10px; right: 10px; display: flex; align-items: center; gap: 6px; }
.hud-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: rgba(10, 13, 34, 0.75); border: 1px solid var(--stroke2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); flex: none; }
.hud-chip { height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border-radius: 99px; background: rgba(10, 13, 34, 0.75); border: 1px solid var(--stroke2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.hud-chip small { color: var(--muted); font-weight: 600; }
.hud-chip i { color: var(--cyan); }
.hud-chip.phase { border-color: color-mix(in srgb, var(--pc) 55%, transparent); color: var(--pc); margin-left: auto; box-shadow: 0 0 14px color-mix(in srgb, var(--pc) 25%, transparent); }
.hud-chip.phase b { color: #fff; font-weight: 800; }
#m-pot { color: #bdfbe2; }
.players { position: absolute; top: calc(var(--safe-t) + 52px); left: 10px; right: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.pp { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 5px 6px; border-radius: 14px; background: rgba(10, 13, 34, 0.72); border: 1px solid var(--stroke); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); text-align: left; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.pp.on { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-1px); }
.pp.rekt { opacity: 0.4; filter: grayscale(1); }
.pp-av { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; flex: none; background: color-mix(in srgb, var(--c) 22%, #0a0d22); border: 2px solid var(--c); }
.pp-jail { position: absolute; right: -5px; bottom: -4px; font-size: 11px; font-style: normal; }
.pp-card { position: absolute; left: -5px; bottom: -4px; font-size: 10px; font-style: normal; }
.pp-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.pp-name { font-size: 10px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-cash { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-cash.up { animation: flashG 0.9s; }
.pp-cash.down { animation: flashR 0.9s; }
@keyframes flashG { 0%, 60% { color: var(--green); text-shadow: 0 0 10px var(--green); } }
@keyframes flashR { 0%, 60% { color: var(--red); text-shadow: 0 0 10px var(--red); } }
.pp-nw { font-size: 9px; color: var(--dim); font-weight: 700; }
.mtoasts { position: absolute; bottom: calc(var(--safe-b) + 230px); left: 12px; right: 12px; display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; pointer-events: none !important; }
.mtoast { display: flex; align-items: center; gap: 7px; max-width: 100%; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 600; background: rgba(10, 13, 34, 0.85); border: 1px solid var(--stroke2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); transform: translateY(-8px) scale(0.96); opacity: 0; transition: all 0.25s; }
.mtoast.in { transform: none; opacity: 1; }
.mtoast i { font-size: 16px; color: var(--cyan); flex: none; }
.mtoast.good { border-color: rgba(61, 255, 168, 0.4); }
.mtoast.good i { color: var(--green); }
.mtoast.bad { border-color: rgba(255, 77, 109, 0.45); }
.mtoast.bad i { color: var(--red); }
.mtoast.warn i { color: var(--gold); }
.floaters { position: absolute; inset: 0; pointer-events: none !important; overflow: hidden; }
.floater { position: absolute; transform: translate(-50%, -50%); font-family: var(--f-display); font-weight: 800; font-size: 20px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 16px currentColor; animation: floatUp 1.4s ease-out forwards; white-space: nowrap; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -200%) scale(1); } }
.coach { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 232px); width: min(320px, calc(100% - 32px)); transform: translate(-50%, 10px); display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 13px; background: #17245e; border: 1px solid rgba(47, 140, 255, 0.45); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none !important; transition: all 0.3s; }
.coach.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto !important; }
.coach::after { content: ''; position: absolute; bottom: -7px; left: 50%; margin-left: -7px; width: 14px; height: 14px; background: #3a30b0; transform: rotate(45deg); border-right: 1px solid rgba(255, 255, 255, 0.25); border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.coach i { color: var(--gold); font-size: 18px; flex: none; }
.turn-status { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 142px); transform: translate(-50%, 6px); padding: 7px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: rgba(10, 13, 34, 0.8); border: 1px solid var(--stroke2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: all 0.25s; pointer-events: none !important; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.turn-status.show { opacity: 1; transform: translate(-50%, 0); }
.turn-status i { color: var(--cyan); }
.dock { position: absolute; left: 10px; right: 10px; bottom: calc(var(--safe-b) + 12px); height: 84px; display: grid; grid-template-columns: 1fr 1fr 96px 1fr 1fr; align-items: end; padding: 0 6px 8px; border-radius: 26px; background: rgba(10, 13, 34, 0.8); border: 1px solid var(--stroke2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.dock-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 60px; border-radius: 16px; color: #c7d0ff; font-size: 10.5px; font-weight: 700; transition: all 0.2s; }
.dock-btn i { font-size: 23px; }
.dock-btn:active { transform: scale(0.92); background: rgba(255, 255, 255, 0.06); }
.dock-btn.dim { opacity: 0.4; }
.dock-btn.on { color: var(--cyan); }
.roll { position: relative; width: 88px; height: 88px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; align-self: center; margin-top: -40px; }
.roll-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(47, 140, 255, 0.55); }
.roll-inner { position: relative; width: 100%; height: 100%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; background: var(--accent); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); transition: transform 0.15s; }
.roll-inner i { font-size: 34px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)); }
.roll-inner b { font-family: var(--f-display); font-size: 12px; letter-spacing: 0.1em; }
.roll:active:not(:disabled) .roll-inner { transform: scale(0.92); }
.roll[data-state='roll'] { animation: breathe 1.8s ease-in-out infinite; }
.roll[data-state='roll'] .roll-inner i { animation: diceShake 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); } }
@keyframes diceShake { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-18deg); } 86% { transform: rotate(14deg); } 94% { transform: rotate(-6deg); } }
.roll[data-state='end'] .roll-inner { background: #17a870; }
.roll[data-state='end'] .roll-ring { border-color: rgba(61, 255, 168, 0.5); }
.roll[data-state='wait'] .roll-ring { opacity: 0.35; animation-duration: 6s; }
.roll[data-state='wait'] .roll-inner { background: #1c2350; box-shadow: none; }
.roll-wait { font-size: 34px; animation: floaty 1.4s ease-in-out infinite; }
.roll-wait i { font-size: 28px; color: var(--muted); }

/* dice overlay */
.dice-ov { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 26px; pointer-events: none; opacity: 0; transition: opacity 0.2s; background: radial-gradient(40% 30% at 50% 50%, rgba(5, 6, 15, 0.55), transparent 80%); }
.dice-ov.show { opacity: 1; }
.die-wrap { position: relative; width: var(--s, 66px); height: var(--s, 66px); --s: 66px; perspective: 520px; }
.dice-ov.show .die-wrap { animation: diceThrow var(--dur, 1000ms) cubic-bezier(.3,.6,.4,1) both; }
.dice-ov.show .die-wrap:nth-child(2) { animation-delay: 60ms; }
.die { --s: 66px; position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.die .core { position: absolute; inset: 1px; background: #c9d5ff; border-radius: 4px; }
.die .cx { transform: rotateY(90deg); }
.die .cy { transform: rotateX(90deg); }
.die .cz { transform: none; }
.face { position: absolute; inset: 0; border-radius: 9px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 9px;
  background: radial-gradient(120% 120% at 30% 25%, #ffffff 0%, #eef2ff 45%, #cfd9ff 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.95), inset 0 0 10px rgba(60, 80, 180, 0.22), inset 0 -5px 10px rgba(40, 55, 150, 0.18);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face i { width: 12px; height: 12px; border-radius: 50%; place-self: center; }
.face i.p { background: radial-gradient(circle at 35% 35%, #5a6cff, #1a1f6a); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.8); }
.f1 i.p { background: radial-gradient(circle at 35% 35%, #ff6b8a, #b0103a); width: 16px; height: 16px; }
.f1 { transform: rotateY(0deg) translateZ(calc(var(--s) / 2)); }
.f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.9); }
.f3 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.94); }
.f4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.94); }
.f2 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(1.02); }
.f5 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.86); }
.die-shadow { position: absolute; left: 10%; right: 10%; bottom: -18px; height: 12px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent); }
.dice-ov.show .die-shadow { animation: diceShadow var(--dur, 1000ms) cubic-bezier(.3,.6,.4,1) both; }
@keyframes diceThrow {
  0% { transform: translate3d(0, 140px, 0) scale(0.6); }
  35% { transform: translate3d(0, -70px, 0) scale(1.08); }
  62% { transform: translate3d(0, 0, 0) scale(1); }
  74% { transform: translate3d(0, -16px, 0); }
  86%, 100% { transform: translate3d(0, 0, 0); }
}
@keyframes diceShadow {
  0% { opacity: 0; transform: scale(0.4); }
  35% { opacity: 0.25; transform: scale(0.55); }
  62%, 100% { opacity: 0.9; transform: scale(1); }
}
.dice-sum { position: absolute; top: calc(50% + 62px); left: 50%; transform: translate(-50%, 10px) scale(0.6); display: flex; flex-direction: column; align-items: center; font-family: var(--f-display); font-size: 44px; font-weight: 800; color: #fff; text-shadow: 0 0 24px rgba(53, 224, 255, 0.9), 0 4px 12px rgba(0, 0, 0, 0.7); opacity: 0; transition: all 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.dice-sum small { font-size: 13px; color: var(--gold); letter-spacing: 0.15em; text-shadow: 0 0 14px rgba(255, 201, 74, 0.9); }
.dice-sum.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* banner */
.banner { position: absolute; left: 0; right: 0; top: 34%; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 16px; text-align: center; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bc) 22%, rgba(5, 6, 15, 0.8)) 20%, color-mix(in srgb, var(--bc) 22%, rgba(5, 6, 15, 0.8)) 80%, transparent); border-top: 1px solid color-mix(in srgb, var(--bc) 50%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--bc) 50%, transparent); transform: scaleY(0.2); transition: all 0.3s cubic-bezier(0.2, 1.2, 0.4, 1); }
.banner.show { opacity: 1; transform: none; }
.bn-icon { font-size: 40px; filter: drop-shadow(0 0 16px var(--bc)); }
.bn-title { font-family: var(--f-display); font-size: 24px; font-weight: 800; letter-spacing: 0.04em; color: #fff; text-shadow: 0 0 20px var(--bc); }
.bn-sub { font-size: 13px; color: #dfe6ff; max-width: 340px; }

/* event card */
.card-modal .modal { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.card-modal .sheet-body { overflow: visible; display: flex; flex-direction: column; align-items: center; }
.card3d { width: 240px; height: 320px; perspective: 1000px; margin: 0 auto; }
.card-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.3, 1.3, 0.5, 1); transform: rotateY(0deg) scale(0.9); }
.flip .card-in { transform: rotateY(180deg); }
.card-face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; overflow: hidden; }
.card-back { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.chance .card-back { background: linear-gradient(145deg, #ff9a2e, #8b2a6a 70%, #2a0d3a); border: 2px solid rgba(255, 201, 74, 0.6); }
.chest .card-back { background: linear-gradient(145deg, #3dffa8, #0f6a52 55%, #0b2440); border: 2px solid rgba(61, 255, 168, 0.6); }
.cb-ring { position: absolute; width: 180px; height: 180px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.35); animation: spin 10s linear infinite; }
.cb-icon { font-size: 72px; }
.cb-title { font-family: var(--f-display); font-size: 17px; margin-top: 12px; letter-spacing: 0.06em; }
.card-front { transform: rotateY(180deg); background: linear-gradient(170deg, #1c2660, #0b0f2a); border: 2px solid; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); gap: 8px; }
.chance .card-front { border-color: #ff9a2e; box-shadow: 0 0 40px rgba(255, 154, 46, 0.35), 0 20px 60px rgba(0, 0, 0, 0.6); }
.chest .card-front { border-color: #3dffa8; box-shadow: 0 0 40px rgba(61, 255, 168, 0.3), 0 20px 60px rgba(0, 0, 0, 0.6); }
.cf-deck { position: absolute; top: 14px; font-size: 10px; font-weight: 800; letter-spacing: 0.18em; color: var(--muted); }
.cf-icon { font-size: 60px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5)); }
.cf-title { font-family: var(--f-display); font-size: 19px; }
.cf-text { font-size: 14px; color: #d6ddff; line-height: 1.45; }
.cf-learn { display: flex; gap: 8px; margin-top: 14px; max-width: 320px; font-size: 12px; color: var(--muted); background: rgba(10, 13, 34, 0.85); border: 1px solid var(--stroke2); border-radius: 12px; padding: 10px 12px; text-align: left; opacity: 0; transition: opacity 0.4s 0.5s; }
.flip .cf-learn { opacity: 1; }
.cf-learn i { color: var(--gold); font-size: 16px; flex: none; }
.card-who { margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); }

/* nft property card */
.nft { border-radius: 20px; overflow: hidden; background: #0b0f2a; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 18%, transparent); }
.nft-hero { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 55%, #0b0f2a), color-mix(in srgb, var(--c) 12%, #0b0f2a) 70%); overflow: hidden; }
.nft-glow { position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.3), transparent); }
.nft-icon { position: relative; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 32px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.25); flex: none; }
.nft-info { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nft-tag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.nft-name { font-family: var(--f-display); font-size: 19px; font-weight: 700; margin: 2px 0; }
.nft-id { font-size: 10.5px; color: rgba(255, 255, 255, 0.6); font-family: ui-monospace, Menlo, monospace; }
.nft-price { position: relative; font-family: var(--f-display); font-size: 20px; font-weight: 800; padding: 6px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); }
.nft-owner { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; font-size: 12.5px; background: color-mix(in srgb, var(--oc) 16%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--oc) 35%, transparent); }
.nft-owner b { font-size: 14px; }
.nft-rows { padding: 6px 14px 8px; }
.nr { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed rgba(140, 170, 255, 0.1); }
.nr:last-child { border-bottom: 0; }
.nr span { color: #c3cbef; display: flex; align-items: center; gap: 5px; }
.nr span i { color: var(--c); }
.nr em { font-style: normal; font-size: 11px; color: var(--muted); }
.nr b { font-variant-numeric: tabular-nums; }
.nr.cur { margin: 0 -8px; padding: 6px 8px; border-radius: 9px; background: color-mix(in srgb, var(--c) 18%, transparent); border-bottom-color: transparent; }
.nr.sub span, .nr.sub b { color: var(--muted); font-size: 12px; }
.nr.txt span { display: block; line-height: 1.5; }
.nft-market, .nft-perk { margin: 0 14px 8px; padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.nft-market { color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, transparent); }
.nft-perk { color: var(--cyan); background: rgba(53, 224, 255, 0.1); display: flex; gap: 6px; align-items: center; }
.nft-learn { display: flex; gap: 8px; margin: 2px 14px 14px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.45; background: rgba(255, 201, 74, 0.06); border: 1px solid rgba(255, 201, 74, 0.15); }
.nft-learn i { color: var(--gold); font-size: 16px; flex: none; }
.nft.compact .nft-rows { max-height: 164px; overflow-y: auto; }
.buy-cash { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 2px; font-size: 13px; color: var(--muted); }
.buy-cash b { color: var(--text); }
.jail-art { font-size: 60px; text-align: center; margin-bottom: 8px; filter: drop-shadow(0 0 20px rgba(255, 154, 46, 0.6)); }
.pl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pl-av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: color-mix(in srgb, var(--c) 22%, #0a0d22); border: 2px solid var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 45%, transparent); }
.pl-name { font-family: var(--f-display); font-size: 18px; }

/* auction */
.auc .nft { margin-bottom: 10px; }
.auc .nft-rows { display: none; }
.auc-stage { position: relative; width: 150px; height: 150px; margin: 4px auto 6px; }
.auc-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.auc-ring circle { fill: none; stroke-width: 6; }
.ar-bg { stroke: rgba(255, 255, 255, 0.08); }
.ar-fg { stroke: var(--cyan); stroke-linecap: round; transition: stroke-dashoffset 0.1s linear, stroke 0.3s; filter: drop-shadow(0 0 6px var(--cyan)); }
.ar-fg.hot { stroke: var(--red); filter: drop-shadow(0 0 6px var(--red)); }
.auc-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.auc-lbl { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.auc-bid { font-family: var(--f-display); font-size: 30px; font-weight: 800; }
.auc-bid.bump { animation: bump 0.3s; }
@keyframes bump { 40% { transform: scale(1.2); color: var(--gold); } }
.auc-lead { font-size: 11.5px; font-weight: 700; max-width: 120px; }
.auc-feed { min-height: 60px; display: flex; flex-direction: column; gap: 3px; align-items: center; font-size: 12px; color: var(--muted); }
.af { animation: obIn 0.3s; }
.auc-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.auc-cash { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* portfolio */
.pg { margin-bottom: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); overflow: hidden; }
.pg-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; background: color-mix(in srgb, var(--c) 12%, transparent); }
.pg-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.pg-n { color: var(--muted); font-size: 12px; margin-right: auto; }
.pr { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--stroke); }
.pr.mort { background: rgba(255, 77, 109, 0.05); }
.pr-l { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pr-name { font-weight: 700; font-size: 13.5px; }
.pr-state { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.pr-rent { color: #c3cbef; font-weight: 600; }
.lv { display: inline-flex; gap: 3px; align-items: center; }
.lv i { width: 9px; height: 9px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
.lv i.on { background: var(--c); box-shadow: 0 0 6px var(--c); }
.lv.v { color: var(--gold); font-weight: 800; gap: 4px; }
.lv.v i { width: auto; height: auto; background: none; box-shadow: none; }
.pr-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.raise { text-align: center; padding: 6px 0 4px; }
.raise-owe { font-size: 17px; }
.raise-owe b { color: var(--red); font-family: var(--f-display); }
.raise-sub { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.raise .bar > i { background: linear-gradient(90deg, var(--red), var(--gold), var(--green)); }
.raise-cash { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* trade */
.tr-opps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.opp { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 86px; padding: 8px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); font-size: 12px; font-weight: 700; }
.opp span { font-size: 22px; }
.opp small { color: var(--muted); font-weight: 600; }
.opp.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 35%, transparent); }
.tr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tr-h { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tr-list { display: flex; flex-direction: column; gap: 5px; min-height: 40px; }
.trade .tc { display: flex; align-items: center; gap: 6px; padding: 8px 9px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); font-size: 12px; font-weight: 600; text-align: left; }
.trade .tc.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.trade .tc:disabled { opacity: 0.35; }
.tc-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.tr-cash { padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.tr-cash > div { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tr-cash b { color: var(--gold); }
.rg { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); outline: none; }
.rg::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--grad-gold); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); cursor: pointer; }
.rg::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #ffb23f; }
.tr-verdict { margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bubble { width: 100%; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--stroke2); font-size: 13px; text-align: center; }
.bubble.no { border-color: rgba(255, 77, 109, 0.4); }
.bubble small { color: var(--muted); }
.offer-modal .offer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; padding: 0 2px; }
.offer-modal .offer > i { font-size: 22px; color: var(--cyan); }
.of-side { display: flex; flex-direction: column; gap: 4px; padding: 12px 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); }
.of-h { font-size: 11px; color: var(--muted); font-weight: 700; }
.of-big { font-family: var(--f-display); font-size: 15px; }
.modal .sheet-head { padding: 4px 20px 8px; }
.modal .sheet-body { padding: 4px 20px 0; }
.modal .sheet-actions { padding: 16px 20px 0; }

/* log, phase, rules */
.log { display: flex; flex-direction: column; }
.lg { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--stroke); font-size: 13px; }
.lg-i { width: 24px; text-align: center; flex: none; }
.lg-t { flex: 1; color: #d0d7fa; }
.lg-r { font-size: 10.5px; color: var(--dim); font-weight: 700; flex: none; }
.phase-row { display: flex; gap: 12px; padding: 12px; margin-bottom: 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); font-size: 13px; }
.phase-row p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.phase-row b { color: var(--pc); }
.phase-row.on { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 10%, transparent); }
.pr-ic { font-size: 28px; }
.rules { display: flex; flex-direction: column; gap: 10px; }
.rl { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); }
.rl p { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* results */
.results { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 16px) 16px calc(var(--safe-b) + 16px); background: rgba(3, 4, 12, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.35s; overflow-y: auto; }
.results.in { opacity: 1; }
.res-card { width: 100%; max-width: 420px; margin: auto; border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, #161e4c, #0b0f2a); border: 1px solid var(--stroke2); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); transform: translateY(30px) scale(0.95); transition: transform 0.5s cubic-bezier(0.2, 1.3, 0.4, 1); padding-bottom: 12px; }
.results.in .res-card { transform: none; }
.res-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 26px 16px 18px; background: radial-gradient(70% 80% at 50% 0%, rgba(47, 140, 255, 0.4), transparent 70%); }
.res-hero.win { background: radial-gradient(70% 80% at 50% 0%, rgba(255, 201, 74, 0.45), transparent 70%); }
.res-rays { position: absolute; top: -90px; left: 50%; width: 360px; height: 360px; margin-left: -180px; background: repeating-conic-gradient(rgba(255, 255, 255, 0.07) 0 10deg, transparent 10deg 20deg); border-radius: 50%; animation: spin 20s linear infinite; mask-image: radial-gradient(closest-side, #000, transparent); -webkit-mask-image: radial-gradient(closest-side, #000, transparent); }
.res-medal { position: relative; font-size: 70px; filter: drop-shadow(0 10px 30px rgba(255, 201, 74, 0.6)); animation: pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); }
.res-title { position: relative; font-family: var(--f-display); font-size: 28px; font-weight: 800; letter-spacing: 0.04em; }
.res-hero.win .res-title { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.res-sub { position: relative; font-size: 12.5px; color: var(--muted); }
.res-list { padding: 4px 16px; }
.rl-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 13.5px; }
.rl-row.me { background: color-mix(in srgb, var(--c) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.rl-rank { width: 20px; font-family: var(--f-display); color: var(--muted); }
.rl-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 22%, #0a0d22); border: 2px solid var(--c); font-size: 15px; }
.rl-name { flex: 1; }
.rl-name em { font-style: normal; font-size: 10px; color: var(--red); font-weight: 800; margin-left: 4px; }
.res-rew { display: flex; gap: 8px; justify-content: center; padding: 12px 16px 4px; flex-wrap: wrap; }
.rw { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 84px; padding: 10px 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke2); }
.rw > span { font-size: 22px; line-height: 1; }
.rw > span .bits-ic, .rw > span .ton-ic { width: 24px; height: 24px; }
.rw b { font-family: var(--f-display); font-size: 17px; }
.rw small { font-size: 10.5px; color: var(--muted); }
.rw.gold { border-color: rgba(255, 201, 74, 0.45); background: rgba(255, 201, 74, 0.08); box-shadow: 0 0 20px rgba(255, 201, 74, 0.2); }
.res-card .fair { margin: 10px 16px 0; width: auto; }
.res-stats { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; padding: 12px 16px 2px; font-size: 11.5px; color: var(--muted); }
.res-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 14px 16px 0; }
.res-acts .btn { min-height: 50px; }
.share-btn { width: 100%; margin-top: 4px; }

/* ---------------------------------------------------------------- tablet */
@media (min-width: 700px) {
  .app { max-width: 720px; }
  .sheet { max-width: 600px; }
  .pad { padding: 4px 24px 0; }
  .topbar, .subbar { padding-left: 24px; padding-right: 24px; }
  .tabbar { left: 50%; right: auto; width: 520px; margin-left: -260px; }
  .grid2:has(.mode-card) { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 26px 24px 22px; }
  .hero-txt h1 { font-size: 32px; }
  .iso { right: 20px; top: 10px; transform: scale(1.25); transform-origin: top right; }
  .hero .btn-xl { max-width: 360px; }
  .skins { grid-template-columns: repeat(3, 1fr); }
  .ach-grid { grid-template-columns: repeat(4, 1fr); }
  .players { left: 50%; right: auto; width: 620px; margin-left: -310px; }
  .dock { left: 50%; right: auto; width: 520px; margin-left: -260px; }
  .hud-top { left: 16px; right: 16px; }
  .die, .die-wrap { --s: 84px; }
  .face i { width: 15px; height: 15px; }
}
@media (min-width: 1000px) {
  .app { box-shadow: 0 0 0 1px var(--stroke), 0 0 80px rgba(61, 123, 255, 0.15); }
}
@media (max-width: 360px) {
  body { font-size: 14px; }
  .hero-txt h1 { font-size: 21px; }
  .pp-nw { display: none; }
  .pp-av { width: 26px; height: 26px; font-size: 14px; }
  .cur-chip { padding: 0 8px; font-size: 12px; }
  .me-meta b { max-width: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* =====================================================================
   v1.1 — turn narration, set progress, i18n / RTL
   ===================================================================== */
.hud-top { flex-wrap: nowrap; }
.hud-chip.speed { padding: 0 9px; color: var(--gold); }
.hud-chip.speed i { color: var(--gold); }
.hud-prog { position: absolute; left: 44px; right: 0; bottom: -7px; height: 3px; border-radius: 9px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.hud-prog i { display: block; height: 100%; background: var(--grad); box-shadow: 0 0 8px rgba(53, 224, 255, 0.6); transition: width 0.6s; }
.pp-rank { position: absolute; top: -6px; inset-inline-end: -4px; font-style: normal; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 99px; background: #1a2150; border: 1px solid var(--stroke2); color: var(--muted); }
.pp-rank.r1 { background: var(--grad-gold); color: #2a1600; border-color: transparent; box-shadow: 0 0 10px rgba(255, 201, 74, 0.6); }

/* live turn card */
.tcard { position: absolute; top: calc(var(--safe-t) + 106px); left: 10px; right: 10px; padding: 9px 11px 8px; border-radius: 16px; background: rgba(10, 13, 34, 0.8); border: 1px solid color-mix(in srgb, var(--c, #35e0ff) 45%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), inset 3px 0 0 var(--c, #35e0ff); opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.tcard.show { opacity: 1; transform: none; pointer-events: auto; }
.tcard-h { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.tcard-h b { font-family: var(--f-display); font-size: 13px; }
.tcard-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: color-mix(in srgb, var(--c) 22%, #0a0d22); border: 1.5px solid var(--c); flex: none; }
.tcard-sub { color: var(--muted); font-size: 11px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-steps { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; }
.tcard-steps:empty { display: none; }
.tstep { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #cfd6ff; line-height: 1.35; animation: stepIn 0.3s ease; }
.tstep .ts-i { width: 18px; text-align: center; flex: none; }
.tstep .ts-t { min-width: 0; }
.tstep.good { color: #9dffd2; }
.tstep.bad { color: #ff9fb2; }
.tstep.warn { color: #ffe08a; }
.tstep:last-child { font-weight: 700; color: #fff; }
.tstep.good:last-child { color: var(--green); }
.tstep.bad:last-child { color: #ff8aa0; }
@keyframes stepIn { from { opacity: 0; transform: translateX(-8px); } }
[dir='rtl'] .tstep { animation-name: stepInR; }
@keyframes stepInR { from { opacity: 0; transform: translateX(8px); } }
.recap { margin-top: 7px; padding: 7px 9px; border-radius: 11px; background: rgba(53, 224, 255, 0.07); border: 1px solid rgba(53, 224, 255, 0.18); font-size: 12px; max-height: 140px; overflow: hidden; transition: max-height 0.4s, opacity 0.3s, margin 0.3s, padding 0.3s; }
.recap.fold { max-height: 0; opacity: 0; margin: 0; padding: 0 9px; border-width: 0; }
.rc-h { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); margin-bottom: 3px; }
.rc-row { display: flex; gap: 6px; align-items: baseline; color: #cfd6ff; padding: 1px 0; }
.rc-row.good b { color: var(--green); }
.rc-row.bad b { color: #ff8aa0; }
.rc-row.warn { color: #ffe08a; }

/* 1 · 2 · 3 stepper in the status pill */
.stepper { display: inline-flex; align-items: center; gap: 5px; }
.stepper b { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10.5px; background: rgba(255, 255, 255, 0.1); color: var(--muted); }
.stepper b.on { background: var(--accent); color: #fff; }
.stepper b.done { background: rgba(61, 255, 168, 0.2); color: var(--green); }
.stepper i { width: 10px; height: 1px; background: var(--stroke2); }

/* dock alert (something to build) */
.dock-btn { position: relative; }
.dock-btn.alert { color: var(--gold); }
.dock-btn.alert::after { content: '!'; position: absolute; top: 4px; inset-inline-end: 12px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #2a1600; background: var(--grad-gold); box-shadow: 0 0 10px rgba(255, 201, 74, 0.8); animation: pulseB 1.2s infinite; }

/* step counter above the moving token */
.floater.stepc { font-size: 15px; color: #fff; background: rgba(10, 13, 34, 0.85); border: 1px solid var(--stroke2); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; text-shadow: none; animation: stepPop 0.7s ease-out forwards; }
@keyframes stepPop { 0% { opacity: 0; transform: translate(-50%, -40%) scale(0.5); } 20% { opacity: 1; transform: translate(-50%, -90%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -140%) scale(0.9); } }

/* set progress */
.setprog { margin-top: 12px; padding: 11px 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 8%, rgba(255, 255, 255, 0.03)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.setprog.full { box-shadow: 0 0 18px color-mix(in srgb, var(--c) 30%, transparent); }
.sp-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sp-h span { color: var(--muted); font-weight: 700; }
.sp-bar { display: flex; gap: 3px; margin-inline-start: auto; }
.sp-bar i { width: 22px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); }
.sp-bar i.on { background: var(--c); box-shadow: 0 0 8px var(--c); }
.sp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.sp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); }
.sp-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--oc); }
.sp-chip small { color: var(--muted); font-weight: 500; }
.sp-chip.mine { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.sp-hint { font-size: 11.5px; color: var(--muted); margin-top: 7px; }
.sp-after { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 12px 2px -6px; }
.tile-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tile-acts .mini { height: 36px; padding: 0 12px; font-size: 12.5px; }
.howto { padding: 10px 12px; border-radius: 14px; background: rgba(255, 201, 74, 0.06); border: 1px solid rgba(255, 201, 74, 0.2); margin-bottom: 12px; }
.ht-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; font-size: 11px; }
.ht-row b { font-weight: 700; }
.ht-row i { color: var(--dim); font-size: 10px; }
.howto p { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; line-height: 1.45; }
.pg-need { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 11.5px; color: #ffe08a; background: rgba(255, 201, 74, 0.05); border-top: 1px solid var(--stroke); }
.pg-need > i { font-size: 16px; flex: none; }
.pg-need span { flex: 1; min-width: 0; }
.pg-need small { color: var(--muted); }

/* language */
.lang-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px; margin-top: 10px; font-weight: 600; }
.lang-row > i:first-child { color: var(--cyan); font-size: 20px; }
.lang-row span { flex: 1; text-align: start; }
.lang-row b { color: var(--muted); font-weight: 600; }
.langs { display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; }
.lang-opt { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke2); text-align: start; }
.lang-opt b { font-size: 16px; }
.lang-opt span { color: var(--muted); font-size: 12.5px; flex: 1; }
.lang-opt.on { border-color: var(--cyan); background: rgba(53, 224, 255, 0.1); }
.lang-opt i { color: var(--cyan); font-size: 20px; }
button.set-row { width: 100%; }
button.set-row b { display: flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; }
.ob-top { position: absolute; top: calc(var(--safe-t) + 12px); left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ob-top .ob-skip { position: static; }
.ob-lang { display: flex; align-items: center; gap: 6px; }
.ob-lang-pick { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 12px; font-size: 13px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--stroke2); }
.ob-lang-pick b { font-weight: 700; }
.ob-lang-pick i { color: var(--muted); font-size: 15px; }
.ob-lang-en { height: 36px; padding: 0 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--stroke); }
.ob-open #overlays { z-index: 160; }

/* RTL (Farsi) */
[dir='rtl'] body { font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif; }
[dir='rtl'] * { letter-spacing: 0 !important; }
[dir='rtl'] .ph-caret-right, [dir='rtl'] .ph-caret-left, [dir='rtl'] .ph-arrow-right, [dir='rtl'] .ph-paper-plane-tilt { transform: scaleX(-1); }
[dir='rtl'] .lb-row b, [dir='rtl'] .lb-me b { margin-left: 0; margin-right: auto; }
[dir='rtl'] .mode-card, [dir='rtl'] .learn-card, [dir='rtl'] .sector, [dir='rtl'] .plot-row, [dir='rtl'] .spin-card, [dir='rtl'] .lesson, [dir='rtl'] .friend, [dir='rtl'] .pass-cta, [dir='rtl'] .me-chip, [dir='rtl'] .tc-main, [dir='rtl'] .pp, [dir='rtl'] .trade .tc, [dir='rtl'] .fair, [dir='rtl'] .txm-rows, [dir='rtl'] .cf-learn { text-align: right; }
[dir='rtl'] .kv b, [dir='rtl'] .txm-rows b { text-align: left; }
[dir='rtl'] .iso { right: auto; left: -18px; }
[dir='rtl'] .hero-txt { margin-left: auto; margin-right: 0; }
[dir='rtl'] .of-badge { right: auto; left: 0; border-radius: 0 0 12px 0; }
[dir='rtl'] .si-tag { right: auto; left: -4px; }
[dir='rtl'] .hud-prog { left: 0; right: 44px; }
[dir='rtl'] .tcard { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), inset -3px 0 0 var(--c, #35e0ff); }
[dir='rtl'] .tk-track { animation-name: marqueeR; }
@keyframes marqueeR { to { transform: translateX(50%); } }
[dir='rtl'] .bdot { right: auto; left: calc(50% - 16px); }
[dir='rtl'] .rg { direction: ltr; }
[dir='rtl'] .dice-ov, [dir='rtl'] .auc-stage, [dir='rtl'] .wheel-wrap { direction: ltr; }
@media (min-width: 700px) {
  .tcard { left: 50%; right: auto; width: 520px; margin-left: -260px; }
  [dir='rtl'] .iso { left: 20px; right: auto; transform-origin: top left; }
}

/* compact HUD for phones (≤ 430px) */
@media (max-width: 430px) {
  .hud-top { gap: 5px; left: 8px; right: 8px; }
  .hud-chip { height: 32px; padding: 0 8px; font-size: 12px; gap: 4px; }
  .hud-btn { width: 34px; height: 34px; }
  .hud-prog { left: 40px; }
  .players { left: 8px; right: 8px; gap: 5px; top: calc(var(--safe-t) + 50px); }
  .pp { padding: 4px 5px; gap: 5px; }
  .pp-av { width: 26px; height: 26px; font-size: 14px; }
  .pp-cash { font-size: 11.5px; }
  .pp-name { font-size: 9.5px; }
  .pp-nw { font-size: 8.5px; }
  .tcard { left: 8px; right: 8px; top: calc(var(--safe-t) + 100px); }
}

/* =====================================================================
   v1.2 — generated art (img/*, falls back to emoji when missing)
   ===================================================================== */
.pic { display: inline-block; object-fit: contain; vertical-align: middle; user-select: none; -webkit-user-drag: none; }
.pic.ico { width: 1.4em; height: 1.4em; vertical-align: -0.35em; filter: drop-shadow(0 0 5px rgba(53, 224, 255, 0.35)); }
.pic.avimg { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; transform: scale(1.18); }
.pic.avimg.xs { width: 1.45em; height: 1.45em; vertical-align: -0.42em; transform: none; background: rgba(255, 255, 255, 0.06); }
.av, .pp-av, .tcard-av, .rl-av, .pl-av, .lb-av, .pd-av, .mm-av, .av-grid button { overflow: hidden; }
.opp span .pic.avimg { width: 34px; height: 34px; }
.av-grid button .pic.avimg { transform: scale(1.05); }
.roll-wait .pic.avimg { width: 56px; height: 56px; border-radius: 50%; }
.mm-av .pic.avimg { width: 100%; height: 100%; }
.mc-ic .pic { width: 52px; height: 52px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5)); }
.mode-card .mc-ic { line-height: 0; }
.hero-art { position: absolute; top: -18px; inset-inline-end: -34px; width: 230px; pointer-events: none; animation: floaty 5s ease-in-out infinite; }
.hero-art .pic { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(61, 123, 255, 0.35)); }
.nft-icon .pic { width: 100%; height: 100%; transform: scale(1.3); }
.nft-icon:has(.pic) { background: radial-gradient(circle, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.2)); overflow: visible; }
.cf-icon .pic { width: 118px; height: 118px; }
.card-back.has-art { background-size: 110% auto; background-position: center; background-repeat: no-repeat; border: 0; }
.row-ic { width: 24px; height: 24px; vertical-align: -7px; }
.pr-name .row-ic { margin-inline-end: 2px; }
.ach span .pic { width: 46px; height: 46px; }
.ach:not(.on) span .pic { filter: grayscale(1); }
.ls-ic:has(.pic) { background: none; }
.ls-img, .lc-img, .acad-img { width: 44px; height: 44px; }
.lf-img { width: 120px; height: 120px; }
.sc-img { width: 46px; height: 46px; }
.of-img { width: 70px; height: 70px; }
.si-img { width: 58px; height: 58px; }
.sk-img { width: 70px; height: 70px; }
.pc-img, .pm-img { width: 48px; height: 48px; }
.ah-img { width: 70px; height: 70px; }
.we-img { width: 110px; height: 110px; }
.ref-img { width: 96px; height: 96px; }
.gift-img { width: 130px; height: 130px; }
.rf-img { width: 100px; height: 100px; }
.medal-img { width: 110px; height: 110px; }
.jail-img { width: 100px; height: 100px; }
.bn-img { width: 72px; height: 72px; }
.ico-l { width: 38px; height: 38px; }
.hc-ic { display: inline-flex; }
.hud-chip .pic.ico { width: 1.5em; height: 1.5em; }
.planet-img { display: inline-block; width: 56px; height: 56px; flex: none; }
.planet-img .pic { width: 100%; height: 100%; transform: scale(1.25); filter: drop-shadow(0 0 16px rgba(61, 123, 255, 0.35)); }
.planet-img.big { width: 92px; height: 92px; }
.planet-img.mc-planet { width: 40px; height: 40px; }
.pc-hex .pic, .hex-img { width: 40px; height: 40px; }
.pr-hex .pic, .row-img { width: 34px; height: 34px; }
.ob-art.ob-img { display: grid; place-items: center; }
.ob-art.ob-img .pic { width: min(340px, 82vw); height: auto; max-height: 100%; filter: drop-shadow(0 20px 40px rgba(61, 123, 255, 0.35)); animation: floaty 4s ease-in-out infinite; }
.as-ic .pic { width: 30px; height: 30px; vertical-align: middle; }
.cur-chip .pic.ico { width: 1.5em; height: 1.5em; }
[dir='rtl'] .hero-art { transform: scaleX(-1); }
.fab-in .fab-img { width: 44px; height: 44px; transform: rotate(-45deg); filter: drop-shadow(0 4px 8px rgba(0, 0, 20, 0.45)); }
.roll-inner .roll-img { width: 46px; height: 46px; margin-bottom: -4px; filter: drop-shadow(0 4px 8px rgba(0, 0, 30, 0.5)); }
.roll[data-state='roll'] .roll-inner .roll-img { animation: diceShake 1.8s ease-in-out infinite; }
.mini .pic.ico { width: 1.5em; height: 1.5em; margin-inline-end: 2px; }
.nr span .pic.ico { width: 1.6em; height: 1.6em; }
.stats4 b .pic.ico { width: 1.3em; height: 1.3em; }
.ht-row .pic.ico { width: 1.8em; height: 1.8em; }

/* =====================================================================
   Production: live server data, TON rooms, wallet flows
   ===================================================================== */
.resume { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 12px; text-align: left; border-radius: var(--r); border: 1px solid rgba(61, 255, 168, 0.35); background: linear-gradient(120deg, rgba(61, 255, 168, 0.14), rgba(12, 16, 44, 0.7)); }
.resume > div { flex: 1; display: flex; flex-direction: column; }
.resume b { font-family: var(--f-display); font-size: 13.5px; }
.spinner.sm { width: 20px; height: 20px; border-width: 2px; }
.empty.small .spinner { margin: 6px auto; width: 28px; height: 28px; }
.t-red { color: var(--red) !important; }

.room-new { padding: 14px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.room-new .opt { margin: 0; }
.room-new .seg button { min-width: 44px; }
.pot-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--stroke); }
.pot-line > div { display: flex; flex-direction: column; gap: 2px; }
.pot-line b { font-family: var(--f-display); font-size: 14px; }
.pot-line > i { color: var(--dim); }
.join-code { display: flex; gap: 8px; }
.join-code .inp { flex: 1; text-transform: uppercase; letter-spacing: 3px; text-align: center; font-weight: 700; }

.lobby { padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.lobby-code { font-family: var(--f-display); font-size: 30px; letter-spacing: 6px; padding: 8px 18px; border-radius: 16px; border: 1px dashed var(--stroke2); background: rgba(53, 224, 255, 0.06); color: var(--cyan); }
.lobby-code i { font-size: 16px; opacity: 0.7; }
.lobby-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.lobby-slots .ls { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; }
.lobby-slots .ls .lb-av { width: 54px; height: 54px; font-size: 26px; }
.lobby-slots .ls.on .lb-av { box-shadow: 0 0 0 2px var(--green), 0 0 18px rgba(61, 255, 168, 0.35); }
.lobby-slots .lb-av.empty { border: 2px dashed var(--stroke2); background: transparent; color: var(--dim); display: grid; place-items: center; animation: bxpulse 1.6s ease-in-out infinite; }
.lobby .pot-line { width: 100%; }
.fair.glass { margin-top: 12px; padding: 10px 12px; font-size: 11px; color: var(--muted); }
.fair.glass i { color: var(--green); }
.res-mini { padding: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.res-mini .rl-row { display: flex; gap: 10px; align-items: center; }
.res-mini .rl-row.me { color: var(--cyan); }
.res-mini .rl-name { flex: 1; }

.dep, .wd { display: flex; flex-direction: column; gap: 12px; }
.amt-row { display: flex; align-items: center; gap: 8px; }
.amt-row .inp { flex: 1; height: 56px; font-size: 24px; font-weight: 700; text-align: center; }
.amt-row > span { font-family: var(--f-display); color: var(--muted); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qr-box { display: grid; place-items: center; padding: 6px; }
.qr-box .qr { border-radius: 16px; box-shadow: 0 10px 40px rgba(53, 224, 255, 0.18); }
.dep .field > span { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: block; }
.dep .addr-box { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 8px; word-break: break-all; }
.dep .addr-box.memo { font-size: 18px; font-weight: 700; color: var(--gold); letter-spacing: 1px; }
.wd-to { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--stroke); }
.wd-pending { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 12px; }
.wd-pending > i { font-size: 22px; color: var(--gold); }
.wd-pending > div { flex: 1; display: flex; flex-direction: column; }

/* in-match decision timer (server deadline) */
.m-timer { position: absolute; left: 50%; top: calc(var(--safe-t) + 112px); transform: translate(-50%, -10px); opacity: 0; pointer-events: none; z-index: 30; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-weight: 800; font-size: 13px; background: rgba(10, 13, 34, 0.85); border: 1px solid var(--stroke2); backdrop-filter: blur(10px); transition: 0.2s; }
.m-timer.show { opacity: 1; transform: translate(-50%, 0); }
.m-timer.hot { color: var(--red); border-color: rgba(255, 77, 109, 0.6); animation: bxpulse 0.6s ease-in-out infinite; }
.m-timer.auto { pointer-events: auto; color: var(--gold); border-color: rgba(255, 201, 74, 0.5); }

/* connection + fatal states */
body.offline::after { content: 'Reconnecting…'; position: fixed; top: calc(var(--safe-t) + 6px); left: 50%; transform: translateX(-50%); z-index: 200; padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #2a1600; background: var(--gold); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
@keyframes bxpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* narration: whose event is it */
.tstep { padding-inline-start: 6px; border-inline-start: 2px solid color-mix(in srgb, var(--pc) 70%, transparent); }
.tstep.me { font-weight: 700; color: #fff; background: rgba(53, 224, 255, 0.07); border-radius: 6px; }
.mtoast.info { border-color: rgba(159, 178, 255, 0.35); }
.mtoast.info i { color: #9fb2ff; }
/* feed with actors */
.log-filter { padding: 0 0 8px; }
.lg { align-items: center; border-inline-start: 3px solid transparent; padding-inline-start: 8px; border-radius: 8px; }
.lg .lg-av { width: 28px; height: 28px; flex: none; display: grid; place-items: center; }
.lg .lg-av .avimg, .lg .lg-av img { width: 28px; height: 28px; border-radius: 50%; }
.lg .lg-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lg .lg-who { font-size: 12px; }
.lg .lg-who.sys { color: var(--muted); }
.lg .lg-t { color: var(--muted); }
.lg.me { border-inline-start-color: var(--pc); background: linear-gradient(90deg, rgba(53, 224, 255, 0.10), transparent); }
.lg.me .lg-t { color: var(--text); font-weight: 700; }
.mtoast.good { color: #c9ffe6; background: rgba(8, 40, 30, 0.9); }
.mtoast.bad { color: #ffd0da; background: rgba(48, 10, 22, 0.9); }


/* ---------------------------------------------------------------- set progress: HUD badge + goal chip */
.pp-set { display: flex; align-items: center; gap: 3px; min-width: 0; font-size: 9px; font-weight: 800; color: #dfe6ff; white-space: nowrap; }
.pp-set i { width: 6px; height: 6px; border-radius: 50%; background: var(--sc); flex: none; }
.pp-set em { font-style: normal; overflow: hidden; text-overflow: ellipsis; color: var(--sc); max-width: 52px; }
.pp-set.full em { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 360px) { .pp-set { font-size: 8.5px; } .pp-set em { max-width: 40px; } }

.goal { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 186px); transform: translate(-50%, 8px); max-width: calc(100% - 24px); display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border-radius: 99px; font-size: 12px; background: rgba(10, 13, 34, 0.86); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); opacity: 0; pointer-events: none !important; transition: opacity 0.25s, transform 0.25s; white-space: nowrap; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.goal.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto !important; }
.goal-set { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--muted); }
.goal-set i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.goal-set b { color: var(--text); }
.goal-act { overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-weight: 600; }
.goal.go { border-color: var(--c); }
.goal.go .goal-act { color: #fff; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--c) 30%, rgba(10, 13, 34, 0.6)); }
.goal > .ph-caret-right { color: var(--c); }
.goal:active { transform: translate(-50%, 0) scale(0.97); }
#match.rr-on .goal, #match.rr-on .turn-status { opacity: 0; pointer-events: none !important; }

/* ---------------------------------------------------------------- dice reroll panel */
.rr-panel { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 128px); width: min(360px, calc(100% - 24px)); transform: translate(-50%, 12px); padding: 10px; border-radius: 18px; background: rgba(10, 13, 34, 0.92); border: 1px solid var(--stroke2); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none !important; transition: opacity 0.2s, transform 0.2s; overflow: hidden; }
.rr-panel.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto !important; }
.rr-dest { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: color-mix(in srgb, var(--c) 10%, rgba(255, 255, 255, 0.03)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.rr-sum { font-family: var(--f-display); font-size: 20px; font-weight: 800; min-width: 50px; text-align: center; }
.rr-sum small { font-size: 12px; color: var(--muted); margin: 0 2px; }
.rr-art { width: 38px; height: 38px; display: grid; place-items: center; font-size: 24px; flex: none; }
.rr-img { width: 38px; height: 38px; object-fit: contain; }
.rr-txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.rr-txt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-txt small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.rr-txt small.good { color: var(--green); }
.rr-txt small.bad { color: #ff8aa0; }
.rr-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.rr-acts .btn { min-height: 44px; }
.rr-acts .cost { background: rgba(255, 201, 74, 0.14); color: var(--gold); }
.rr-meta { margin-top: 6px; text-align: center; font-size: 11px; color: var(--dim); font-weight: 600; }
.rr-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.06); }
.rr-bar i { display: block; height: 100%; width: 100%; background: var(--accent); }
.roll[data-state='go'] .roll-inner { background: var(--accent); }

/* ---------------------------------------------------------------- trade offer / set deal sheet */
.deal-hd { display: flex; align-items: center; gap: 10px; padding: 4px 2px 10px; position: relative; }
.deal-av { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 26px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 18%, #0a0d22); }
.deal-av .avimg { width: 100%; height: 100%; object-fit: cover; }
.deal-hd > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.deal-hd b { font-size: 15px; }
.deal-hd small { color: var(--muted); font-size: 12px; }
.of-timer { position: absolute; left: 0; right: 0; bottom: 2px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.of-timer i { display: block; height: 100%; width: 100%; background: var(--c); transition: width 0.2s linear; }
.of-timer.hot i { background: var(--red); }
.of-cols { display: grid; grid-template-columns: 1fr; gap: 10px; }
.of-col { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 16px; border: 1px solid var(--stroke); background: rgba(255, 255, 255, 0.025); }
.of-col.get { border-color: rgba(61, 255, 168, 0.3); background: rgba(61, 255, 168, 0.04); }
.of-col.give { border-color: rgba(255, 93, 122, 0.3); background: rgba(255, 93, 122, 0.04); }
.of-h { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.of-col.get .of-h { color: var(--green); }
.of-col.give .of-h { color: #ff8aa0; }
.of-h span { margin-inline-start: auto; color: var(--muted); letter-spacing: 0; text-transform: none; font-weight: 700; }
.ot { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; text-align: start; background: rgba(10, 13, 34, 0.6); border: 1px solid var(--stroke); border-inline-start: 4px solid var(--c); }
.ot:active { transform: scale(0.98); }
.ot-art { width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-size: 26px; border-radius: 10px; background: color-mix(in srgb, var(--c) 16%, transparent); overflow: hidden; }
.ot-img { width: 44px; height: 44px; object-fit: cover; }
.ot-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.ot-txt b { font-size: 14px; }
.ot-txt small { font-size: 11.5px; color: var(--muted); }
.ot-txt em { font-style: normal; font-size: 11.5px; font-weight: 700; }
.ot-txt em.good { color: var(--green); }
.ot-txt em.bad { color: #ff8aa0; }
.ot-pin { color: var(--muted); font-size: 17px; }
.of-cash { font-family: var(--f-display); font-size: 16px; padding: 4px 8px; }
.of-cash.good { color: var(--green); }
.of-cash.bad { color: #ff8aa0; }
.of-tip { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 2px; font-size: 11.5px; color: var(--dim); }
.deal .tipline, .deal .setprog { margin-top: 10px; }
.tipline.good { background: rgba(61, 255, 168, 0.07); border-color: rgba(61, 255, 168, 0.22); }
.tipline.good i { color: var(--green); }

/* peek: the sheet tucks away so the board (and the highlighted lands) can be seen */
.peek-bar { display: none; align-items: center; justify-content: center; gap: 6px; height: 46px; font-weight: 700; font-size: 13px; color: var(--text); cursor: pointer; }
.ov.peek { pointer-events: none; }
.ov.peek .ov-bg { opacity: 0 !important; }
.ov.peek .sheet { transform: translateY(calc(100% - 58px - var(--safe-b))) !important; pointer-events: auto; }
.ov.peek .peek-bar { display: flex; }
.ov.peek .sheet-grab { display: none; }

/* =====================================================================
   Premium theme layer — calmer, flatter, faster.
   Solid surfaces with hairline borders, one accent colour, Inter for UI text (the brand face only for the
   wordmark and big moments), no neon glows, no live blur (a blurred layer over the 3D board is re-blurred
   every frame — one of the biggest sources of heat on phones) and no decorative infinite animations.
   ===================================================================== */
:root {
  --bg0: #06070c; --bg1: #0a0c14; --bg2: #10131d;
  --card: #0d1019; --card2: #0a0c14; --surface: #121521;
  --stroke: rgba(255, 255, 255, 0.07); --stroke2: rgba(255, 255, 255, 0.12);
  --text: #f3f5f9; --muted: #9298ad; --dim: #5d6479;
  --cyan: #5ac8fa; --blue: #2f8cff; --accent: #2f8cff; --accent-press: #2475d6;
  --green: #34d399; --red: #f87171; --gold: #f5c451; --orange: #fb923c;
  --grad: linear-gradient(120deg, #5ac8fa, #2f8cff); --grad-gold: linear-gradient(135deg, #f7d06b, #f0a93a);
  --r: 18px; --r-sm: 12px;
  --f-display: 'Inter', 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --f-brand: 'Unbounded', 'Vazirmatn', 'Inter', system-ui, sans-serif;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 28px rgba(0, 0, 0, 0.32);
}
*, *::before, *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body { background: var(--bg0); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 25px; line-height: 1.12; }
.grad { background: none; -webkit-text-fill-color: currentColor; color: var(--accent); }
.eyebrow { color: var(--muted); letter-spacing: 0.1em; }
.glass, .sheet, .modal { background: var(--card); border-color: var(--stroke); box-shadow: var(--shadow); }
.sheet { border-top: 1px solid var(--stroke2); }
.ov-bg { background: rgba(3, 4, 8, 0.72); }
.chip, .icon-btn, .btn-ghost, .mini, .seg, .seg-tabs { background: rgba(255, 255, 255, 0.05); border-color: var(--stroke); }
.bar > i { background: var(--accent); box-shadow: none; }
.bits-ic, .star, .tabbar button.on > i:first-child { filter: none; }
.chip .dotc, .sp-bar i.on, .bdot { box-shadow: none; }
.av { box-shadow: none; border-color: var(--stroke2); }
.tabbar { background: rgba(8, 10, 16, 0.97); border-top: 1px solid var(--stroke); }
.hero::before, .res-rays, .fab-ring, .iso-glow { display: none; }
.hero, .mode-card, .mode-card.arena, .mode-card.galaxy, .mode-card.spin, .mode-card.pass, .play-card, .offer.glass, .tge, .pass-hero, .arena-hero, .sd.big, .wal-card { background: var(--card); border: 1px solid var(--stroke); box-shadow: var(--shadow); }
.wal-card { background: linear-gradient(160deg, #11264a, #0d1019 70%); }
.mode-card:active, .play-mini:active, .tut-card:active { transform: scale(0.985); }
/* big moments keep the brand typeface */
.spl-name, .bn-title, .res-title, .lu-badge, .rr-sum { font-family: var(--f-brand); }
/* over the 3D board: opaque, flat panels instead of blurred glass */
.hud-btn, .hud-chip, .pp, .mtoast, .turn-status, .tcard, .m-timer, .goal, .rr-panel { background: rgba(11, 13, 21, 0.92); border-color: var(--stroke2); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.dock { background: rgba(10, 12, 19, 0.96); border-color: var(--stroke2); }
.pp.on { box-shadow: 0 0 0 1px var(--c); }
.hud-chip.phase { box-shadow: none; }
/* decorative motion off (it keeps the compositor busy all the time); functional motion stays */
.live-dot, .ob-dice, .ob-orbit, .a2 span, .a3 .ton-ic, .iso-plane, .iso-token, .sd.today, .tk-track, .h-free polygon, .sc-cube, .lf-ic,
.we-art .ton-ic, .of-art, .gift-box, .hero-art, .ob-art.ob-img .pic, .cb-ring, .dock-btn.alert::after, .lobby-slots .lb-av.empty { animation: none !important; }
.live-dot { box-shadow: none; }
.roll[data-state='roll'] { animation-duration: 2.6s; }

/* ---------------------------------------------------------------- tutorial coach marks */
.cm { position: fixed; inset: 0; z-index: 400; pointer-events: none; display: none; }
.cm.on { display: block; }
.cm-hole { position: absolute; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(3, 4, 8, 0.6); outline: 2px solid var(--accent); outline-offset: 2px; transition: all 0.25s ease; animation: cmPulse 1.8s ease-in-out infinite; }
@keyframes cmPulse { 50% { outline-color: rgba(47, 140, 255, 0.35); } }
.cm.free .cm-hole { display: none; }
.cm.free { background: rgba(3, 4, 8, 0.45); }
.cm-card { position: absolute; bottom: calc(var(--safe-b) + 150px); width: min(360px, calc(100vw - 24px)); pointer-events: auto; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--stroke2); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55); }
.cm-step { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.cm-title { display: block; font-size: 16px; margin-bottom: 4px; }
.cm-card p { font-size: 14px; line-height: 1.45; color: #d9deea; }
.cm-acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.cm-skip { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- onboarding helpers on home / play */
.tut-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 12px; text-align: start; border-color: rgba(47, 140, 255, 0.35) !important; }
.tut-card .tc-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: #fff; background: var(--accent); flex: none; }
.tut-card > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.unlock { display: flex; flex-direction: column; gap: 10px; padding: 14px; margin-top: 12px; }
.unlock > div { display: flex; flex-direction: column; gap: 2px; }
.new-tag { position: absolute; top: 10px; inset-inline-end: 10px; padding: 2px 8px; border-radius: 99px; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; color: #fff; background: var(--accent); }
.hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; }
.hint i { font-size: 16px; flex: none; margin-top: 1px; }
.hint.good { background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.25); color: #c9f5e2; }
.hint.good i { color: var(--green); }
.hint.warn { background: rgba(245, 196, 81, 0.08); border: 1px solid rgba(245, 196, 81, 0.28); color: #f7e3b0; }
.hint.warn i { color: var(--gold); }
.tut-done ul { list-style: none; display: grid; gap: 8px; margin: 4px 0 14px; }
.tut-done li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.tut-done li i { color: var(--green); font-size: 20px; }
.td-reward { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; margin-bottom: 10px; border-radius: 14px; background: rgba(245, 196, 81, 0.08); border: 1px solid rgba(245, 196, 81, 0.25); }
.td-reward b { font-size: 22px; } .td-reward span { color: var(--muted); font-weight: 700; }
.hero-art { z-index: 0; opacity: 0.85; }
.hero-txt { position: relative; z-index: 1; }
