:root {
    --bg: #071525;
    --bg2: #0d2138;
    --card: #102b46;
    --card2: #153b5f;
    --line: rgba(77, 163, 255, 0.20);
    --text: #f4f9ff;
    --muted: #9fb4c9;
    --gold: #38a8ff;
    --gold2: #1677d2;
    --orange: #0b5cad;
    --green: #38d39f;
    --blue: #4da3ff;
    --red: #ff5d6c;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --dock-h: 74px;
    --font: 'Outfit', system-ui, sans-serif;
    --display: 'Russo One', 'Outfit', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
    user-select: none;
}

.bg-glow {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(700px 420px at 50% 18%, rgba(30, 136, 229, 0.24), transparent 60%),
        radial-gradient(500px 300px at 80% 80%, rgba(77, 163, 255, 0.10), transparent 55%),
        linear-gradient(180deg, #091b2d 0%, #071525 45%, #050f1a 100%);
}
.bg-grid {
    position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .22;
    background-image:
        linear-gradient(rgba(77,163,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77,163,255,.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 75%);
}

.topbar, #app, .dock, .toast, .boot { position: relative; z-index: 1; }

.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px 8px; gap: 12px;
}
.profile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar-ring {
    width: 44px; height: 44px; border-radius: 50%;
    padding: 2px; background: linear-gradient(135deg, var(--gold), var(--orange));
}
.avatar {
    width: 100%; height: 100%; border-radius: 50%;
    background: #173653; display: grid; place-items: center;
    font-family: var(--display); color: var(--gold); font-size: 18px;
}
.profile-meta { min-width: 0; }
.name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.lvl-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
#level-text { font-size: 11px; font-weight: 800; color: var(--gold); letter-spacing: .04em; }
.lvl-bar { width: 72px; height: 5px; background: rgba(255,255,255,.10); border-radius: 99px; overflow: hidden; }
.lvl-fill { height: 100%; width: 10%; background: linear-gradient(90deg, var(--gold), var(--green)); }

.daily-pill {
    background: rgba(255,184,0,.08); border: 1px solid var(--line);
    border-radius: 14px; padding: 8px 12px; text-align: right;
    min-width: 128px; max-width: 170px; overflow: hidden;
}
.daily-label { display: block; font-size: 10px; color: var(--muted); font-weight: 800; letter-spacing: .08em; }
.package-val {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--text); font-size: 11px; font-weight: 800; margin-top: 2px;
}
.daily-val { display: block; font-family: var(--display); color: var(--gold); font-size: 12px; margin-top: 2px; }
.language-trigger {
    width: auto; min-width: 92px; height: 38px; flex: 0 0 auto;
    padding: 0 10px; gap: 7px; border: 1px solid var(--line);
    border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text);
    font: inherit; font-size: 11px; font-weight: 800; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.language-trigger-flag { display: inline-flex; align-items: center; }
.connect-wallet-trigger {
    min-height: 40px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 14px; border: 1px solid rgba(56,168,255,.34); border-radius: 999px;
    background: linear-gradient(135deg, rgba(22,119,210,.36), rgba(11,92,173,.22));
    color: var(--text); font: inherit; font-size: 11px; font-weight: 800; white-space: nowrap; cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,.16);
}
.connect-wallet-trigger i { color: var(--gold); }
.connect-wallet-trigger span { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
.connect-wallet-trigger.is-connected { border-color: rgba(56,211,159,.38); }
.connect-wallet-trigger.is-connected i { color: var(--green); }
.connect-wallet-trigger:active { transform: scale(.97); }

#app {
    height: calc(100vh - 78px - var(--dock-h) - var(--safe-b));
    overflow-y: auto; overflow-x: hidden;
    padding: 4px 16px calc(18px + var(--safe-b));
    -webkit-overflow-scrolling: touch;
}
.screen { display: none; animation: up .28s ease; }
.screen.active { display: block; }
@keyframes up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.balance-block { text-align: center; margin-top: 6px; }
.balance-label {
    font-size: 11px; letter-spacing: .18em; font-weight: 800;
    color: var(--muted); margin-bottom: 8px;
}
.balance-row { display: flex; justify-content: center; align-items: center; gap: 10px; }
.balance-row.center { justify-content: center; }
.balance-num {
    font-family: var(--display); font-size: 42px; line-height: 1;
    background: linear-gradient(180deg, #d9f1ff, var(--gold) 45%, var(--orange));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 28px rgba(56,168,255,.28);
}
.coin-3d {
    width: 38px; height: 38px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #dff5ff, #38a8ff 45%, #07569e);
    color: #06233e; display: grid; place-items: center;
    font-family: var(--display); font-size: 18px;
    box-shadow: 0 8px 20px rgba(30,136,229,.35), inset 0 2px 4px rgba(255,255,255,.45);
}
.coin-3d.sm { width: 30px; height: 30px; font-size: 14px; }

.tap-arena { position: relative; display: grid; place-items: center; margin: 18px 0 10px; min-height: 230px; }
.tap-orb {
    position: relative; width: 210px; height: 210px; border: 0; background: transparent;
    border-radius: 50%; cursor: pointer; outline: none;
}
.orb-ring {
    position: absolute; inset: 8px; border-radius: 50%;
    border: 2px solid rgba(56,168,255,.28);
    animation: pulse 2.4s ease-out infinite;
}
.orb-ring.delay { animation-delay: 1.1s; inset: 0; }
@keyframes pulse {
    0% { transform: scale(.85); opacity: .8; }
    100% { transform: scale(1.2); opacity: 0; }
}
.orb-core {
    position: absolute; inset: 28px; border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #e8f7ff, #38a8ff 40%, #0d6fd1 78%, #8a3d00);
    box-shadow:
        0 0 0 8px rgba(255,140,0,.12),
        0 18px 50px rgba(30,136,229,.45),
        inset 0 8px 18px rgba(255,255,255,.40);
    display: grid; place-items: center;
    transition: transform .08s ease;
}
.tap-orb:active .orb-core { transform: scale(.92); }
.orb-letter {
    font-family: var(--display); font-size: 72px; color: #06233e;
    text-shadow: 0 2px 0 rgba(255,255,255,.25);
}
.tap-hint {
    position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
    font-size: 11px; font-weight: 800; letter-spacing: .14em; color: rgba(244,249,255,.88);
    background: rgba(2,15,29,.45); padding: 5px 10px; border-radius: 999px;
}
.float-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.float-plus {
    position: absolute; left: 50%; top: 40%;
    font-family: var(--display); color: var(--gold); font-size: 22px;
    animation: floatUp .8s ease forwards; text-shadow: 0 0 12px rgba(56,168,255,.8);
}
@keyframes floatUp {
    from { opacity: 1; transform: translate(-50%, 0) scale(1); }
    to { opacity: 0; transform: translate(-50%, -70px) scale(1.2); }
}

.energy-wrap { margin: 8px 0 18px; }
.energy-top {
    display: flex; justify-content: space-between; font-size: 12px;
    font-weight: 700; color: var(--muted); margin-bottom: 6px;
}
.energy-track {
    height: 12px; border-radius: 99px; background: rgba(255,255,255,.07);
    border: 1px solid rgba(56,168,255,.18); overflow: hidden;
}
.energy-fill {
    height: 100%; width: 100%;
    background: linear-gradient(90deg, #1677d2, #73c7ff, #38d39f);
    box-shadow: 0 0 16px rgba(56,168,255,.45);
    transition: width .25s ease;
}

.section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin: 8px 0 10px;
}
.section-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.section-head.mt { margin-top: 22px; }
.mini-btn {
    border: 1px solid var(--line); background: rgba(255,184,0,.08);
    color: var(--gold); border-radius: 999px; padding: 6px 12px;
    font-weight: 800; font-size: 12px;
}

.miners, .list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }

.miner-card, .item-card {
    background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--line); border-radius: 18px;
    padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.miner-left, .item-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.miner-ico, .item-ico {
     border-radius: 14px;
    //background: radial-gradient(circle at 30% 30%, #ffe08a, #1677d2);
    display: grid; place-items: center; color: #06233e;
    font-family: var(--display); font-size: 18px; flex-shrink: 0;
	margin:2px;
}
.miner-info h4, .item-info h4 { margin: 0 0 4px; font-size: 14px; }
.miner-info p, .item-info p { margin: 0; color: var(--muted); font-size: 12px; }
.miner-right { text-align: right; }
.miner-level {
    font-family: color: white; font-size: 18px; margin-bottom: 2px;
}
.miner-cost { color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.btn-up {
    border: 0; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 12px;
    //background: linear-gradient(135deg, var(--gold), var(--orange)); color: #06233e;
}
.btn-up:disabled { opacity: .45; }
.det {font-size:12px; color:white; font-family:verdana;}

.//title { margin: 8px 0 4px; font-family: var(--display); font-size: 28px; letter-spacing: .02em; }
.subtitle { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.subtitle b { color: var(--gold); }

.invite-hero {
    width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
    background: linear-gradient(135deg, rgba(255,184,0,.16), rgba(11,92,173,.10));
    border: 1px solid var(--line); border-radius: 18px; padding: 16px; color: inherit; margin-bottom: 12px;
}
.invite-ico { font-size: 28px; }
.invite-title { font-weight: 800; }
.invite-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.invite-arrow { margin-left: auto; font-size: 28px; color: var(--gold); }

.btn-primary {
    border: 0; border-radius: 16px; padding: 14px 16px; font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #06233e; box-shadow: 0 10px 28px rgba(30,136,229,.28);
}
.w-full { width: 100%; }

.task-go {
    width: 42px; height: 42px; border-radius: 50%; border: 0;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #06233e; font-weight: 900; flex-shrink: 0;
}
.task-go.done { background: rgba(255,255,255,.1); color: var(--green); }
.task-go.processing {
    width: auto; min-width: 88px; max-width: 45%; padding: 6px 10px;
    border-radius: 14px; font-size: 10px; line-height: 1.3;
    background: rgba(77,163,255,.15); color: var(--gold);
    border: 1px solid rgba(77,163,255,.3); cursor: wait;
}
.task-go.daily {
    width: auto;
    min-width: 72px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 10px;
    white-space: nowrap;
}
.task-go.daily.processing { white-space: normal; }

.wallet-hero {
    background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--line); border-radius: 22px; padding: 22px; text-align: center; margin-bottom: 14px;
}
.wallet-min { margin-top: 10px; color: var(--muted); font-size: 13px; }
.wallet-min b { color: var(--gold); }

.form-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
    padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.form-card label { font-size: 12px; color: var(--muted); font-weight: 700; }
.form-card input {
    width: 100%; border: 1px solid rgba(255,255,255,.10); background: #091b2d;
    color: #fff; border-radius: 12px; padding: 12px; outline: none; font: inherit;
}
.form-card input:focus { border-color: rgba(56,168,255,.45); }

.rank-card {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, rgba(56,168,255,.16), rgba(11,92,173,.10));
    border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px;
}
.rank-big { font-family: var(--display); font-size: 20px; color: var(--gold); }
.rank-score { text-align: right; font-weight: 800; font-size: 20px; }
.muted { color: var(--muted); font-size: 18px; }
.bonus-summary-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px;
}
.bonus-stat {
    min-width: 0; padding: 13px; border-radius: 16px;
    background: linear-gradient(145deg, rgba(56,168,255,.16), rgba(10,52,88,.32));
    border: 1px solid var(--line);
}
.bonus-stat span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.bonus-stat strong { display: block; margin-top: 5px; color: var(--gold); font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.bonus-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(6,28,47,.62); }
.bonus-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bonus-table th, .bonus-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: center; font-size: 12px; }
.bonus-table th { color: var(--muted); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; background: rgba(0,0,0,.18); }
.bonus-table tbody tr:last-child td { border-bottom: 0; }
.bonus-table tbody tr.active { background: linear-gradient(90deg, rgba(56,168,255,.24), rgba(44,211,184,.10)); box-shadow: inset 3px 0 var(--gold); }
.bonus-table tbody tr.active td { color: #fff; font-weight: 800; }
.bonus-level { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 800; }
.bonus-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--level-color); box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 10px var(--level-color); }
.hidden { display: none !important; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }

.status-pill {
    display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase;
    padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.10);
}
.status-pending { color: var(--gold); }
.status-approved { color: var(--green); }
.status-rejected { color: var(--red); }

.dock {
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b));
    height: var(--dock-h); z-index: 20;
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
    padding: 8px; border-radius: 22px;
    background: rgba(18, 14, 10, 0.92);
    border: 1px solid var(--line);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.dock-item {
    border: 0; background: transparent; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 10px; font-weight: 800; border-radius: 16px;
}
.dock-ico { font-size: 18px; line-height: 1; }
.dock-task-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.dock-alert {
    position: absolute; top: -12px; right: -12px; display: none;
    color: #ffd43b; font-size: 21px; font-weight: 900; line-height: 1;
    filter: drop-shadow(0 0 3px rgba(255, 190, 42, .75));
}
.dock-alert.show { display: block; animation: taskAlertPulse 1.35s ease-in-out infinite; }
.dock-item.task-attention { color: var(--gold); }
.dock-item.task-attention .dock-ico { animation: taskIconPulse 1.35s ease-in-out infinite; }
.dock-item.active {
    color: #06233e;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    box-shadow: 0 8px 20px rgba(30,136,229,.28);
}
@keyframes taskIconPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    45% { transform: translateY(-3px) scale(1.14); }
    70% { transform: translateY(0) scale(1); }
}
@keyframes taskAlertPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(255, 190, 42, .75)); }
    50% { transform: scale(1.2) rotate(12deg); filter: drop-shadow(0 0 8px rgba(255, 212, 59, 1)); }
}
@media (prefers-reduced-motion: reduce) {
    .dock-item.task-attention .dock-ico,
.dock-alert.show { animation: none; }
}

.profile-card {
    margin: 14px 0; padding: 4px 16px; border: 1px solid var(--line); border-radius: 18px;
    background: linear-gradient(145deg, rgba(21,59,95,.88), rgba(16,43,70,.9));
    box-shadow: 0 12px 30px rgba(0,0,0,.16);
}
.profile-setting-row {
    min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.profile-setting-row:last-child { border-bottom: 0; }
.profile-setting-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.profile-setting-label > i { width: 18px; color: var(--gold); text-align: center; }
#profile-user-id { max-width: 58%; overflow-wrap: anywhere; color: var(--text); font-size: 13px; text-align: right; }
.profile-language-trigger { min-width: 0; }
.sound-toggle {
    display: inline-flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line);
    border-radius: 999px; background: rgba(4,18,31,.48); color: var(--green); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
}
.sound-toggle.is-off { color: var(--muted); }
.sound-switch { width: 30px; height: 17px; padding: 2px; border-radius: 99px; background: var(--green); transition: background .2s ease; }
.sound-switch > span { display: block; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.sound-toggle.is-off .sound-switch { background: rgba(159,180,201,.35); }
.sound-toggle.is-off .sound-switch > span { transform: translateX(13px); }
.profile-links-card { padding: 14px 16px 4px; }
.profile-links-card h3 { margin: 0 0 4px; color: var(--text); font-size: 14px; }
.profile-link, .profile-wallet-link {
    min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 0; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--text); text-decoration: none;
    font: inherit; font-size: 13px; font-weight: 700;
}
.profile-link:last-child { border-bottom: 0; }
.profile-link > span, .profile-wallet-link > span { display: inline-flex; align-items: center; gap: 11px; }
.profile-link > span > i, .profile-wallet-link > span > i { width: 18px; color: var(--gold); text-align: center; font-size: 16px; }
.profile-link > i, .profile-wallet-link > i { color: var(--muted); font-size: 11px; }
.profile-wallet-link {
    width: 100%; margin: 14px 0 20px; padding: 0 16px; border: 1px solid var(--line); border-radius: 16px;
    background: rgba(16,43,70,.88); cursor: pointer;
}
.profile-wallet-link:active { transform: scale(.99); }

.toast {
    position: fixed; left: 50%; top: -80px; transform: translateX(-50%);
    z-index: 50; background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #06233e; font-weight: 800; padding: 12px 18px; border-radius: 999px;
    transition: top .28s ease, opacity .28s ease; max-width: calc(100% - 24px);
    text-align: center; font-size: 13px; opacity: 0; pointer-events: none;
}
.toast.show {
    top: calc(78px + env(safe-area-inset-top, 0px));
    opacity: 1;
}

.ad-modal {
    position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
    padding: 24px; background: rgba(2, 10, 18, .78); backdrop-filter: blur(8px);
}
.ad-card {
    width: min(340px, 100%); padding: 22px; text-align: center;
    background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--line); border-radius: 22px;
    box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.ad-card h3 { margin: 10px 0 6px; font-size: 20px; }
.ad-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.ad-badge {
    display: inline-block; padding: 5px 9px; border-radius: 999px;
    color: var(--gold); background: rgba(56,168,255,.12);
    font-size: 10px; font-weight: 900; letter-spacing: .12em;
}
.ad-cancel {
    margin-top: 12px; border: 0; background: transparent; color: var(--muted);
    font: inherit; font-size: 12px; font-weight: 700;
}

.language-modal {
    position: fixed; inset: 0; z-index: 110; display: grid; place-items: center;
    padding: 18px; background: rgba(2, 10, 18, .86); backdrop-filter: blur(10px);
}
.language-card {
    width: min(420px, 100%); max-height: min(680px, calc(100vh - 36px)); overflow-y: auto;
    padding: 22px; background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 60px rgba(0,0,0,.5);
}
.language-card h2 { margin: 8px 0 6px; font-size: 22px; }
.language-card p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.language-badge { font-size: 32px; }
.language-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.language-option {
    display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px;
    border: 1px solid rgba(77,163,255,.16); border-radius: 12px; background: rgba(0,0,0,.14);
    color: var(--text); font: inherit; font-size: 12px; text-align: left; cursor: pointer;
}
.language-option.selected { border-color: var(--gold); background: rgba(56,168,255,.16); }
.language-flag {
    width: 24px; height: 17px; display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 24px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.12);
    font-size: 9px; font-weight: 900; letter-spacing: .02em;
}
.language-flag img { display: block; width: 24px; height: 17px; object-fit: cover; border-radius: 3px; }
.language-flag img + span { display: none; }
.language-flag > span { color: var(--text); }
.language-option > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-check { margin-left: auto; color: var(--green); font-weight: 900; }
[dir="rtl"] .language-option { text-align: right; }
[dir="rtl"] .language-check { margin-left: 0; margin-right: auto; }

.tutorial-fab {
    position: fixed; left: 18px; bottom: calc(var(--dock-h) + 26px + var(--safe-b)); z-index: 25;
    width: 54px; height: 54px; display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.46); border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, #f7fbff, #2b425b 47%, #050b12 100%);
    color: #fff; font-family: var(--display); font-size: 30px; line-height: 1;
    cursor: pointer; box-shadow: 0 0 0 0 rgba(56,168,255,.55), 0 10px 28px rgba(0,0,0,.45);
    animation: tutorialPulse 2.2s ease-out infinite;
}
.tutorial-fab::after {
    content: ''; position: absolute; inset: -7px; border: 1px solid rgba(56,168,255,.3);
    border-radius: 50%; pointer-events: none; animation: tutorialRing 2.2s ease-out infinite;
}
.tutorial-fab:focus-visible { outline: 3px solid rgba(255,213,72,.9); outline-offset: 3px; }
@keyframes tutorialPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.04); }
}
@keyframes tutorialRing {
    0% { transform: scale(.8); opacity: .75; }
    100% { transform: scale(1.25); opacity: 0; }
}

.tutorial-modal {
    position: fixed; inset: 0; z-index: 120; display: grid; place-items: center;
    padding: 18px; background: rgba(2,10,18,.86); backdrop-filter: blur(10px);
}
.tutorial-card {
    width: min(620px, 100%); max-height: calc(100vh - 24px); overflow-y: auto;
    padding: 20px; background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 22px 70px rgba(0,0,0,.55);
    -webkit-overflow-scrolling: touch;
}
.tutorial-head {
    position: sticky; top: -20px; z-index: 2; display: flex; align-items: flex-start;
    justify-content: space-between; gap: 12px; margin: -20px -20px 16px; padding: 20px 20px 14px;
    background: linear-gradient(180deg, var(--card2) 78%, rgba(15,25,38,0));
}
.tutorial-kicker { color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.35; }
.tutorial-head h2 { margin: 4px 0 0; color: var(--text); font-size: 22px; line-height: 1.15; }
.tutorial-close {
    flex: 0 0 auto; border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
    padding: 8px 11px; background: rgba(255,255,255,.07); color: var(--muted);
    font: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
}
.tutorial-list { display: grid; gap: 14px; }
.tutorial-step {
    position: relative; overflow: hidden; padding: 12px; border-radius: 18px;
    background: linear-gradient(145deg, rgba(56,168,255,.16), rgba(5,27,47,.7));
    border: 1px solid rgba(77,163,255,.22); box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.tutorial-step-number {
    position: absolute; top: 10px; left: 10px; z-index: 1; width: 28px; height: 28px;
    display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: #06233e;
    font-size: 13px; font-weight: 900; box-shadow: 0 4px 12px rgba(0,0,0,.28);
}
.tutorial-step-image-wrap {
    display: flex; justify-content: center; overflow: hidden; border-radius: 13px;
    background: #061624; border: 1px solid rgba(255,255,255,.08);
}
.tutorial-step-image {
    display: block; width: auto; max-width: 100%; height: auto; max-height: 440px;
    object-fit: contain; image-rendering: auto;
}
.tutorial-step-copy { padding: 12px 2px 2px; }
.tutorial-step-copy h3 { margin: 0 0 6px; color: var(--text); font-size: 17px; line-height: 1.2; }
.tutorial-step-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
[dir="rtl"] .tutorial-head { direction: rtl; }
[dir="rtl"] .tutorial-step { direction: rtl; }
[dir="rtl"] .tutorial-step-number { left: auto; right: 10px; }
[dir="rtl"] .tutorial-step-copy { text-align: right; }

@media (max-width: 420px) {
    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "profile wallet-connect"
            "daily daily";
        align-items: center;
        gap: 10px;
        padding: 12px 14px 10px;
    }
    .profile { grid-area: profile; min-width: 0; }
    .profile-meta { flex: 1 1 auto; }
    .name { max-width: none; }
    #level-text { white-space: nowrap; }
    .daily-pill {
        grid-area: daily;
        width: 100%; min-width: 0; max-width: none;
        padding: 8px 14px; text-align: center;
    }
    .daily-label { line-height: 1.15; }
    .daily-val { font-size: 13px; }
    .connect-wallet-trigger { grid-area: wallet-connect; padding: 0 11px; font-size: 10px; }
    #app {
        height: calc(100vh - 138px - var(--dock-h) - var(--safe-b));
    }
    .balance-block { margin-top: 14px; }
    .tutorial-fab { left: 14px; bottom: calc(var(--dock-h) + 22px + var(--safe-b)); width: 50px; height: 50px; font-size: 27px; }
    .tutorial-modal { padding: 10px; }
    .tutorial-card { max-height: calc(100vh - 20px); padding: 14px; border-radius: 20px; }
    .tutorial-head { top: -14px; margin: -14px -14px 14px; padding: 14px 14px 12px; }
    .tutorial-head h2 { font-size: 19px; }
    .tutorial-step-image { max-height: 360px; }
}

.boot {
    position: fixed; inset: 0; z-index: 100;
    background: radial-gradient(circle at 50% 35%, #103b61, #071525 65%);
    display: grid; place-items: center; align-content: center; gap: 10px;
    transition: opacity .35s ease, visibility .35s ease;
}
.boot.hide { opacity: 0; visibility: hidden; pointer-events: none; }
//.boot-coin {
    width: 88px; height: 88px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e8f7ff, #38a8ff 45%, #0d6fd1);
    display: grid; place-items: center; font-family: var(--display); font-size: 42px; color: #06233e;
    box-shadow: 0 0 40px rgba(255,140,0,.45); animation: spinPulse 1.4s ease-in-out infinite;
}
@keyframes spinPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.boot-text {  letter-spacing: .12em; font-size: 18px; color: var(--gold); }
.boot-sub { color: var(--muted); font-size: 13px; }
.boot-retry {
    margin-top: 8px; padding: 10px 18px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), var(--orange)); color: #06233e;
    font: inherit; font-size: 12px; font-weight: 900; cursor: pointer;
}
.boot-retry:focus-visible { outline: 3px solid rgba(255,255,255,.8); outline-offset: 3px; }

@media (max-height: 700px) {
    .tap-orb { width: 180px; height: 180px; }
    .orb-letter { font-size: 58px; }
    .tap-arena { min-height: 190px; }
    .balance-num { font-size: 34px; }
}
