/* ===== LOGO (top-left) ============================================== */
#logo {
    position: fixed;
    top: 14px; left: 20px;
    height: 53px;                /* same height as the balance pill */
    z-index: var(--z-hud);
    display: flex; align-items: center;
    pointer-events: none; user-select: none; line-height: 0;
    filter: drop-shadow(0 4px 10px rgba(var(--pink-rgb), 0.20));
}
#logo svg { display: block; width: 44px; height: auto; overflow: visible; }
/* white outer stroke 3px: stroke under fill, width 6 → 3px visible outside */
#logo svg path { stroke: #FFFFFF; stroke-width: 6; paint-order: stroke; stroke-linejoin: round; }
#logo img { display: block; width: 64px; height: auto; }
/* Текстовое лого (скины без ассета лого — jetski, nearmiss, slotmiss, tetroglass; index.html .skin-logo-text): белая обводка как у svg. */
#logo .skin-logo-text { font-size: 22px; -webkit-text-stroke: 4px #FFFFFF; paint-order: stroke fill; }
.wf-logo .skin-logo-text { font-size: 64px; color: #FFFFFF; }

/* ===== PILLS: bet bottom-left (balance lives in the bottom sysbar) ===== */
.pill {
    position: fixed;
    z-index: var(--z-hud);
    height: 53px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 18px;
    background: #FFFFFF;
    border: none;
    border-radius: 100px;
    box-shadow: 0 4px 10px 3px rgba(0, 0, 0, 0.10);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 100ms var(--ease);
}
/* ☢️ `.pill { display: flex }` (author sheet) BEATS the UA rule `[hidden]
   { display: none }`, so `el.hidden = true` on a pill does NOTHING on its own —
   #pill-freebet with no grants stayed on screen as an empty white ghost tile.
   Same idiom as #conn-pill[hidden] below: restore the attribute's meaning. */
.pill[hidden] { display: none; }
/* Press feedback — like the autoplay button. Only the clickable bet pill
   (the balance pill is not clickable). */
.pill-bet:active { transform: scale(0.96); }
/* Бейдж «DEMO» над суммой ставки. Сосед .pill-val (у того overflow:hidden —
   обрезал бы), позиционируется от кнопки (.pill — position:fixed), absolute ⇒
   не влияет на размер/положение плитки. Низ — на 3px выше строки суммы
   (центр плитки + половина line-height 16px). */
.pill-demo {
    position: absolute;
    left: 50%; bottom: calc(50% + 8px + 3px);
    transform: translateX(-50%);
    background: var(--pink);
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 700; font-size: 8px; letter-spacing: .06em;
    padding: 2px 5px; border-radius: 6px; line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}
.pill-demo[hidden] { display: none; }
/* Подпись «Bet size» — на месте бейджа DEMO (вне демо), та же геометрия:
   absolute ⇒ цифра суммы не смещается. */
.pill-size {
    position: absolute; left: 50%; bottom: calc(50% + 8px + 3px);
    transform: translateX(-50%); color: #8A8A90;
    font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 9px; letter-spacing: .02em; line-height: 1;
    white-space: nowrap; pointer-events: none;
}
.pill-size[hidden] { display: none; }
.pill-val {
    position: relative;
    display: inline-flex; align-items: baseline;
    font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 16px; line-height: 1;
    color: #000000; white-space: nowrap;
    /* 42vw — the WIDTH BUDGET of a pill value. FitText (ui/fitText.js,
       capacity 'max-width') reads it: the exact amount is shown when it fits
       here, else the compact K/M/B/T one. overflow/ellipsis is a last-resort
       safeguard only (the exact amount is in the pill's title/aria-label). */
    max-width: 42vw; overflow: hidden; text-overflow: ellipsis;
}
.pill-cap {
    position: absolute;
    left: 0; right: 0;
    bottom: calc(100% + 2px);
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700; font-size: 9px; line-height: 1;
    letter-spacing: 0.04em; text-transform: uppercase;
    color: rgba(0, 0, 0, 0.50);
    pointer-events: none;
}
.pill-unit {
    margin-left: 4px;
    font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.50);
}
.pill-bet { bottom: 44px; left: 20px; }

/* Free-bet pill — ЗАМЕНА тайла #pill-bet, пока у игрока есть гранты. Выбора
   «фрибет или деньги» нет (фрибеты отыгрываются первыми), выбора суммы тоже:
   сумма = номинал гранта. Поэтому пилла занимает РОВНО место #pill-bet
   (bottom 44 / left 20 / height 53), а кнопка автоставки, как и раньше, встаёт
   на 10px над нижним тайлом — её позицию считает JS по видимому якорю
   (TapiumUI._betAnchorEl), поэтому подмена тайла не рвёт стек.
   Вся информация — ВНУТРИ тайла, одной строкой: «N × номинал» в значении,
   срок — в нативном тултипе. Накопленный выигрыш здесь НЕ печатается (решение
   владельца): он живёт ровно в одном месте — в розовой пилюле «+6.45» над
   капсулой баланса (#balance-accrued ниже), рядом с деньгами, с которыми игрок
   его сравнивает.
   Фирменный розовый (var(--pink)) постоянен и не является состоянием: он
   говорит «эта ставка не за твои деньги», а состояний у тайла больше нет.
   Видимость — [hidden] из TapiumUI (нет грантов → нет тайла). */
.pill-freebet {
    bottom: 44px; left: 20px;
    cursor: default;
    background: var(--pink);
    box-shadow: 0 4px 10px 3px rgba(var(--pink-rgb), 0.22);
}
/* `.pill-val` clips by default (`overflow:hidden`, a runaway-string safeguard),
   and that ALSO clips the absolutely-positioned `.pill-cap` above the tile — the
   caption never paints. Here the content is ours and always short ("N × stake"),
   so the safeguard buys nothing while the caption is the only thing that says
   WHOSE money this tile is about; drop the clip on this pill only.
   (#pill-bet не имеет подписи: её сняли как рудимент — она всегда была
   обрезана этим же clip'ом и никогда не показывалась.) */
.pill-freebet .pill-val { font-size: 15px; overflow: visible; color: #FFFFFF; }
/* …so the clip moves one level down, onto the value itself: `.pill-val` keeps its
   42vw budget, the text shrinks inside it (min-width:0) instead of painting past
   the tile. FitText already picks the compact stake when the exact one does not
   fit; the ellipsis is only a last resort (exact summary is in the tile's title). */
.pill-freebet #freebet-num { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-freebet .pill-cap { color: rgba(255, 255, 255, 0.75); }

/* Mobile: never zoom on double-tap. touch-action: manipulation keeps
   taps/clicks/scroll but disables double-tap zoom (including the amount input).
   The play field and modals are already under touch-action: none. */
.pill, .bet-sheet, .bet-sheet *, .bet-scrim,
.sys-stat, .sys-stat *,
button, [contenteditable], input, select { touch-action: manipulation; }

/* ===== Bet-energy ring around BET (token bucket, ChargeMeter.js) ===
   SVG stroke around the pill perimeter; fill fraction = charges + progress to next.
   Pure cosmetics — bet gate is server-side only. Position/size set by JS. */
#bet-charge-ring {
    position: fixed;
    z-index: var(--z-hud-over);  /* above pill (--z-hud), but pointer-events off */
    pointer-events: none;
    overflow: visible;
}
#bet-charge-ring rect { fill: none; stroke-linecap: round; }
#bet-charge-ring .bcr-track { stroke: rgba(0, 0, 0, 0.08); stroke-width: 3; }
#bet-charge-ring .bcr-fill {
    stroke: var(--accent);       /* Tapium heat-pink */
    stroke-width: 3;
    filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.45));
}
#bet-charge-ring .bcr-notch { stroke: #FFFFFF; stroke-width: 4.5; stroke-linecap: butt; }
/* Charges depleted — red pulse to indicate "betting not allowed". */
#bet-charge-ring.empty .bcr-fill {
    stroke: var(--hover-fill);
    animation: bcr-pulse 1s var(--ease) infinite;
}
@keyframes bcr-pulse {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 1; }
}

/* ===== DRUM (odometer) for amounts ======================================= */
.drum .rd {
    display: inline-block; position: relative; height: 1.4em; overflow: hidden;
    text-align: center; vertical-align: bottom;
    -webkit-mask-image: linear-gradient(to bottom,
        transparent 0%, #000 32%, #000 68%, transparent 100%);
    mask-image: linear-gradient(to bottom,
        transparent 0%, #000 32%, #000 68%, transparent 100%);
}
.drum .rstatic { display: inline-block; line-height: 1.4em; }
.drum .rbase   { display: inline-block; line-height: 1.4em; }
.drum .rstack  { position: absolute; left: 0; right: 0; top: 0.2em; line-height: 1em; }
/* Drum in pills: more compact height, aligned to baseline with USD and label */
.pill-num.drum { display: inline-flex; align-items: baseline; }
.pill-num.drum .rd { height: 1.25em; vertical-align: baseline; }
.pill-num.drum .rstack { top: 0.13em; }
/* Balance and bet pills: mask below digits is solid (fade only at top) —
   otherwise the drum fades to white and a "flare" shows under the amount. */
#pill-balance .pill-num.drum .rd,
#pill-bet .pill-num.drum .rd {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 100%);
}

/* ===== Camera return button (aim) ===================================== */
#aim-btn {
    position: fixed;
    top: 50%; left: 15px;
    transform: translateY(-50%) scale(0.85);
    width: 53px; height: 53px;
    z-index: var(--z-hud-over);
    background: var(--pink);
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 4px 10px 3px rgba(var(--pink-rgb), 0.20);
    display: none;
    align-items: center; justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    transition: opacity 200ms var(--ease), transform 220ms var(--ease-spring);
}
#aim-btn.show { display: flex; opacity: 1; transform: translateY(-50%) scale(1); }
#aim-btn svg { display: block; width: 25px; height: 25px; transform: translateX(-2px); }
#aim-btn.on-right { left: auto; right: 15px; }
#aim-btn.on-right svg { transform: scaleX(-1) translateX(-2px); }

/* ===== Snake head indicator at screen edge ============================ */
#head-indicator {
    position: fixed;
    left: 4px; top: 50%;
    z-index: var(--z-hud-over);
    width: 25px; height: 25px;
    display: none;
    pointer-events: none;
    filter: drop-shadow(0 4px 10px rgba(var(--pink-rgb), 0.20));
    transition: opacity 200ms var(--ease);
    opacity: 0;
}
#head-indicator.show { display: block; opacity: 1; }
#head-indicator.on-right { left: auto; right: 4px; }
#head-indicator.on-right svg { transform: scaleX(-1); }
#head-indicator svg { display: block; width: 25px; height: 25px; overflow: visible; }
#head-indicator svg path { fill: var(--pink); stroke: #FFFFFF; stroke-width: 6; paint-order: stroke; stroke-linejoin: round; }

/* ===== Bet amount popover ====================================== */
.bet-scrim {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.04);
    z-index: var(--z-sheet-scrim);
    opacity: 0; visibility: hidden;
    transition: opacity 180ms var(--ease), visibility 180ms var(--ease);
}
.bet-scrim.open { opacity: 1; visibility: visible; }

.bet-sheet {
    position: fixed;
    left: 20px; bottom: 44px;
    z-index: var(--z-sheet);
    width: 264px;
    background: #FFFFFF;
    border-radius: var(--r-modal);
    box-shadow: var(--shadow-modal);
    padding: 10px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    opacity: 0; visibility: hidden;
    transform: translateY(8px) scale(0.98);
    transform-origin: left bottom;
    transition: opacity 180ms var(--ease), transform 200ms var(--ease-spring),
                visibility 180ms var(--ease);
}
.bet-sheet.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.bet-amount-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 7px;
}
.bet-pm {
    flex: none; width: 40px; height: 40px; border: none; border-radius: var(--r-field);
    background: var(--surface-btn); color: #000;
    font-weight: 600; font-size: 22px; line-height: 1;
    cursor: pointer; user-select: none;
    transition: background 120ms var(--ease), transform 80ms var(--ease);
}
.bet-pm:active { transform: scale(0.92); background: var(--surface-press); }
.bet-pm.disabled { opacity: 0.32; pointer-events: none; }
.bet-amount-mid {
    flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
    min-width: 0; height: 1.25em;
    font-size: 28px; font-weight: 600; color: #000;
    letter-spacing: 0.01em;
}
.bet-amount-text {
    font-size: 28px; font-weight: 600; color: #000; line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    display: inline-flex; align-items: flex-end;
}
/* Input — overlaid on drum in the same metric; hidden by default */
#bet-input {
    outline: none; cursor: text; caret-color: var(--pink);
    position: absolute; left: 50%; transform: translateX(-50%);
    display: none;
    height: 1.4em; line-height: 1.4em;
    align-items: center;
    /* A long typed amount scrolls inside the field (caret stays visible), it
       never paints over the −/+ buttons. */
    max-width: 100%; overflow: hidden;
}
/* Rejected input (money.parseAmountInput → null: ambiguous "1.000", garbage): toast +
   the field stays open on Enter with a red ring and red, NOT re-selected text (a
   selection repainted it and hid the red) until the next keystroke. */
.bet-amount-mid.invalid #bet-input { color: var(--danger); caret-color: var(--danger); box-shadow: 0 0 0 2px var(--danger); border-radius: var(--r-field); }
.bet-amount-mid.editing #bet-display { visibility: hidden; }
.bet-amount-mid.editing #bet-input { display: inline-flex; }

.bet-presets {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
    margin-bottom: 11px;
}
/* Шторка ставки: число чипов задаёт сервер (SessionMsg.bet_presets_cents; при
   повышенном минимуме валюты пресеты ниже него отброшены) — колонки по числу детей. */
#bet-presets { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.bet-preset {
    height: 34px; border: none; border-radius: var(--r-chip);
    background: var(--surface-btn); color: #000;
    font-weight: 600; font-size: 13px;
    letter-spacing: -0.01em; cursor: pointer;
    transition: background 120ms var(--ease), transform 80ms var(--ease);
}
.bet-preset:active { transform: scale(0.94); background: var(--surface-press); }
/* Chip label: the number FitText sizes (ui/fitText.js — container = the chip). */
.bet-preset-num { white-space: nowrap; }

.bet-confirm {
    width: 100%; height: 46px; border: none; border-radius: var(--r-cta);
    background: var(--pink); color: #FFFFFF;
    font-family: var(--ff-head); font-weight: 900; font-size: 14px;
    letter-spacing: 0.01em;
    text-transform: uppercase; cursor: pointer;
    transition: transform 100ms var(--ease), filter 120ms var(--ease);
}
.bet-confirm:active { transform: scale(0.97); filter: brightness(0.95); }

/* ===== AUTOPLAY ================================================== */
/* Button sits ABOVE the BET tile (left-aligned with it); both left & bottom
   are set from JS in TapiumUI._initAutoplay().place(). */
#autoplay-btn {
    position: fixed; bottom: 44px; left: 0; z-index: var(--z-hud);
    width: 53px; height: 53px; border: none; border-radius: 50%;
    background: #FFFFFF; box-shadow: 0 4px 10px 3px rgba(0, 0, 0, 0.10);
    display: flex; align-items: center; justify-content: center; padding: 0;
    cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
    transition: transform 100ms var(--ease);
}
#autoplay-btn:active { transform: scale(0.96); }
#autoplay-btn .ap-ico { display: flex; align-items: center; justify-content: center; line-height: 0; }
#autoplay-btn .ap-ico svg { display: block; width: 36px; height: 36px; overflow: visible; }
#autoplay-btn .ap-arrows {
    transform-box: fill-box; transform-origin: center;
    transition: transform 420ms cubic-bezier(.2, 1.3, .4, 1);
}
@media (hover: hover) and (pointer: fine) {
    #autoplay-btn:hover .ap-arrows { transform: rotate(40deg); }
}

/* Running-state icon (magenta progress ring + black stop square) — hidden until
   the bot runs, then it replaces the refresh-arrows glyph. */
#autoplay-btn .ap-run-ico { display: none; position: relative; width: 44px; height: 44px; }
#autoplay-btn .ap-ring { display: block; width: 44px; height: 44px; transform: rotate(-90deg); }
#autoplay-btn .ap-ring-track { fill: none; stroke: rgba(var(--pink-rgb), 0.15); stroke-width: 4; }
#autoplay-btn .ap-ring-prog {
    fill: none; stroke: var(--pink); stroke-width: 4; stroke-linecap: round;
    stroke-dasharray: 119.38; stroke-dashoffset: 119.38; /* 2πr, r=19 */
    transition: stroke-dashoffset 300ms var(--ease);
}
#autoplay-btn .ap-stop {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 15px; height: 15px; border-radius: 3.5px; background: #000;
}
#autoplay-btn.ap-running .ap-ico { display: none; }
#autoplay-btn.ap-running .ap-run-ico { display: flex; align-items: center; justify-content: center; }
/* Endless run (∞): no determinate progress → spin the ring instead. */
#autoplay-btn.ap-running.ap-endless .ap-ring { animation: ap-run-spin 1.8s linear infinite; }
@keyframes ap-run-spin { to { transform: rotate(270deg); } }

/* Rounds badge — white pill anchored to the RIGHT of the running button
   (left/bottom set from JS). Shows done/total, e.g. "4/10". */
#autoplay-count {
    position: fixed; z-index: var(--z-hud-over); left: 0; top: auto; bottom: 84px;
    min-width: 16px; text-align: center;
    background: #FFFFFF; box-shadow: 0 4px 10px 3px rgba(0, 0, 0, 0.10);
    border-radius: 100px; padding: 8px 12px;
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 16px; line-height: 1;
    color: #000000; white-space: nowrap;
    display: none; user-select: none; pointer-events: none;
}
#autoplay-count.show { display: block; }

/* Strategy rounds note in the ap-sheet (shows override of program.rounds). */

/* Inline confirm bar (dangerous launch, discard-changes) — no native dialogs. */
.ap-inline-confirm {
    display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px;
    border-radius: var(--r-chip); background: var(--surface); color: var(--ink);
    font-family: var(--ff-body); font-size: var(--fs-body); font-weight: 600;
}
.ap-inline-confirm span { flex: 1; min-width: 0; }
.ap-inline-confirm button {
    min-height: 34px; padding: 0 14px; border: none; border-radius: var(--r-copy);
    font-family: var(--ff-head); font-weight: 900; font-size: 12px;
    letter-spacing: .02em; text-transform: uppercase; cursor: pointer;
}
.ap-ic-no { background: transparent; color: var(--label-3); }
.ap-ic-yes { background: var(--pink); color: #FFFFFF; }
/* inside the editor panel it floats above the bottom bar */
.ap-editor .wf-modal .ap-inline-confirm {
    position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 5; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

#ap-sheet { transform-origin: left bottom; }
#ap-sheet .bet-presets { margin-bottom: 6px; }
#ap-start { display: flex; align-items: center; justify-content: center; gap: 7px; }
#ap-start .ap-play { display: inline-flex; line-height: 0; }
#ap-start .ap-play svg { display: block; width: 13px; height: auto; }
.ap-inf {
    width: 100%; height: 34px; border: none; border-radius: var(--r-chip);
    background: var(--surface-btn); color: #000; cursor: pointer; margin-bottom: 11px;
    display: flex; align-items: center; justify-content: center;
    transition: background 120ms var(--ease), transform 80ms var(--ease);
}
.ap-inf:active { transform: scale(0.98); background: var(--surface-press); }
.ap-inf.active { background: rgba(var(--pink-rgb), 0.10); }
.ap-inf-glyph {
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 22px; line-height: 1;
    color: #000;
}
.ap-inf.active .ap-inf-glyph { color: var(--pink); }


/* ===== COMBO-ШКАЛА «Супер бонуса» (ComboBarHud.js, темы со stickers — nearmiss, slotmiss, tetroglass) =====
   Самоцветы-деления (вариант №5 scratchpad/super-bonus-variants.html) на плашке в стиле
   стикеров NEAR MISS / COMBO (stickerBadge.js «4e»: белая плашка, розовая рамка,
   розовый Inter Black). Цвет = STICKER_INK (0xFF0080) из stickerBadge.js. */
#combo-bar {
    --cb-ink: #FF0080;
    position: fixed;
    top: 14px; left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    z-index: var(--z-hud);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 8px 16px 12px;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 0 0 6px var(--cb-ink), 0 8px 16px rgba(0, 0, 0, 0.18);
    pointer-events: none; user-select: none;
}
#combo-bar[hidden] { display: none; }
#combo-bar .cb-title {
    font-family: 'Inter', sans-serif; font-weight: 900; font-size: 20px; line-height: 1;
    letter-spacing: -0.5px; text-transform: uppercase; white-space: nowrap;
    color: var(--cb-ink);
}
#combo-bar .cb-gems { display: flex; gap: 12px; padding: 0 4px; }
#combo-bar .cb-gem {
    position: relative;
    width: 18px; height: 18px; margin: 3px;
    transform: rotate(45deg);
    border-radius: 4px;
    background: #FFE3F1;
    border: 2px solid #FFB3D6;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
#combo-bar .cb-gem.on {
    background: linear-gradient(135deg, #FFB3D9, var(--cb-ink) 55%, #B0005A);
    border-color: var(--cb-ink);
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.55), inset 2px 2px 0 rgba(255, 255, 255, 0.6);
    transform: rotate(45deg) scale(1.12);
}
/* Прилёт плашки COMBO (ComboBarHud.arrive, scratchpad/combo-fly-demo.html): вспышка + мигание
   деления, кольцо, искры, «подпрыгивание» таблички; полная шкала — золотое мигание. */
#combo-bar { transition: transform 0.15s; }
#combo-bar.bump { transform: translateX(-50%) rotate(-2deg) scale(1.12); }
#combo-bar.full { animation: cb-full 0.25s 8 alternate; }
@keyframes cb-full { to { box-shadow: 0 0 0 6px #FFD23F, 0 0 40px 14px #FFD23F; } }
#combo-bar .cb-gem.lit { animation: cb-lit 1.6s; }
@keyframes cb-lit {
    0% { transform: rotate(45deg) scale(2.2); box-shadow: 0 0 30px 12px #FFFFFF, 0 0 50px 20px var(--cb-ink); }
    15% { transform: rotate(45deg) scale(1); }
    25%, 45%, 65%, 85% { filter: brightness(1.9); box-shadow: 0 0 22px 8px #FF66B3; }
    35%, 55%, 75% { filter: brightness(0.8); box-shadow: 0 0 4px rgba(255, 0, 128, 0.33); }
    100% { transform: rotate(45deg) scale(1.12); }
}
#combo-bar .cb-ring {
    position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px;
    border-radius: 50%; border: 3px solid var(--cb-ink); pointer-events: none;
    animation: cb-ring 0.7s ease-out forwards;
}
@keyframes cb-ring { to { transform: scale(5); opacity: 0; border-width: 1px; } }
.cb-spark {
    position: fixed; left: 0; top: 0; width: 6px; height: 6px; border-radius: 50%;
    background: #FFD23F; box-shadow: 0 0 6px #FFFFFF; pointer-events: none; z-index: var(--z-hud);
}
@media (prefers-reduced-motion: reduce) {
    #combo-bar .cb-gem { transition: none; }
    #combo-bar.bump { transform: translateX(-50%) rotate(-2deg); }
    #combo-bar.full, #combo-bar .cb-gem.lit { animation: none; }
}
