/* /assets/css/game.css — «Сөз Батл». Игровой интерфейс всегда светлый, как мобильная игра. */
:root {
    color-scheme: light;
    --sb-blue: #2e7cf6;
    --sb-blue-d: #1859c9;
    --sb-blue-l: #e3eefb;
    --sb-ink: #1d2433;
    --sb-muted: #6b7a90;
    --sb-line: #c4d2e4;
    --sb-cell: #ffffff;
    --sb-clue: #e2edfa;
    --sb-blank: #f1f5fa;
    --sb-tile: #fbe6c4;
    --sb-tile-edge: #e2bf86;
    --sb-me: #2e7cf6;
    --sb-bot: #e8590c;
    --sb-gold: #ffc83d;
    --sb-gold-d: #e9a400;
    --sb-green: #cdf3c4;
    --sb-red: #ff5a5a;
    --sb-card: #ffffff;
    --sb-radius: 18px;
    --sb-shadow: 0 6px 20px rgba(23, 63, 122, .14);
    --sb-cell-size: 42px;
    --sb-safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
.sb-body {
    background: #cfeef7;
    color: var(--sb-ink);
    font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.sb-app {
    position: relative;
    max-width: 520px;
    height: 100dvh;
    margin: 0 auto;
    overflow: hidden;
    background: linear-gradient(180deg, var(--sb-sky1, #e9f8fc) 0%, var(--sb-sky2, #a6dcee) 100%);
    transition: background .6s ease;
    display: flex;
    flex-direction: column;
}
@media (min-width: 560px) {
    .sb-body { background: radial-gradient(circle at 50% 20%, #e6f6fb, #9fd3ea); }
    .sb-app { box-shadow: 0 0 60px rgba(17, 60, 110, .25); }
}

.sb-sky { position: absolute; inset: auto 0 0 0; height: 46%; pointer-events: none; }
.sb-mountains { width: 100%; height: 100%; display: block; }

/* ---------- Верхняя панель ---------- */
.sb-top {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 6px;
}
.sb-icon-btn {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border: 0; border-radius: 50%;
    background: #fff;
    box-shadow: var(--sb-shadow);
    color: var(--sb-blue);
    text-decoration: none;
}
.sb-icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sb-coins {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 6px 5px 6px;
    border: 0; border-radius: 999px;
    background: #fff;
    box-shadow: var(--sb-shadow);
    font-family: "Geologica", sans-serif;
    font-size: 19px;
}
.sb-coins b { min-width: 44px; text-align: center; font-weight: 800; }
.sb-coins.is-bump { animation: sb-bump .5s ease; }
.sb-coin {
    width: 26px; height: 26px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff3b0, var(--sb-gold) 45%, var(--sb-gold-d));
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), 0 0 0 2px #ffe08a;
    position: relative;
}
.sb-coin::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 14px; text-shadow: 0 1px 0 #c98a00; }
.sb-coins-plus {
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--sb-blue); color: #fff; font-weight: 800; font-size: 20px;
}

/* ---------- Экраны ---------- */
.sb-screen {
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 14px;
    animation: sb-screen-in .28s ease;
}
.sb-with-tabs { padding-bottom: calc(76px + var(--sb-safe-b)); }
.sb-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
@keyframes sb-screen-in { from { opacity: 0; transform: translateY(8px); } }

.sb-h2 { font-family: "Geologica", sans-serif; font-size: 26px; margin: 8px 0 12px; }
.sb-h3 { font-family: "Geologica", sans-serif; font-size: 18px; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.sb-card { background: var(--sb-card); border-radius: var(--sb-radius); box-shadow: var(--sb-shadow); padding: 16px; }
.sb-muted { color: var(--sb-muted); font-size: 13px; text-align: center; margin: 10px 0 0; }
.sb-soon { font-size: 11px; font-family: "Onest", sans-serif; text-transform: uppercase; letter-spacing: .06em; background: #ffe7a3; color: #8a5a00; padding: 3px 8px; border-radius: 999px; }

/* ---------- Кнопки ---------- */
.sb-btn {
    border: 0; border-radius: 999px;
    padding: 12px 22px;
    font-family: "Geologica", sans-serif; font-weight: 800; font-size: 17px;
    transition: transform .12s ease, box-shadow .12s ease, opacity .2s;
}
.sb-btn:active { transform: translateY(2px) scale(.98); }
.sb-btn-primary {
    color: #fff;
    background: linear-gradient(180deg, #4b93ff, var(--sb-blue) 55%, var(--sb-blue-d));
    box-shadow: 0 5px 0 #0f45a4, 0 10px 22px rgba(30, 90, 200, .35);
}
.sb-btn-primary:active { box-shadow: 0 2px 0 #0f45a4, 0 6px 14px rgba(30, 90, 200, .3); }
.sb-btn-primary:disabled { background: #b9c8dc; box-shadow: 0 5px 0 #98a8bd; cursor: default; }
.sb-btn-white { color: var(--sb-blue); background: #fff; box-shadow: 0 5px 0 #c3d6f2, var(--sb-shadow); }
.sb-btn-gold { color: #5a3a00; background: linear-gradient(180deg, #ffe27a, var(--sb-gold) 60%, var(--sb-gold-d)); box-shadow: 0 5px 0 #b97f00, var(--sb-shadow); }
.sb-btn-ghost { background: transparent; color: #fff; font-size: 18px; }
.sb-btn-big { width: 100%; padding: 16px; font-size: 19px; }

/* ---------- Приветствие ---------- */
.sb-welcome { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 40px; overflow-y: auto; }
.sb-logo { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin-bottom: 6px; }
.sb-logo span {
    width: 60px; height: 60px; display: grid; place-items: center;
    font-family: "Geologica", sans-serif; font-weight: 900; font-size: 34px;
    background: var(--sb-tile); border-radius: 12px;
    box-shadow: inset 0 -5px 0 var(--sb-tile-edge), 0 6px 14px rgba(140, 90, 20, .25);
    animation: sb-tile-drop .6s cubic-bezier(.3,1.6,.5,1) backwards;
}
.sb-logo span:nth-child(2) { animation-delay: .1s; transform: translateY(-6px); }
.sb-logo span:nth-child(3) { animation-delay: .2s; }
.sb-logo em {
    font-style: normal; font-family: "Geologica", sans-serif; font-weight: 900; font-size: 22px;
    color: #fff; background: var(--sb-bot); border-radius: 10px; padding: 4px 10px; margin-left: 4px;
    transform: rotate(-6deg); box-shadow: 0 5px 12px rgba(232, 89, 12, .35);
    animation: sb-pop .5s .35s cubic-bezier(.3,1.6,.5,1) backwards;
}
.sb-welcome-title { text-align: center; font-family: "Geologica", sans-serif; font-size: 28px; margin: 16px 0 4px; }
.sb-welcome-sub { text-align: center; color: var(--sb-muted); margin: 0 0 18px; }
.sb-welcome-form { display: flex; flex-direction: column; gap: 8px; }
.sb-welcome-form { gap: 12px; }
.sb-welcome-note { margin: 0; text-align: center; color: var(--sb-muted); line-height: 1.45; }
.sb-welcome-form a.sb-btn { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; box-sizing: border-box; }
.sb-btn-google svg { width: 24px; height: 24px; flex: none; }
.sb-welcome-form .sb-muted { margin: 0; text-align: center; font-size: 13px; }
.sb-label { font-weight: 700; font-size: 14px; }
.sb-input {
    width: 100%; padding: 14px 16px; border-radius: 14px;
    border: 2px solid var(--sb-line); font: 600 18px "Onest", sans-serif; color: var(--sb-ink);
    background: #f7faff; outline: none;
}
.sb-input:focus { border-color: var(--sb-blue); background: #fff; }
.sb-error { color: #d42f2f; font-size: 13px; min-height: 16px; margin: 0; }
.sb-avatar-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 10px; }
.sb-avatar-pick button {
    aspect-ratio: 1; border: 2px solid transparent; border-radius: 14px; background: #f1f6fd; font-size: 26px;
    transition: transform .15s;
}
.sb-avatar-pick button.is-on { border-color: var(--sb-blue); background: #fff; transform: scale(1.08); box-shadow: var(--sb-shadow); }

/* ---------- Главная ---------- */
.sb-events {
    display: flex; gap: 10px; overflow-x: auto; margin: 4px -14px 0; padding: 4px 14px 10px;
    scroll-snap-type: x mandatory; scroll-padding-inline: 14px; scrollbar-width: none;
}
.sb-events::-webkit-scrollbar { display: none; }
.sb-events { cursor: grab; }
.sb-events.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.sb-events.is-dragging .sb-event { pointer-events: none; }
.sb-event {
    flex: 0 0 72%; scroll-snap-align: start;
    min-height: 104px; border: 0; border-radius: var(--sb-radius); padding: 14px; text-align: left; color: #fff;
    display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
    box-shadow: var(--sb-shadow);
}
.sb-event small { opacity: .8; font-size: 13px; font-weight: 600; }
.sb-event b { font-family: "Geologica", sans-serif; font-size: 20px; line-height: 1.15; }
.sb-event i { position: absolute; right: 12px; bottom: 8px; font-size: 44px; font-style: normal; filter: drop-shadow(0 4px 6px rgba(0,0,0,.2)); }
.sb-event-gift { background: linear-gradient(135deg, #4aa8ff, #2470e6); }
.sb-event-gift.is-ready i { animation: sb-wiggle 1.4s ease-in-out infinite; }
.sb-event-streak { background: linear-gradient(135deg, #f4793b, #c8410d); }
.sb-event-boss { background: linear-gradient(135deg, #8f5cf6, #5b2bc4); }
.sb-event-bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.3); overflow: hidden; margin-top: 8px; width: 70%; }
.sb-event-bar span { display: block; height: 100%; background: #fff; border-radius: inherit; }
.sb-pill-time { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.18); padding: 3px 8px; border-radius: 999px; }

.sb-path { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column-reverse; align-items: center; justify-content: flex-start; gap: 14px; padding: 6px 0 14px; position: relative; }
.sb-path::before { content: ""; position: absolute; top: 0; bottom: 30px; left: 50%; width: 12px; margin-left: -6px; background: linear-gradient(#ffffff00, #ffffffb0 30%); border-radius: 99px; }
.sb-hex {
    position: relative; width: 76px; height: 84px; display: grid; place-items: center;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: #fff; font-family: "Geologica", sans-serif; font-weight: 800; font-size: 26px; color: #4a5568;
    filter: drop-shadow(0 4px 0 #c9d8ea);
    flex: 0 0 auto;
}
.sb-hex-wrap { position: relative; display: grid; place-items: center; }
.sb-hex-wrap.is-current .sb-hex { width: 96px; height: 106px; font-size: 34px; color: #fff; background: linear-gradient(180deg, #4b93ff, var(--sb-blue-d)); }
.sb-hex-wrap.is-current::before {
    content: ""; position: absolute; width: 110px; height: 121px;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: var(--sb-gold); animation: sb-pulse 1.6s ease-in-out infinite;
}
.sb-hex-wrap.is-boss .sb-hex { background: linear-gradient(180deg, #a678ff, #5b2bc4); color: #fff; }
.sb-hex-wrap.is-boss::after { content: "👑"; position: absolute; top: -14px; font-size: 24px; }
.sb-hex-wrap.is-done .sb-hex { color: #2b9a4b; }
.sb-path-hint { position: absolute; left: 50%; transform: translateX(62px); font-size: 12px; font-weight: 700; background: #fff; border-radius: 10px; padding: 4px 8px; box-shadow: var(--sb-shadow); white-space: nowrap; }
.sb-play-wrap { padding: 0 6px 16px; }
.sb-btn-play { width: 100%; display: flex; flex-direction: column; padding: 12px; border: 4px solid var(--sb-gold); font-size: 24px; animation: sb-breathe 2.2s ease-in-out infinite; }
.sb-btn-play small { font-family: "Onest", sans-serif; font-weight: 600; font-size: 15px; opacity: .85; }

/* ---------- Нижние вкладки ---------- */
.sb-tabs {
    position: absolute; z-index: 6; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: #fff; padding: 8px 4px calc(8px + var(--sb-safe-b));
    box-shadow: 0 -4px 20px rgba(23, 63, 122, .1);
}
.sb-tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #8492a6; font-size: 12px; font-weight: 600; }
.sb-tabs svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sb-tabs button.is-on { color: var(--sb-blue); }
.sb-tabs button.is-on svg { fill: #d7e7ff; }

/* ---------- Магазин ---------- */
.sb-gift-card { display: flex; align-items: center; gap: 14px; }
.sb-gift-card > i { font-size: 46px; font-style: normal; }
.sb-gift-card.is-ready > i { animation: sb-wiggle 1.4s ease-in-out infinite; }
.sb-gift-card div { flex: 1; }
.sb-gift-card b { display: block; font-family: "Geologica", sans-serif; font-size: 18px; }
.sb-gift-card small { color: var(--sb-muted); }
.sb-gift-card .sb-btn { padding: 10px 16px; font-size: 15px; }
.sb-shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sb-shop-item { background: #fff; border-radius: var(--sb-radius); box-shadow: var(--sb-shadow); padding: 14px 12px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sb-shop-item > i { font-size: 38px; font-style: normal; }
.sb-shop-item b { font-family: "Geologica", sans-serif; }
.sb-shop-item small { color: var(--sb-muted); font-size: 12px; min-height: 30px; }
.sb-shop-item .sb-have { font-size: 12px; font-weight: 700; color: var(--sb-blue); }
.sb-shop-item .sb-btn { width: 100%; padding: 9px; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; }
.sb-shop-item .sb-coin { width: 18px; height: 18px; }
.sb-shop-item .sb-coin::after { font-size: 10px; }
.sb-chests .sb-shop-item { opacity: .75; }
.sb-chest-gold { background: linear-gradient(180deg, #fff8e1, #fff); }
.sb-chest-epic { background: linear-gradient(180deg, #f1e8ff, #fff); }

/* ---------- Рейтинг ---------- */
.sb-leaders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sb-leader { display: grid; grid-template-columns: 34px 40px 1fr auto; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 8px 12px; box-shadow: 0 2px 8px rgba(23, 63, 122, .08); }
.sb-leader.is-me { outline: 3px solid var(--sb-blue); }
.sb-rank { font-family: "Geologica", sans-serif; font-weight: 800; text-align: center; color: var(--sb-muted); }
.sb-leader:nth-child(1) .sb-rank, .sb-leader:nth-child(2) .sb-rank, .sb-leader:nth-child(3) .sb-rank { font-size: 22px; }
.sb-leader-name b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-leader-name small { color: var(--sb-muted); font-size: 12px; }
.sb-cup { font-family: "Geologica", sans-serif; font-weight: 800; color: #b07800; }
.sb-cup > i { font-style: normal; margin-right: 6px; }
.sb-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 6px 0 12px; background: rgba(255,255,255,.6); border-radius: 14px; }
.sb-seg button { border: 0; background: none; padding: 9px 6px; border-radius: 11px; font-weight: 700; font-size: 14px; color: #5d6b80; }
.sb-seg button.is-on { background: #fff; color: var(--sb-blue); box-shadow: 0 2px 8px rgba(23, 63, 122, .12); }
.sb-league-head { text-align: center; margin-bottom: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sb-league-head b { font: 800 22px "Geologica", sans-serif; }
.sb-league-head small { color: var(--sb-muted); font-weight: 600; }
.sb-league-ladder { display: flex; gap: 6px; align-items: center; }
.sb-league-ladder span { font-size: 24px; opacity: .35; filter: grayscale(1); transition: transform .2s; }
.sb-league-ladder span.is-past { opacity: .7; filter: none; }
.sb-league-ladder span.is-on { font-size: 44px; opacity: 1; filter: drop-shadow(0 6px 10px rgba(0,0,0,.2)); animation: sb-pop .5s cubic-bezier(.3,1.6,.5,1); }
.sb-leader.is-up { background: #effbec; }
.sb-leader.is-down { background: #fff0f0; }
.sb-leader.is-up .sb-rank { color: #2b9a4b; }
.sb-leader.is-down .sb-rank { color: #d42f2f; }
.sb-zone-line { list-style: none; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 4px 0; }
.sb-zone-line.is-up { color: #2b9a4b; }
.sb-zone-line.is-down { color: #d42f2f; }
.sb-event-league { background: linear-gradient(135deg, #2bb673, #16804a); }
.sb-league-card { border: 0; color: #fff; text-align: left; font: inherit; cursor: pointer; }
.sb-league-card small b { font-weight: 800; }
.sb-leader-me { position: sticky; bottom: 0; margin-top: 10px; }
.sb-leader-me .sb-leader { background: #eaf3ff; }
.sb-empty { text-align: center; color: var(--sb-muted); padding: 30px 10px; }

/* ---------- Профиль ---------- */
.sb-profile { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.sb-profile-head { display: flex; align-items: center; gap: 14px; }
.sb-profile-head .sb-ava { width: 72px; height: 72px; font-size: 40px; }
.sb-profile-head b { font-family: "Geologica", sans-serif; font-size: 24px; display: block; }
.sb-profile-head > div { min-width: 0; }
.sb-profile-head .sb-prof-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sb-prof-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-rename-btn {
    flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0;
    display: grid; place-items: center; background: #eaf2ff; font-size: 22px; cursor: pointer;
    transition: transform .15s;
}
.sb-rename-btn:active { transform: scale(.9); }
.sb-rename { display: grid; gap: 8px; text-align: left; }
.sb-rename .sb-muted { margin: 0; font-size: 13px; text-align: center; }
.sb-rename .sb-error a { color: inherit; font-weight: 700; }
.sb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sb-stat { background: #fff; border-radius: 14px; padding: 12px 6px; text-align: center; box-shadow: 0 2px 8px rgba(23, 63, 122, .08); }
.sb-stat b { display: block; font-family: "Geologica", sans-serif; font-size: 22px; }
.sb-stat small { color: var(--sb-muted); font-size: 12px; }
.sb-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #edf1f7; }
.sb-row:last-child { border-bottom: 0; }
.sb-switch { width: 50px; height: 30px; border-radius: 99px; border: 0; background: #cdd6e3; position: relative; transition: background .2s; }
.sb-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sb-switch[aria-checked="true"] { background: var(--sb-blue); }
.sb-switch[aria-checked="true"]::after { transform: translateX(20px); }
.sb-rules { font-size: 14px; line-height: 1.5; color: #3b475a; }
.sb-rules p { margin: 0 0 8px; }
.sb-rules small { color: var(--sb-muted); }

/* ---------- Аватары ---------- */
.sb-ava {
    width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%;
    display: grid; place-items: center; font-size: 22px;
    background: #fff; box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(0,0,0,.15);
}

/* ---------- Поиск соперника ---------- */
.sb-vs-badge { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--sb-blue); color: #fff; font: 900 22px "Geologica", sans-serif; box-shadow: 0 0 0 5px #fff, var(--sb-shadow); }
.sb-search-status { font-weight: 700; font-size: 17px; color: #36506f; }
.sb-search-status::after { content: ""; display: inline-block; width: 14px; text-align: left; animation: sb-dots 1.2s steps(4) infinite; }
.sb-search-status.is-done::after { display: none; }
.sb-boss-tag { color: #fff; background: linear-gradient(135deg, #a678ff, #5b2bc4); padding: 4px 12px; border-radius: 999px; font: 800 13px "Geologica", sans-serif; letter-spacing: .05em; }

/* ---------- Игра: счёт ---------- */
#scr-game { padding: 0 8px; }
.sb-scorebar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin-top: -2px; }
.sb-side { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px; border-radius: 999px; transition: background .25s, box-shadow .25s; }
.sb-side-opp { justify-content: flex-end; }
.sb-side .sb-ava { width: 34px; height: 34px; font-size: 19px; }
.sb-side-name { font-size: 13px; font-weight: 700; color: #3b4b63; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sb-score {
    min-width: 56px; padding: 4px 10px; border-radius: 12px; text-align: center;
    font: 800 22px "Geologica", sans-serif; background: #fff; border: 2px solid #d5e1f0; color: #9aa6b8;
    transition: color .2s, border-color .2s;
}
.sb-side.is-turn { background: rgba(255,255,255,.75); box-shadow: 0 2px 10px rgba(23, 63, 122, .12); }
.sb-side-me.is-turn .sb-score { color: var(--sb-blue); border-color: var(--sb-blue); }
.sb-side-opp.is-turn .sb-score { color: var(--sb-bot); border-color: var(--sb-bot); }
.sb-score.is-bump { animation: sb-bump .45s ease; }
.sb-score.is-minus { animation: sb-shake .4s ease; color: var(--sb-red) !important; }
.sb-level-tag { display: grid; place-items: center; min-width: 40px; height: 40px; border-radius: 12px; background: var(--sb-blue); color: #fff; font: 800 15px "Geologica", sans-serif; padding: 0 6px; box-shadow: 0 3px 0 var(--sb-blue-d); }
.sb-level-tag.is-boss { background: linear-gradient(135deg, #a678ff, #5b2bc4); box-shadow: 0 3px 0 #3f1a96; }
.sb-status { text-align: center; font-size: 13px; font-weight: 700; color: #3b4b63; min-height: 22px; padding: 3px 0; }
.sb-status.is-opp { color: var(--sb-bot); }
.sb-status.is-opp::after { content: ""; display: inline-block; width: 14px; text-align: left; animation: sb-dots 1.2s steps(4) infinite; }

/* ---------- Игра: эмоции ---------- */
.sb-side { position: relative; }
.sb-ava-btn { border: 0; padding: 0; cursor: pointer; position: relative; }
.sb-ava-btn::after {
    content: "😊"; position: absolute; right: -5px; bottom: -4px;
    width: 17px; height: 17px; border-radius: 50%; background: var(--sb-blue);
    font-size: 10px; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff;
}
.sb-emote {
    position: absolute; top: 100%; z-index: 12; margin-top: 6px;
    font-size: 32px; line-height: 1; padding: 6px 8px; background: #fff; border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 40, 90, .25);
    animation: sb-emote 2.6s ease forwards; pointer-events: none;
}
.sb-side-me .sb-emote { left: 2px; }
.sb-side-opp .sb-emote { right: 2px; }
.sb-emote::before { content: ""; position: absolute; top: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: #fff; }
.sb-side-me .sb-emote::before { left: 14px; }
.sb-side-opp .sb-emote::before { right: 14px; }
.sb-emote-picker {
    position: absolute; z-index: 13; left: 8px; right: 8px; top: 50px;
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
    padding: 6px; background: #fff; border-radius: 18px; box-shadow: 0 12px 30px rgba(15, 40, 90, .25);
    animation: sb-pop .2s ease;
}
.sb-emote-picker button { border: 0; background: none; font-size: 26px; padding: 4px 0; border-radius: 10px; }
.sb-emote-picker button:active { background: #eef4fd; transform: scale(.9); }
@keyframes sb-emote { 0% { opacity: 0; transform: scale(.3) translateY(-6px); } 12% { opacity: 1; transform: scale(1.15); } 20% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }

/* ---------- Игра: поле ---------- */
.sb-board-wrap { flex: 0 0 auto; display: grid; place-items: start center; padding-top: 2px; }
.sb-board {
    display: grid;
    grid-template-columns: repeat(var(--sb-cols, 8), var(--sb-cell-size));
    grid-auto-rows: var(--sb-cell-size);
    background: var(--sb-line);
    gap: 1px;
    border: 2px solid #8fa3bd;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(23, 63, 122, .2);
    touch-action: none;
}
.sb-cell { position: relative; background: var(--sb-cell); display: grid; place-items: center; user-select: none; -webkit-user-select: none; }
.sb-cell-decor { background: var(--sb-clue) radial-gradient(circle, #c3d5ec 1.2px, transparent 1.6px) 0 0 / 8px 8px; }
.sb-cell-corner {
    background: linear-gradient(180deg, #4b93ff, var(--sb-blue-d));
    color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
    line-height: 1; font-family: "Geologica", sans-serif;
}
.sb-cell-corner small { font-size: calc(var(--sb-cell-size) * .2); font-weight: 700; opacity: .9; }
.sb-cell-corner b { font-size: calc(var(--sb-cell-size) * .42); font-weight: 900; }
.sb-cell-clue {
    background: var(--sb-clue);
    z-index: 1; /* стрелка заходит на соседнюю клетку и рисуется поверх неё */
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.sb-clue-text {
    position: relative;
    flex: 1; min-height: 0; min-width: 0; width: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 1px 3px;
    text-align: center; text-transform: uppercase; font-weight: 700;
    line-height: 1.05; color: #20324d; overflow: hidden;
    font-size: 8px;
}
.sb-clue-text.is-break > span { overflow-wrap: anywhere; }
.sb-clue-text > span { display: block; width: 100%; }
.sb-cell-clue.is-split .sb-clue-text + .sb-clue-text { border-top: 1px solid var(--sb-line); }
.sb-arrow {
    position: absolute; width: 0; height: 0; pointer-events: none;
    border: max(4px, calc(var(--sb-cell-size) * .12)) solid transparent;
}
.sb-arrow.is-right { left: 100%; top: 50%; transform: translateY(-50%); border-left-color: #6d84a3; border-right-width: 0; }
.sb-arrow.is-down { top: 100%; left: 50%; transform: translateX(-50%); border-top-color: #6d84a3; border-bottom-width: 0; }
.sb-cell-clue.is-split .sb-arrow.is-right.is-a { top: 25%; }
.sb-cell-clue.is-split .sb-arrow.is-right.is-b { top: 75%; }
.sb-clue-text.is-pic { padding: 2px; background: #fff; }
.sb-clue-text.is-pic img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
/* С подписью картинка меньше и ниже — подпись над ней, а не поверх. */
.sb-clue-text.is-pic.has-part { padding: calc(max(8px, var(--sb-cell-size) * .22) * 1.1 + 2px) 3px 2px; }
.sb-pic-part {
    position: absolute; top: 1px; padding: 0 2px; border-radius: 3px;
    background: rgba(255,255,255,.9); color: #13223a;
    font: 900 max(8px, calc(var(--sb-cell-size) * .22)) / 1.1 "Geologica", sans-serif; text-transform: uppercase;
}
.sb-pic-part.is-start { left: 1px; }
.sb-pic-part.is-end { right: 1px; }
.sb-clue-text.is-sel { background: #cfe2fb; box-shadow: inset 0 0 0 2px var(--sb-blue); }
.sb-clue-zoom {
    position: absolute; z-index: 34;
    display: flex; align-items: center; justify-content: center;
    padding: 8px 10px;
    background: var(--sb-clue); color: #13223a;
    border: 3px solid #4a5d7a; border-radius: 10px;
    box-shadow: 0 14px 30px rgba(15, 40, 90, .35);
    font: 800 20px/1.08 "Geologica", sans-serif; text-transform: uppercase; text-align: center;
    overflow: hidden;
    animation: sb-pop .22s cubic-bezier(.3,1.5,.5,1);
    cursor: pointer;
}
.sb-clue-zoom.is-break { overflow-wrap: anywhere; }
.sb-clue-zoom.is-pic { padding: 6px; background: #fff; }
.sb-clue-zoom.is-pic img { width: 100%; height: 100%; object-fit: contain; }
.sb-clue-zoom.is-pic.has-part { padding-top: 38px; }
.sb-clue-zoom .sb-pic-part { top: 6px; font-size: 24px; }
.sb-clue-zoom .sb-pic-part.is-start { left: 6px; }
.sb-clue-zoom .sb-pic-part.is-end { right: 6px; }
.sb-cell-letter { cursor: pointer; }
.sb-cell-letter.is-word { background: var(--sb-green); }
.sb-cell-letter.is-target { background: #fff6c8; box-shadow: inset 0 0 0 3px var(--sb-gold); animation: sb-pulse 1s ease-in-out infinite; }
.sb-cell-letter.is-drop { background: #e1efff; }
.sb-letter {
    font: 800 calc(var(--sb-cell-size) * .58) / 1 "Geologica", sans-serif;
    color: var(--sb-ink);
}
.sb-cell[data-owner="me"] .sb-letter { color: var(--sb-me); }
.sb-cell[data-owner="bot"] .sb-letter { color: var(--sb-bot); }
.sb-cell.is-new .sb-letter { animation: sb-pop .4s cubic-bezier(.3,1.6,.5,1); }
.sb-cell.is-good { animation: sb-flash-good .7s ease; }
.sb-cell.is-bad { animation: sb-flash-bad .6s ease; }
.sb-cell.is-complete { animation: sb-complete .9s ease; }
.sb-cell .sb-tile { position: absolute; inset: 2px; width: auto; height: auto; font-size: calc(var(--sb-cell-size) * .56); box-shadow: inset 0 -3px 0 var(--sb-tile-edge); animation: sb-pop .25s ease; }
.sb-cell .sb-tile.is-bot { background: #ffe0cc; box-shadow: inset 0 -3px 0 #f0a578; color: #8a2f00; }

/* ---------- Игра: подсказка и фишки ---------- */
.sb-cluebar {
    margin: 8px auto 0; min-height: 34px; max-width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.85);
    font-size: 14px; font-weight: 700; color: #20324d; text-align: center;
    visibility: hidden;
}
.sb-cluebar.is-on { visibility: visible; animation: sb-screen-in .2s ease; }
.sb-cluebar small { color: var(--sb-muted); font-weight: 600; white-space: nowrap; }
.sb-cluebar img { flex: none; width: 28px; height: 28px; object-fit: contain; }
.sb-rack { display: flex; justify-content: center; gap: 8px; min-height: 68px; padding: 8px 0 4px; --sb-rack-n: 5; }
/* Фишки сужаются, если в ряду 6 букв и «+». */
.sb-rack > .sb-tile, .sb-rack > .sb-rack-plus { width: min(54px, calc((min(100vw, 520px) - 24px - (var(--sb-rack-n) - 1) * 8px) / var(--sb-rack-n))); }
.sb-rack-plus {
    position: relative; height: 58px; flex: 0 0 auto;
    display: grid; place-items: center;
    border: 2px dashed #9fb4d1; border-radius: 10px; background: rgba(255,255,255,.7);
    color: var(--sb-blue); cursor: pointer;
}
.sb-rack-plus b { font: 900 34px/1 "Geologica", sans-serif; }
.sb-rack-plus em { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--sb-blue); color: #fff; font: 800 11px/20px "Geologica", sans-serif; font-style: normal; box-shadow: 0 0 0 2px #fff; }
.sb-rack-plus em.is-buy { background: var(--sb-gold); color: #5a3a00; }
.sb-rack.is-locked .sb-rack-plus { opacity: .5; }
.sb-tile {
    width: 54px; height: 58px; flex: 0 0 auto;
    display: grid; place-items: center;
    border: 0; border-radius: 10px;
    background: var(--sb-tile);
    box-shadow: inset 0 -5px 0 var(--sb-tile-edge), 0 4px 10px rgba(140, 90, 20, .22);
    font: 800 32px "Geologica", sans-serif; color: var(--sb-ink);
    touch-action: none; user-select: none; -webkit-user-select: none;
    transition: transform .15s ease, opacity .15s;
}
.sb-tile.is-fresh { animation: sb-tile-drop .35s cubic-bezier(.3,1.5,.5,1) backwards; }
.sb-rack .sb-tile:nth-child(2) { animation-delay: .04s; }
.sb-rack .sb-tile:nth-child(3) { animation-delay: .08s; }
.sb-rack .sb-tile:nth-child(4) { animation-delay: .12s; }
.sb-rack .sb-tile:nth-child(5) { animation-delay: .16s; }
.sb-rack .sb-tile:nth-child(6) { animation-delay: .2s; }
.sb-tile.is-sel { transform: translateY(-8px) scale(1.06); box-shadow: inset 0 -5px 0 var(--sb-tile-edge), 0 0 0 3px var(--sb-blue), 0 10px 18px rgba(30, 90, 200, .3); }
.sb-tile.is-used { opacity: .25; transform: scale(.9); pointer-events: none; }
.sb-tile.is-hint { box-shadow: inset 0 -5px 0 var(--sb-tile-edge), 0 0 0 3px var(--sb-gold), 0 0 18px var(--sb-gold); }
.sb-rack.is-locked .sb-tile { filter: grayscale(.5); opacity: .7; }
.sb-cell .sb-tile.is-lifted { opacity: .25; }
.sb-cell .sb-tile.is-sel { box-shadow: inset 0 -3px 0 var(--sb-tile-edge), 0 0 0 3px var(--sb-blue); transform: scale(1.06); z-index: 2; }
.sb-drag-ghost { position: fixed; z-index: 50; pointer-events: none; transform: translate(-50%, -60%) scale(1.15); box-shadow: inset 0 -5px 0 var(--sb-tile-edge), 0 16px 26px rgba(0,0,0,.25); animation: none; }

.sb-controls {
    display: grid; grid-template-columns: 1fr 1.8fr 1fr 1fr; align-items: end; gap: 6px;
    margin-top: auto;
    padding: 6px 0 calc(10px + var(--sb-safe-b));
}
.sb-boost { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; color: #5d6b80; font-size: 11px; font-weight: 700; }
.sb-boost i { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-style: normal; background: #fff; box-shadow: 0 3px 0 #cbd8ea, 0 5px 12px rgba(23, 63, 122, .12); transition: transform .12s; }
.sb-boost:active i { transform: scale(.92); }
.sb-boost em { position: absolute; top: -4px; right: 50%; margin-right: -30px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--sb-blue); color: #fff; font: 800 11px/20px "Geologica", sans-serif; font-style: normal; box-shadow: 0 0 0 2px #fff; }
.sb-boost em.is-buy { background: var(--sb-gold); color: #5a3a00; }
.sb-boost:disabled { opacity: .45; }
.sb-move-btn { height: 56px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; font-size: 18px; }
.sb-move-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.sb-move-btn.is-ready { animation: sb-breathe 1.2s ease-in-out infinite; }

/* ---------- Итог ---------- */
.sb-result { padding: 0; color: #fff; background: radial-gradient(circle at 50% 30%, #4aa3ff, #1d63db 70%); position: absolute; inset: 0; z-index: 20; overflow-y: auto; }
.sb-result.is-lose { background: radial-gradient(circle at 50% 30%, #7d8ba6, #3f4b63 70%); }
.sb-rays { position: absolute; left: 50%; top: 26%; width: 900px; height: 900px; margin: -450px 0 0 -450px; background: repeating-conic-gradient(rgba(255,255,255,.13) 0 10deg, transparent 10deg 20deg); animation: sb-rotate 30s linear infinite; pointer-events: none; mask-image: radial-gradient(circle, #000 20%, transparent 65%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 65%); }
.sb-result-inner { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: calc(70px + env(safe-area-inset-top, 0px)) 20px calc(24px + var(--sb-safe-b)); }
.sb-result-title { font: 900 40px "Geologica", sans-serif; margin: 0; text-shadow: 0 4px 0 rgba(0,0,0,.15); animation: sb-pop .6s cubic-bezier(.3,1.6,.5,1); text-align: center; }
.sb-result-vs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative; background: rgba(255,255,255,.18); border-radius: 22px; padding: 8px; }
.sb-result-vs .sb-vs-badge { position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%); width: 50px; height: 50px; font-size: 18px; box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(0,0,0,.18); }
.sb-result-card { position: relative; background: #fff; color: var(--sb-ink); border-radius: 16px; padding: 22px 10px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sb-result-card .sb-ava { width: 48px; height: 48px; font-size: 26px; }
.sb-result-card small { color: var(--sb-muted); font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-result-card b { font: 900 30px "Geologica", sans-serif; background: #f0f4fa; border-radius: 12px; padding: 2px 16px; }
.sb-winner-tag { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: var(--sb-gold); color: #5a3a00; font-size: 12px; font-weight: 800; padding: 3px 12px; border-radius: 0 0 10px 10px; }
.sb-reward-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sb-reward { display: flex; align-items: center; gap: 8px; background: #fff; color: var(--sb-ink); border-radius: 999px; padding: 8px 18px 8px 10px; font: 800 22px "Geologica", sans-serif; box-shadow: 0 6px 16px rgba(0,0,0,.15); animation: sb-pop .5s .3s cubic-bezier(.3,1.6,.5,1) backwards; }
.sb-reward:nth-child(2) { animation-delay: .45s; }
.sb-reward .sb-coin { width: 30px; height: 30px; }
.sb-reward-ico { font-size: 26px; }
.sb-progress-card { width: 100%; background: rgba(255,255,255,.18); border-radius: 18px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
.sb-progress-card b { font: 700 18px "Geologica", sans-serif; }
.sb-progress-card small { opacity: .85; font-weight: 600; }
.sb-progress-card > i { grid-row: span 3; font-size: 40px; font-style: normal; }
.sb-progress-card .sb-event-bar { width: 100%; margin: 4px 0; height: 9px; }
.sb-progress-card .sb-event-bar span { transition: width 1s .6s ease; }
.sb-result-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 10px; }
.sb-result-actions .sb-btn-white { display: flex; flex-direction: column; padding: 12px; font-size: 20px; }
.sb-result-actions .sb-btn-white small { font: 600 14px "Onest", sans-serif; opacity: .7; }

/* ---------- Модальное окно ---------- */
.sb-modal { position: absolute; inset: 0; z-index: 40; background: rgba(15, 30, 60, .55); display: grid; place-items: center; padding: 20px; animation: sb-fade .2s ease; }
.sb-modal-card { width: 100%; max-width: 380px; max-height: 90%; overflow-y: auto; background: #fff; border-radius: 24px; padding: 22px 18px 18px; text-align: center; animation: sb-pop .35s cubic-bezier(.3,1.5,.5,1); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.sb-modal-card h3 { font: 800 22px "Geologica", sans-serif; margin: 4px 0 8px; }
.sb-modal-card p { color: #4a5a70; margin: 0 0 14px; line-height: 1.45; }
.sb-modal-big { font-size: 72px; line-height: 1; display: block; margin: 0 auto 6px; animation: sb-wiggle 1.6s ease-in-out infinite; }
.sb-modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.sb-modal-actions .sb-btn { width: 100%; }
.sb-modal-actions .sb-btn[disabled] { opacity: .55; pointer-events: none; }
.sb-modal-actions .sb-coin { display: inline-block; vertical-align: -4px; width: 22px; height: 22px; margin: 0 4px; }
.sb-fix-tiles { display: flex; justify-content: center; align-items: center; margin: 6px 0 12px; }
.sb-fix-tiles span { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 -4px; border-radius: 12px; background: linear-gradient(180deg, #ffd9d9, #ff9b9b); box-shadow: 0 4px 0 #d86a6a; color: #a11d1d; font: 800 30px "Geologica", sans-serif; }
.sb-fix-tiles span:nth-child(2) { position: relative; z-index: 1; width: 66px; height: 66px; font-size: 38px; animation: sb-shake .5s ease .2s; }
.sb-fix-tiles span:nth-child(2)::after { content: "✕"; position: absolute; top: -10px; right: -10px; width: 24px; height: 24px; border-radius: 50%; background: var(--sb-red); color: #fff; font-size: 13px; display: grid; place-items: center; }
.sb-modal-loot { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.sb-loot { background: #f1f6fd; border-radius: 14px; padding: 10px 12px; min-width: 76px; animation: sb-pop .45s cubic-bezier(.3,1.6,.5,1) backwards; }
.sb-loot i { font-size: 30px; font-style: normal; display: block; }
.sb-loot b { font-family: "Geologica", sans-serif; }
.sb-boss-portrait { font-size: 86px; display: block; animation: sb-boss-in .8s cubic-bezier(.3,1.4,.5,1); filter: drop-shadow(0 10px 16px rgba(91, 43, 196, .45)); }

/* ---------- Обучение ---------- */
.sb-coach { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.sb-coach-bubble {
    position: absolute; left: 16px; right: 16px;
    background: #fff; border-radius: 18px; padding: 14px 16px;
    box-shadow: 0 12px 34px rgba(15, 40, 90, .3);
    font-size: 16px; line-height: 1.4; color: #34445c; text-align: center;
    pointer-events: auto;
    animation: sb-pop .35s cubic-bezier(.3,1.5,.5,1);
}
.sb-coach-bubble b { color: var(--sb-blue); }
.sb-coach-bubble .sb-btn { margin-top: 10px; padding: 9px 22px; font-size: 15px; }
.sb-hand { position: absolute; font-size: 46px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); transform: translate(-30%, -10%); transition: left .2s, top .2s; }
.sb-hand.is-tap { animation: sb-tap 1.1s ease-in-out infinite; }
.sb-hand.is-drag { animation: sb-drag 2s ease-in-out infinite; }

/* ---------- Эффекты ---------- */
.sb-fx { position: absolute; inset: 0; z-index: 35; pointer-events: none; overflow: hidden; }
.sb-float { position: absolute; font: 900 26px "Geologica", sans-serif; color: #2b9a4b; text-shadow: 0 2px 0 #fff, 0 0 10px #fff; transform: translate(-50%, -50%); animation: sb-float 1s ease-out forwards; white-space: nowrap; }
.sb-float.is-minus { color: var(--sb-red); }
.sb-float.is-bot { color: var(--sb-bot); }
.sb-float.is-big { font-size: 34px; color: #ffb000; }
.sb-spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--sb-gold); animation: sb-spark .7s ease-out forwards; }
.sb-flycoin { position: absolute; width: 24px; height: 24px; z-index: 36; transition: transform .8s cubic-bezier(.5,-0.3,.6,1), opacity .8s; }
.sb-banner {
    position: absolute; left: 0; right: 0; top: 38%; z-index: 36; pointer-events: none;
    text-align: center; font: 900 54px "Geologica", sans-serif; color: #fff;
    -webkit-text-stroke: 2px #d17a00; text-shadow: 0 6px 0 #d17a00, 0 12px 30px rgba(0,0,0,.25);
    opacity: 0;
}
.sb-banner.is-on { animation: sb-banner 1.5s cubic-bezier(.3,1.4,.5,1) forwards; }
.sb-banner.is-blue { -webkit-text-stroke-color: var(--sb-blue-d); text-shadow: 0 6px 0 var(--sb-blue-d), 0 12px 30px rgba(0,0,0,.25); font-size: 40px; }
.sb-banner small { display: block; font-size: 20px; -webkit-text-stroke: 0; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.sb-confetti { position: absolute; inset: 0; z-index: 37; pointer-events: none; width: 100%; height: 100%; }
.sb-toast { position: absolute; left: 50%; bottom: 110px; z-index: 45; transform: translate(-50%, 20px); background: rgba(20, 32, 54, .92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: 90%; text-align: center; }
.sb-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Анимации ---------- */
@keyframes sb-bump { 30% { transform: scale(1.25); } 60% { transform: scale(.95); } }
@keyframes sb-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes sb-pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes sb-tile-drop { 0% { transform: translateY(-24px) scale(.6); opacity: 0; } }
@keyframes sb-pulse { 50% { opacity: .55; transform: scale(1.04); } }
@keyframes sb-breathe { 50% { transform: scale(1.03); } }
@keyframes sb-wiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-12deg) scale(1.1); } 80% { transform: rotate(10deg) scale(1.1); } 90% { transform: rotate(-6deg); } }
@keyframes sb-flash-good { 0% { background: #9be58c; } 100% { background: var(--sb-cell); } }
@keyframes sb-flash-bad { 0%, 100% { transform: none; } 15% { background: #ffc9c9; transform: translateX(-4px); } 35% { transform: translateX(4px); } 55% { transform: translateX(-3px); } 75% { transform: translateX(2px); } }
@keyframes sb-complete { 0% { background: #fff3a8; } 40% { background: #ffe066; transform: scale(1.08); z-index: 2; } 100% { background: var(--sb-cell); } }
@keyframes sb-float { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -70%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
@keyframes sb-spark { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }
@keyframes sb-banner { 0% { opacity: 0; transform: scale(.4) rotate(-6deg); } 20% { opacity: 1; transform: scale(1.12) rotate(2deg); } 35% { transform: scale(1) rotate(0); } 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes sb-rotate { to { transform: rotate(360deg); } }
@keyframes sb-fade { from { opacity: 0; } }
@keyframes sb-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@keyframes sb-spin-ava { 50% { transform: scale(.92); } }
@keyframes sb-tap { 0%, 100% { transform: translate(-30%, -10%) scale(1); } 50% { transform: translate(-30%, 0) scale(.88); } }
@keyframes sb-drag { 0% { transform: translate(-30%, -10%); opacity: 0; } 10% { opacity: 1; } 70% { transform: translate(calc(-30% + var(--hx, 0px)), calc(-10% + var(--hy, 0px))); opacity: 1; } 100% { transform: translate(calc(-30% + var(--hx, 0px)), calc(-10% + var(--hy, 0px))); opacity: 0; } }
@keyframes sb-boss-in { 0% { transform: scale(2.4) rotate(-20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-height: 700px) {
    .sb-tile { width: 48px; height: 50px; font-size: 28px; }
    .sb-rack { min-height: 58px; }
    .sb-boost i { width: 42px; height: 42px; font-size: 20px; }
    .sb-move-btn { height: 50px; }
}

/* ---------- Города ---------- */
.sb-city-tag {
    position: absolute; left: 0; top: 4px; z-index: 2;
    display: flex; flex-direction: column; padding: 6px 12px; border-radius: 14px;
    background: rgba(255,255,255,.85); box-shadow: var(--sb-shadow);
    font: 800 16px "Geologica", sans-serif;
}
.sb-city-ico { margin-right: 6px; }
.sb-city-tag small { font: 600 12px "Onest", sans-serif; color: var(--sb-muted); }

/* ---------- Таймер хода ---------- */
.sb-timer { position: relative; height: 6px; margin: 0 4px 4px; border-radius: 99px; background: rgba(255,255,255,.7); overflow: visible; }
.sb-timer > span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #2ecc71, var(--sb-blue)); transition: width .1s linear; }
.sb-timer::after { content: attr(data-sec); position: absolute; right: 0; top: -18px; font: 800 12px "Geologica", sans-serif; color: #3b4b63; }
.sb-timer.is-low > span { background: var(--sb-red); animation: sb-pulse .5s ease-in-out infinite; }
.sb-timer.is-low::after { color: var(--sb-red); }

/* ---------- События: ежедневный сканворд и открытки ---------- */
.sb-event-daily { background: linear-gradient(135deg, #38bdf8, #0369a1); }
.sb-event-postcard { background: linear-gradient(135deg, #f472b6, #9d174d); }
.sb-event-install { background: linear-gradient(135deg, #34d399, #047857); }
.sb-event-push { background: linear-gradient(135deg, #fb7185, #be123c); }
.sb-row-note { display: block; font-size: 12px; color: #8a94a6; font-weight: 500; margin-top: 2px; }
.sb-install-steps { text-align: left; margin: 0 0 14px; padding-left: 22px; color: #4a5a70; line-height: 1.5; }
.sb-install-steps li { margin-bottom: 6px; }
.sb-event.is-done { filter: saturate(.6); }
.sb-postcard {
    position: relative; width: 100%; max-width: 260px; aspect-ratio: 4 / 3; margin: 6px auto 10px;
    border-radius: 16px; overflow: hidden; color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px rgba(0,0,0,.2);
}
.sb-postcard > i { font-size: 76px; font-style: normal; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.sb-postcard > b { font: 800 18px "Geologica", sans-serif; text-shadow: 0 2px 6px rgba(0,0,0,.3); }
.sb-postcard > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sb-postcard > img + b { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.sb-postcard-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.sb-postcard-grid span {
    background: #dfe6f1 repeating-linear-gradient(45deg, #e9eef6 0 8px, #dfe6f1 8px 16px);
    border: 1px solid #fff; display: grid; place-items: center; transition: opacity .5s;
}
.sb-postcard-grid span::after { content: "?"; font: 900 22px "Geologica", sans-serif; color: #b3c0d4; }
.sb-postcard-grid span.is-open { opacity: 0; }
.sb-postcard-grid span.is-fresh { animation: sb-piece 1.4s .6s ease forwards; opacity: 1; }
@keyframes sb-piece { 0% { opacity: 1; transform: none; } 40% { opacity: 1; transform: scale(1.12) rotate(4deg); background: var(--sb-gold); } 100% { opacity: 0; transform: scale(.6) rotate(-8deg); } }
.sb-albums { display: flex; justify-content: center; gap: 8px; margin: 0 0 10px; }
.sb-album { min-width: 54px; padding: 8px; border-radius: 12px; background: #eef2f8; font: 800 16px "Geologica", sans-serif; display: grid; place-items: center; }
.sb-album:has(> img) { padding: 3px; }
.sb-album img { display: block; width: 56px; height: 42px; object-fit: cover; border-radius: 9px; }
.sb-album.is-on { background: #fff1d6; box-shadow: inset 0 0 0 2px var(--sb-gold); }
.sb-album.is-done { background: #e7f8ea; font-size: 22px; }
.sb-result-postcard { border: 0; color: #fff; font: inherit; cursor: pointer; text-align: left; }
.sb-result-postcard .sb-postcard { grid-row: span 3; width: 110px; margin: 0; }
.sb-result-postcard .sb-postcard > i { font-size: 40px; }
.sb-result-postcard .sb-postcard > b { display: none; }
.sb-result-postcard .sb-postcard-grid span::after { font-size: 12px; }
.sb-event-postcard i { right: 14px; bottom: 10px; filter: none; }
.sb-event-postcard .sb-postcard { width: 60px; margin: 0; border: 2px solid #fff; border-radius: 8px; transform: rotate(6deg); box-shadow: 0 6px 14px rgba(0,0,0,.3); }
.sb-event-postcard .sb-postcard > b { display: none; }
.sb-event-postcard .sb-postcard-grid span { border-width: .5px; }
.sb-event-postcard .sb-postcard-grid span::after { font-size: 7px; }
.sb-modal-big .sb-postcard { width: 230px; margin: 0 auto; }

/* ---------- Серия дней ---------- */
.sb-streak { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 12px; }
.sb-streak-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: #f1f5fb; }
.sb-streak-day small { font-size: 11px; font-weight: 700; color: var(--sb-muted); }
.sb-streak-day i { font-style: normal; font-size: 22px; line-height: 1; }
.sb-streak-day i .sb-coin { display: inline-block; width: 22px; height: 22px; }
.sb-streak-day b { font: 800 14px "Geologica", sans-serif; }
.sb-streak-day.is-done { background: #e7f8ea; opacity: .75; }
.sb-streak-day.is-done small::after { content: " ✓"; color: #2b9a4b; }
.sb-streak-day.is-today { background: #fff1d6; box-shadow: inset 0 0 0 2px var(--sb-gold); animation: sb-breathe 1.2s ease-in-out infinite; }
.sb-streak-day.is-chest { grid-column: span 2; }

/* ---------- Бөлісу ---------- */
.sb-share-img { width: 100%; max-width: 260px; border-radius: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.2); margin-bottom: 8px; }
.sb-modal-actions a.sb-btn { display: block; text-decoration: none; text-align: center; }

/* ---- Дүкен: платные жинақтар (как карточки наборов в мобильных играх) ---- */
.sb-packs { display: grid; gap: 14px; }
.sb-pack {
    position: relative; display: block; width: 100%; padding: 0 6px 6px; border: 0; border-radius: 22px; text-align: left; cursor: pointer;
    background: #4a86e8; box-shadow: 0 6px 0 #2f63c4, var(--sb-shadow); color: #fff; font: inherit;
    transition: transform .12s ease;
}
.sb-pack:active { transform: translateY(3px); }
.sb-pack-big { background: #8b5cf6; box-shadow: 0 6px 0 #6235c9, var(--sb-shadow); }
.sb-pack-title { display: block; padding: 9px 12px 8px; text-align: center; font: 800 20px/1.1 "Geologica", sans-serif; letter-spacing: -.01em; }
.sb-pack-body {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 132px; padding: 14px 12px 14px 14px;
    border-radius: 17px; overflow: hidden; background: linear-gradient(180deg, #7cc4ff, #5aa9f5);
}
.sb-pack-big .sb-pack-body { background: linear-gradient(180deg, #c4a8ff, #a07cf7); }
.sb-pack-body::before { /* лучи за горкой монет */
    content: ""; position: absolute; right: -40px; top: 50%; width: 260px; height: 260px; transform: translateY(-50%);
    background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.22) 0deg 9deg, transparent 9deg 22deg);
    -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 68%); mask-image: radial-gradient(circle, #000 25%, transparent 68%);
}
.sb-pack-left, .sb-pack-right { position: relative; z-index: 1; display: flex; flex-direction: column; }
.sb-pack-left { gap: 10px; }
.sb-pack-right { align-items: center; gap: 6px; flex: none; }
.sb-pack-boosts { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.sb-pack-boost { display: flex; flex-direction: column; align-items: center; gap: 2px; }
/* Четыре бустера (большой жинақ) — в одну строку, а не три + один под ними. */
.sb-pack-boosts:has(> :nth-child(4)) { flex-wrap: nowrap; gap: 6px; }
.sb-pack-boosts:has(> :nth-child(4)) .sb-pack-boost i { width: 34px; height: 34px; }
.sb-pack-boost i {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 21px; font-style: normal;
    background: radial-gradient(circle at 35% 30%, #fff, #e3ecf8); box-shadow: 0 3px 0 rgba(30, 60, 140, .35);
}
.sb-pack-boost b, .sb-pack-coins b {
    color: #fff; font: 900 17px/1 "Geologica", sans-serif;
    text-shadow: 2px 0 #23408e, -2px 0 #23408e, 0 2px #23408e, 0 -2px #23408e, 1.5px 1.5px #23408e, -1.5px -1.5px #23408e, 1.5px -1.5px #23408e, -1.5px 1.5px #23408e, 0 3px 0 #23408e;
}
.sb-pack-big .sb-pack-boost b, .sb-pack-big .sb-pack-coins b { text-shadow: 2px 0 #4c1d95, -2px 0 #4c1d95, 0 2px #4c1d95, 0 -2px #4c1d95, 1.5px 1.5px #4c1d95, -1.5px -1.5px #4c1d95, 1.5px -1.5px #4c1d95, -1.5px 1.5px #4c1d95, 0 3px 0 #4c1d95; }
.sb-pack-coins { display: flex; align-items: center; gap: 8px; }
.sb-pack-coins b { font-size: 28px; }
.sb-pack-stack { position: relative; width: 34px; height: 34px; }
.sb-pack-stack .sb-coin { position: absolute; width: 26px; height: 26px; }
.sb-pack-stack .sb-coin:nth-child(1) { left: 0; top: 8px; }
.sb-pack-stack .sb-coin:nth-child(2) { left: 4px; top: 2px; }
.sb-pack-stack .sb-coin:nth-child(3) { left: 10px; top: 10px; }
.sb-pack-stack .sb-coin::after, .sb-pack-pile .sb-coin::after { font-size: 12px; }
.sb-pack-pile { position: relative; width: 116px; height: 84px; }
.sb-pack-pile .sb-coin { position: absolute; width: 40px; height: 40px; box-shadow: 0 3px 0 #b97f00; }
.sb-pack-pile .c1 { left: 6px; top: 32px; } .sb-pack-pile .c2 { left: 36px; top: 40px; }
.sb-pack-pile .c3 { left: 66px; top: 30px; } .sb-pack-pile .c4 { left: 50px; top: 14px; transform: rotate(-14deg); }
.sb-pack-pile i {
    position: absolute; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; font-style: normal;
    background: radial-gradient(circle at 35% 30%, #fff, #dfe8f5); box-shadow: 0 3px 0 rgba(30, 60, 140, .35);
}
.sb-pack-pile .p1 { left: 0; top: 10px; transform: rotate(-12deg); } .sb-pack-pile .p2 { left: 76px; top: 2px; transform: rotate(10deg); }
.sb-pack-pile .p3 { left: 30px; top: 0; }
.sb-pack-pile em { position: absolute; color: #fff; font-style: normal; text-shadow: 0 0 8px rgba(255,255,255,.9); animation: sb-twinkle 2.2s ease-in-out infinite; }
.sb-pack-pile .s1 { left: -10px; top: -6px; font-size: 16px; } .sb-pack-pile .s2 { right: -8px; top: 22px; font-size: 12px; animation-delay: .7s; }
.sb-pack-pile .s3 { left: 52px; top: -14px; font-size: 13px; animation-delay: 1.3s; }
@keyframes sb-twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.sb-pack-price {
    padding: 7px 16px; border-radius: 999px; background: #fff; color: #2e6fdc; box-shadow: 0 3px 0 rgba(30, 60, 140, .25);
    font: 900 18px/1 "Geologica", sans-serif; white-space: nowrap;
}
.sb-pack-big .sb-pack-price { color: #6d28d9; }
.sb-pack-badge {
    position: absolute; top: -10px; right: 6px; z-index: 2; display: grid; place-items: center; width: 76px; height: 76px; transform: rotate(14deg);
    background: #e5484d; color: #fff; text-align: center; line-height: 1;
    clip-path: polygon(50% 0%, 61% 10%, 75% 6%, 80% 20%, 94% 25%, 90% 39%, 100% 50%, 90% 61%, 94% 75%, 80% 80%, 75% 94%, 61% 90%, 50% 100%, 39% 90%, 25% 94%, 20% 80%, 6% 75%, 10% 61%, 0% 50%, 10% 39%, 6% 25%, 20% 20%, 25% 6%, 39% 10%);
}
.sb-pack-badge small { display: block; font: 700 11px/1 "Onest", sans-serif; }
.sb-pack-badge b { display: block; font: 900 20px/1.05 "Geologica", sans-serif; }

/* Оплата через Kaspi */
.sb-btn-kaspi { color: #fff; background: linear-gradient(180deg, #ff5b4a, #e8331f); box-shadow: 0 5px 0 #b3200f, var(--sb-shadow); }
.sb-btn-kaspi:hover { color: #fff; text-decoration: none; }
.sb-modal-actions a.sb-btn-kaspi, .sb-pay a.sb-btn-kaspi { display: block; text-align: center; text-decoration: none; }
.sb-pay { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 6px 0 4px; }
.sb-pay .sb-btn { width: 100%; box-sizing: border-box; }
.sb-pay-qr:not(:empty) { padding: 10px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 2px #e8331f; }
.sb-pay-qr img, .sb-pay-qr canvas { display: block; }
.sb-pay-status { margin: 0; color: #4a5a70; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sb-spin { width: 14px; height: 14px; border: 2.5px solid #c9d6ea; border-top-color: #2e7cf6; border-radius: 50%; animation: sb-rot .8s linear infinite; }
@keyframes sb-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sb-pack-pile em, .sb-spin { animation: none; } }

/* ---- Анимированная инструкция «добавить на главный экран» ---- */
.ig-phone {
    position: relative; width: 212px; height: 372px; margin: 4px auto 10px; border: 7px solid #1d2433; border-radius: 30px;
    background: #f2f4f8; overflow: hidden; box-shadow: 0 10px 24px rgba(20, 40, 90, .25);
}
.ig-phone::before { content: ""; position: absolute; z-index: 5; top: 6px; left: 50%; width: 58px; height: 15px; transform: translateX(-50%); border-radius: 10px; background: #1d2433; }
.ig-screen { position: absolute; inset: 0; font: 600 10px/1.25 "Onest", sans-serif; color: #1d2433; text-align: left; }
.ig-screen.is-in > * { animation: ig-in .45s ease both; }
@keyframes ig-in { from { opacity: 0; transform: translateY(14px); } }
.ig-page { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 70px; background: linear-gradient(180deg, #e9f8fc, #a6dcee); }
.ig-page b { font: 800 15px "Geologica", sans-serif; }
.ig-lines { display: grid; gap: 6px; width: 70%; margin-top: 10px; }
.ig-lines i { height: 22px; border-radius: 8px; background: rgba(255,255,255,.75); }
.ig-appicon { display: inline-flex; gap: 2px; padding: 7px 6px; border-radius: 10px; background: linear-gradient(135deg, #4aa3ff, #1d4fc4); }
.ig-appicon i { display: grid; place-items: center; width: 11px; height: 12px; border-radius: 3px; background: #fbe6c4; color: #1d2433; font: 800 8px/1 "Geologica", sans-serif; font-style: normal; }
.ig-safari { position: absolute; left: 6px; right: 6px; bottom: 8px; display: flex; justify-content: space-around; align-items: center; height: 34px; border-radius: 17px; background: rgba(255,255,255,.92); font-size: 15px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.ig-hot { position: relative; border-radius: 10px; animation: ig-hot 1.4s ease-in-out infinite; }
@keyframes ig-hot { 0%, 100% { box-shadow: 0 0 0 0 rgba(46, 124, 246, 0); } 50% { box-shadow: 0 0 0 4px rgba(46, 124, 246, .55); } }
.ig-safari .ig-hot { padding: 2px 6px; color: #2e7cf6; }
.ig-sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 10px 16px; border-radius: 18px 18px 0 0; background: #3a3a3c; color: #fff; }
.ig-sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ig-sheet-head b { font-size: 11px; }
.ig-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; }
.ig-acts span { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 14px; }
.ig-acts small { font-size: 7.5px; line-height: 1.1; color: #ddd; }
.ig-acts .ig-hot { padding: 2px 0; }
.ig-sheet-tall { padding-top: 14px; }
.ig-list { display: grid; gap: 1px; overflow: hidden; border-radius: 10px; background: #48484a; }
.ig-list span { padding: 9px 10px; background: #2c2c2e; font-size: 9.5px; }
.ig-list .ig-hot { background: #3d4f6e; }
.ig-confirm { position: absolute; inset: 0; background: #f2f2f7; }
.ig-bar { display: flex; justify-content: space-between; align-items: center; padding: 26px 8px 8px; font-size: 9px; color: #2e7cf6; }
.ig-bar b { color: #1d2433; font-size: 9px; }
.ig-bar .ig-hot { padding: 2px 4px; font-weight: 800; }
.ig-confirm-app { display: flex; align-items: center; gap: 8px; margin: 10px 8px; padding: 10px; border-radius: 10px; background: #fff; font-size: 11px; font-weight: 700; }
.ig-home { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); align-content: start; gap: 14px 10px; padding: 46px 14px; background: linear-gradient(160deg, #7b8cff, #c06bd8); }
.ig-home > i { aspect-ratio: 1; border-radius: 10px; background: rgba(255,255,255,.55); }
.ig-newapp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; animation: ig-pop .6s .3s cubic-bezier(.3,1.6,.5,1) both; }
.ig-newapp > .ig-hot { display: block; width: 100%; border-radius: 10px; }
.ig-newapp .ig-appicon { width: 100%; justify-content: center; box-sizing: border-box; padding: 9px 2px; }
.ig-newapp .ig-appicon i { width: 9px; height: 10px; font-size: 6.5px; }
.ig-newapp small { color: #fff; font-size: 7px; white-space: nowrap; }
.ig-newapp em { position: absolute; top: -10px; right: -12px; padding: 1px 4px; border-radius: 8px; background: #ffc83d; color: #5a3a00; font: 800 8px/1.3 "Geologica", sans-serif; font-style: normal; }
@keyframes ig-pop { from { opacity: 0; transform: scale(.3); } }
.ig-chrome { position: absolute; z-index: 2; top: 24px; left: 6px; right: 6px; display: flex; align-items: center; gap: 6px; }
.ig-url { flex: 1; padding: 7px 10px; border-radius: 14px; background: #fff; font-size: 9px; color: #555; }
.ig-chrome > span:last-child { padding: 2px 6px; font-size: 16px; font-weight: 800; }
.ig-menu { position: absolute; z-index: 3; top: 52px; right: 6px; display: grid; width: 150px; padding: 4px 0; border-radius: 10px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.ig-menu span { padding: 7px 12px; font-size: 9.5px; }
.ig-menu .ig-hot { background: #e8f0ff; font-weight: 800; border-radius: 0; }
.ig-dialog { position: absolute; z-index: 3; left: 14px; right: 14px; top: 34%; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.ig-dialog > b { display: block; margin-bottom: 10px; font-size: 11px; }
.ig-dialog > div { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; }
.ig-dialog small { display: block; font-weight: 500; color: #777; }
.ig-dialog p { display: flex; justify-content: flex-end; gap: 14px; margin: 14px 0 0; color: #1a73e8; font-weight: 800; }
.ig-dialog p .ig-hot { padding: 4px 8px; }
.ig-finger {
    position: absolute; z-index: 6; font-size: 30px; line-height: 1; pointer-events: none;
    transform: translate(-35%, 15%); transition: left .6s ease, top .6s ease; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35));
}
.ig-finger.is-tap { animation: ig-tap 1.4s .55s ease-in-out infinite; }
@keyframes ig-tap { 0%, 60%, 100% { transform: translate(-35%, 15%) scale(1); } 30% { transform: translate(-35%, 5%) scale(.86); } }
.ig-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.ig-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #c9d6ea; cursor: pointer; }
.ig-dots button.is-on { width: 22px; border-radius: 5px; background: #2e7cf6; }
.ig-caption { min-height: 44px; margin: 0 0 6px; font-size: 15px; line-height: 1.4; color: #2b3a52; }
.ig-caption span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: #2e7cf6; color: #fff; font: 800 12px/1 "Geologica", sans-serif; vertical-align: 1px; }
@media (prefers-reduced-motion: reduce) { .ig-finger.is-tap, .ig-hot, .ig-newapp, .ig-screen.is-in > * { animation: none; } }

/* ---------- Иконки (спрайт в index.php) ---------- */
.sb-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sb-ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; }
.sb-modal-big .sb-ic { width: 84px; height: 84px; }
.sb-event i .sb-ic { width: 52px; height: 52px; vertical-align: middle; }
.sb-boost i .sb-ic { width: 32px; height: 32px; }
.sb-reward-ico .sb-ic { width: 28px; height: 28px; }

/* ---------- Аватары-персонажи ---------- */
/* Картинка обрезается по кругу сама (.sb-pic), чтобы значки на кружке (эмоции) не срезались.
   Лист: бюст прижат к низу квадрата, голова сверху — чуть увеличиваем и опускаем, чтобы лицо было в центре. */
.sb-ava { position: relative; }
.sb-pic { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: #dbeafe; pointer-events: none; }
.sb-pic img { position: absolute; left: -8%; top: 4%; width: 116%; height: 116%; max-width: none; }

/* ---------- Досыңмен ойна ---------- */
.sb-play-wrap { display: flex; gap: 8px; align-items: stretch; }
.sb-btn-play { flex: 1.3; width: auto; min-width: 0; }
.sb-btn-orange { color: #fff; background: linear-gradient(180deg, #ffa95a, #ff7a1f 60%, #ec5d0e); box-shadow: 0 5px 0 #b8430a, 0 8px 18px rgba(232, 89, 12, .3); }
.sb-btn-orange:active { box-shadow: 0 2px 0 #b8430a; }
.sb-btn-friend { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 6px; border: 4px solid #ffd8b0; font-size: 17px; animation: sb-breathe 2.2s ease-in-out infinite .4s; }
.sb-friend-ico { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.sb-friend-ico .sb-ic { width: 30px; height: 30px; }
.sb-new-tag { position: absolute; top: -12px; right: -6px; background: #ff3b5c; color: #fff; font: 900 11px "Geologica", sans-serif; letter-spacing: .04em; padding: 4px 8px; border-radius: 99px; box-shadow: 0 0 0 2px #fff; transform: rotate(8deg); }
.sb-result-actions .sb-btn-orange { padding: 12px; font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.sb-result-actions .sb-ic { width: 26px; height: 26px; }
.sb-result-note { text-align: center; color: var(--sb-muted); font-size: 13px; font-weight: 600; margin: 4px 0; }

.sb-fr-title { text-align: center; }
.sb-fr-panel { display: flex; flex-direction: column; gap: 12px; }
.sb-fr-card { text-align: center; }
.sb-fr-label { font: 800 12px "Geologica", sans-serif; color: var(--sb-muted); letter-spacing: .04em; }
.sb-fr-code { display: flex; justify-content: center; gap: 10px; margin: 12px 0 4px; }
.sb-fr-code .sb-tile { width: 54px; height: 62px; font-size: 34px; }
.sb-btn-wa { color: #fff; background: linear-gradient(180deg, #46df82, #1fb85a); box-shadow: 0 5px 0 #128a41; }
.sb-btn-tg { color: #fff; background: linear-gradient(180deg, #4fbbf2, #229ed9); box-shadow: 0 5px 0 #157bb0; }
.sb-fr-vs { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
.sb-fr-vs .sb-ava { width: 64px; height: 64px; font-size: 34px; }
.sb-fr-vs .sb-vs-badge { width: 44px; height: 44px; font-size: 16px; }
.sb-ava-wait { background: transparent !important; box-shadow: none !important; border: 3px dashed #8fb2e4; color: #8fb2e4; font: 900 26px "Geologica", sans-serif !important; animation: sb-pulse 1.4s ease-in-out infinite; }
.sb-fr-wait { text-align: center; font: 800 15px "Geologica", sans-serif; color: #34405a; margin: 0; }
.sb-fr-wait small { display: block; font: 600 12px "Onest", sans-serif; color: var(--sb-muted); margin-top: 4px; }
.sb-dots i { display: inline-block; width: 5px; height: 5px; margin: 0 1.5px; border-radius: 50%; background: currentColor; animation: sb-blink 1s infinite; }
.sb-dots i:nth-child(2) { animation-delay: .15s; }
.sb-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes sb-blink { 50% { opacity: .2; } }
.sb-link { border: 0; background: none; color: var(--sb-blue); font: inherit; text-decoration: underline; padding: 0; }
.sb-fr-boxes { display: flex; justify-content: center; gap: 10px; margin: 12px 0 4px; cursor: text; }
.sb-fr-boxes span { width: 54px; height: 62px; border-radius: 12px; background: var(--sb-blank); border: 2px solid var(--sb-line); display: grid; place-items: center; font: 900 32px "Geologica", sans-serif; }
.sb-fr-boxes span:not(:empty) { background: var(--sb-tile); border-color: var(--sb-tile-edge); box-shadow: inset 0 -4px 0 var(--sb-tile-edge); }
.sb-fr-boxes span.is-on { border-color: var(--sb-blue); }
.sb-fr-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sb-fr-note { margin-top: 16px; }
.sb-invite-ava { width: 96px; height: 96px; font-size: 52px; margin: 0 auto; }
.sb-chip { display: inline-flex; align-items: center; gap: 5px; background: #f1f5fa; border-radius: 99px; padding: 5px 12px; font: 800 13px "Geologica", sans-serif; margin: 4px 0 12px; }
.sb-timer.is-opp > span { background: linear-gradient(90deg, #ffb066, var(--sb-bot)); }
.sb-level-tag .sb-ic { width: 22px; height: 22px; vertical-align: middle; }
.sb-result .sb-result-note { color: rgba(255, 255, 255, .88); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.sb-result-actions .sb-btn-row { flex-direction: row; align-items: center; justify-content: center; gap: 8px; font-size: 18px; }
.sb-rack-plus .sb-ic { width: 80%; height: 80%; }
.sb-loot i .sb-ic { width: 34px; height: 34px; }
.sb-pack-boost i .sb-ic { width: 24px; height: 24px; }
.sb-pack-pile i .sb-ic { width: 26px; height: 26px; vertical-align: middle; }
.sb-streak-day i .sb-ic { width: 26px; height: 26px; }
.sb-pill-time .sb-ic, .sb-cup .sb-ic, .sb-muted .sb-ic, small .sb-ic { width: 1.15em; height: 1.15em; }
.sb-shop-item i .sb-ic, .sb-gift-card i .sb-ic { width: 44px; height: 44px; }
.sb-progress-card i .sb-ic { width: 34px; height: 34px; }
.sb-gift-card .sb-btn .sb-ic { width: 22px; height: 22px; }
.sb-char-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 6px; max-height: 46vh; overflow-y: auto; padding: 6px 2px; margin-bottom: 4px; }
.sb-char { position: relative; border: 2px solid transparent; background: #f4f8fd; border-radius: 14px; padding: 6px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.sb-char .sb-ava { width: 52px; height: 52px; background: #dbeafe; }
.sb-char b { font: 800 11px "Geologica", sans-serif; white-space: nowrap; }
.sb-char.is-on { border-color: var(--sb-blue); background: #fff; box-shadow: var(--sb-shadow); }
.sb-char.is-locked .sb-ava img { filter: grayscale(.85) brightness(.9); opacity: .75; }
.sb-char small { font: 700 9.5px "Onest", sans-serif; color: var(--sb-muted); display: flex; align-items: center; gap: 2px; }
.sb-char small .sb-ic { width: 12px; height: 12px; }
.sb-char em { position: absolute; top: 3px; right: 3px; display: flex; align-items: center; gap: 2px; background: #fff; border-radius: 99px; padding: 1px 5px 1px 2px; font: 800 10px "Geologica", sans-serif; font-style: normal; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.sb-char em .sb-coin { width: 12px; height: 12px; display: inline-block; }
.sb-avatar-pick { grid-template-columns: repeat(6, 1fr); gap: 4px; }
.sb-avatar-pick button { font-size: 18px; padding: 4px 0; }
.sb-profile-head .sb-ava, .sb-result-card .sb-ava, .sb-side .sb-ava, .sb-leaders .sb-ava { background-color: #dbeafe; }
.sb-modal-big .sb-ic { display: block; margin: 0 auto; }

/* ---------- Экран «VS» перед матчем ---------- */
.sb-vs-screen {
    position: absolute; inset: 0; z-index: 8; background: #f2f3f7;
    align-items: center; justify-content: center; gap: 16px;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 16px calc(var(--sb-safe-b) + 18px);
}
.sb-vs-title {
    margin: 0; font: 900 clamp(32px, 10vw, 44px)/1.1 "Geologica", sans-serif; color: #6aa0ff; text-align: center;
    text-shadow: 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 0 3px 0 #fff, 0 3px 0 #fff, 0 8px 14px rgba(46, 124, 246, .25);
}
.sb-vs-stage { position: relative; width: min(100%, 430px); height: min(62vh, 540px); flex: none; }
.sb-vs-panel { position: absolute; left: 0; right: 0; height: 54%; border-radius: 40px; background: #dbe8fe; overflow: hidden; }
.sb-vs-me { top: 0; }
.sb-vs-opp { bottom: 0; }
.sb-vs-gap { position: absolute; left: -12%; right: -12%; top: 50%; height: 30px; background: #f2f3f7; transform: translateY(-50%) rotate(-9deg); z-index: 2; }
.sb-vs-mid { position: absolute; left: 50%; top: 50%; z-index: 3; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; background: #f2f3f7; display: grid; place-items: center; }
.sb-vs-mid span {
    font: 900 54px/1 "Geologica", sans-serif; color: #6aa0ff; letter-spacing: -.02em;
    text-shadow: 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 0 3px 0 #fff, 0 6px 10px rgba(46, 124, 246, .3);
}
.sb-vs-pic { position: absolute; bottom: 0; height: 84%; aspect-ratio: 1; object-fit: contain; pointer-events: none; }
.sb-vs-me .sb-vs-pic { left: -4%; }
.sb-vs-opp .sb-vs-pic { right: -4%; }
.sb-vs-emoji { height: auto; aspect-ratio: auto; font-size: clamp(90px, 28vw, 130px); line-height: 1; bottom: 14%; }
.sb-vs-me .sb-vs-emoji { left: 10%; }
.sb-vs-opp .sb-vs-emoji { right: 10%; }
.sb-vs-name {
    position: absolute; max-width: 50%; padding: 10px 20px; border-radius: 999px; background: #93b8fd; color: #fff;
    font: 800 clamp(15px, 4.6vw, 19px) "Geologica", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-vs-me .sb-vs-name { top: 10%; right: 5%; }
.sb-vs-opp .sb-vs-name { bottom: 13%; left: 5%; }
.sb-vs-cup { position: absolute; display: flex; align-items: center; gap: 4px; font: 800 13px "Geologica", sans-serif; color: #4f74b8; }
.sb-vs-me .sb-vs-cup { top: calc(10% + 52px); right: 9%; }
.sb-vs-opp .sb-vs-cup { bottom: calc(13% + 52px); left: 9%; }
.sb-vs-opp .sb-boss-tag { position: absolute; top: 18%; left: 7%; }
.sb-vs-screen .sb-search-status { margin: 0; text-align: center; font: 600 18px "Onest", sans-serif; color: #8a93a3; }

.sb-vs-screen.is-in .sb-vs-title { animation: sb-vs-drop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.sb-vs-screen.is-in .sb-vs-me { animation: sb-vs-left .55s .1s cubic-bezier(.2, 1.25, .4, 1) both; }
.sb-vs-screen.is-in .sb-vs-opp { animation: sb-vs-right .55s .22s cubic-bezier(.2, 1.25, .4, 1) both; }
.sb-vs-screen.is-in .sb-vs-mid { animation: sb-vs-pop .5s .55s cubic-bezier(.3, 1.7, .5, 1) both, sb-vs-beat 1.6s 1.2s ease-in-out infinite; }
.sb-vs-screen.is-in .sb-vs-pic { animation: sb-vs-rise .5s .45s cubic-bezier(.2, 1.2, .4, 1) both; }
.sb-vs-screen.is-in .sb-vs-name, .sb-vs-screen.is-in .sb-vs-cup { animation: sb-vs-fade .4s .6s ease-out both; }
.sb-vs-opp.is-spinning .sb-vs-pic { animation: none !important; filter: brightness(.9) saturate(.6); }
.sb-vs-opp.is-spinning .sb-vs-name { animation: none !important; }
.sb-vs-screen.is-in .sb-vs-opp.is-found .sb-vs-pic { animation: sb-vs-found .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.sb-vs-opp.is-found::after { content: ""; position: absolute; inset: 0; background: #fff; pointer-events: none; animation: sb-vs-flash .5s ease-out both; }
@keyframes sb-vs-drop { from { transform: translateY(-30px) scale(.8); opacity: 0; } }
@keyframes sb-vs-left { from { transform: translateX(-115%); } }
@keyframes sb-vs-right { from { transform: translateX(115%); } }
@keyframes sb-vs-pop { from { transform: scale(0) rotate(-35deg); } }
@keyframes sb-vs-beat { 50% { transform: scale(1.07); } }
@keyframes sb-vs-rise { from { transform: translateY(28%); opacity: 0; } }
@keyframes sb-vs-fade { from { transform: translateY(8px); opacity: 0; } }
@keyframes sb-vs-found { from { transform: translateY(14%) scale(.7); opacity: .3; } }
@keyframes sb-vs-flash { from { opacity: .85; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .sb-vs-screen.is-in * { animation-duration: .01s !important; animation-delay: 0s !important; }
}

/* ---------- Видео за награду ---------- */
.sb-btn-ad { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sb-btn-ad .sb-ic { width: 28px; height: 28px; flex: none; filter: drop-shadow(0 1px 1px rgba(120, 40, 0, .35)); }
.sb-ad-double { width: 100%; flex-wrap: wrap; row-gap: 0; padding: 10px 14px; font-size: 19px; text-align: center; animation: sb-breathe 2.2s ease-in-out infinite .8s; }
.sb-ad-double small { flex-basis: 100%; font: 600 14px "Onest", sans-serif; opacity: .92; }
.sb-shop-item .sb-btn-ad { margin-top: 10px; }
.sb-shop-item .sb-btn-ad .sb-ic { width: 22px; height: 22px; }

/* ---------- Главная: игры (карточки по образцу владельца) ---------- */
.sb-home-mid { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; margin: 0 -14px; padding: 0 14px; scrollbar-width: none; }
.sb-home-mid::-webkit-scrollbar { display: none; }
.sb-home-mid .sb-path { flex: 1 0 auto; min-height: 260px; }
.sb-games { padding: 2px 0 10px; }
.sb-games-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; }
.sb-games-head b { font: 800 18px "Geologica", sans-serif; }
.sb-games-head small { font-weight: 700; color: var(--sb-muted); }
.sb-games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sb-game { position: relative; min-width: 0; background: #fff; border-radius: 20px; box-shadow: var(--sb-shadow); padding: 82px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; overflow: hidden; animation: sb-pop .3s ease backwards; }
.sb-game::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46px; background: var(--sb-blue-l); }
.sb-game.is-mine::before, .sb-game.is-invite::before { background: linear-gradient(180deg, #9cc0ff, #77a5f7); }
.sb-game-tag { position: absolute; z-index: 1; top: 8px; left: 8px; background: #fff; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 800; color: var(--sb-blue); }
.sb-game-ava { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 62px; height: 62px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 32px; box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(0,0,0,.12); }
.sb-lvl-badge { position: absolute; right: -6px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 7px; background: linear-gradient(180deg, #f2a65a, #c96d1d); color: #fff; font: 800 12px/22px "Geologica", sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px #fff; }
.sb-game-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--sb-muted); }
.sb-game-big { font: 900 22px "Geologica", sans-serif; line-height: 1.2; color: #1b2a5e; }
.sb-game-status { min-height: 20px; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--sb-blue); }
.sb-game-status .sb-ic { width: 16px; height: 16px; }
.sb-game-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.sb-game-actions .sb-btn:only-child { grid-column: 1 / -1; }
.sb-game .sb-btn-white { color: #1b2a5e; box-shadow: inset 0 0 0 2px #1b2a5e; }
.sb-btn.sb-btn-sm { padding: 8px 2px; font-size: 13px; border-radius: 12px; white-space: nowrap; }
.sb-btn-green { color: #fff; background: linear-gradient(180deg, #82e28d, #43c65c 60%, #2fa94b); box-shadow: 0 4px 0 #23843a, 0 8px 16px rgba(46, 168, 74, .3); }
.sb-spin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: sb-rotate 1s linear infinite; }

/* ---------- Игра: ход соперника (поле закрыто) и видео внизу ---------- */
.sb-board-wrap { position: relative; }
.sb-oppturn { position: absolute; z-index: 5; inset: -4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; padding-top: 40px; border-radius: 16px; background: rgba(238, 245, 252, .96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: sb-fade .25s ease; }
.sb-oppturn-card { position: relative; width: min(300px, 88%); background: #fff; border-radius: 24px; box-shadow: var(--sb-shadow); padding: 64px 16px 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; animation: sb-pop .35s cubic-bezier(.3,1.5,.5,1); }
.sb-oppturn-ava { position: absolute; top: -52px; left: 50%; transform: translateX(-50%); width: 104px; height: 104px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 56px; box-shadow: 0 0 0 6px #fff, 0 6px 16px rgba(0,0,0,.15); }
.sb-oppturn-ava .sb-lvl-badge { right: -2px; bottom: 2px; min-width: 30px; height: 30px; font-size: 15px; line-height: 30px; border-radius: 9px; }
.sb-oppturn-card b { font: 800 25px "Geologica", sans-serif; color: #1b2a5e; }
.sb-oppturn-card small { font-size: 16px; font-weight: 600; line-height: 1.35; color: #5a6a8a; }
.sb-oppturn-clock { position: relative; width: 84px; height: 84px; border-radius: 22px; background: #fff; box-shadow: var(--sb-shadow); display: grid; place-items: center; color: #6f9ef5; }
.sb-oppturn-clock .sb-ic { width: 50px; height: 50px; animation: sb-tick 1s steps(2) infinite; }
.sb-oppturn-clock em { position: absolute; bottom: -24px; font-style: normal; font-size: 13px; font-weight: 800; color: #3b4b63; white-space: nowrap; }
@keyframes sb-tick { 50% { transform: rotate(10deg); } }
#scr-game.has-offer .sb-rack, #scr-game.has-offer .sb-controls { display: none; }
#scr-game.is-oppturn .sb-cluebar { visibility: hidden; }
.sb-offer { margin: 10px 0 calc(8px + var(--sb-safe-b)); padding: 12px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; background: #fff; border-radius: 20px; box-shadow: var(--sb-shadow); animation: sb-pop .35s ease; }
.sb-offer-ico { width: 52px; height: 52px; display: grid; place-items: center; color: #e8590c; }
.sb-offer-ico .sb-ic { width: 48px; height: 48px; }
.sb-offer-text b { display: block; font: 800 16px "Geologica", sans-serif; color: #1b2a5e; }
.sb-offer-text small { display: block; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--sb-muted); }
.sb-offer-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sb-offer-pill { display: flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px; border-radius: 999px; background: #f3f6fb; font: 800 16px "Geologica", sans-serif; }
.sb-offer-pill .sb-coin { width: 20px; height: 20px; }
.sb-offer-pill .sb-coin::after { font-size: 11px; }
.sb-offer .sb-btn-sm, .sb-choice-card .sb-btn { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 12px; }
.sb-offer .sb-btn .sb-ic, .sb-choice-card .sb-btn .sb-ic { width: 18px; height: 18px; }

/* ---------- Итог: выбор награды и статистика ---------- */
.sb-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.sb-choice-card { padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; border: 3px solid #b9cff5; border-radius: 18px; }
.sb-choice-card.is-plus { border-color: #8ddc9a; }
.sb-choice-card small { font: 700 15px "Geologica", sans-serif; color: var(--sb-ink); }
.sb-choice-card b { display: flex; align-items: center; gap: 6px; font: 900 24px "Geologica", sans-serif; color: var(--sb-gold-d); }
.sb-choice-card .sb-btn { width: 100%; }
.sb-modal-card .sb-choice-note { margin: 8px 0 0; font-size: 13px; color: var(--sb-muted); }
.sb-mstats { width: 100%; padding: 10px; background: #fff; color: var(--sb-ink); border-radius: 20px; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.sb-mstats-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; padding: 8px; border-radius: 14px; background: #8fb6ff; color: #fff; font: 800 17px "Geologica", sans-serif; }
.sb-mstats-head i { display: grid; place-items: center; color: var(--sb-gold); }
.sb-mstats-head .sb-ic { width: 22px; height: 22px; }
.sb-mstats-row { display: grid; grid-template-columns: 60px 1fr 60px; gap: 4px; margin-top: 4px; }
.sb-mstats-row > * { padding: 7px 4px; text-align: center; border-radius: 10px; background: #f3f6fb; }
.sb-mstats-row span { font-size: 14px; font-weight: 600; color: var(--sb-muted); }
.sb-mstats-row b { font: 700 18px "Geologica", sans-serif; color: #7b8aa3; }
.sb-mstats-row b.is-top { font-weight: 900; color: #1b2a5e; }
.sb-game-code { letter-spacing: .18em; color: var(--sb-blue); }
.sb-game-ava > .sb-ic { width: 34px; height: 34px; color: var(--sb-blue); }
.sb-fr-wait .sb-fr-home { display: block; margin: 12px auto 0; padding: 10px 22px; font-size: 16px; }

/* ---------- Профиль игрока и друзья ---------- */
.sb-leader[data-pid]:not([data-pid=""]), .sb-leader[data-bot] { cursor: pointer; }
.sb-stats-4 { grid-template-columns: repeat(4, 1fr); }
.sb-stats-4 .sb-stat { padding: 10px 2px; }
.sb-stats-4 .sb-stat b { font-size: 19px; }
.sb-stats-4 .sb-stat small { font-size: 11px; }
.sb-player-chips { display: flex; flex-wrap: wrap; justify-content: inherit; gap: 6px; margin-top: 6px; }
.sb-player-chips .sb-chip { margin: 0; }
.sb-player-chips .sb-ic { width: 15px; height: 15px; }
.sb-player-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 22px; }
.sb-player-head .sb-player-chips { justify-content: center; }
.sb-player-ava { position: relative; width: 112px; height: 112px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 60px; box-shadow: 0 0 0 5px #fff, 0 6px 16px rgba(0,0,0,.14); }
.sb-player-ava .sb-lvl-badge { right: 0; bottom: 4px; min-width: 30px; height: 30px; font-size: 15px; line-height: 30px; border-radius: 9px; }
.sb-online { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #2fc25b; box-shadow: 0 0 0 3px #fff; }
.sb-player-ava .sb-online { top: 8px; right: 8px; width: 18px; height: 18px; }
.sb-player-name { margin-top: 12px; font: 800 24px "Geologica", sans-serif; color: #1b2a5e; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sb-player-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sb-player-actions .sb-btn { padding: 12px 6px; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.sb-player-actions .sb-btn[disabled] { opacity: .6; }
.sb-player-actions .sb-ic { width: 20px; height: 20px; }
.sb-h2h { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; }
.sb-h2h > small { font-weight: 700; color: var(--sb-muted); }
.sb-h2h > div { display: flex; align-items: center; gap: 12px; }
.sb-h2h b { font: 900 34px "Geologica", sans-serif; color: #1b2a5e; min-width: 30px; text-align: center; }
.sb-h2h i { font: 900 28px "Geologica", sans-serif; font-style: normal; color: var(--sb-muted); }
.sb-h2h .sb-ava { width: 44px; height: 44px; font-size: 24px; }
.sb-profile > .sb-card, .sb-profile > .sb-stats { margin-bottom: 12px; }
.sb-hists, .sb-friend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sb-hist, .sb-friend { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: #f5f8fc; }
.sb-hist.is-link, .sb-friend { cursor: pointer; }
.sb-hist .sb-ava, .sb-friend .sb-ava { position: relative; width: 38px; height: 38px; font-size: 20px; }
.sb-friend .sb-online { top: -1px; right: -1px; width: 12px; height: 12px; box-shadow: 0 0 0 2px #fff; }
.sb-hist-name, .sb-friend-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sb-hist-name b, .sb-friend-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-hist-name small, .sb-friend-name small { color: var(--sb-muted); font-size: 12px; font-weight: 600; }
.sb-friend-name .sb-ic { width: 13px; height: 13px; }
.sb-hist-score { font: 800 16px "Geologica", sans-serif; color: #1b2a5e; white-space: nowrap; }
.sb-hist-res { min-width: 62px; text-align: center; padding: 3px 6px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.sb-hist-res.is-win { background: #dff6e4; color: #1f8a3d; }
.sb-hist-res.is-lose { background: #fde4e4; color: #c23434; }
.sb-hist-res.is-draw { background: #e8eef7; color: #4a5a70; }
.sb-friends-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sb-friends-head .sb-h3 { margin: 0; }
.sb-friends-head .sb-h3 small { color: var(--sb-muted); font-size: 15px; }
.sb-friends-head .sb-btn-sm { padding: 7px 12px; display: flex; align-items: center; gap: 5px; }
.sb-friends-head .sb-ic { width: 18px; height: 18px; }
.sb-friends-label { margin: 8px 2px 6px; font-size: 13px; font-weight: 700; color: var(--sb-muted); }
.sb-friends-empty { margin: 4px 0; font-size: 14px; }
.sb-friend-acts { display: flex; gap: 6px; }
.sb-friend-acts .sb-btn-sm { padding: 7px 10px; }
.sb-leader.has-vs { grid-template-columns: 34px 40px 1fr auto 38px; }
.sb-row-vs { width: 38px; height: 38px; border: 0; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: linear-gradient(180deg, #82e28d, #43c65c 60%, #2fa94b); box-shadow: 0 3px 0 #23843a; }
.sb-row-vs:active { transform: translateY(2px); box-shadow: 0 1px 0 #23843a; }
.sb-row-vs:disabled { opacity: .7; }
.sb-tabs button { position: relative; }
.sb-tab-badge { position: absolute; top: -4px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--sb-red); color: #fff; font: 800 11px/19px "Geologica", sans-serif; font-style: normal; box-shadow: 0 0 0 2px #fff; animation: sb-pop .3s ease; }
