/* game.css — Sunny Bay RP, стили интерфейса. Владелец: UI (docs/DESIGN.md, раздел 8).
   Образ: «солнечный приморский город» — кремовые и коралловые панели, толстая тёмно-синяя обводка (3px), кнопки-наклейки с жёсткой тенью,
   бирюзовые акценты, жёлтые деньги, шрифт Rubik (подключён в index.html). Блоки HUD считает HudLayout: внутри них всё в em (1em = 16px × --hl-k). */

:root {
    --ink: #1c2a4a; --ink2: #34456b;
    --cream: #fff4dc; --cream2: #ffe9bd; --cream3: #fff9ec;
    --coral: #ff6b57; --coral-d: #e04a3a; --teal: #2ec4b6; --teal-d: #18968c; --sun: #ffc83d; --sun-d: #e9a400;
    --sky: #4aa3df; --pink: #ff8fb1; --leaf: #6fcf5f; --wood: #c98a4b;
    --font: 'Rubik', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol', 'Apple Color Emoji', 'Noto Color Emoji';
    --shadow: 0 .24em 0 var(--ink);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --tut-bg: #fff4dc; --tut-fg: #1c2a4a; --tut-accent: #ff6b57; --tut-border: #1c2a4a; --tut-font: 'Rubik', system-ui, sans-serif; --tut-radius: 18px; --tut-z: 55;
    --lory-input-fg: #1c2a4a; --lory-input-bg: rgba(255, 244, 220, .55); --lory-input-accent: #ffc83d;
}

/* ---------------------------------------------------------------------------------------------- база и слои */
#sb-ui { position: fixed; inset: 0; z-index: 40; pointer-events: none; font-family: var(--font); color: var(--ink); font-weight: 600; -webkit-tap-highlight-color: transparent; }
#sb-ui * { box-sizing: border-box; }
#sb-ui button { font-family: inherit; }
.sb-layer { position: fixed; inset: 0; pointer-events: none; }
#sb-ui.sb-adbusy .sb-layer { visibility: hidden; }
.sb-grow { flex: 1 1 auto; }
[hidden] { display: none !important; }

.sb-ico { display: inline-flex; width: 1.5em; height: 1.5em; flex: 0 0 auto; align-items: center; justify-content: center; line-height: 1; vertical-align: middle; }
.sb-ico svg, .sb-ico img { width: 100%; height: 100%; display: block; object-fit: contain; }
.sb-ico.sb-emoji { font-size: 1.2em; }

/* ---------------------------------------------------------------------------------------------- кнопки-наклейки */
.sb-btn {
    --bg: var(--cream); --fg: var(--ink);
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 2.7em; padding: 0 1em;
    font: 800 1em/1 var(--font); color: var(--fg); background: var(--bg); border: 3px solid var(--ink); border-radius: .95em;
    box-shadow: 0 .24em 0 var(--ink); cursor: pointer; pointer-events: auto; touch-action: manipulation; user-select: none; -webkit-user-select: none;
    transition: transform .09s, box-shadow .09s, filter .15s; white-space: nowrap;
}
.sb-btn:hover { filter: brightness(1.06); }
.sb-btn:active:not(:disabled) { transform: translateY(.2em); box-shadow: 0 .04em 0 var(--ink); }
.sb-btn:disabled { filter: grayscale(.55) brightness(.95); cursor: default; opacity: .78; }
.sb-btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.sb-btn .sb-ico { width: 1.45em; height: 1.45em; }
.sb-btn-t { overflow: hidden; text-overflow: ellipsis; }
.sb-btn-round { width: 2.7em; padding: 0; border-radius: 50%; }
.sb-btn-round .sb-ico { width: 1.2em; height: 1.2em; }
.sb-btn-sm { min-height: 2.2em; font-size: .88em; padding: 0 .8em; }
.sb-btn-big { min-height: 3.3em; width: 3.3em; padding: 0; }
.sb-btn-big .sb-ico { width: 1.9em; height: 1.9em; }
.sb-btn-wide { width: 100%; }
.sb-btn-teal { --bg: var(--teal); --fg: #fff; }
.sb-btn-coral { --bg: var(--coral); --fg: #fff; }
.sb-btn-sun { --bg: var(--sun); --fg: var(--ink); }
.sb-btn-cream { --bg: var(--cream); }
.sb-btn-ghost { --bg: transparent; box-shadow: 0 .16em 0 rgba(28, 42, 74, .55); border-style: dashed; }
.sb-btn-teal .sb-btn-t, .sb-btn-coral .sb-btn-t, .sb-btn-go .sb-btn-t, .sb-btn-ad .sb-btn-t { color: #fff; -webkit-text-stroke: .17em var(--ink); paint-order: stroke fill; }
.sb-btn-go { --bg: var(--leaf); --fg: #fff; min-height: 3em; font-size: 1.12em; padding: 0 1.5em; }
.sb-btn-ad { --bg: var(--teal); --fg: #fff; }
.sb-btn-ad .sb-ico { filter: drop-shadow(0 .06em 0 rgba(28, 42, 74, .5)); }
.sb-btn-ad.sb-wait { --bg: #8a97ad; }
.sb-btn.sb-poor { --bg: #ffd9c9; }
.sb-btn.on { --bg: var(--sun); }
.sb-dot { position: absolute; right: -.35em; top: -.35em; width: .95em; height: .95em; border-radius: 50%; background: var(--coral); border: 2.5px solid var(--ink); animation: sb-dotpulse 1.4s ease-in-out infinite; }
@keyframes sb-dotpulse { 50% { transform: scale(1.22); } }

/* ---------------------------------------------------------------------------------------------- HUD (em: 1em = 16px × --hl-k) */
.sb-layer-hud { font-size: calc(var(--hl-k, 1) * 16px); }
.sb-menu, .sb-top, .sb-goal, .sb-radar, .sb-quick, .sb-buffs, .sb-bottom, .sb-feed, .sb-offerhost { font-size: calc(var(--hl-k, 1) * 16px); pointer-events: none; }
.sb-menu { display: flex; align-items: center; gap: .5em; }
.sb-menu .sb-btn { pointer-events: auto; min-height: 2.8em; }
.sb-menu .sb-btn-big { min-height: 3.3em; }
.sb-menu .sb-btn:not(.sb-btn-big) { width: 2.9em; padding: 0; }

.sb-top { display: flex; align-items: center; justify-content: center; gap: .55em; }
.sb-chip { position: relative; display: inline-flex; align-items: center; gap: .4em; height: 2.7em; padding: 0 .95em .0 .5em; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.4em; box-shadow: var(--shadow); font-weight: 800; pointer-events: auto; }
.sb-chip-ico { width: 1.7em; height: 1.7em; margin-top: -.1em; filter: drop-shadow(0 .08em 0 rgba(28, 42, 74, .35)); }
.sb-money { background: linear-gradient(#ffe27a, var(--sun)); min-width: 9.4em; justify-content: flex-start; }
.sb-money-d { font-size: 1.1em; opacity: .85; margin-right: -.2em; }
.sb-money-n { font-size: 1.25em; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.sb-money.sb-bump { animation: sb-bump .4s var(--spring); }
@keyframes sb-bump { 0% { transform: scale(1); } 40% { transform: scale(1.12) rotate(-1.5deg); } 100% { transform: scale(1); } }
.sb-money-pop { position: absolute; right: .3em; top: 100%; margin-top: .1em; font-weight: 900; font-size: 1.15em; color: #fff; -webkit-text-stroke: .2em var(--ink); paint-order: stroke fill; pointer-events: none; animation: sb-moneypop 1.2s ease-out forwards; white-space: nowrap; }
.sb-money-pop.up { color: var(--sun); }
.sb-money-pop.down { color: var(--coral); }
@keyframes sb-moneypop { 0% { opacity: 0; transform: translateY(-.4em) scale(.6); } 15% { opacity: 1; transform: translateY(.2em) scale(1.15); } 100% { opacity: 0; transform: translateY(1.8em) scale(1); } }
.sb-clock { padding-right: .85em; background: linear-gradient(#bfe8ff, #8fd5f2); }
.sb-clock.night { background: linear-gradient(#3b4f86, #26345f); color: #fff; }
.sb-clock-ico { display: inline-flex; }
.sb-clock-ico .sb-ico { width: 1.7em; height: 1.7em; }
.sb-clock-t { font-size: 1.12em; font-variant-numeric: tabular-nums; }

.sb-goal { display: flex; align-items: center; gap: .55em; padding: .45em .8em; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.2em; box-shadow: var(--shadow); font-weight: 800; pointer-events: none; }
.sb-goal-ico { width: 1.9em; height: 1.9em; }
.sb-goal-t { flex: 1 1 auto; line-height: 1.15; font-size: .95em; }
.sb-goal-d { flex: 0 0 auto; padding: .2em .6em; background: var(--teal); color: #fff; border: 2.5px solid var(--ink); border-radius: 1em; font-size: .9em; -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill; font-variant-numeric: tabular-nums; }
.sb-pop { animation: sb-popin .38s var(--spring); }
@keyframes sb-popin { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.sb-radar { display: flex; flex-direction: column; align-items: center; gap: .3em; cursor: pointer; pointer-events: auto; }
.sb-radar-c { width: 8em; height: 8em; border-radius: 50%; border: 3px solid var(--ink); box-shadow: var(--shadow), 0 0 0 .3em var(--cream); background: var(--cream); display: block; }
.sb-radar-n { max-width: 100%; padding: .12em .7em; background: var(--cream); border: 2.5px solid var(--ink); border-radius: 1em; font-size: .72em; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.5em; }
.sb-radar-n:empty { display: none; }

.sb-quick { display: flex; flex-direction: column; align-items: flex-end; gap: .5em; padding: .55em .5em; background: rgba(255, 244, 220, .92); border: 3px solid var(--ink); border-radius: 1.4em; box-shadow: var(--shadow); pointer-events: auto; transition: transform .25s var(--spring); }
.sb-quick .sb-qbtn { width: 3.2em; min-height: 3.2em; padding: 0; flex-direction: column; border-radius: 1em; gap: 0; }
.sb-qbtn .sb-ico { width: 2em; height: 2em; }
.sb-qbtn-l { display: none; }
.sb-q-sun { --bg: #ffe27a; } .sb-q-coral { --bg: #ff9b8a; } .sb-q-teal { --bg: #7fe0d6; } .sb-q-sky { --bg: #9ccdf0; } .sb-q-pink { --bg: #ffb9cf; }
.sb-fold { align-self: center; width: 2.2em !important; min-height: 1.4em !important; padding: 0 !important; border-radius: .7em !important; box-shadow: 0 .14em 0 var(--ink); }
.sb-fold .sb-ico { width: 1em; height: 1em; }
.sb-quick.sb-folded { transform: translateX(calc(100% - 2.4em)); }
.sb-quick.sb-folded .sb-qbtn { opacity: .0; pointer-events: none; }
.sb-quick.sb-folded .sb-fold { position: absolute; left: .2em; top: 50%; transform: translateY(-50%); }
.sb-quick.sb-folded { background: transparent; border-color: transparent; box-shadow: none; }

.sb-buffs { display: flex; flex-direction: column; gap: .35em; }
.sb-buff { position: relative; display: flex; align-items: center; gap: .4em; padding: .3em .7em .45em .35em; background: var(--cream); border: 3px solid var(--ink); border-radius: 1em; box-shadow: 0 .16em 0 var(--ink); font-size: .82em; font-weight: 800; }
.sb-buff-ico { width: 1.6em; height: 1.6em; }
.sb-buff-t { flex: 1 1 auto; }
.sb-buff-v { font-variant-numeric: tabular-nums; }
.sb-buff-bar { position: absolute; left: .7em; right: .7em; bottom: .12em; height: .26em; background: rgba(28, 42, 74, .2); border-radius: 1em; overflow: hidden; }
.sb-buff-bar i { display: block; height: 100%; width: 100%; background: var(--coral); border-radius: 1em; transition: width .4s linear; }

.sb-bottom { display: flex; flex-direction: column; align-items: center; gap: .5em; }
.sb-ctx { display: inline-flex; align-items: center; gap: .55em; padding: .35em .95em .35em .4em; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.4em; box-shadow: var(--shadow); font-weight: 800; }
.sb-ctx-i .sb-ico { width: 1.7em; height: 1.7em; }
.sb-key { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9em; height: 1.9em; padding: 0 .4em; font: 900 1em/1 var(--font); color: #fff; background: var(--coral); border: 2.5px solid var(--ink); border-radius: .55em; box-shadow: 0 .16em 0 var(--ink); -webkit-text-stroke: .14em var(--ink); paint-order: stroke fill; }
.sb-ctx-t { font-size: 1.05em; }
.sb-speed { width: 100%; padding: .4em .8em .55em; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.1em; box-shadow: var(--shadow); }
.sb-speed-top { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; font-weight: 800; }
.sb-speed-name { font-size: .8em; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-speed-v b { font-size: 1.55em; font-variant-numeric: tabular-nums; }
.sb-speed-v { font-size: .85em; }
.sb-speed-bar { height: .55em; margin-top: .25em; background: rgba(28, 42, 74, .18); border: 2px solid var(--ink); border-radius: 1em; overflow: hidden; }
.sb-speed-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--sun) 60%, var(--coral)); }

.sb-feed { display: flex; flex-direction: column; gap: .3em; }
.sb-line { padding: .3em .7em; background: rgba(255, 244, 220, .92); border: 2.5px solid var(--ink); border-radius: .9em; font-size: .85em; line-height: 1.2; animation: sb-slidein .3s var(--spring); }
.sb-line.me { background: #bfe8ff; }
.sb-line-n { margin-right: .4em; color: var(--coral-d); }
.sb-line.me .sb-line-n { color: var(--teal-d); }
@keyframes sb-slidein { 0% { transform: translateX(-1.5em); opacity: 0; } 100% { transform: none; opacity: 1; } }
.hl-low .sb-feed { display: none; }

.sb-chatbox { position: fixed; z-index: 3; left: var(--hl-sb-menu-x, 10px); top: calc(var(--hl-sb-menu-y, 10px) + var(--hl-sb-menu-h, 52px) + 8px); width: min(320px, calc(100vw - 20px)); max-height: min(70vh, 360px); display: flex; flex-direction: column; gap: .5em; padding: .6em; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.2em; box-shadow: 0 .4em 0 var(--ink); pointer-events: auto; font-size: 16px; animation: sb-popin .3s var(--spring); transform-origin: top left; }
.sb-chatbox-h { display: flex; align-items: center; gap: .5em; font-weight: 900; }
.sb-chatlog { flex: 1 1 auto; min-height: 3.5em; overflow: auto; display: flex; flex-direction: column; gap: .3em; padding: .35em; background: #fff; border: 2.5px solid var(--ink); border-radius: .8em; }
.sb-chatlog .sb-line { animation: none; background: var(--cream3); font-size: .9em; }
.sb-chat-empty { opacity: .6; font-size: .85em; padding: .4em; }
.sb-chatquick { display: flex; flex-wrap: wrap; gap: .4em; max-height: 9.5em; overflow: auto; }
.sb-chip-btn { padding: .4em .8em; font: 800 .85em/1.1 var(--font); color: var(--ink); background: var(--cream2); border: 2.5px solid var(--ink); border-radius: 1em; box-shadow: 0 .14em 0 var(--ink); cursor: pointer; touch-action: manipulation; }
.sb-chip-btn:active { transform: translateY(.12em); box-shadow: none; }
.sb-chip-btn.on { background: var(--sun); }
.sb-chatquick .sb-chip-btn { background: #fff; }

/* ---------------------------------------------------------------------------------------------- тосты */
.sb-layer-toasts { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 10px; top: calc(max(var(--hl-sb-top-y, 8px) + var(--hl-sb-top-h, 46px), var(--hl-sb-goal-y, 0px) + var(--hl-sb-goal-h, 0px)) + 10px); bottom: auto; }
.sb-toast { max-width: min(440px, 92vw); display: flex; align-items: center; gap: .55em; padding: .3em 1em .3em .35em; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.5em; box-shadow: 0 4px 0 var(--ink); font: 800 14px/1.2 var(--font); animation: sb-toastin .45s var(--spring); }
.sb-toast-ico { width: 1.9em; height: 1.9em; padding: .12em; background: #fff; border: 2.5px solid var(--ink); border-radius: 50%; }
.sb-toast-money { background: #fff0b8; } .sb-toast-reward { background: #d9f7f1; } .sb-toast-warn { background: #ffd9d2; } .sb-toast-join { background: #e3f6d8; } .sb-toast-leave { background: #eceff5; }
.sb-toast-out { animation: sb-toastout .26s ease-in forwards; }
@keyframes sb-toastin { 0% { transform: translateY(-120%) scale(.85); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes sb-toastout { to { transform: translateY(-80%) scale(.9); opacity: 0; } }

/* ---------------------------------------------------------------------------------------------- окна */
.sb-layer-panels { z-index: 5; }
.sb-scrim { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); background: rgba(22, 36, 70, .42); pointer-events: auto; animation: sb-fade .16s ease-out; font-size: 16px; }
.sb-scrim.sb-out { animation: sb-fadeout .14s ease-in forwards; }
.sb-scrim.sb-out .sb-panel { animation: sb-popout .14s ease-in forwards; }
@keyframes sb-fade { from { opacity: 0; } }
@keyframes sb-fadeout { to { opacity: 0; } }
@keyframes sb-popout { to { transform: scale(.92); opacity: 0; } }
.sb-panel { --acc: var(--coral); display: flex; flex-direction: column; width: min(920px, 100%); max-height: 100%; background: var(--cream); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink), 0 18px 40px rgba(0, 0, 0, .25); overflow: hidden; animation: sb-panelin .38s var(--spring); }
@keyframes sb-panelin { 0% { transform: translateY(24px) scale(.88); opacity: 0; } 100% { transform: none; opacity: 1; } }
.sb-ph { display: flex; align-items: center; gap: .6em; padding: .55em .8em .55em 1em; background: var(--acc); border-bottom: 3px solid var(--ink); position: relative; flex: 0 0 auto;
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .13) 0 10px, transparent 10px 22px); }
.sb-ph::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 7px; background: radial-gradient(circle at 7px -1px, transparent 6px, var(--ink) 6.5px, var(--ink) 8px, transparent 8.5px) 0 0 / 14px 8px repeat-x; display: none; }
.sb-ph .sb-chip { height: 2.2em; font-size: .9em; }
.sb-ph-ico { width: 2.1em; height: 2.1em; padding: .18em; background: var(--cream); border: 3px solid var(--ink); border-radius: 50%; }
.sb-ph-t { margin: 0; font: 900 1.45em/1.1 var(--font); color: #fff; -webkit-text-stroke: .2em var(--ink); paint-order: stroke fill; letter-spacing: .01em; text-shadow: 0 .09em 0 var(--ink); }
.sb-pb { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px; background: var(--cream) radial-gradient(rgba(28, 42, 74, .07) 1.4px, transparent 1.6px) 0 0 / 16px 16px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sb-app-jobs, .sb-app-jobcard { --acc: var(--wood); } .sb-app-map { --acc: var(--sky); } .sb-app-houses { --acc: var(--coral); } .sb-app-vehicles { --acc: #e9a400; }
.sb-app-shop { --acc: var(--pink); } .sb-app-gifts { --acc: var(--teal); } .sb-app-wardrobe { --acc: #9b7bd6; } .sb-app-settings { --acc: #7d8aa3; } .sb-app-backpack { --acc: var(--coral); }
.sb-app-emotes { --acc: var(--sun); } .sb-app-shift { --acc: var(--leaf); }
.sb-app-jobs, .sb-app-houses, .sb-app-backpack, .sb-app-emotes, .sb-app-settings, .sb-app-jobcard, .sb-app-shift { width: min(620px, 100%); }
.sb-app-vehicles, .sb-app-gifts { width: min(860px, 100%); }
.sb-app-shop, .sb-app-wardrobe, .sb-app-map { width: min(980px, 100%); height: min(640px, 100%); }
.sb-app-shop .sb-pb, .sb-app-wardrobe .sb-pb { overflow: hidden; display: flex; flex-direction: column; }

.sb-tabs { display: flex; gap: .45em; flex-wrap: wrap; margin-bottom: 10px; }
.sb-tabs-scroll { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 4px; scrollbar-width: none; flex: 0 0 auto; }
.sb-tabs-scroll::-webkit-scrollbar { display: none; }
.sb-tab { min-height: 2.5em; padding: 0 .9em; font-size: .9em; flex: 0 0 auto; }
.sb-tab .sb-ico { width: 1.35em; height: 1.35em; }
.sb-tab-n { font-style: normal; font-size: .75em; opacity: .65; margin-left: .15em; }
.sb-tag { display: inline-flex; align-items: center; gap: .3em; padding: .15em .7em; background: var(--cream2); border: 2.5px solid var(--ink); border-radius: 1em; font-size: .78em; font-weight: 800; }
.sb-tag-teal { background: #9bebe2; } .sb-tag-sun { background: #ffe27a; } .sb-tag-rare { background: #bfe8ff; } .sb-tag-epic { background: #e0cffb; } .sb-tag-legendary, .sb-tag-mythic { background: #ffd08a; } .sb-tag-uncommon { background: #d8f2c2; }
.sb-hint { font-size: .85em; opacity: .8; margin: .3em 0; line-height: 1.25; }
.sb-hint.big { font-size: 1.05em; font-weight: 800; opacity: 1; text-align: center; }
.sb-empty { padding: 1.4em; text-align: center; opacity: .65; font-weight: 700; }
.sb-sub { margin: 1em 0 .5em; font: 900 1.05em/1 var(--font); }
.sb-xp { display: block; height: .55em; margin-top: .35em; background: rgba(28, 42, 74, .15); border: 2px solid var(--ink); border-radius: 1em; overflow: hidden; min-width: 4em; }
.sb-xp i { display: block; height: 100%; background: var(--teal); }
.sb-seg { display: inline-flex; border: 3px solid var(--ink); border-radius: 1em; overflow: hidden; box-shadow: 0 .2em 0 var(--ink); }
.sb-segb { padding: .5em .9em; font: 800 .9em/1 var(--font); color: var(--ink); background: var(--cream); border: 0; border-right: 2px solid var(--ink); cursor: pointer; }
.sb-segb:last-child { border-right: 0; }
.sb-segb.on { background: var(--sun); }
.sb-setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 2px dashed rgba(28, 42, 74, .25); }
.sb-setl { font-weight: 900; }
.sb-nick { padding: .25em .8em; background: #fff; border: 2.5px solid var(--ink); border-radius: 1em; }
.sb-nickrow { align-items: center; }
.sb-nickw { display: flex; gap: 8px; align-items: center; flex: 1 1 220px; min-width: 0; justify-content: flex-end; }
.sb-nickin { flex: 1 1 auto; min-width: 0; max-width: 260px; font: 800 16px/1.2 inherit; font-family: inherit; color: var(--ink); padding: .45em .8em; background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: inset 0 2px 0 rgba(28, 42, 74, .12); outline: none; -webkit-user-select: text; user-select: text; }
.sb-nickin:focus { border-color: #22c3b5; box-shadow: 0 0 0 3px rgba(34, 195, 181, .35); }
.sb-nickmsg { flex-basis: 100%; text-align: right; font-weight: 700; opacity: .75; }
.sb-nickmsg.ok { color: #1f9e6a; opacity: 1; }
.sb-nickmsg.bad { color: #e0523a; opacity: 1; }
.sb-rangew { display: flex; align-items: center; gap: 8px; flex: 1 1 200px; max-width: 320px; }
.sb-rangew small { font-weight: 800; opacity: .7; }
.sb-range { flex: 1; accent-color: var(--coral); height: 28px; }
.sb-keys { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 1 1 260px; }
.sb-app-settings .sb-btn-wide { margin-top: 14px; }

/* ---------------------------------------------------------------------------------------------- телефон */
.sb-scrim:has(.sb-phone-panel) { background: rgba(22, 36, 70, .18); justify-content: flex-end; padding-right: max(4vw, 18px); }
.sb-phone-panel.sb-panel { background: none; border: 0; box-shadow: none; width: auto; overflow: visible; animation: sb-phonein .45s var(--spring); }
.sb-phone-panel .sb-pb { padding: 0; background: none; overflow: visible; position: relative; }
@keyframes sb-phonein { 0% { transform: translateY(60px) rotate(4deg) scale(.9); opacity: 0; } 100% { transform: none; opacity: 1; } }
.sb-phone { --h: min(590px, calc(100dvh - 28px)); position: relative; height: var(--h); width: calc(var(--h) * .5); font-size: calc(var(--h) / 36.5); padding: .9em; background: var(--ink); border: 3px solid var(--ink); border-radius: 2.6em; box-shadow: 0 .5em 0 #0f1830, 0 1.2em 2.6em rgba(0, 0, 0, .35), inset 0 0 0 .25em #34456b; font-weight: 700; }
.sb-phone-spk { position: absolute; left: 50%; top: .38em; width: 3.2em; height: .38em; margin-left: -1.6em; background: #0f1830; border-radius: 1em; z-index: 3; }
.sb-phone-screen { position: relative; height: 100%; border-radius: 1.8em; overflow: hidden; display: flex; flex-direction: column; padding: 1.4em .9em .8em; color: #fff; }
.sb-phone-wall { position: absolute; inset: 0; z-index: 0; }
.sb-wall-art, .sb-wall-art svg { width: 100%; height: 100%; display: block; }
.sb-phone-screen > * { position: relative; z-index: 1; }
.sb-phone-screen > .sb-phone-wall { position: absolute; }
.sb-phone-status { display: flex; align-items: center; gap: .5em; font-size: .85em; font-weight: 900; text-shadow: 0 .08em 0 var(--ink); }
.sb-ps-sig { display: inline-flex; align-items: flex-end; gap: .12em; height: .9em; }
.sb-ps-sig i { width: .22em; background: #fff; border-radius: .1em; } .sb-ps-sig i:nth-child(1) { height: 30%; } .sb-ps-sig i:nth-child(2) { height: 50%; } .sb-ps-sig i:nth-child(3) { height: 75%; } .sb-ps-sig i:nth-child(4) { height: 100%; }
.sb-ps-bat { width: 1.5em; height: .8em; border: .15em solid #fff; border-radius: .25em; padding: .08em; } .sb-ps-bat i { display: block; width: 80%; height: 100%; background: #fff; border-radius: .08em; }
.sb-phone-hi { display: flex; flex-direction: column; margin: 1.1em 0 .8em; line-height: 1.1; text-shadow: 0 .08em 0 var(--ink); }
.sb-phone-hi b { font-size: 1.35em; font-weight: 900; -webkit-text-stroke: .14em var(--ink); paint-order: stroke fill; } .sb-phone-hi span { color: var(--sun); font-weight: 900; font-size: 1.1em; -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill; }
.sb-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1em .5em; align-content: start; flex: 1 1 auto; }
.sb-app-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35em; padding: 0; background: none; border: 0; cursor: pointer; font: 800 .8em/1.1 var(--font); color: #fff; -webkit-text-stroke: .14em var(--ink); paint-order: stroke fill; touch-action: manipulation; animation: sb-appin .5s var(--spring) backwards; }
.sb-app-btn:nth-child(2) { animation-delay: .04s; } .sb-app-btn:nth-child(3) { animation-delay: .08s; } .sb-app-btn:nth-child(4) { animation-delay: .12s; } .sb-app-btn:nth-child(5) { animation-delay: .16s; } .sb-app-btn:nth-child(6) { animation-delay: .2s; } .sb-app-btn:nth-child(7) { animation-delay: .24s; } .sb-app-btn:nth-child(8) { animation-delay: .28s; } .sb-app-btn:nth-child(9) { animation-delay: .32s; }
@keyframes sb-appin { 0% { transform: scale(.4); opacity: 0; } }
.sb-app-i { display: flex; align-items: center; justify-content: center; width: 3.9em; height: 3.9em; background: var(--app); border: 3px solid var(--ink); border-radius: 1.15em; box-shadow: 0 .24em 0 var(--ink); transition: transform .09s, box-shadow .09s; }
.sb-app-i .sb-ico { width: 2.4em; height: 2.4em; }
.sb-app-btn:hover .sb-app-i { transform: translateY(-.1em) rotate(-2deg); }
.sb-app-btn:active .sb-app-i { transform: translateY(.2em); box-shadow: 0 .04em 0 var(--ink); }
.sb-phone-bar { align-self: center; width: 7em; height: .35em; margin-top: .5em; background: rgba(255, 255, 255, .85); border-radius: 1em; border: 1px solid var(--ink); }
.sb-phone-x { position: absolute; right: -1.3em; top: -.3em; z-index: 5; }

/* ---------------------------------------------------------------------------------------------- работы */
.sb-boost { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 12px; background: #fff0b8; border: 3px dashed var(--ink); border-radius: 16px; flex-wrap: wrap; }
.sb-boost.on { border-style: solid; background: #d9f7f1; }
.sb-boost-i { width: 2.2em; height: 2.2em; }
.sb-boost-t { display: flex; flex-direction: column; flex: 1 1 140px; line-height: 1.15; } .sb-boost-t span { font-size: .82em; opacity: .75; }
.sb-joblist { display: flex; flex-direction: column; gap: 10px; }
.sb-job { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); }
.sb-job.active { background: #d9f7f1; }
.sb-job-i { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 54px; height: 54px; background: var(--cream2); border: 3px solid var(--ink); border-radius: 16px; }
.sb-job-i .sb-ico { width: 34px; height: 34px; }
.sb-job-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sb-job-n { font: 900 1.05em/1.1 var(--font); }
.sb-job-d { font-size: .82em; opacity: .75; line-height: 1.2; }
.sb-job-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sb-job-go { flex: 0 0 auto; }
.sb-job.card { box-shadow: none; border: 0; background: none; padding: 0; flex-wrap: wrap; }

/* ---------------------------------------------------------------------------------------------- карта */
.sb-mapwrap { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; height: 100%; min-height: 0; }
.sb-mapstage { position: relative; align-self: start; justify-self: center; width: min(100%, calc(min(640px, 100dvh - 20px) - 112px)); aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--cream); box-shadow: 0 4px 0 var(--ink); }
.sb-mapc { width: 100%; height: 100%; display: block; }
.sb-mappins { position: absolute; inset: 0; }
.sb-pin { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 0; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
.sb-pin i { display: block; width: 18px; height: 18px; margin: 6px; background: var(--dc); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 2px 0 var(--ink); transition: transform .12s var(--spring); }
.sb-pin:hover i { transform: scale(1.35); }
.sb-you { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; pointer-events: none; }
.sb-you i { display: block; width: 100%; height: 100%; background: #fff; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 0 0 5px rgba(255, 107, 87, .4); animation: sb-dotpulse 1.2s ease-in-out infinite; }
.sb-homepin { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; }
.sb-mapside { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
.sb-dlist { display: flex; flex-direction: column; gap: 8px; }
.sb-dbtn { justify-content: flex-start; padding-left: .6em; min-height: 3em; }
.sb-dbtn .sb-ico { background: var(--dc); border: 2.5px solid var(--ink); border-radius: 50%; padding: .1em; width: 1.7em; height: 1.7em; }
.sb-dbtn .sb-btn-t { flex: 1; text-align: left; }
.sb-dbtn-s { font-size: .72em; opacity: .7; }
.sb-mapad { margin-top: 4px; }

/* ---------------------------------------------------------------------------------------------- дома */
.sb-home-stage { display: flex; align-items: center; justify-content: center; gap: 10px; touch-action: pan-y; }
.sb-home-card { position: relative; flex: 1 1 auto; max-width: 340px; padding: 10px 12px 12px; background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); animation: sb-popin .3s var(--spring); }
.sb-home-art { background: linear-gradient(#bfe8ff 0 62%, #d8f0a8 62%); border: 3px solid var(--ink); border-radius: 14px; padding: 6px; }
.sb-home-art svg { width: 100%; display: block; max-height: 190px; }
.sb-home-card.locked .sb-home-art { filter: grayscale(.8) brightness(.9); }
.sb-home-lock { position: absolute; right: 22px; top: 22px; width: 54px; height: 54px; padding: 8px; background: var(--sun); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink); }
.sb-home-lock .sb-ico { width: 100%; height: 100%; }
.sb-sign { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: -14px 8px 0; position: relative; padding: 6px 10px; background: var(--wood); border: 3px solid var(--ink); border-radius: 12px; color: #fff; text-align: center; }
.sb-sign b { font-size: 1.05em; -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill; }
.sb-sign span { font-size: .8em; background: rgba(255, 255, 255, .92); color: var(--ink); padding: 0 .6em; border-radius: 1em; } .sb-sign span.mine { background: var(--leaf); } .sb-sign span.taken { background: #ffd9d2; }
.sb-arrow { flex: 0 0 auto; width: 3.1em; min-height: 3.1em; }
.sb-home-count { text-align: center; font-weight: 800; opacity: .7; margin: 8px 0 4px; font-size: .85em; }
.sb-home-act { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ---------------------------------------------------------------------------------------------- транспорт */
.sb-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.sb-vcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 10px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); text-align: center; }
.sb-vcard.st-locked .sb-vpic { filter: saturate(.55); }
.sb-vpic { --vc: #4aa3df; display: flex; align-items: center; justify-content: center; width: 100%; height: 76px; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--vc) 55%, #fff) 0 55%, color-mix(in srgb, var(--vc) 25%, #fff) 56%); border: 3px solid var(--ink); border-radius: 14px; }
.sb-vpic .sb-ico { width: 56px; height: 56px; }
.sb-vn { font: 900 1em/1.1 var(--font); }
.sb-vs { display: flex; gap: 10px; font-size: .78em; opacity: .75; }
.sb-vact { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; margin-top: 4px; }
.sb-vact .sb-btn { min-height: 2.4em; font-size: .85em; padding: 0 .5em; }
.sb-vjob { position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; padding: 3px; background: var(--cream2); border: 2.5px solid var(--ink); border-radius: 50%; }
.sb-vjob .sb-ico { width: 100%; height: 100%; }

/* ---------------------------------------------------------------------------------------------- гардероб */
.sb-wd { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 12px; flex: 1 1 auto; min-height: 0; }
.sb-wd-view, .sb-shop-view { position: relative; min-height: 220px; background: radial-gradient(circle at 50% 80%, #fff 0, #bfe8ff 60%, #8fd5f2); border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: inset 0 -.6em 0 rgba(28, 42, 74, .08); }
.sb-wd-view canvas, .sb-shop-view canvas { position: absolute; inset: 0; }
.sb-wd-ph { position: absolute; left: 50%; top: 50%; width: 40%; height: 40%; transform: translate(-50%, -50%); opacity: .5; }
.sb-wd-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.sb-wd-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding-right: 4px; }
.sb-sw { margin-bottom: 12px; } .sb-sw h4 { margin: 0 0 6px; font: 900 .95em/1 var(--font); }
.sb-swg { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-swatch { width: 38px; height: 38px; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink); cursor: pointer; touch-action: manipulation; transition: transform .1s var(--spring); }
.sb-swatch:hover { transform: scale(1.1); } .sb-swatch.on { outline: 4px solid var(--sun); outline-offset: 2px; transform: scale(1.1); }
.sb-items, .sb-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 9px; }
.sb-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; cursor: pointer; font: 800 .72em/1.1 var(--font); color: var(--ink); touch-action: manipulation; }
.sb-item.on { background: var(--sun); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.sb-item .sb-thumb { width: 100%; }
.sb-item-n { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sb-thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; width: 100%; background: radial-gradient(circle at 50% 60%, #fff, #e3f4fb); border: 2.5px solid rgba(28, 42, 74, .55); border-radius: 10px; overflow: hidden; }
.sb-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; animation: sb-fade .25s; }
.sb-thumb-ph { width: 50%; height: 50%; opacity: .45; }

/* редкость: цвет рамки */
.sb-r-uncommon { --rc: #6fcf5f; } .sb-r-rare { --rc: #4aa3df; } .sb-r-epic { --rc: #9b6fe0; } .sb-r-legendary { --rc: #ffa81f; } .sb-r-mythic { --rc: #ff4f9a; } .sb-r-common { --rc: #8a97ad; }
.sb-item, .sb-card { border-color: var(--ink); }
.sb-r-uncommon .sb-thumb, .sb-r-rare .sb-thumb, .sb-r-epic .sb-thumb, .sb-r-legendary .sb-thumb, .sb-r-mythic .sb-thumb, .sb-r-common .sb-thumb { border-color: var(--rc); border-width: 3px; }
.sb-r-legendary .sb-thumb, .sb-r-mythic .sb-thumb { background: radial-gradient(circle at 50% 60%, #fff8d8, #ffe39a); }
.sb-r-epic .sb-thumb { background: radial-gradient(circle at 50% 60%, #fff, #eadbff); }
.sb-r-mythic .sb-thumb { background: radial-gradient(circle at 50% 60%, #fff0f7, #ffc6de); animation: sb-glow 1.8s ease-in-out infinite; }
.sb-r-legendary .sb-thumb { animation: sb-glow 2.2s ease-in-out infinite; }
@keyframes sb-glow { 50% { box-shadow: 0 0 .9em var(--rc); } }

/* ---------------------------------------------------------------------------------------------- магазин */
.sb-shop { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 12px; flex: 1 1 auto; min-height: 0; }
.sb-shop-left { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.sb-shop-view { flex: 1 1 auto; min-height: 150px; }
.sb-view-hint { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 11px; font-weight: 800; opacity: .6; pointer-events: none; }
.sb-shop-detail { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; padding: 10px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); }
.sb-det-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; } .sb-det-n { font: 900 1em/1.1 var(--font); }
.sb-det-p { display: flex; align-items: center; gap: 6px; font-size: .95em; } .sb-det-p .sb-xp { flex: 1; }
.sb-det-a { display: flex; flex-direction: column; gap: 6px; } .sb-det-a .sb-btn { width: 100%; }
.sb-shop-right { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.sb-shop-grid { flex: 1 1 auto; min-height: 0; overflow: auto; align-content: start; padding: 2px 4px 8px 2px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.sb-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 5px 6px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); cursor: pointer; font: 800 .74em/1.1 var(--font); color: var(--ink); touch-action: manipulation; transition: transform .1s var(--spring); }
.sb-card:hover { transform: translateY(-2px); } .sb-card.sel { background: var(--sun); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); transform: translateY(-2px); }
.sb-card-n { display: block; width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95em; }
.sb-card-p { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: .1em .6em; background: var(--cream2); border: 2px solid var(--ink); border-radius: 1em; font-size: .92em; }
.sb-card.k-coins .sb-card-p { background: #ffe27a; } .sb-card.k-ads .sb-card-p { background: #9bebe2; } .sb-card.st-owned .sb-card-p, .sb-card.st-equipped .sb-card-p { background: #d8f2c2; } .sb-card.st-equipped .sb-card-p { background: var(--leaf); color: #fff; }
.sb-card-b { position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; padding: 2px; background: var(--cream); border: 2px solid var(--ink); border-radius: 50%; } .sb-card-b .sb-ico { width: 100%; height: 100%; }
.sb-card-bar { position: absolute; left: 8px; right: 8px; top: calc(100% - 22px); height: 5px; background: rgba(28, 42, 74, .18); border-radius: 1em; overflow: hidden; display: none; } .sb-card-bar i { display: block; height: 100%; background: var(--teal); }
.sb-card.st-locked .sb-thumb img { filter: brightness(.85) saturate(.8); }
.sb-card.sb-pop { animation: sb-popin .4s var(--spring); }

/* ---------------------------------------------------------------------------------------------- подарки и колесо */
.sb-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; margin-bottom: 10px; }
.sb-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 10px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); text-align: center; }
.sb-day-n { font-size: .75em; font-weight: 900; opacity: .7; }
.sb-day-i { display: flex; width: 44px; height: 44px; } .sb-day-i .sb-ico { width: 100%; height: 100%; }
.sb-day-r { font-size: .85em; line-height: 1.1; }
.sb-day .sb-thumb { width: 64px; }
.sb-day.st-claimed { background: #d8f2c2; } .sb-day.st-locked { opacity: .8; }
.sb-day.st-today { background: #fff0b8; animation: sb-glowsun 1.2s ease-in-out infinite; }
@keyframes sb-glowsun { 50% { box-shadow: 0 4px 0 var(--ink), 0 0 16px var(--sun); } }
.sb-day.big { grid-column: span 2; background: linear-gradient(#fff, #ffe9bd); border-color: var(--ink); }
.sb-day-ok { position: absolute; right: -6px; top: -8px; width: 28px; height: 28px; padding: 4px; background: var(--leaf); border: 3px solid var(--ink); border-radius: 50%; } .sb-day-ok .sb-ico { width: 100%; height: 100%; }
.sb-day-now { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 1px 10px; background: var(--coral); color: #fff; border: 2.5px solid var(--ink); border-radius: 1em; font-size: .72em; font-weight: 900; -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; }
.sb-gact { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.sb-wheel { position: relative; width: min(330px, 70vw, calc(100dvh - 330px)); min-width: 200px; aspect-ratio: 1; margin: 18px auto 8px; }
.sb-wheel-disc { position: absolute; inset: 0; border-radius: 50%; border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink), 0 0 0 9px var(--sun), 0 0 0 12px var(--ink); background: var(--cream); will-change: transform; }
.sb-wheel-disc svg { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.sb-wheel-lab { position: absolute; inset: 0; pointer-events: none; }
.sb-wheel-in { position: absolute; left: 50%; top: 7%; width: 24%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: clamp(11px, 3.3vw, 17px); text-align: center; line-height: 1; color: var(--ink); }
.sb-wheel-in .sb-ico { width: 2.1em; height: 2.1em; }
.sb-wheel-in b { -webkit-text-stroke: .0 transparent; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.sb-wheel-hub { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; margin: -11% 0 0 -11%; display: flex; align-items: center; justify-content: center; background: var(--coral); border: 4px solid var(--ink); border-radius: 50%; box-shadow: 0 4px 0 var(--ink); }
.sb-wheel-hub .sb-ico { width: 60%; height: 60%; }
.sb-wheel-ptr { position: absolute; left: 50%; top: -22px; width: 36px; height: 40px; margin-left: -18px; background: var(--coral); clip-path: polygon(50% 100%, 0 0, 100% 0); filter: drop-shadow(0 3px 0 var(--ink)); z-index: 3; }
.sb-wheel-ptr::before { content: ''; position: absolute; inset: 0; background: var(--ink); clip-path: polygon(50% 100%, 0 0, 100% 0); z-index: -1; }
.sb-wheel-ptr::after { content: ''; position: absolute; left: 5px; right: 5px; top: 0; bottom: 8px; background: var(--coral); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.sb-wheel-res { min-height: 1.6em; text-align: center; font: 900 1.1em/1.2 var(--font); margin-top: 8px; }

/* ---------------------------------------------------------------------------------------------- рюкзак, эмоции */
.sb-bag { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sb-bagi { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); }
.sb-bagi-i { display: flex; width: 64px; height: 64px; padding: 8px; background: var(--cream2); border: 3px solid var(--ink); border-radius: 50%; } .sb-bagi-i .sb-ico { width: 100%; height: 100%; }
.sb-bagi-d { font-size: .8em; opacity: .75; min-height: 2.2em; }
.sb-emotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin-bottom: 8px; }
.sb-emote { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; background: #fff; border: 3px solid var(--ink); border-radius: 50% 50% 22px 22px / 40% 40% 22px 22px; box-shadow: 0 4px 0 var(--ink); cursor: pointer; font: 800 .82em/1.1 var(--font); color: var(--ink); touch-action: manipulation; transition: transform .1s var(--spring); }
.sb-emote:hover { transform: translateY(-3px) rotate(-1.5deg); } .sb-emote:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.sb-emote-i { display: flex; width: 64px; } .sb-emote-i .sb-ico { width: 64px; height: 64px; }
.sb-emote .sb-thumb { width: 64px; }

/* ---------------------------------------------------------------------------------------------- предложения и итог смены */
.sb-offerhost { display: flex; flex-direction: column; gap: 8px; }
.sb-offer { position: relative; display: flex; align-items: flex-start; gap: .6em; padding: .65em .7em .8em .6em; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.2em; box-shadow: 0 .3em 0 var(--ink); pointer-events: auto; animation: sb-offerin .5s var(--spring); transform-origin: left center; font-size: 1em; overflow: hidden; }
.sb-offer.sb-out { animation: sb-offerout .22s ease-in forwards; }
@keyframes sb-offerin { 0% { transform: translateX(-120%) rotate(-4deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes sb-offerout { to { transform: translateX(-110%); opacity: 0; } }
.sb-offer-i { display: flex; flex: 0 0 auto; width: 3.2em; height: 3.2em; padding: .5em; background: var(--sun); border: 3px solid var(--ink); border-radius: 50%; } .sb-offer-i .sb-ico { width: 100%; height: 100%; }
.sb-offer-m { display: flex; flex-direction: column; gap: .2em; min-width: 0; flex: 1 1 auto; padding-right: 1.6em; }
.sb-offer-t { font: 900 1.02em/1.1 var(--font); } .sb-offer-d { font-size: .8em; line-height: 1.2; opacity: .8; }
.sb-offer-a { display: flex; flex-wrap: wrap; gap: .4em; margin-top: .3em; } .sb-offer-a .sb-btn { font-size: .78em; }
.sb-offer-x { position: absolute; right: .35em; top: .35em; width: 1.9em !important; min-height: 1.9em !important; box-shadow: 0 .1em 0 var(--ink); } .sb-offer-x .sb-ico { width: .8em; height: .8em; }
.sb-offer-bar { position: absolute; left: 0; right: 0; bottom: 0; height: .35em; background: rgba(28, 42, 74, .15); } .sb-offer-bar i { display: block; height: 100%; width: 100%; background: var(--coral); transform-origin: left; animation: sb-barrun linear forwards; }
@keyframes sb-barrun { to { transform: scaleX(0); } }
.sb-shift { display: flex; flex-direction: column; gap: 8px; }
.sb-shift-job { display: flex; align-items: center; gap: 12px; font-size: 1.1em; }
.sb-sline { display: flex; justify-content: space-between; padding: 8px 12px; background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; font-weight: 800; }
.sb-sline.total { background: #fff0b8; font-size: 1.2em; border-width: 3px; }
.sb-levelup { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; background: var(--teal); color: #fff; border: 3px solid var(--ink); border-radius: 14px; font-weight: 900; -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; animation: sb-popin .5s var(--spring); }
.sb-shift-a { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* ---------------------------------------------------------------------------------------------- обучение и экранная кнопка Input */
.lory-tut-card { border-width: 3px !important; border-radius: 18px !important; box-shadow: 0 5px 0 var(--ink) !important; font-weight: 700; background: var(--cream) !important; }
.lory-tut-title { font-weight: 900 !important; color: var(--coral-d); -webkit-text-stroke: 0; }
.lory-tut-key { background: var(--coral) !important; color: #fff !important; border: 2px solid var(--ink); -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill; box-shadow: 0 2px 0 var(--ink) !important; }
.lory-tut-skip { background: var(--sun) !important; border: 3px solid var(--ink) !important; color: var(--ink) !important; box-shadow: 0 3px 0 var(--ink); }
.lory-tut-skip kbd { background: var(--ink) !important; color: #fff !important; }
.lory-tut-bar { background: rgba(28, 42, 74, .18) !important; } .lory-tut-bar i { background: var(--teal) !important; }
.lory-tut-dots i { background: rgba(28, 42, 74, .25) !important; } .lory-tut-dots i.done { background: var(--teal) !important; } .lory-tut-dots i.cur { background: var(--coral) !important; }
.lory-tut-final { border: 3px solid var(--ink) !important; background: var(--cream) !important; color: var(--ink) !important; box-shadow: 0 4px 0 var(--ink); }
.lory-ctx { border: 3px solid var(--ink) !important; background: var(--sun) !important; color: var(--ink) !important; box-shadow: 0 5px 0 var(--ink); text-shadow: none !important; font-family: var(--font) !important; }
.lory-ctx-label { text-shadow: none !important; font-weight: 800; }
.lory-ctx:active, .lory-ctx.held { box-shadow: 0 1px 0 var(--ink); }
.lory-stick { border-color: var(--ink) !important; background: rgba(255, 244, 220, .45) !important; }
.lory-stick i { background: var(--coral) !important; border: 3px solid var(--ink); }

@media (prefers-reduced-motion: reduce) { #sb-ui *, #sb-ui *::before, #sb-ui *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* чат и тосты живут в слое HUD (вне контейнера окон) — обычные @media */
.sb-chatbox { max-height: min(70vh, calc(100dvh - var(--hl-sb-menu-y, 10px) - var(--hl-sb-menu-h, 52px) - 18px)); }
.sb-chatquick { flex: 1 1 auto; min-height: 0; }
.sb-chatquick .sb-chip-btn, .sb-chatbox .sb-btn { min-height: 40px; }
@media (max-height: 520px) {
    .sb-toast { font-size: 12px; }
    .sb-chatbox { font-size: 13px; width: min(300px, 50vw); padding: .45em; gap: .35em; }
    .sb-chatlog { flex: 0 1 auto; min-height: 2.6em; max-height: 4.6em; }
}
@media (max-width: 620px) and (min-height: 521px) { .sb-chatbox { width: calc(100vw - 20px); } }
/* ImageGen-арт: плитки приложений, метки карты, колесо, узор */
.sb-app-i.sb-app-art:has(img) { background: none; border: 0; box-shadow: none; }
.sb-app-i.sb-app-art img { width: 100%; height: 100%; filter: drop-shadow(0 .2em 0 var(--ink)); }
.sb-app-i.sb-app-art:has(img) .sb-ico { width: 100%; height: 100%; }
.sb-pin.art i, .sb-pin img { display: block; } .sb-pin img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(28,42,74,.6)); }
.sb-you img { width: 100%; height: 100%; }
.sb-wheel-rim { position: absolute; inset: -9%; width: 118%; height: 118%; object-fit: contain; pointer-events: none; z-index: 2; }
.sb-wheel-hub.art, .sb-wheel-ptr.art { background: none; border: 0; box-shadow: none; clip-path: none; filter: none; }
.sb-wheel-hub.art img, .sb-wheel-ptr.art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sb-wheel-ptr.art::before, .sb-wheel-ptr.art::after { display: none; }
.sb-pb.sb-pattern { background-image: url('../assets/ui/bg/panel-pattern.webp'); background-size: 256px; }

/* HUD под окнами: радар и быстрая панель прячутся, чтобы не торчать из-под телефона и окон */
.sb-hud-dim .sb-radar, .sb-hud-dim .sb-quick, .sb-hud-dim .sb-bottom, .sb-hud-dim .sb-feed, .sb-hud-dim .sb-goal, .sb-hud-dim .sb-buffs { opacity: 0; pointer-events: none !important; transition: opacity .15s; }


/* ===================================================================================================================
   HUD v2 — «нарисовано руками». Разные материалы для разных вещей (бумага, дерево, наклейка, эмаль, глянцевый пластик), одна палитра,
   один вес обводки и шрифт. Тени — жёсткие смещённые формы, не размытие. Контур вырезных форм делает .sb-die (стопка drop-shadow).
   =================================================================================================================== */
:root {
    --paper: #fff8e4; --paper2: #fdeec6; --wood2: #9c6535;
    --die: drop-shadow(.16em 0 0 var(--ink)) drop-shadow(-.16em 0 0 var(--ink)) drop-shadow(0 .16em 0 var(--ink)) drop-shadow(0 -.16em 0 var(--ink));
    --star: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
/* вырезная форма: контур + жёсткая тень по форме clip-path внутри */
.sb-die { position: absolute; inset: 0; pointer-events: none; filter: var(--die) drop-shadow(0 .24em 0 var(--ink)); }
.sb-die > i { position: absolute; inset: 0; display: block; }

/* ---------------------------------------------------------------------------------------------- деньги: мешочек и лента */
.sb-top { align-items: flex-start; justify-content: center; gap: .9em; padding-top: .1em; }
.sb-money { position: relative; display: flex; align-items: center; height: 3.3em; padding-left: 1.9em; margin-top: .45em; pointer-events: auto; transform: rotate(-1.6deg); transform-origin: 15% 60%; }
.sb-money-rb { position: relative; display: flex; align-items: center; gap: .2em; height: 2.5em; min-width: 7.6em; padding: 0 1.9em 0 1.9em; }
.sb-money-rb .sb-die > i { background: linear-gradient(100deg, #ffd849 0 70%, #ffc21f 70%); clip-path: polygon(0 0, 100% 0, calc(100% - .7em) 50%, 100% 100%, 0 100%); }
.sb-money-rb .sb-die > i::before { content: ''; position: absolute; left: 1.2em; right: 1.6em; top: .3em; height: .26em; border-radius: 1em; background: rgba(255, 255, 255, .6); transform: rotate(-.6deg); }
.sb-money-d { position: relative; align-self: flex-start; margin-top: .35em; font: 900 .85em/1 var(--font); color: var(--ink); opacity: .8; }
.sb-money-n { position: relative; font: 900 1.55em/1 var(--font); font-variant-numeric: tabular-nums; color: #fff; -webkit-text-stroke: .2em var(--ink); paint-order: stroke fill; letter-spacing: .01em; }
.sb-money-bag { position: absolute; left: -.2em; top: 50%; z-index: 2; width: 3.5em; height: 3.5em; margin-top: -1.9em; transform: rotate(-10deg); transform-origin: 50% 85%; filter: drop-shadow(.08em .2em 0 var(--ink)); pointer-events: none; }
.sb-money.sb-bump .sb-money-bag { animation: sb-jiggle .65s var(--spring); }
.sb-money.sb-bump-dn .sb-money-bag { animation: sb-slump .4s ease-out; }
.sb-money.sb-bump .sb-money-n { animation: sb-numhop .45s var(--spring); }
@keyframes sb-jiggle { 0% { transform: rotate(-10deg) scale(1); } 18% { transform: rotate(-24deg) scale(1.16, .9); } 40% { transform: rotate(6deg) scale(.94, 1.12); } 62% { transform: rotate(-16deg) scale(1.04); } 100% { transform: rotate(-10deg) scale(1); } }
@keyframes sb-slump { 40% { transform: rotate(-4deg) scale(1.06, .88); } 100% { transform: rotate(-10deg); } }
@keyframes sb-numhop { 30% { transform: translateY(-.12em) scale(1.12); } 100% { transform: none; } }
.sb-money-coin { position: absolute; left: 1.3em; top: 3em; z-index: 3; width: 1.35em; height: 1.35em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b0, #ffc83d 55%, #e9a400); border: .17em solid var(--ink); pointer-events: none; animation: sb-coinfly .75s cubic-bezier(.3, .6, .4, 1) forwards; }
.sb-money-coin::after { content: '$'; position: absolute; inset: 0; display: grid; place-items: center; font: 900 .8em/1 var(--font); color: var(--ink); }
@keyframes sb-coinfly { 0% { transform: translateY(1.2em) perspective(300px) rotateY(0) scale(.5); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-1.3em) perspective(300px) rotateY(720deg) scale(1); opacity: 0; } }
.sb-spark { position: absolute; left: .2em; top: .2em; width: 1.5em; height: 1.5em; z-index: 3; pointer-events: none; filter: var(--die); animation: sb-twinkle .8s ease-out forwards; }
.sb-spark::before { content: ''; position: absolute; inset: 0; background: #fff6b0; clip-path: var(--star); }
@keyframes sb-twinkle { 0% { transform: scale(0) rotate(0); opacity: 0; } 35% { transform: scale(1.2) rotate(40deg); opacity: 1; } 100% { transform: scale(0) rotate(90deg); opacity: 0; } }
.sb-money-pop { left: 2.6em; right: auto; top: 100%; margin-top: .25em; font: 900 1.2em/1 var(--font); }
.sb-money-pop.up { color: #ffe27a; }

/* ---------------------------------------------------------------------------------------------- часы: медальон с дугой дня */
.sb-clock { position: relative; width: 4.5em; height: 4.5em; padding: 0; pointer-events: auto; transform: rotate(1.8deg); background: none; border: 0; box-shadow: none; display: block; }
.sb-clock.night { background: none; }
.sb-clock-disc { position: absolute; left: .25em; top: 0; width: 4em; height: 4em; border-radius: 50%; overflow: hidden; border: .2em solid var(--ink); box-shadow: 0 .24em 0 var(--ink), inset 0 0 0 .14em rgba(255, 255, 255, .55);
    background: radial-gradient(circle at 50% 100%, transparent .26em, rgba(255, 255, 255, .6) .28em .38em, transparent .4em) 0 61% / .9em .5em repeat-x, linear-gradient(#8fd5f2 0 59%, #35c3b5 59%); }
.sb-clock.night .sb-clock-disc { background: radial-gradient(circle, #fff 0 .05em, transparent .07em) 0 0 / 1.1em 1.3em, radial-gradient(circle at 50% 100%, transparent .26em, rgba(143, 213, 242, .45) .28em .38em, transparent .4em) 0 61% / .9em .5em repeat-x, linear-gradient(#26345f 0 59%, #1a6a86 59%); }
.sb-clock-arc { position: absolute; left: .25em; top: .32em; width: 4em; height: 2.4em; pointer-events: none; }
.sb-clock-arc svg { width: 100%; height: 100%; display: block; }
.sb-clock-ico { position: absolute; left: 2.25em; top: 2.4em; z-index: 2; width: 1.8em; height: 1.8em; margin: -.9em 0 0 -.9em; transform: translate(calc(var(--sx, -1) * 1.68em), calc(var(--sy, 0) * 1.68em)); transition: transform 1.6s cubic-bezier(.3, 1.35, .5, 1); filter: drop-shadow(0 .1em 0 rgba(28, 42, 74, .55)); }
.sb-clock-ico .sb-ico { width: 100%; height: 100%; }
.sb-clock-plate { position: absolute; left: 50%; bottom: -.1em; z-index: 3; min-width: 3.5em; padding: .08em .6em .12em; text-align: center; transform: translateX(-50%) rotate(-2.5deg); background: repeating-linear-gradient(176deg, #d99a58 0 .38em, #c98a4b .38em .46em); border: .17em solid var(--ink); border-radius: .4em; box-shadow: 0 .17em 0 var(--ink); }
.sb-clock-t { font: 900 .98em/1.15 var(--font); font-variant-numeric: tabular-nums; color: #fff; -webkit-text-stroke: .2em var(--ink); paint-order: stroke fill; }

/* ---------------------------------------------------------------------------------------------- меню слева: чехол с ракушкой, пузырь, значок */
.sb-menu { gap: .75em; align-items: center; }
.sb-menu .sb-btn { position: relative; border-width: 3px; }
.sb-menu .sb-btn-big { width: 3.2em; min-height: 4em; border-radius: .95em; transform: rotate(-3deg); background: linear-gradient(160deg, #54dccd, #1fb0a3); }
.sb-menu .sb-btn-big:active:not(:disabled) { transform: rotate(-3deg) translateY(.2em) scale(.96, .93); }
.sb-menu .sb-btn-big::before { content: ''; position: absolute; left: 50%; top: .28em; width: .9em; height: .2em; margin-left: -.45em; border-radius: 1em; background: rgba(28, 42, 74, .55); }
.sb-menu .sb-btn-big::after { content: ''; position: absolute; right: -.7em; bottom: -.55em; width: 1.7em; height: 1.6em; transform: rotate(16deg); pointer-events: none; filter: drop-shadow(.06em .12em 0 rgba(28, 42, 74, .55));
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M16 27 L5 19 Q0 9 9 4 Q16 0 23 4 Q32 9 27 19Z' fill='rgb(255,185,207)' stroke='rgb(28,42,74)' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M16 26V8M16 26L9 10M16 26L23 10M16 26L5 16M16 26L27 16' stroke='rgb(28,42,74)' stroke-width='1.5' stroke-linecap='round'/%3E%3Crect x='11' y='25' width='10' height='4' rx='2' fill='rgb(255,200,61)' stroke='rgb(28,42,74)' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat; }
.sb-menu .sb-btn:nth-child(2) { isolation: isolate; border-radius: 1.1em 1.1em 1.1em .3em; transform: rotate(2deg); width: 3em; background: linear-gradient(#fffdf2, #ffedc2); }
.sb-menu .sb-btn:nth-child(2)::after { content: ''; position: absolute; left: .35em; bottom: -.62em; width: .85em; height: .8em; z-index: -1; background: #ffedc2; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: skewX(38deg); border-radius: 0 0 0 .3em; }
.sb-menu .sb-btn:nth-child(2):active:not(:disabled) { transform: rotate(2deg) translateY(.2em) scale(.95); }
.sb-menu .sb-btn:nth-child(3) { border-radius: 50%; width: 2.9em; background: radial-gradient(circle at 35% 28%, #ffffff 0 12%, #dfe6f4 70%); }
.sb-menu .sb-btn:nth-child(3)::before { content: ''; position: absolute; inset: .3em; border: 2px dashed rgba(28, 42, 74, .4); border-radius: 50%; pointer-events: none; }
.sb-menu .sb-btn:nth-child(3):hover .sb-ico { transform: rotate(60deg); }
.sb-menu .sb-btn:nth-child(3) .sb-ico { transition: transform .5s var(--spring); }
.sb-dot { width: 1.15em; height: 1.15em; right: -.4em; top: -.45em; background: radial-gradient(circle at 35% 30%, #ffb0a2, var(--coral) 62%); box-shadow: 0 .1em 0 var(--ink); z-index: 3; }

/* ---------------------------------------------------------------------------------------------- цель: бумажный листок на кнопке */
.sb-goal { position: relative; display: flex; align-items: center; gap: .6em; padding: .7em .8em 1.05em 3.5em; background: none; border: 0; border-radius: 0; box-shadow: none; transform: rotate(-.8deg); margin-top: .2em; }
.sb-goal .sb-die > i { background: repeating-linear-gradient(transparent 0 1.25em, rgba(74, 163, 223, .25) 1.25em calc(1.25em + 1px)), linear-gradient(95deg, var(--paper) 0 86%, var(--paper2));
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - .55em), 96% 100%, 91% calc(100% - .42em), 85% calc(100% - .08em), 78% calc(100% - .5em), 71% 100%, 64% calc(100% - .38em), 55% calc(100% - .05em), 47% calc(100% - .5em), 39% 100%, 31% calc(100% - .4em), 22% calc(100% - .06em), 14% calc(100% - .5em), 7% 100%, 0 calc(100% - .45em)); }
.sb-goal-pin { position: absolute; left: 62%; top: -.5em; z-index: 3; width: 1.15em; height: 1.15em; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #ffd0c7 0 14%, var(--coral) 45%, var(--coral-d)); border: .17em solid var(--ink); box-shadow: .14em .3em 0 rgba(28, 42, 74, .45); }
.sb-goal-ic { position: absolute; left: -.75em; top: 50%; z-index: 3; width: 3.4em; height: 3.4em; margin-top: -1.8em; transform: rotate(-9deg); filter: drop-shadow(.06em .18em 0 rgba(28, 42, 74, .75)); }
.sb-goal-ic .sb-ico, .sb-goal-ico { position: relative; width: 100%; height: 100%; }
.sb-goal-ring { position: absolute; inset: -.1em; border-radius: 50%; opacity: 0; transition: opacity .2s; pointer-events: none; }
.sb-goal-ic.timed .sb-goal-ring { opacity: 1; background: conic-gradient(var(--coral) calc(var(--p, 1) * 360deg), rgba(28, 42, 74, .25) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - .28em), #000 calc(100% - .26em)); mask: radial-gradient(farthest-side, transparent calc(100% - .28em), #000 calc(100% - .26em)); }
.sb-goal-m { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; gap: .3em; min-width: 0; }
.sb-goal-t { position: relative; flex: none; font: 800 .98em/1.18 var(--font); color: var(--ink); transform: rotate(.4deg); }
.sb-goal-dots { display: flex; gap: .3em; }
.sb-goal-dots i { width: .62em; height: .62em; border-radius: 50%; background: rgba(255, 255, 255, .8); border: 2px solid var(--ink); }
.sb-goal-dots i.done { background: var(--teal); }
.sb-goal-dots i.cur { background: var(--sun); transform: scale(1.3); animation: sb-dothop 1s var(--spring) infinite; }
@keyframes sb-dothop { 50% { transform: scale(1.3) translateY(-.2em); } }
.sb-goal-d { position: relative; flex: 0 0 auto; padding: .12em .55em; background: none; color: var(--coral-d); border: .17em dashed var(--coral-d); border-radius: .4em; font: 900 .92em/1.1 var(--font); letter-spacing: .02em; -webkit-text-stroke: 0; transform: rotate(4deg); font-variant-numeric: tabular-nums; }
.sb-goal.sb-pop { animation: sb-ticketin .5s var(--spring); }
@keyframes sb-ticketin { 0% { transform: rotate(-6deg) translateY(-1.5em) scale(.8); opacity: 0; } 60% { transform: rotate(1.2deg) scale(1.04); opacity: 1; } 100% { transform: rotate(-.8deg); } }

/* ---------------------------------------------------------------------------------------------- правая панель: доска для сёрфа и наклейки */
.sb-quick { position: relative; isolation: isolate; align-items: center; gap: .55em; padding: 1.1em .5em 1em; background: none; border: 0; border-radius: 0; box-shadow: none; }
.sb-quick::before { content: ''; position: absolute; inset: 0 .3em; z-index: -1; border: 3px solid var(--ink); border-radius: 50% 50% 46% 46% / 11% 11% 8% 8%; box-shadow: .22em .26em 0 var(--ink);
    background: linear-gradient(90deg, var(--paper) 0 30%, var(--coral) 30% 38%, var(--paper) 38% 66%, rgba(46, 196, 182, .55) 66% 70%, var(--paper) 70%); }
.sb-quick .sb-qbtn { --rot: -4deg; width: 3.15em; min-height: 3.15em; border: 3px solid var(--ink); border-radius: 46% 54% 50% 50% / 56% 44% 56% 44%; box-shadow: 0 .2em 0 var(--ink), inset 0 -.2em 0 rgba(28, 42, 74, .14); transform: rotate(var(--rot)); }
.sb-quick .sb-qbtn:nth-child(2) { --rot: 3deg; border-radius: 55% 45% 42% 58% / 48% 52% 48% 52%; margin-right: .25em; }
.sb-quick .sb-qbtn:nth-child(3) { --rot: -2deg; border-radius: 1em; margin-left: .2em; }
.sb-quick .sb-qbtn:nth-child(4) { --rot: 4.5deg; border-radius: 50%; }
.sb-quick .sb-qbtn:nth-child(5) { --rot: -3deg; border-radius: 1em 1em 50% 50% / 1em 1em 40% 40%; margin-right: .15em; }
.sb-quick .sb-qbtn::after { content: ''; position: absolute; left: .32em; top: .22em; width: 1em; height: .38em; border-radius: 50%; background: rgba(255, 255, 255, .72); transform: rotate(-28deg); pointer-events: none; }
.sb-quick .sb-qbtn .sb-ico { width: 2.3em; height: 2.3em; filter: drop-shadow(0 .1em 0 rgba(28, 42, 74, .3)); }
.sb-quick .sb-qbtn:hover { transform: rotate(var(--rot)) scale(1.08); }
.sb-quick .sb-qbtn:active:not(:disabled) { transform: rotate(var(--rot)) translateY(.17em) scale(.93, .86); box-shadow: 0 .03em 0 var(--ink); }
.sb-q-sun { --bg: #ffd84a; } .sb-q-coral { --bg: #ff8f7c; } .sb-q-teal { --bg: #59d9cc; } .sb-q-sky { --bg: #7dbdee; } .sb-q-pink { --bg: #ffa9c6; }
.sb-fold { box-shadow: 0 .14em 0 var(--ink); transform: rotate(0); }
.sb-fold::after { display: none; }
.sb-quick.sb-folded::before { opacity: 0; }
@media (hover: hover) {
    .sb-quick .sb-qbtn:hover .sb-qbtn-l, .sb-quick .sb-qbtn:focus-visible .sb-qbtn-l { display: block; position: absolute; right: calc(100% + .75em); top: 50%; padding: .18em .65em .22em; white-space: nowrap; transform: translateY(-50%) rotate(calc(var(--rot) * -1.5)); background: var(--paper); border: 2.5px solid var(--ink); border-radius: .5em; box-shadow: 0 .15em 0 var(--ink); font: 900 .78em/1.2 var(--font); color: var(--ink); animation: sb-tipin .22s var(--spring); pointer-events: none; }
}
@keyframes sb-tipin { from { opacity: 0; margin-right: -.6em; } }

/* ---------------------------------------------------------------------------------------------- таймеры: ранец и усиления */
.sb-buffs { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: .5em .8em; padding-top: .3em; }
.sb-buff { --bc: var(--coral); position: relative; display: flex; flex-direction: column; align-items: center; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; font-size: .9em; animation: sb-popin .4s var(--spring); }
.sb-buff.c-teal { --bc: var(--teal); } .sb-buff.c-sun { --bc: var(--sun); }
.sb-buff-ring { position: relative; display: grid; place-items: center; width: 3.1em; height: 3.1em; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 0 .2em 0 var(--ink); background: conic-gradient(var(--bc) calc(var(--p, 1) * 360deg), rgba(28, 42, 74, .3) 0); }
.sb-buff-ring::before { content: ''; position: absolute; inset: .32em; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--ink); }
.sb-buff-ico { position: relative; z-index: 1; width: 1.65em; height: 1.65em; }
.sb-buff-v { position: relative; z-index: 2; margin-top: -.55em; padding: .02em .5em .06em; background: var(--paper); border: 2.5px solid var(--ink); border-radius: .6em; font: 900 .82em/1.15 var(--font); font-variant-numeric: tabular-nums; transform: rotate(-3deg); box-shadow: 0 .12em 0 var(--ink); }
.sb-buff.low .sb-buff-ring { animation: sb-lowpulse .7s ease-in-out infinite; }
@keyframes sb-lowpulse { 50% { transform: scale(1.1) rotate(4deg); } }

/* ---------------------------------------------------------------------------------------------- подсказка действия: клавиша и бирка */
.sb-ctx { position: relative; gap: .6em; padding: .4em 1.15em .4em .45em; background: var(--paper); border: 3px solid var(--ink); border-radius: 1.8em .6em .6em 1.8em; box-shadow: .12em .26em 0 var(--ink); transform: rotate(-1deg); }
.sb-ctx::after { content: ''; position: absolute; inset: .2em .3em .2em .2em; border: 1.5px dashed rgba(28, 42, 74, .32); border-radius: 1.5em .4em .4em 1.5em; pointer-events: none; }
.sb-key { min-width: 2.1em; height: 2.1em; padding: 0 .45em; font: 900 1.05em/1 var(--font); color: var(--ink); background: linear-gradient(#ffffff, #efe6cf); border: 2.5px solid var(--ink); border-radius: .5em; box-shadow: 0 .26em 0 var(--ink), inset 0 -.18em 0 rgba(28, 42, 74, .12); -webkit-text-stroke: 0; paint-order: normal; }
.sb-ctx .sb-key { animation: sb-keypress 1.7s ease-in-out infinite; }
@keyframes sb-keypress { 0%, 70%, 100% { transform: none; } 78% { transform: translateY(.14em); } 88% { transform: none; } }
.sb-ctx-t { font-weight: 800; }

/* ---------------------------------------------------------------------------------------------- спидометр */
.sb-bottom { gap: .7em; }
.sb-speed { --vc: #ffc83d; position: relative; width: 12em; display: flex; flex-direction: column; align-items: center; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; pointer-events: none; transform-origin: 50% 90%; }
.sb-speed-in { animation: sb-speedin .6s var(--spring); }
.sb-speed-out { animation: sb-speedout .26s ease-in forwards; }
@keyframes sb-speedin { 0% { transform: translateY(45%) scale(.45) rotate(-14deg); opacity: 0; } 55% { transform: translateY(-2%) scale(1.08) rotate(2deg); opacity: 1; } 100% { transform: none; } }
@keyframes sb-speedout { to { transform: translateY(70%) scale(.7); opacity: 0; } }
.sb-dial { position: relative; width: 10.6em; height: 10.6em; }
.sb-dial-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sb-speed.hot .sb-dial { animation: sb-redline .14s linear infinite; }
@keyframes sb-redline { 25% { transform: translate(.04em, -.03em); } 75% { transform: translate(-.04em, .03em); } }
.sb-dial-n { font: 900 30px var(--font); fill: #ffe27a; stroke: #0f1830; stroke-width: 4px; paint-order: stroke fill; stroke-linejoin: round; font-variant-numeric: tabular-nums; }
.sb-dial-u { font: 900 11px var(--font); fill: var(--ink); letter-spacing: .04em; }
.sb-dial-labs text { font: 800 11px var(--font); fill: var(--ink); opacity: .75; }
.sb-siren { position: absolute; left: 50%; top: -.85em; z-index: 3; width: 2.6em; height: 1.15em; margin-left: -1.3em; border: 2.5px solid var(--ink); border-radius: 1.3em 1.3em .25em .25em; background: linear-gradient(90deg, #ff6b57 0 50%, #4aa3df 50%); box-shadow: 0 .15em 0 var(--ink); opacity: .4; filter: grayscale(.7); }
.sb-siren.on { opacity: 1; filter: none; animation: sb-sirenflip .5s steps(1, end) infinite; }
@keyframes sb-sirenflip { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } }
.sb-hb { position: absolute; left: -.55em; bottom: .9em; z-index: 3; display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: 50%; background: #ece4cf; border: 2.5px solid var(--ink); box-shadow: 0 .17em 0 var(--ink); font: 900 .95em/1 var(--font); color: rgba(28, 42, 74, .4); transition: background .12s, color .12s; }
.sb-hb::before { content: ''; position: absolute; inset: .25em; border: 2px solid currentColor; border-radius: 50%; border-left-color: transparent; border-right-color: transparent; opacity: .9; }
.sb-hb.on { background: var(--coral); color: #fff; animation: sb-hbshake .16s linear infinite; }
@keyframes sb-hbshake { 25% { transform: translateX(-.05em) rotate(-4deg); } 75% { transform: translateX(.05em) rotate(4deg); } }
.sb-speed-rb { position: relative; z-index: 2; display: flex; align-items: center; min-width: 7em; max-width: 100%; margin-top: -1.55em; padding: .42em 1.7em .5em 1.7em; transform: rotate(-1.2deg); }
.sb-speed-rb .sb-die > i { background: linear-gradient(100deg, var(--vc) 0 75%, color-mix(in srgb, var(--vc) 78%, #000) 75%); clip-path: polygon(0 0, 100% 0, calc(100% - .7em) 50%, 100% 100%, 0 100%, .7em 50%); }
.sb-speed-ico { position: absolute; left: -1.4em; top: 50%; z-index: 2; width: 3em; height: 3em; margin-top: -1.55em; transform: rotate(-7deg); filter: drop-shadow(.06em .16em 0 var(--ink)); }
.sb-speed-ico .sb-ico { width: 100%; height: 100%; }
.sb-speed-name { position: relative; flex: 1; text-align: center; padding-left: 1em; font: 900 1em/1.1 var(--font); color: #fff; -webkit-text-stroke: .2em var(--ink); paint-order: stroke fill; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-speed-hints { display: flex; gap: 1em; margin-top: .5em; }
.sb-speed-hint { display: inline-flex; align-items: center; gap: .4em; font: 900 .8em/1 var(--font); color: #fff; -webkit-text-stroke: .24em var(--ink); paint-order: stroke fill; }
.sb-speed-hint .sb-key { min-width: 1.9em; height: 1.9em; font-size: .95em; animation: none; box-shadow: 0 .2em 0 var(--ink); }
@media (max-height: 430px), (max-width: 430px) {
    .sb-dial { width: 7.8em; height: 7.8em; }
    .sb-dial-labs { display: none; }
    .sb-speed-hints { display: none; }
    .sb-speed { width: 9em; }
    .sb-speed-rb { margin-top: -1.2em; padding: .3em 1.3em .38em 1.4em; font-size: .85em; }
    .sb-hb { width: 1.9em; height: 1.9em; }
}

/* ---------------------------------------------------------------------------------------------- чат: пузыри речи */
.sb-feed { gap: .55em; }
.sb-line { position: relative; isolation: isolate; align-self: flex-start; max-width: 100%; margin-left: .45em; padding: .3em .8em .4em; background: #fff; border: 2.5px solid var(--ink); border-radius: 1.1em 1.1em 1.1em .3em; box-shadow: .1em .18em 0 var(--ink); }
.sb-line::after { content: ''; position: absolute; left: -.45em; bottom: .22em; z-index: -1; width: .8em; height: .8em; background: #fff; border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg) skew(14deg, 14deg); border-bottom-left-radius: .25em; }
.sb-line.me { align-self: flex-end; margin: 0 .45em 0 0; background: #d6f3ff; border-radius: 1.1em 1.1em .3em 1.1em; }
.sb-line.me::after { left: auto; right: -.45em; background: #d6f3ff; border-left: 0; border-bottom: 2.5px solid var(--ink); border-right: 2.5px solid var(--ink); transform: rotate(-45deg) skew(-14deg, -14deg); border-bottom-left-radius: 0; border-bottom-right-radius: .25em; }
.sb-line-n { color: var(--nc, var(--coral-d)); font-weight: 900; font-size: .92em; margin-right: .45em; }
.sb-line.me .sb-line-n { color: var(--teal-d); }
.sb-line-t { font-weight: 700; }
.sb-chatlog .sb-line { margin: 0 .45em; }
.sb-chatbox { border-radius: 1.4em 1.1em 1.4em 1.1em; background: var(--paper); box-shadow: .2em .35em 0 var(--ink); }
.sb-chatquick .sb-chip-btn:nth-child(3n) { transform: rotate(-1.5deg); } .sb-chatquick .sb-chip-btn:nth-child(3n+1) { transform: rotate(1deg); border-radius: 1em .5em 1em .5em; }

/* ---------------------------------------------------------------------------------------------- тосты: наклейки с белым краем */
.sb-layer-toasts { gap: 12px; }
.sb-toast { --tc: var(--paper); --ec: var(--sun); position: relative; max-width: min(430px, 90vw); margin-left: 1.3em; padding: .5em 1.15em .55em 2.7em; background: var(--tc); border: .27em solid #fff; border-radius: var(--r1, 1.1em) var(--r2, 1.6em) var(--r1, 1.1em) var(--r2, 1.2em);
    box-shadow: 0 0 0 2.5px var(--ink), .1em .3em 0 2.5px var(--ink); transform: rotate(var(--tilt, 0deg)); animation: sb-stickin .55s var(--spring); font: 800 14px/1.2 var(--font); color: var(--ink); }
.sb-toast::before { content: ''; position: absolute; left: .15em; top: .35em; bottom: .35em; width: .42em; border-radius: 1em; background: var(--ec); }
.sb-toast::after { content: ''; position: absolute; right: .55em; top: .22em; width: 1.4em; height: .4em; border-radius: 1em; background: rgba(255, 255, 255, .8); transform: rotate(-14deg); }
.sb-toast-ico { position: absolute; left: -1em; top: 50%; width: 2.7em; height: 2.7em; margin-top: -1.45em; padding: 0; background: none; border: 0; border-radius: 0; transform: rotate(-9deg); filter: drop-shadow(.06em .14em 0 var(--ink)); }
.sb-toast-money { --tc: #ffe58a; --ec: #e9a400; } .sb-toast-reward { --tc: #b9f1e8; --ec: var(--teal-d); } .sb-toast-warn { --tc: #ffc4b8; --ec: var(--coral-d); } .sb-toast-join { --tc: #d2f2bd; --ec: #4aa83a; } .sb-toast-leave { --tc: #e3e8f2; --ec: #8a97ad; } .sb-toast-info { --tc: #d9efff; --ec: var(--sky); }
.sb-toast-out { animation: sb-stickout .26s ease-in forwards; }
@keyframes sb-stickin { 0% { transform: translateY(-130%) rotate(calc(var(--tilt, 0deg) * 4)) scale(.8); opacity: 0; } 55% { transform: translateY(8%) rotate(calc(var(--tilt, 0deg) * -.6)) scale(1.07); opacity: 1; } 100% { transform: rotate(var(--tilt, 0deg)); } }
@keyframes sb-stickout { to { transform: translateY(-70%) rotate(calc(var(--tilt, 0deg) * 3)) scale(.85); opacity: 0; } }

@media (max-height: 520px) { .sb-toast { font-size: 12px; } .sb-layer-toasts { gap: 10px; } }

/* ---------------------------------------------------------------------------------------------- окна: тент с фестонами, скотч на карточках */
.sb-ph { border-bottom: 0; padding-bottom: .75em; background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .2) 0 1.5em, transparent 1.5em 3em); overflow: visible; z-index: 2; }
.sb-ph::after { display: block; content: ''; position: absolute; left: 0; right: 0; top: 100%; bottom: auto; height: 12px; background: radial-gradient(circle at 12px 0, var(--acc) 0 8.5px, var(--ink) 9px 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x; pointer-events: none; }
.sb-ph::before { content: ''; position: absolute; right: 4.7em; top: .35em; width: 2em; height: 1.7em; background: #fff; opacity: .85; pointer-events: none;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 34'%3E%3Cpath d='M12 0L15 11 26 14 15 17 12 28 9 17-2 14 9 11Z M31 14L33 21 40 23 33 25 31 32 29 25 22 23 29 21Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 34'%3E%3Cpath d='M12 0L15 11 26 14 15 17 12 28 9 17-2 14 9 11Z M31 14L33 21 40 23 33 25 31 32 29 25 22 23 29 21Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.sb-pb { padding-top: 20px; }
@media (orientation: landscape) and (max-height: 520px) { .sb-pb { padding-top: 14px; } }
.sb-panel { border-radius: 26px 22px 26px 22px; box-shadow: .3em .5em 0 var(--ink), 0 18px 40px rgba(0, 0, 0, .22); }
.sb-vcard, .sb-bagi { overflow: visible; }
.sb-vcard::before, .sb-bagi::before { content: ''; position: absolute; left: 50%; top: -.55em; width: 3.4em; height: 1.1em; margin-left: -1.7em; background: rgba(255, 214, 90, .85); border-left: 2px dashed rgba(28, 42, 74, .3); border-right: 2px dashed rgba(28, 42, 74, .3); transform: rotate(-3deg); pointer-events: none; z-index: 2; }
.sb-vcard:nth-child(even)::before, .sb-bagi:nth-child(even)::before { transform: rotate(4deg); background: rgba(127, 224, 214, .85); }
.sb-vcard:nth-child(3n+1) { transform: rotate(-.7deg); } .sb-vcard:nth-child(3n+2) { transform: rotate(.5deg); }
.sb-job:nth-child(even) { transform: rotate(.35deg); } .sb-job { border-radius: 1.2em .6em 1.2em .6em; }
.sb-day:nth-child(odd) { transform: rotate(-.6deg); } .sb-day:nth-child(even) { transform: rotate(.6deg); }
.sb-tab { border-radius: 1em .6em 1em .6em; }
.sb-day { padding-top: 16px; } .sb-day-now { top: -12px; }
.sb-tab.on { transform: translateY(.1em) rotate(-1deg); }
.sb-btn { background-image: linear-gradient(rgba(255, 255, 255, .28), transparent 45%); }
.sb-btn:disabled { background-image: none; }

/* рекламные кнопки и паузы */
.sb-btn-ad { padding-left: 1.5em; background-image: linear-gradient(rgba(255, 255, 255, .25), transparent 45%); }
.sb-btn-ad .sb-ico { position: absolute; left: -.7em; top: 50%; width: 2.3em; height: 2.3em; margin-top: -1.15em; transform: rotate(-9deg); }
.sb-btn-ad .sb-btn-t { padding-left: .9em; }
.sb-btn-ad.sb-wait { background: repeating-linear-gradient(135deg, #8a97ad 0 .55em, #99a5ba .55em 1.1em); }
.sb-btn-ad.sb-wait .sb-ico { filter: grayscale(.8); }
.sb-btn-ad.sb-wait .sb-btn-t { font-variant-numeric: tabular-nums; }

/* телефон: яркий чехол с ракушкой и пальмой */
.sb-phone { background: linear-gradient(155deg, #59d9cc, #1fa79b 60%, #17897f); box-shadow: 0 .5em 0 #0f1830, 0 1.2em 2.6em rgba(0, 0, 0, .3), inset 0 0 0 .12em rgba(255, 255, 255, .45); }
.sb-phone-screen { box-shadow: 0 0 0 .38em #0f1830, 0 0 0 .55em var(--ink); }
.sb-phone-spk { background: #0f1830; z-index: 4; }
.sb-phone-shell { position: absolute; right: -.75em; bottom: 1.6em; z-index: 6; width: 3.3em; height: 3.1em; transform: rotate(14deg); pointer-events: none; filter: drop-shadow(.08em .16em 0 rgba(28, 42, 74, .6));
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M16 27 L5 19 Q0 9 9 4 Q16 0 23 4 Q32 9 27 19Z' fill='rgb(255,185,207)' stroke='rgb(28,42,74)' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M16 26V8M16 26L9 10M16 26L23 10M16 26L5 16M16 26L27 16' stroke='rgb(28,42,74)' stroke-width='1.5' stroke-linecap='round'/%3E%3Crect x='11' y='25' width='10' height='4' rx='2' fill='rgb(255,200,61)' stroke='rgb(28,42,74)' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat; }
.sb-phone-palm { position: absolute; left: -.9em; top: 2.5em; z-index: 6; width: 2.6em; height: 3.6em; transform: rotate(-12deg); pointer-events: none; filter: drop-shadow(.08em .16em 0 rgba(28, 42, 74, .6));
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 36'%3E%3Cpath d='M13 34 C12 22 13 12 13 2 C21 8 24 18 13 34Z' fill='rgb(111,207,95)' stroke='rgb(28,42,74)' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M13 30V6' stroke='rgb(28,42,74)' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M13 34C8 26 4 20 3 12 9 14 12 22 13 34Z' fill='rgb(74,168,58)' stroke='rgb(28,42,74)' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.sb-app-btn { -webkit-text-stroke: .16em var(--ink); }
.sb-app-btn:nth-child(3n+1) .sb-app-i { transform: rotate(-2deg); } .sb-app-btn:nth-child(3n) .sb-app-i { transform: rotate(2deg); }
.sb-app-i:not(.sb-app-art) { border-radius: 1.15em .8em 1.15em .8em; background-image: linear-gradient(rgba(255, 255, 255, .3), transparent 50%); }

/* редкость: искры у эпика и выше */
.sb-r-epic .sb-thumb::after, .sb-r-legendary .sb-thumb::after, .sb-r-mythic .sb-thumb::after { content: ''; position: absolute; right: .2em; top: .15em; width: 1.2em; height: 1.2em; background: var(--rc); pointer-events: none; animation: sb-twinkle2 1.8s ease-in-out infinite;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 34'%3E%3Cpath d='M12 0L15 11 26 14 15 17 12 28 9 17-2 14 9 11Z M31 14L33 21 40 23 33 25 31 32 29 25 22 23 29 21Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 34'%3E%3Cpath d='M12 0L15 11 26 14 15 17 12 28 9 17-2 14 9 11Z M31 14L33 21 40 23 33 25 31 32 29 25 22 23 29 21Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.sb-r-legendary .sb-thumb::after { background: #ffa81f; } .sb-r-mythic .sb-thumb::after { background: #ff4f9a; }
@keyframes sb-twinkle2 { 0%, 100% { transform: scale(.6) rotate(0); opacity: .6; } 50% { transform: scale(1.15) rotate(25deg); opacity: 1; } }

@media (prefers-reduced-motion: reduce) { #sb-ui *, #sb-ui *::before, #sb-ui *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; } }

/* ===================================================================================================================
   АДАПТИВ ОКОН (SBUI-панели). Общий каркас для ВСЕХ окон — в том числе тех, что модули добавят позже через SBUI.openPanel.
   Слой окон — контейнер `sbp` (размер поля игры, с учётом ViewCap), поэтому правила пишутся через @container, а не @media.
   Режимы окна:   LOW    — высота ≤ 520 (низкий альбом: 568×320, 640×360, 536×351, 800×360, 812×375): окно на весь экран, шапка 44px, две колонки;
                  NARROW — ширина ≤ 620 и высота > 520 (портрет 360×800, 375×812, 390×844): окно на весь экран, колонки в стопку;
                  остальное (планшет, десктоп): окно-карточка по центру.
   Для новых окон: класс окна `sb-app sb-app-<id>`; тело — обычный поток или готовые классы ниже:
     .sb-split  (+ .sb-split-side / .sb-split-main) — боковая колонка и основная область, в LOW остаётся двумя колонками, в NARROW — стопка;
     .sb-cardgrid — сетка карточек на всю доступную ширину (авто-колонки), .sb-scroll — прокручиваемая область без полос,
     .sb-tabs — ряд вкладок (одна строка, листается пальцем).
   Размер текста окна — clamp() по высоте/ширине поля, кнопки ≥ 40px, полосы прокрутки скрыты (прокрутка колесом и касанием работает).
   =================================================================================================================== */
.sb-layer-panels { container: sbp / size; }
#sb-ui * { scrollbar-width: none; -ms-overflow-style: none; }
#sb-ui *::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sb-scrim { --sa-t: max(env(safe-area-inset-top, 0px), var(--lory-safe-top, 0px)); --sa-r: max(env(safe-area-inset-right, 0px), var(--lory-safe-right, 0px)); --sa-b: max(env(safe-area-inset-bottom, 0px), var(--lory-safe-bottom, 0px)); --sa-l: max(env(safe-area-inset-left, 0px), var(--lory-safe-left, 0px));
    padding: max(10px, var(--sa-t)) max(10px, var(--sa-r)) max(10px, var(--sa-b)) max(10px, var(--sa-l)); }
.sb-panel { min-height: 0; }
.sb-app-shop, .sb-app-wardrobe, .sb-app-map { width: min(1000px, 100%); height: min(100%, 780px); }
.sb-app-vehicles, .sb-app-gifts { max-height: min(100%, 780px); }
.sb-pb { overflow-y: auto; overflow-x: hidden; }
.sb-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; flex: 0 0 auto; padding: 2px 2px 8px; margin-bottom: 4px; min-width: 0; }
.sb-tab { flex: 1 0 auto; min-height: 2.6em; white-space: nowrap; }
.sb-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sb-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cw, 150px), 1fr)); gap: var(--cg, 10px); align-content: start; }
.sb-split { display: grid; grid-template-columns: var(--side, 260px) minmax(0, 1fr); gap: 12px; min-height: 0; flex: 1 1 auto; }
.sb-split-side, .sb-split-main { min-width: 0; min-height: 0; }

/* окна с вкладками и списком: вкладки и шапка стоят, прокручивается только список */
.sb-app-vehicles .sb-pb, .sb-app-gifts .sb-pb { display: flex; flex-direction: column; overflow: hidden; }
.sb-app-vehicles .sb-vgrid, .sb-gpane { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 4px 10px 2px; }
.sb-gpane:has(.sb-wheel) { display: block; }

/* магазин: сетка с именованными зонами. Обёртки left/right растворены (display: contents), зоны: view, detail, tabs, grid */
.sb-shop { display: grid; grid-template-columns: clamp(210px, 31%, 300px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "view tabs" "view grid" "detail grid"; gap: 6px 12px; flex: 1 1 auto; min-height: 0; }
.sb-shop-left, .sb-shop-right { display: contents; }
.sb-shop-view { grid-area: view; min-height: 0; }
.sb-shop-detail { grid-area: detail; min-height: 0; overflow-y: auto; }
.sb-shop .sb-tabs { grid-area: tabs; margin: 0; }
.sb-shop-grid { grid-area: grid; min-height: 0; overflow-y: auto; overflow-x: hidden; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); padding: 4px 6px 12px 4px; }
.sb-det-a .sb-btn { min-height: 2.8em; }
.sb-det-a .sb-hint, .sb-shop-detail > .sb-hint { margin: 0; }
.sb-wd { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); }
.sb-wd-view { min-height: 0; }
.sb-mapstage { width: min(100%, calc(min(780px, 100cqh) - 130px)); }
.sb-job-go .sb-btn, .sb-job .sb-btn { min-height: 2.6em; }
.sb-app-btn { min-width: 40px; min-height: 40px; }
.sb-panel .sb-btn, .sb-panel .sb-segb, .sb-panel .sb-chip-btn { min-height: 40px; } .sb-panel .sb-btn-round { min-width: 40px; }
.sb-swatch { width: 40px; height: 40px; } .sb-nickin { min-height: 40px; }
.sb-pin::after { content: ''; position: absolute; inset: -6px; }

/* телефон: размеры от поля игры */
.sb-phone { --h: min(620px, calc(100cqh - 28px)); }
.sb-scrim:has(.sb-phone-panel) { padding-right: max(4cqw, 18px); }
.sb-phone-x { width: 2.9em; min-height: 2.9em; }

@container sbp ((max-height: 520px) or (max-width: 620px)) {
    .sb-scrim { padding: var(--sa-t) var(--sa-r) var(--sa-b) var(--sa-l); }
    .sb-panel:not(.sb-phone-panel):not(.sb-app-jobcard):not(.sb-app-shift) { width: 100%; height: 100%; max-height: 100%; border-radius: 0; border-width: 0; box-shadow: none; }
    .sb-ph { min-height: 44px; padding: 2px .6em 2px .8em; padding-bottom: 2px; gap: .5em; }
    .sb-ph .sb-btn-round { width: 40px; min-height: 40px; font-size: 14px; }
    .sb-ph .sb-chip { height: 2.3em; }
    .sb-ph-t { font-size: 1.2em; }
    .sb-ph-ico { width: 1.8em; height: 1.8em; }
    .sb-ph::before { display: none; }
    .sb-pb { padding: 16px 10px 8px; }
    .sb-app-jobcard, .sb-app-shift { width: min(560px, 100%); height: auto; max-height: 100%; margin: auto; }
    .sb-scrim:has(.sb-app-jobcard), .sb-scrim:has(.sb-app-shift) { padding: max(8px, var(--sa-t)) max(8px, var(--sa-r)) max(8px, var(--sa-b)) max(8px, var(--sa-l)); }
    .sb-phone-panel .sb-pb { padding: 0; }
    .sb-panel .sb-btn { min-height: 40px; } .sb-panel .sb-btn-round { min-width: 40px; }
    .sb-segb { min-height: 40px; }
    .sb-chip-btn { min-height: 40px; }
}

/* ---------------------------------------------------------------------------------------------- LOW: низкий альбом */
@container sbp (max-height: 520px) {
    .sb-scrim { font-size: clamp(13px, 4.3cqh, 15px); }
    .sb-pb { padding-top: 15px; }
    .sb-shop { grid-template-columns: minmax(0, 1fr) clamp(160px, 34%, 210px); grid-template-areas: "tabs view" "grid view" "grid detail"; gap: 4px 10px; }
    .sb-shop-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 7px; padding: 4px 4px 10px 2px; }
    .sb-card { font-size: .7em; padding: 4px 3px 5px; }
    .sb-shop-view { border-radius: 14px; min-height: 90px; }
    .sb-view-hint { display: none; }
    .sb-shop-detail { max-height: 58cqh; padding: 6px 8px 8px; gap: 4px; border-radius: 14px; }
    .sb-det-n { font-size: .92em; }
    .sb-det-p { flex-wrap: wrap; gap: 2px 6px; font-size: .88em; } .sb-det-p b { white-space: nowrap; } .sb-det-p .sb-xp { flex: 1 1 100%; margin-top: 2px; }
    .sb-det-a .sb-btn { font-size: .86em; padding: 0 .5em; min-height: 40px; } .sb-det-a .sb-btn-ad { padding-left: 1.5em; }
    .sb-det-a { position: sticky; bottom: 0; margin-top: 2px; background: #fff; }
    .sb-tab { min-height: 40px; font-size: .84em; padding: 0 .7em; }
    .sb-tabs { padding-bottom: 4px; }
    .sb-wd { grid-template-columns: minmax(0, 30%) minmax(0, 1fr); gap: 8px; }
    .sb-mapwrap { grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
    .sb-mapstage { width: calc(100cqh - 90px); max-width: 52cqw; }
    .sb-dlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .sb-dbtn { min-height: 40px; padding-left: .4em; } .sb-dbtn-s { display: none; } .sb-side.cool .sb-dbtn-s { display: inline; }
    .sb-hint { font-size: .8em; margin: 0 0 .2em; }
    /* дома: карточка слева, действия справа */
    .sb-app-houses .sb-pb { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 0 14px; align-content: stretch; }
    .sb-app-houses .sb-home-stage { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
    .sb-app-houses .sb-home-count { grid-column: 2; grid-row: 1; align-self: end; margin: 0 0 4px; }
    .sb-app-houses .sb-home-act { grid-column: 2; grid-row: 2; flex-direction: column; align-items: stretch; align-self: start; margin: 0; gap: 8px; }
    .sb-app-houses .sb-home-act .sb-btn { width: 100%; }
    .sb-app-houses .sb-empty { grid-column: 1 / -1; }
    .sb-home-card { max-width: none; padding: 7px 8px 9px; }
    .sb-home-art svg { max-height: calc(100cqh - 200px); }
    .sb-home-lock { width: 42px; height: 42px; padding: 6px; right: 16px; top: 16px; }
    .sb-arrow { width: 40px; min-height: 40px; font-size: 14px; }
    /* работы, рюкзак, эмоции: сетка в 2 колонки */
    .sb-joblist { gap: 8px 12px; }
    .sb-job { padding: 6px 8px; gap: 8px; } .sb-job-i { width: 42px; height: 42px; border-radius: 12px; } .sb-job-i .sb-ico { width: 26px; height: 26px; }
    .sb-job-d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .sb-boost { padding: 6px 8px; margin-bottom: 8px; }
    .sb-bag { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .sb-bagi { padding: 8px; gap: 4px; } .sb-bagi-i { width: 44px; height: 44px; padding: 6px; } .sb-bagi-d { min-height: 0; }
    .sb-emotes { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; } .sb-emote { padding: 6px 4px; gap: 3px; }
    .sb-emote-i, .sb-emote .sb-thumb { width: 48px; } .sb-emote-i .sb-ico { width: 48px; height: 48px; }
    /* настройки: две колонки, ник и кнопка на всю ширину */
    .sb-app-settings .sb-btn-wide { margin-top: 8px; }
    .sb-setrow { padding: 6px 0; gap: 8px; }
    .sb-nickin { padding: .3em .7em; }
    /* транспорт: карточка-строка */
    .sb-vgrid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 10px; padding-top: 8px; }
    .sb-vcard { display: grid; grid-template-columns: 62px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 8px; align-items: center; text-align: left; padding: 8px; }
    .sb-vpic { grid-column: 1; grid-row: 1 / span 3; height: 100%; min-height: 62px; }
    .sb-vpic .sb-ico { width: 40px; height: 40px; }
    .sb-vn, .sb-vs, .sb-vact { grid-column: 2; }
    .sb-vact { margin-top: 2px; } .sb-vact .sb-btn { min-height: 40px; }
    .sb-vcard::before, .sb-bagi::before { display: none; }
    /* подарки */
    .sb-days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
    .sb-day { padding: 14px 2px 5px; gap: 2px; } .sb-day.big { grid-column: auto; } .sb-day-i { width: 28px; height: 28px; } .sb-day .sb-thumb { width: 42px; }
    .sb-gact { margin-top: 4px; }
    .sb-wheel { width: max(150px, calc(100cqh - 160px)); min-width: 0; margin: 22px 10px 6px 14px; }
    .sb-gpane:has(.sb-wheel) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 16px; align-content: center; }
    .sb-gpane:has(.sb-wheel) .sb-wheel { grid-row: 1 / span 2; }
    .sb-gpane:has(.sb-wheel) .sb-wheel-res { align-self: end; margin: 0; }
    .sb-gpane:has(.sb-wheel) .sb-gact { align-self: start; flex-direction: column; align-items: stretch; flex-wrap: nowrap; margin-top: 0; min-width: 0; }
    .sb-gact .sb-btn { min-width: 0; max-width: 100%; }
    /* итог смены: две колонки */
    .sb-app-shift .sb-pb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
    .sb-app-shift .sb-shift { gap: 4px; } .sb-app-shift .sb-sline { padding: 4px 10px; } .sb-app-shift .sb-shift-a { margin-top: 0; }
    /* друзья */
    /* телефон: горизонтальный, поле на всю высоту */
    .sb-scrim:has(.sb-phone-panel) { justify-content: center; padding-right: var(--sa-r); }
    .sb-phone { --h: min(360px, calc(100cqh - 24px), calc((100cqw - 40px) / 1.9)); width: calc(var(--h) * 1.9); font-size: calc(var(--h) / 19); border-radius: 1.6em; padding: .7em; }
    .sb-phone-spk { left: .35em; top: 50%; width: .38em; height: 3.2em; margin: -1.6em 0 0 0; }
    .sb-phone-screen { padding: .8em 1em .6em 1.4em; border-radius: 1.2em; }
    .sb-phone-hi { flex-direction: row; justify-content: space-between; align-items: baseline; margin: .4em 0 .5em; }
    .sb-apps { grid-template-columns: repeat(5, 1fr); gap: .5em .3em; }
    .sb-app-i { width: 3.1em; height: 3.1em; } .sb-app-i .sb-ico { width: 1.9em; height: 1.9em; }
    .sb-phone-bar { display: none; }
    .sb-phone-x { right: -.7em; top: -.7em; }
    .sb-phone-shell, .sb-phone-palm { display: none; }
}

/* LOW и широко (800×360, 812×375): списки в две колонки */
@container sbp (max-height: 520px) and (min-width: 700px) {
    .sb-joblist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sb-app-settings .sb-pb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; align-content: start; }
    .sb-app-settings .sb-nickrow, .sb-app-settings .sb-btn-wide { grid-column: 1 / -1; }
    .sb-soc-panel .sb-pb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; align-content: start; }
    .sb-soc-panel .sb-soc-empty { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------------------------------------- NARROW: портретный телефон */
@container sbp (max-width: 620px) and (min-height: 521px) {
    .sb-scrim { font-size: clamp(14px, 4.2cqw, 16px); }
    .sb-ph-t { font-size: 1.25em; }
    .sb-shop { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "view detail" "tabs tabs" "grid grid"; gap: 8px; }
    .sb-shop-view { height: clamp(150px, 27cqh, 250px); min-height: 0; }
    .sb-shop-detail { max-height: clamp(150px, 27cqh, 250px); }
    .sb-shop-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
    .sb-view-hint { display: none; }
    .sb-job { flex-wrap: wrap; } .sb-job-info { flex: 1 1 0; } .sb-job-go { flex: 1 1 100%; } .sb-job-go.sb-btn, .sb-job > .sb-btn { width: 100%; }
    .sb-wd { grid-template-columns: 1fr; grid-template-rows: clamp(150px, 27cqh, 250px) minmax(0, 1fr); }
    .sb-mapwrap { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; align-content: start; }
    .sb-mapstage { width: min(100%, 50cqh); }
    .sb-dlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .sb-dbtn { min-height: 3.6em; } .sb-mapside { padding-top: 4px; }
    .sb-days { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } .sb-day.big { grid-column: span 2; }
    .sb-vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; padding-top: 8px; }
    .sb-vact .sb-btn { max-width: 100%; }
    .sb-wheel { width: min(300px, 74cqw, calc(100cqh - 330px)); min-width: 200px; }
    .sb-bag { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
    .sb-emotes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .sb-home-art svg { max-height: 30cqh; }
    .sb-scrim:has(.sb-phone-panel) { justify-content: center; padding-right: var(--sa-r); }
    .sb-phone { --h: min(620px, calc(100cqh - 70px), calc((100cqw - 24px) * 2)); }
    .sb-phone-x { right: -.2em; top: -1.5em; }
}
@container sbp (max-width: 620px) {
    .sb-tabs:not(.sb-tabs-scroll) .sb-tab { padding: 0 .7em; font-size: .85em; }
}
@container sbp (min-width: 621px) and (min-height: 521px) {
    .sb-shop-grid { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { #sb-ui *, #sb-ui *::before, #sb-ui *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ряды вкладок: листаются колесом, мышью и пальцем, примагничиваются, у края с продолжением — затухание и стрелка (классы ставит SBUI._rows) */
.sb-tabs, .sb-seg { scroll-snap-type: x proximity; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.sb-tabs > .sb-tab, .sb-seg > .sb-segb { scroll-snap-align: center; }
.sb-tabs { cursor: grab; } .sb-tabs.sb-dragging { cursor: grabbing; scroll-snap-type: none; } .sb-tabs.sb-dragging * { pointer-events: none; }
.sb-seg { max-width: 100%; overflow-x: auto; }
.sb-tabs.sb-more-r::after, .sb-tabs.sb-more-l::before { content: ''; position: sticky; flex: 0 0 30px; align-self: stretch; display: flex; align-items: center; z-index: 4; pointer-events: none; font: 900 26px/1 var(--font); color: var(--ink); -webkit-text-stroke: 0; }
.sb-tabs.sb-more-r::after { content: '›'; right: 0; margin-left: -30px; justify-content: flex-end; padding-right: 3px; background: linear-gradient(90deg, transparent, var(--cream) 75%); animation: sb-nudge 1.2s ease-in-out infinite; }
.sb-tabs.sb-more-l::before { content: '‹'; left: 0; margin-right: -30px; justify-content: flex-start; padding-left: 3px; background: linear-gradient(270deg, transparent, var(--cream) 75%); }
@keyframes sb-nudge { 50% { padding-right: 0; } }

/* ===== SOCIAL ===== */
/* Колесо взаимодействия с ботами-игроками (GameSocial): кольцо сегментов вокруг ступицы с ником, профессией и сердечками. */
.sb-soc { position: fixed; z-index: 45; pointer-events: auto; transform: translate(-50%, -50%) scale(.55); opacity: 0; transition: transform .22s var(--spring), opacity .18s; font-family: var(--font); color: var(--ink); touch-action: manipulation; }
.sb-soc.on { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.sb-soc-ring { position: relative; pointer-events: none; }
.sb-soc-hub { position: absolute; left: 50%; top: 50%; width: var(--hub, 120px); height: var(--hub, 120px); transform: translate(-50%, -50%); border-radius: 50%; background: var(--cream); border: 3px solid var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-align: center; padding: 6px; pointer-events: none; overflow: hidden; }
.sb-soc-nick { font-size: clamp(11px, calc(var(--hub, 120px) * .13), 17px); font-weight: 800; line-height: 1.05; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-soc-role { font-size: clamp(9px, calc(var(--hub, 120px) * .095), 12px); font-weight: 800; color: #fff; background: var(--teal-d); border-radius: 8px; padding: 0 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-soc-hearts { font-size: clamp(10px, calc(var(--hub, 120px) * .11), 14px); color: var(--coral); letter-spacing: 1px; line-height: 1.1; }
.sb-soc-lbl { font-size: clamp(9px, calc(var(--hub, 120px) * .1), 13px); font-weight: 800; color: var(--ink2); min-height: 1.1em; line-height: 1.05; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-soc-seg { position: absolute; width: var(--seg, 56px); height: var(--seg, 56px); border-radius: 50%; border: 3px solid var(--ink); background: var(--cream3); box-shadow: 0 .16em 0 var(--ink); padding: 0; cursor: pointer; pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: scale(.4); opacity: 0; transition: transform .2s var(--spring), opacity .15s, background .1s; touch-action: manipulation; }
.sb-soc.on .sb-soc-seg { transform: scale(1); opacity: 1; }
.sb-soc-seg.sel, .sb-soc-seg:focus-visible { background: var(--sun); transform: scale(1.14); z-index: 2; outline: none; }
.sb-soc-seg.back { background: var(--cream2); }
.sb-soc-seg:active { transform: scale(.94) translateY(.1em); box-shadow: none; }
.sb-soc-ico { display: block; width: 58%; height: 58%; pointer-events: none; }
.sb-soc-ico .sb-ico, .sb-soc-ico img { width: 100%; height: 100%; display: block; object-fit: contain; }
.sb-soc-seg i { font-style: normal; font-size: 9px; font-weight: 800; line-height: 1; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -1px; pointer-events: none; }
.sb-soc-banner { position: fixed; left: 50%; top: 32%; z-index: 46; transform: translate(-50%, -50%); font: 900 clamp(40px, 12vmin, 96px)/1 var(--font); color: #fff; -webkit-text-stroke: .08em var(--ink); paint-order: stroke fill; text-shadow: 0 .06em 0 var(--ink); pointer-events: none; animation: sb-soc-pop .9s var(--spring) both; }
@keyframes sb-soc-pop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 0; } }
/* запрос бота: карточка сверху */
.sb-soc-req { position: fixed; left: 50%; top: 64px; z-index: 44; width: min(92vw, 340px); transform: translate(-50%, -140%); opacity: 0; transition: transform .3s var(--spring), opacity .2s; background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); padding: 8px 12px 10px; pointer-events: auto; font-family: var(--font); color: var(--ink); }
.sb-soc-req.on { transform: translate(-50%, 0); opacity: 1; }
.sb-soc-req-h { font-weight: 800; font-size: 14px; color: var(--teal-d); }
.sb-soc-req-t { font-weight: 700; font-size: 15px; margin: 2px 0 8px; }
.sb-soc-req-b { display: flex; gap: 8px; justify-content: flex-end; }
/* панель друзей */
.sb-soc-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; background: var(--cream3); border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px 10px; margin: 0 0 8px; }
.sb-soc-rn { font-size: 1.05em; } .sb-soc-rr { font-size: .8em; color: var(--ink2); grid-column: 1; } .sb-soc-rh { color: var(--coral); grid-row: 1; grid-column: 2; text-align: right; }
.sb-soc-ra { grid-column: 1 / span 2; display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.sb-soc-empty { text-align: center; padding: 24px 8px; font-weight: 700; }
@media (max-height: 420px) { .sb-soc-req { top: 8px; } }

/* ===== RADIO (основная сессия): кнопка радио внутри спидометра ===== */
.sb-speed .sb-radio { position: absolute; left: 50%; top: -14px; transform: translate(-50%, -100%) rotate(-2deg); display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border: 3px solid var(--ink, #1c2a4a); border-radius: 14px 10px 14px 10px; background: #fff4e0; color: var(--ink, #1c2a4a); font: 900 13px/1 'Rubik', system-ui, sans-serif; box-shadow: 0 3px 0 var(--ink, #1c2a4a); cursor: pointer; pointer-events: auto; white-space: nowrap; }
.sb-speed .sb-radio:active { transform: translate(-50%, -100%) rotate(-2deg) translateY(2px); box-shadow: 0 1px 0 var(--ink, #1c2a4a); }
.sb-speed .sb-radio-ico { font-size: 15px; }
.sb-speed .sb-radio-key { font-size: 11px; padding: 1px 5px; }
.hl-touch .sb-speed .sb-radio-key { display: none; }
.hl-low .sb-speed .sb-radio { font-size: 11px; padding: 3px 8px; top: -8px; }
