:root { --bg:#10131a; --surface:#1a1f2a; --surface-2:#242b38; --text:#f3f5f8; --muted:#9da7b8; --accent:#7ee5ad; --accent-2:#8ca8ff; --line:rgba(255,255,255,.09); --danger:#ff8d91; --tg-safe-top:0px; font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--text); background:var(--bg); 
          --workshop-bg: #1a1210;
    --workshop-bg-2: #241713;
    --workshop-surface: #251a15;
    --workshop-surface-2: #2e1f18;
    --workshop-card: rgba(37, 26, 21, .86);
    --workshop-card-2: rgba(20, 14, 11, .7);
    --workshop-line: rgba(214, 150, 90, .22);
    --workshop-line-soft: rgba(214, 150, 90, .14);
    --workshop-text: #f3e6d8;
    --workshop-muted: #b9a08d;
    --workshop-ember: #ff7a33;
    --workshop-ember-2: #ff9a3d;
    --workshop-gold: #ffcf6b;
    --workshop-gold-2: #e0a53a;
    --workshop-amber: #f0a24e;
    --workshop-amber-2: #d9862f;
    --workshop-parchment: #e8d9b8;
    --workshop-brass: #b98a4a;
    --workshop-green: #7ee5ad;
    --workshop-danger: #ff8d91;
    --tier-novice: #9aa0ab;
    --tier-fighter: #6fb6ff;
    --tier-veteran: #c37bff;
    --tier-champion: #ffb23d;
}
* { box-sizing:border-box; } body { margin:0; min-width:320px; min-height:100vh; background:radial-gradient(circle at 80% -10%,#283a58 0,transparent 37%),var(--bg); } button { font:inherit; cursor:pointer; border:0; } .app { width:100%; min-height:100vh; margin:auto; padding-bottom:92px; }
.app-header { min-height:72px; padding:max(16px, env(safe-area-inset-top), var(--tg-safe-top)) 20px 14px; display:flex; align-items:center; gap:11px; border-bottom:1px solid var(--line); background:rgba(16,19,26,.86); position:sticky; top:0; z-index:2; backdrop-filter:blur(16px); } .app-header b { display:block; letter-spacing:-.02em; } .app-header small { color:var(--muted); font-size:12px; }.mark { width:36px; height:36px; display:grid; place-items:center; color:#142018; background:var(--accent); border-radius:12px; font-size:20px; } .fullscreen { margin-left:auto; border:1px solid var(--line); background:var(--surface); border-radius:10px; color:var(--text); width:38px; height:38px; font-size:23px; }
.content { padding:20px 16px; }.loading-card,.hero,.panel,.character-card,.item-card { border:1px solid var(--line); background:linear-gradient(145deg,rgba(36,43,56,.94),rgba(26,31,42,.94)); box-shadow:0 12px 32px rgba(0,0,0,.14); border-radius:20px; }.loading-card { min-height:100vh; display:grid; place-content:center; text-align:center; color:var(--muted); }.paw { color:var(--accent); font-size:36px; animation:pulse 1.4s ease-in-out infinite; }.error-card h1 { color:var(--text); }.error-card button,.pet-choice,.item-card button,.item-buy button { color:#132219; background:var(--accent); padding:12px 15px; border-radius:12px; font-weight:750; min-height:46px; }.error-card button { margin-top:8px; }
.hero { padding:28px 20px; }
.hero h1,.screen-head h1 { 
    margin: 0;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 21px;
    color: var(--workshop-parchment);
    text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
    letter-spacing: .01em;
}
.hero p,.item-card p { color:var(--muted); line-height:1.5; }.hero-kicker { color:var(--accent); text-transform:uppercase; letter-spacing:.12em; font-size:11px; font-weight:800; }.pet-options { display:grid; grid-template-columns:1fr; gap:12px; margin-top:22px; }.pet-choice { display:flex; min-height:140px; padding:20px; color:var(--text); text-align:left; align-items:flex-start; flex-direction:column; background:var(--surface); border:1px solid var(--line); transition:transform .16s, border-color .16s; }.pet-choice b { font-size:22px; }.pet-choice span { margin-top:8px; color:var(--accent); font-weight:700; }.pet-choice small { color:var(--muted); margin-top:auto; }.pet-choice:active { transform:scale(.98); border-color:var(--accent); }
.character-card { display:flex; gap:16px; align-items:center; padding:19px; }.character-card h1 { margin:4px 0; font-size:28px; }.character-card p { color:var(--muted); margin:0; font-size:13px; }.pet-avatar { width:72px; height:72px; display:grid; place-items:center; flex:0 0 auto; font-size:44px; background:rgba(126,229,173,.1); border-radius:20px; overflow:hidden; }.pet-avatar img,.pet-avatar .pet-layers { width:100%; height:100%; object-fit:contain; }.pet-showcase { display:flex; justify-content:center; margin:2px 0 16px; padding:14px; border-radius:20px; background:linear-gradient(145deg,rgba(36,43,56,.94),rgba(26,31,42,.94)); border:1px solid var(--line); }.pet-showcase img,.pet-showcase .pet-layers { width:min(100%,260px); aspect-ratio:1/1; object-fit:contain; }.pet-layers { position:relative; display:block; }.pet-layer { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }.currency-bar { display:flex; justify-content:space-between; gap:10px; margin:13px 0; padding:12px 14px; font-size:13px; border-radius:13px; background:rgba(126,229,173,.07); border:1px solid rgba(126,229,173,.16); }.currency-bar span:last-child { color:var(--accent-2); }.meters { display:grid; gap:10px; margin:14px 0; }.meters label { display:flex; justify-content:space-between; font-size:13px; color:var(--muted); }.meters b { color:var(--text); } progress { appearance:none; width:100%; height:11px; overflow:hidden; border:0; border-radius:99px; } progress::-webkit-progress-bar { background:#11151d; } progress::-webkit-progress-value { background:var(--accent); border-radius:99px; } progress.mood::-webkit-progress-value { background:#f0bc71; }.panel { padding:17px; margin-top:14px; }.panel h2,.item-card h2 { margin:0; font-size:17px; letter-spacing:-.02em; }.panel-title { display:flex; gap:8px; align-items:baseline; justify-content:space-between; }.panel-title span { font-size:12px; color:var(--muted); }.xp-track { height:10px; margin-top:12px; border-radius:8px; overflow:hidden; background:#11151d; }.xp-track i { display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:inherit; }.stats-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:9px; margin-top:13px; }.stat { min-height:68px; padding:10px; display:grid; grid-template-columns:1fr auto; align-items:center; background:rgba(0,0,0,.14); border-radius:11px; color:var(--muted); font-size:12px; }.stat strong { color:var(--text); font-size:22px; }.stat small { grid-column:1/-1; margin-top:3px; }.buff { color:#f0bc71; margin:15px 0 0; font-size:13px; }.phase-note { color:var(--muted); font-size:12px; line-height:1.4; padding:0 4px; }
.screen-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }.screen-head h1 { margin-bottom:0; }.icon-button { width:40px; height:40px; border-radius:12px; color:var(--text); background:var(--surface); border:1px solid var(--line); font-size:22px; }.items { display:grid; gap:11px; }.item-card { display:flex; gap:14px; align-items:center; padding:16px; }.item-card>div:first-child { min-width:0; flex:1; }.item-card p { font-size:13px; margin:6px 0 0; }.item-card small { color:#f0bc71; font-size:11px; }.item-card em { color:var(--accent); font-style:normal; white-space:nowrap; }.item-card button:disabled { opacity:.55; cursor:wait; }
/* Phase 19.3: shared account inventory can list gear currently worn by ANOTHER pet. That row is
   informational only (no equip/unequip action makes sense here), so dim it and swap the disabled
   button's cursor to not-allowed instead of the "wait" spinner used for in-flight requests. */
.item-card-disabled { opacity:.62; }
.item-card-disabled button:disabled { cursor:not-allowed; }.badge { display:inline-block; margin-bottom:7px; padding:3px 7px; border:1px solid var(--line); border-radius:99px; font-size:10px; color:var(--accent-2); text-transform:uppercase; letter-spacing:.06em; }.item-buy { min-width:86px; display:grid; gap:8px; text-align:right; }.item-buy strong { font-size:13px; white-space:nowrap; }.qty-input { width:100%; min-height:34px; border-radius:10px; border:1px solid var(--line); background:var(--surface); color:var(--text); text-align:center; font-size:13px; -moz-appearance:textfield; }.qty-input:disabled { opacity:.5; }.tabs { display:flex; gap:7px; overflow-x:auto; padding:7px 0 15px; scrollbar-width:none; }.tabs button { flex:0 0 auto; border:1px solid var(--line); color:var(--muted); background:var(--surface); padding:9px 12px; border-radius:999px; font-size:12px; }.tabs button.active { color:#122018; background:var(--accent); border-color:var(--accent); font-weight:750; }.empty { color:var(--muted); text-align:center; padding:42px 12px; }
.bottom-nav { position:fixed; bottom:0; left:50%; transform:translateX(-50%); display:grid; grid-template-columns:repeat(3,1fr); width:min(100%,700px); padding:10px 11px max(10px,env(safe-area-inset-bottom)); background:rgba(16,19,26,.95); border-top:1px solid var(--line); backdrop-filter:blur(18px); z-index:3; }.bottom-nav button { color:var(--muted); padding:12px 4px; background:transparent; border-radius:12px; font-size:12px; font-weight:650; }.bottom-nav button.active { background:rgba(126,229,173,.12); color:var(--accent); }.toast { position:fixed; z-index:10; left:50%; bottom:90px; transform:translate(-50%,20px); visibility:hidden; opacity:0; width:min(calc(100% - 36px),440px); padding:12px 15px; background:#dff9e9; color:#143121; border-radius:12px; text-align:center; font-weight:700; font-size:13px; box-shadow:0 12px 30px rgba(0,0,0,.25); transition:.2s; }.toast.error { background:#ffe0e1; color:#4a161c; }.toast.visible { visibility:visible; opacity:1; transform:translate(-50%,0); } @keyframes pulse { 50% { transform:scale(1.2); opacity:.6; } } @media (min-width:560px) { .content { padding:28px 24px; }.pet-options { grid-template-columns:1fr 1fr; }.stats-grid { grid-template-columns:repeat(3,1fr); } }

/* Phase 2: equipment, forge and cosmetic controls. */
.app { padding-bottom:124px; }
.bottom-nav { grid-template-columns:repeat(6, minmax(88px,1fr)); justify-content:start; overflow-x:auto; left:0; transform:none; width:100%; max-width:none; scrollbar-width:none; }
.bottom-nav button { white-space:nowrap; }
.equipment-slots { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:14px 0; }
.equipment-slot { min-height:112px; display:flex; align-items:center; gap:10px; padding:12px; border:1px dashed var(--line); background:rgba(26,31,42,.58); border-radius:16px; color:var(--muted); }
.equipment-slot.occupied { border-style:solid; border-color:rgba(126,229,173,.35); color:var(--text); background:linear-gradient(145deg,rgba(36,43,56,.94),rgba(26,31,42,.94)); }
.slot-icon { width:48px; height:48px; flex:0 0 auto; display:grid; place-items:center; overflow:visible; border-radius:12px; background:rgba(255,255,255,.06); color:var(--accent); font-size:23px; }
.slot-icon .item-icon { width:100%; height:100%; object-fit:cover; border-radius:12px; }
.equipment-slot>div:nth-child(2) { min-width:0; display:grid; gap:3px; }
.equipment-slot span:first-child { font-size:11px; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); }
.equipment-slot strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.equipment-slot small,.slot-state { font-size:11px; color:var(--accent); }
.slot-state { margin-left:auto; align-self:flex-start; }
/* Phase 7.12: per-item stat pills -- surfaces base_stats + sharpen_bonus (equipment slots, the
   equipment inventory list, and the forge screen) which previously had no visual representation at
   all beyond the raw sharpen LEVEL number. */
.item-stats-line { display:flex; flex-wrap:wrap; gap:5px; margin-top:5px; }
.item-stat-pill { display:inline-flex; align-items:baseline; gap:3px; padding:2px 7px; border-radius:99px; font-size:11px; font-weight:650; color:var(--muted); background:rgba(0,0,0,.18); white-space:nowrap; }
.item-stat-pill small { color:var(--accent); font-weight:600; }
.item-stat-pill.has-bonus { color:var(--text); border:1px solid rgba(126,229,173,.3); }
.item-stats-line.preview-line { margin-top:8px; padding-top:8px; border-top:1px dashed var(--line); }
.item-stats-line.preview-line small { flex:0 0 100%; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.05em; margin-bottom:2px; }
.item-stat-pill.preview { color:#f0bc71; background:rgba(240,188,113,.1); border:1px solid rgba(240,188,113,.28); }
.compact-items { margin-top:12px; }
.item-with-icon { min-width:0; flex:1; display:flex; align-items:center; gap:11px; }
.item-with-icon>div { min-width:0; }
.item-icon { width:46px; height:46px; flex:0 0 auto; overflow:hidden; object-fit:cover; border:1px solid var(--line); border-radius:12px; background:#11151d; }
.item-icon-fallback { display:grid; place-items:center; color:var(--accent); }
.large-icon { width:64px; height:64px; }
/* Phase 7.4: rarity ring drawn around an item's icon. The wrapper sizes to the icon so it drops
   into existing .item-with-icon/.slot-icon/.forge-card flex layouts unchanged.
   Фаза 31 (баг #5): раньше здесь был абсолютно позиционированный <img class="rarity-frame-img">
   (декоративная PNG-рамка поверх иконки, ~34% шире иеё). Удалён по прямому запросу
   пользователя вместе с iconFramed() в app.js -- теперь .icon-frame-wrap сам рисует CSS-рамку/
   свечение через --rarity-color/--rarity-soft, которые iconFramed() теперь задаёт инлайново на
   каждом вызове (см. RARITY_COLORS в app.js) -- работает одинаково на любой поверхности
   (магазин, боевой магазин, инвентарь, экипировка, кузница, чертежи/реформация/раскрытие
   Мастерской), без зависимости от того, заданы ли эти переменные амбиентным скоупом. .shop-screen
   оставляет свои более специфичные правила (см. .shop-screen .icon-frame-wrap ниже) нетронутыми --
   они по-прежнему выигрывают по специфичности и просто дублируют тот же визуальный язык своим фоном. */
.icon-frame-wrap { position:relative; display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center; isolation:isolate; border-radius:12px; border:1.5px solid var(--rarity-color, rgba(255,255,255,.14)); box-shadow:0 0 0 1px var(--rarity-soft, transparent) inset, 0 0 12px var(--rarity-soft, transparent); background: var(--rarity-soft, transparent); }
.icon-frame-wrap .item-icon { position:relative; z-index:1; }
.slot-icon .icon-frame-wrap,.slot-icon .item-icon { width:100%; height:100%; }
.forge-picker { display:flex; gap:7px; overflow-x:auto; margin:12px 0; padding-bottom:3px; scrollbar-width:none; }
.forge-picker button { min-width:82px; display:grid; gap:3px; padding:10px 11px; color:var(--muted); background:var(--surface); border:1px solid var(--line); border-radius:12px; font-size:12px; text-align:left; }
.forge-picker button.active { color:#132219; background:var(--accent); border-color:var(--accent); font-weight:750; }
.forge-picker small { font-size:11px; }
.forge-card { display:grid; gap:15px; }
.forge-action { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; background:rgba(0,0,0,.14); border-radius:12px; }
.forge-action div { display:grid; gap:2px; color:var(--muted); font-size:12px; }
.forge-action strong { color:var(--text); font-size:20px; }
.forge-action button,.socket-row button,.rune-row button,.skin-row button,.skin-remove-row button { min-height:40px; padding:9px 12px; border-radius:10px; background:var(--accent); color:#132219; font-size:12px; font-weight:750; }
.forge-action button:disabled { opacity:.5; cursor:not-allowed; }
.socket-list,.rune-list,.skins-list { display:grid; gap:8px; margin-top:12px; }
.socket-row,.rune-row,.skin-row,.skin-remove-row { display:flex; align-items:center; gap:9px; padding:10px; background:rgba(0,0,0,.14); border-radius:12px; }
.socket-row { flex-wrap:wrap; }
.socket-row>span { width:100%; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.07em; }
.socket-row strong { flex:1; font-size:14px; }
.socket-row small,.rune-row small { color:var(--muted); font-size:11px; }
.socket-row select,.skin-row select,.skin-remove-row select { min-width:0; flex:1; padding:9px; color:var(--text); background:var(--surface-2); border:1px solid var(--line); border-radius:9px; font-size:12px; }
.rune-row>div { min-width:0; flex:1; display:grid; gap:3px; }
.rune-row strong { font-size:14px; }
.skins-panel { margin-bottom:8px; }
.skin-row>div { min-width:0; flex:1; display:flex; align-items:center; gap:8px; }
.skin-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.skin-row .item-icon { width:34px; height:34px; border-radius:9px; }
.skin-row { flex-wrap:wrap; }
.skin-row select { min-width:120px; }
.skin-remove-row { margin-top:10px; flex-wrap:wrap; }
.skin-remove-row>span { width:100%; color:var(--muted); font-size:12px; }
@media (min-width:560px) { .equipment-slots { grid-template-columns:repeat(3,minmax(0,1fr)); }.equipment-slot:last-child { grid-column:2; }.bottom-nav { left:50%; transform:translateX(-50%); width:min(100%,700px); max-width:700px; } }

.forge-button-stack { display:grid; gap:5px; justify-items:end; }.forge-protection { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:11px; white-space:nowrap; }.forge-protection input { accent-color:var(--accent); }
.forge-action.needs-stone { border:1px solid rgba(255,141,145,.4); }
.stone-requirement { display:flex; align-items:center; gap:8px; margin-top:4px; padding:8px 10px; border-radius:10px; background:rgba(0,0,0,.16); font-size:11px; color:var(--muted); }
.stone-requirement img,.stone-requirement .item-icon-fallback { width:26px; height:26px; flex:0 0 auto; border-radius:7px; }
.stone-requirement strong { color:var(--text); }
.stone-requirement.insufficient strong { color:var(--danger); }
.stone-craft-panel { margin-top:14px; }
.stone-craft-list { display:grid; gap:8px; margin-top:10px; }
.stone-craft-row { display:flex; align-items:center; gap:10px; padding:10px; border-radius:12px; background:rgba(0,0,0,.14); }
.stone-craft-row .item-icon { width:38px; height:38px; flex:0 0 auto; border-radius:9px; }
.stone-craft-row .item-icon-fallback { width:38px; height:38px; }
.stone-craft-row>div { min-width:0; flex:1; display:grid; gap:2px; }
.stone-craft-row strong { font-size:13px; }
.stone-craft-row small { color:var(--muted); font-size:11px; }
.stone-craft-row button { min-height:38px; padding:8px 11px; border-radius:10px; background:var(--accent); color:#132219; font-size:11px; font-weight:750; white-space:nowrap; }
.stone-craft-row button:disabled { opacity:.5; cursor:not-allowed; }

/* Phase 3: server-resolved 1v1 arena. */
.app { padding-bottom:132px; }.bottom-nav { grid-template-columns:repeat(7,minmax(82px,1fr)); }

.arena-intro button,.arena-result>button,.arena-actions button { 
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--workshop-muted);
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.secondary-action { color:var(--text)!important; background:var(--surface-2)!important; border:1px solid var(--line)!important; }
.arena-hp { display:grid; gap:10px; margin:14px 0; }.arena-fighter { padding:11px 12px; border:1px solid var(--line); border-radius:13px; background:rgba(0,0,0,.16); }.arena-fighter.self { border-color:rgba(126,229,173,.36); }.arena-fighter>div { display:flex; justify-content:space-between; gap:8px; margin-bottom:7px; font-size:12px; }.arena-fighter span { color:var(--muted); }.arena-fighter progress::-webkit-progress-value { background:var(--danger); }.arena-fighter.self progress::-webkit-progress-value { background:var(--accent); }
.arena-cooldown { padding:9px 11px; color:#132219; background:var(--accent); border-radius:11px; font-size:14px; }.arena-cooldown.active { background:#f0bc71; }.arena-timer { padding:9px 11px; color:#132219; background:#f0bc71; border-radius:11px; font-size:14px; }.arena-autopass { background:#3a2a20; color:#ffb997; border:1px solid #7a4830; }.arena-autopass.urgent { background:#5c1f1f; color:#ffcac2; border-color:#a33; animation:pulse 1s infinite; }.hex-grid { position:relative; width:min(100%,360px); aspect-ratio:1/1; margin:10px auto 16px; overflow:hidden; border:1px solid var(--line); border-radius:22px; background:radial-gradient(circle at 50% 50%,rgba(140,168,255,.14),transparent 59%),#151a23; }.hex { position:absolute; width:50px; height:58px; transform:translate(-50%,-50%); clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0 75%,0 25%); background:rgba(255,255,255,.09); color:var(--muted); font-size:9px; border:0; }.hex.available { background:rgba(126,229,173,.46); color:#0c2819; box-shadow:0 0 0 1px rgba(126,229,173,.7); }.hex.you { background:var(--accent-2); color:#10131a; font-weight:800; }.hex.enemy { background:var(--danger); color:#321117; font-weight:800; }.ap-m3-0{left:11%;top:50%}.ap-m3-1{left:17.5%;top:61.5%}.ap-m3-2{left:24%;top:73%}.ap-m3-3{left:30.5%;top:84.5%}.ap-m2-m1{left:17.5%;top:38.5%}.ap-m2-0{left:24%;top:50%}.ap-m2-1{left:30.5%;top:61.5%}.ap-m2-2{left:37%;top:73%}.ap-m2-3{left:43.5%;top:84.5%}.ap-m1-m2{left:24%;top:27%}.ap-m1-m1{left:30.5%;top:38.5%}.ap-m1-0{left:37%;top:50%}.ap-m1-1{left:43.5%;top:61.5%}.ap-m1-2{left:50%;top:73%}.ap-m1-3{left:56.5%;top:84.5%}.ap-0-m3{left:30.5%;top:15.5%}.ap-0-m2{left:37%;top:27%}.ap-0-m1{left:43.5%;top:38.5%}.ap-0-0{left:50%;top:50%}.ap-0-1{left:56.5%;top:61.5%}.ap-0-2{left:63%;top:73%}.ap-0-3{left:69.5%;top:84.5%}.ap-1-m3{left:43.5%;top:15.5%}.ap-1-m2{left:50%;top:27%}.ap-1-m1{left:56.5%;top:38.5%}.ap-1-0{left:63%;top:50%}.ap-1-1{left:69.5%;top:61.5%}.ap-1-2{left:76%;top:73%}.ap-2-m3{left:56.5%;top:15.5%}.ap-2-m2{left:63%;top:27%}.ap-2-m1{left:69.5%;top:38.5%}.ap-2-0{left:76%;top:50%}.ap-2-1{left:82.5%;top:61.5%}.ap-3-m3{left:69.5%;top:15.5%}.ap-3-m2{left:76%;top:27%}.ap-3-m1{left:82.5%;top:38.5%}.ap-3-0{left:89%;top:50%}.hex:disabled { cursor:default; }.arena-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }.arena-actions button:disabled { opacity:.45; cursor:not-allowed; }.battle-log ul { margin:12px 0 0; padding:0; list-style:none; display:grid; gap:7px; }.battle-log li { padding:9px; background:rgba(0,0,0,.14); color:var(--muted); border-radius:9px; font-size:12px; line-height:1.35; }.arena-result { text-align:center; padding-top:22px; }.arena-result h1 { margin:7px 0 6px; font-size:40px; letter-spacing:-.04em; }.arena-result-subtitle { margin:0 0 16px; color:var(--muted); font-size:13px; }.result-score { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }.result-score>div { display:grid; gap:4px; padding:12px 8px; background:var(--surface); border:1px solid var(--line); border-radius:14px; }.result-score small { color:var(--muted); font-size:11px; }.result-score strong { font-size:19px; }
@media (min-width:560px) { .bottom-nav { grid-template-columns:repeat(7,minmax(82px,1fr)); }.hex { font-size:10px; } }

/* Phase 4: parchment Arena and fog-of-war Outskirts map. */
.bottom-nav { grid-template-columns:repeat(8,minmax(82px,1fr)); }
.arena-status-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }.arena-status-badges { display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.arena-status-header h1 { margin:3px 0 0; font-size:28px; letter-spacing:-.04em; }
.arena-battle .hex-grid { width:min(100%,380px); background:radial-gradient(circle at 45% 35%,rgba(255,250,225,.72),transparent 55%),linear-gradient(145deg,#e8d9b5,#d4bf8f); border:1px solid #b89962; border-radius:18px; box-shadow:inset 0 0 0 7px rgba(100,72,35,.06),0 12px 24px rgba(0,0,0,.14); }
.arena-battle .hex { width:50px; height:58px; display:grid; place-items:center; background:rgba(255,246,218,.34); border:1px solid rgba(114,82,42,.32); color:#695237; clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0 75%,0 25%); }
.arena-battle .hex.available { background:rgba(222,190,111,.63); border-color:#a27536; box-shadow:none; }
.arena-battle .hex.you,.arena-battle .hex.enemy { background:rgba(255,246,218,.26); }
.arena-token { width:25px; height:25px; display:grid; place-items:center; border-radius:50%; border:2px solid rgba(255,255,255,.78); box-shadow:0 2px 5px rgba(62,39,19,.36); color:transparent; }
.arena-token.you { background:#3e78b5; }.arena-token.enemy { background:#c85448; }.hex-modifier { opacity:.62; font-size:11px; }.hex-modifier-icon { width:34px; height:34px; object-fit:contain; filter:drop-shadow(0 1px 3px rgba(0,0,0,.35)); pointer-events:none; }
.arena-battle .arena-hp { grid-template-columns:1fr 1fr; gap:8px; margin:12px 0 15px; }.arena-battle .arena-fighter { padding:10px; background:#f3e6c8; border-color:#c8aa76; color:#47331f; }.arena-battle .arena-fighter.self { border-color:#6f9fc7; }.arena-battle .arena-fighter span { color:#725f48; }.arena-battle .arena-fighter progress::-webkit-progress-bar { background:#d9c49a; }.arena-battle .arena-fighter.self progress::-webkit-progress-value { background:#3e78b5; }.arena-battle .arena-fighter progress::-webkit-progress-value { background:#c85448; }
.arena-cooldown { background:#dfe8d7; color:#35513d; border:1px solid #9eaf9a; }.arena-cooldown.active { background:#f1d69b; color:#65491c; border-color:#c8a358; }.arena-autopass { background:#f8dcc7; color:#7a3410; border:1px solid #c98a52; }.arena-autopass.urgent { background:#f8c4c0; color:#7a1f1f; border-color:#c85448; animation:pulse 1s infinite; }
.outskirts .phase-note { margin-top:0; }.world-map { position:relative; margin:16px auto 10px; overflow:hidden; border:1px solid #4c463e; border-radius:20px; background:radial-gradient(circle at center,rgba(98,102,108,.23),transparent 50%),#20272d; box-shadow:inset 0 0 0 6px rgba(0,0,0,.2); }
.world-hex { position:absolute; transform:translate(-50%,-50%); display:grid; place-items:center; padding:0; color:#f6eddb; border:1px solid rgba(255,255,255,.38); clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0 75%,0 25%); background-size:722.222% 619.048%; background-position:50% 50%; box-shadow:inset 0 0 0 2px rgba(34,25,16,.18); }
.world-hex:disabled { cursor:default; }
.world-token { width:25px; height:25px; border:2px solid #fff; border-radius:50%; background:#3e78b5; color:transparent; box-shadow:0 2px 6px rgba(0,0,0,.45); }.world-encounter { z-index:1; width:30px; height:30px; background-size:cover; background-position:center; border-radius:8px; box-shadow:0 2px 5px rgba(0,0,0,.55); filter:drop-shadow(0 0 3px rgba(0,0,0,.6)); }
/* Phase 7.11: world-map hex grid -- base tier (base, radius 3). */
.wp-m3-m3{left:calc(50% - 198px);top:calc(50% - 114px)}.wp-m3-m2{left:calc(50% - 176px);top:calc(50% - 76px)}.wp-m3-m1{left:calc(50% - 154px);top:calc(50% - 38px)}.wp-m3-0{left:calc(50% - 132px);top:50%}.wp-m3-1{left:calc(50% - 110px);top:calc(50% + 38px)}.wp-m3-2{left:calc(50% - 88px);top:calc(50% + 76px)}.wp-m3-3{left:calc(50% - 66px);top:calc(50% + 114px)}.wp-m2-m3{left:calc(50% - 154px);top:calc(50% - 114px)}.wp-m2-m2{left:calc(50% - 132px);top:calc(50% - 76px)}.wp-m2-m1{left:calc(50% - 110px);top:calc(50% - 38px)}.wp-m2-0{left:calc(50% - 88px);top:50%}.wp-m2-1{left:calc(50% - 66px);top:calc(50% + 38px)}.wp-m2-2{left:calc(50% - 44px);top:calc(50% + 76px)}.wp-m2-3{left:calc(50% - 22px);top:calc(50% + 114px)}.wp-m1-m3{left:calc(50% - 110px);top:calc(50% - 114px)}.wp-m1-m2{left:calc(50% - 88px);top:calc(50% - 76px)}.wp-m1-m1{left:calc(50% - 66px);top:calc(50% - 38px)}.wp-m1-0{left:calc(50% - 44px);top:50%}.wp-m1-1{left:calc(50% - 22px);top:calc(50% + 38px)}.wp-m1-2{left:50%;top:calc(50% + 76px)}.wp-m1-3{left:calc(50% + 22px);top:calc(50% + 114px)}.wp-0-m3{left:calc(50% - 66px);top:calc(50% - 114px)}.wp-0-m2{left:calc(50% - 44px);top:calc(50% - 76px)}.wp-0-m1{left:calc(50% - 22px);top:calc(50% - 38px)}.wp-0-0{left:50%;top:50%}.wp-0-1{left:calc(50% + 22px);top:calc(50% + 38px)}.wp-0-2{left:calc(50% + 44px);top:calc(50% + 76px)}.wp-0-3{left:calc(50% + 66px);top:calc(50% + 114px)}.wp-1-m3{left:calc(50% - 22px);top:calc(50% - 114px)}.wp-1-m2{left:50%;top:calc(50% - 76px)}.wp-1-m1{left:calc(50% + 22px);top:calc(50% - 38px)}.wp-1-0{left:calc(50% + 44px);top:50%}.wp-1-1{left:calc(50% + 66px);top:calc(50% + 38px)}.wp-1-2{left:calc(50% + 88px);top:calc(50% + 76px)}.wp-1-3{left:calc(50% + 110px);top:calc(50% + 114px)}.wp-2-m3{left:calc(50% + 22px);top:calc(50% - 114px)}.wp-2-m2{left:calc(50% + 44px);top:calc(50% - 76px)}.wp-2-m1{left:calc(50% + 66px);top:calc(50% - 38px)}.wp-2-0{left:calc(50% + 88px);top:50%}.wp-2-1{left:calc(50% + 110px);top:calc(50% + 38px)}.wp-2-2{left:calc(50% + 132px);top:calc(50% + 76px)}.wp-2-3{left:calc(50% + 154px);top:calc(50% + 114px)}.wp-3-m3{left:calc(50% + 66px);top:calc(50% - 114px)}.wp-3-m2{left:calc(50% + 88px);top:calc(50% - 76px)}.wp-3-m1{left:calc(50% + 110px);top:calc(50% - 38px)}.wp-3-0{left:calc(50% + 132px);top:50%}.wp-3-1{left:calc(50% + 154px);top:calc(50% + 38px)}.wp-3-2{left:calc(50% + 176px);top:calc(50% + 76px)}.wp-3-3{left:calc(50% + 198px);top:calc(50% + 114px)}.world-hex{width:44px;height:51px}.world-map{width:min(100%,320px);height:280px;aspect-ratio:auto}

/* Phase 7.11: world-map hex grid -- desktop tier (radius 5). */
@media (min-width:1200px) { .wp-m5-m5{left:calc(50% - 630px);top:calc(50% - 360px)}.wp-m5-m4{left:calc(50% - 588px);top:calc(50% - 288px)}.wp-m5-m3{left:calc(50% - 546px);top:calc(50% - 216px)}.wp-m5-m2{left:calc(50% - 504px);top:calc(50% - 144px)}.wp-m5-m1{left:calc(50% - 462px);top:calc(50% - 72px)}.wp-m5-0{left:calc(50% - 420px);top:50%}.wp-m5-1{left:calc(50% - 378px);top:calc(50% + 72px)}.wp-m5-2{left:calc(50% - 336px);top:calc(50% + 144px)}.wp-m5-3{left:calc(50% - 294px);top:calc(50% + 216px)}.wp-m5-4{left:calc(50% - 252px);top:calc(50% + 288px)}.wp-m5-5{left:calc(50% - 210px);top:calc(50% + 360px)}.wp-m4-m5{left:calc(50% - 546px);top:calc(50% - 360px)}.wp-m4-m4{left:calc(50% - 504px);top:calc(50% - 288px)}.wp-m4-m3{left:calc(50% - 462px);top:calc(50% - 216px)}.wp-m4-m2{left:calc(50% - 420px);top:calc(50% - 144px)}.wp-m4-m1{left:calc(50% - 378px);top:calc(50% - 72px)}.wp-m4-0{left:calc(50% - 336px);top:50%}.wp-m4-1{left:calc(50% - 294px);top:calc(50% + 72px)}.wp-m4-2{left:calc(50% - 252px);top:calc(50% + 144px)}.wp-m4-3{left:calc(50% - 210px);top:calc(50% + 216px)}.wp-m4-4{left:calc(50% - 168px);top:calc(50% + 288px)}.wp-m4-5{left:calc(50% - 126px);top:calc(50% + 360px)}.wp-m3-m5{left:calc(50% - 462px);top:calc(50% - 360px)}.wp-m3-m4{left:calc(50% - 420px);top:calc(50% - 288px)}.wp-m3-m3{left:calc(50% - 378px);top:calc(50% - 216px)}.wp-m3-m2{left:calc(50% - 336px);top:calc(50% - 144px)}.wp-m3-m1{left:calc(50% - 294px);top:calc(50% - 72px)}.wp-m3-0{left:calc(50% - 252px);top:50%}.wp-m3-1{left:calc(50% - 210px);top:calc(50% + 72px)}.wp-m3-2{left:calc(50% - 168px);top:calc(50% + 144px)}.wp-m3-3{left:calc(50% - 126px);top:calc(50% + 216px)}.wp-m3-4{left:calc(50% - 84px);top:calc(50% + 288px)}.wp-m3-5{left:calc(50% - 42px);top:calc(50% + 360px)}.wp-m2-m5{left:calc(50% - 378px);top:calc(50% - 360px)}.wp-m2-m4{left:calc(50% - 336px);top:calc(50% - 288px)}.wp-m2-m3{left:calc(50% - 294px);top:calc(50% - 216px)}.wp-m2-m2{left:calc(50% - 252px);top:calc(50% - 144px)}.wp-m2-m1{left:calc(50% - 210px);top:calc(50% - 72px)}.wp-m2-0{left:calc(50% - 168px);top:50%}.wp-m2-1{left:calc(50% - 126px);top:calc(50% + 72px)}.wp-m2-2{left:calc(50% - 84px);top:calc(50% + 144px)}.wp-m2-3{left:calc(50% - 42px);top:calc(50% + 216px)}.wp-m2-4{left:50%;top:calc(50% + 288px)}.wp-m2-5{left:calc(50% + 42px);top:calc(50% + 360px)}.wp-m1-m5{left:calc(50% - 294px);top:calc(50% - 360px)}.wp-m1-m4{left:calc(50% - 252px);top:calc(50% - 288px)}.wp-m1-m3{left:calc(50% - 210px);top:calc(50% - 216px)}.wp-m1-m2{left:calc(50% - 168px);top:calc(50% - 144px)}.wp-m1-m1{left:calc(50% - 126px);top:calc(50% - 72px)}.wp-m1-0{left:calc(50% - 84px);top:50%}.wp-m1-1{left:calc(50% - 42px);top:calc(50% + 72px)}.wp-m1-2{left:50%;top:calc(50% + 144px)}.wp-m1-3{left:calc(50% + 42px);top:calc(50% + 216px)}.wp-m1-4{left:calc(50% + 84px);top:calc(50% + 288px)}.wp-m1-5{left:calc(50% + 126px);top:calc(50% + 360px)}.wp-0-m5{left:calc(50% - 210px);top:calc(50% - 360px)}.wp-0-m4{left:calc(50% - 168px);top:calc(50% - 288px)}.wp-0-m3{left:calc(50% - 126px);top:calc(50% - 216px)}.wp-0-m2{left:calc(50% - 84px);top:calc(50% - 144px)}.wp-0-m1{left:calc(50% - 42px);top:calc(50% - 72px)}.wp-0-0{left:50%;top:50%}.wp-0-1{left:calc(50% + 42px);top:calc(50% + 72px)}.wp-0-2{left:calc(50% + 84px);top:calc(50% + 144px)}.wp-0-3{left:calc(50% + 126px);top:calc(50% + 216px)}.wp-0-4{left:calc(50% + 168px);top:calc(50% + 288px)}.wp-0-5{left:calc(50% + 210px);top:calc(50% + 360px)}.wp-1-m5{left:calc(50% - 126px);top:calc(50% - 360px)}.wp-1-m4{left:calc(50% - 84px);top:calc(50% - 288px)}.wp-1-m3{left:calc(50% - 42px);top:calc(50% - 216px)}.wp-1-m2{left:50%;top:calc(50% - 144px)}.wp-1-m1{left:calc(50% + 42px);top:calc(50% - 72px)}.wp-1-0{left:calc(50% + 84px);top:50%}.wp-1-1{left:calc(50% + 126px);top:calc(50% + 72px)}.wp-1-2{left:calc(50% + 168px);top:calc(50% + 144px)}.wp-1-3{left:calc(50% + 210px);top:calc(50% + 216px)}.wp-1-4{left:calc(50% + 252px);top:calc(50% + 288px)}.wp-1-5{left:calc(50% + 294px);top:calc(50% + 360px)}.wp-2-m5{left:calc(50% - 42px);top:calc(50% - 360px)}.wp-2-m4{left:50%;top:calc(50% - 288px)}.wp-2-m3{left:calc(50% + 42px);top:calc(50% - 216px)}.wp-2-m2{left:calc(50% + 84px);top:calc(50% - 144px)}.wp-2-m1{left:calc(50% + 126px);top:calc(50% - 72px)}.wp-2-0{left:calc(50% + 168px);top:50%}.wp-2-1{left:calc(50% + 210px);top:calc(50% + 72px)}.wp-2-2{left:calc(50% + 252px);top:calc(50% + 144px)}.wp-2-3{left:calc(50% + 294px);top:calc(50% + 216px)}.wp-2-4{left:calc(50% + 336px);top:calc(50% + 288px)}.wp-2-5{left:calc(50% + 378px);top:calc(50% + 360px)}.wp-3-m5{left:calc(50% + 42px);top:calc(50% - 360px)}.wp-3-m4{left:calc(50% + 84px);top:calc(50% - 288px)}.wp-3-m3{left:calc(50% + 126px);top:calc(50% - 216px)}.wp-3-m2{left:calc(50% + 168px);top:calc(50% - 144px)}.wp-3-m1{left:calc(50% + 210px);top:calc(50% - 72px)}.wp-3-0{left:calc(50% + 252px);top:50%}.wp-3-1{left:calc(50% + 294px);top:calc(50% + 72px)}.wp-3-2{left:calc(50% + 336px);top:calc(50% + 144px)}.wp-3-3{left:calc(50% + 378px);top:calc(50% + 216px)}.wp-3-4{left:calc(50% + 420px);top:calc(50% + 288px)}.wp-3-5{left:calc(50% + 462px);top:calc(50% + 360px)}.wp-4-m5{left:calc(50% + 126px);top:calc(50% - 360px)}.wp-4-m4{left:calc(50% + 168px);top:calc(50% - 288px)}.wp-4-m3{left:calc(50% + 210px);top:calc(50% - 216px)}.wp-4-m2{left:calc(50% + 252px);top:calc(50% - 144px)}.wp-4-m1{left:calc(50% + 294px);top:calc(50% - 72px)}.wp-4-0{left:calc(50% + 336px);top:50%}.wp-4-1{left:calc(50% + 378px);top:calc(50% + 72px)}.wp-4-2{left:calc(50% + 420px);top:calc(50% + 144px)}.wp-4-3{left:calc(50% + 462px);top:calc(50% + 216px)}.wp-4-4{left:calc(50% + 504px);top:calc(50% + 288px)}.wp-4-5{left:calc(50% + 546px);top:calc(50% + 360px)}.wp-5-m5{left:calc(50% + 210px);top:calc(50% - 360px)}.wp-5-m4{left:calc(50% + 252px);top:calc(50% - 288px)}.wp-5-m3{left:calc(50% + 294px);top:calc(50% - 216px)}.wp-5-m2{left:calc(50% + 336px);top:calc(50% - 144px)}.wp-5-m1{left:calc(50% + 378px);top:calc(50% - 72px)}.wp-5-0{left:calc(50% + 420px);top:50%}.wp-5-1{left:calc(50% + 462px);top:calc(50% + 72px)}.wp-5-2{left:calc(50% + 504px);top:calc(50% + 144px)}.wp-5-3{left:calc(50% + 546px);top:calc(50% + 216px)}.wp-5-4{left:calc(50% + 588px);top:calc(50% + 288px)}.wp-5-5{left:calc(50% + 630px);top:calc(50% + 360px)}.world-hex{width:84px;height:97px}.world-map{width:min(100%,940px);height:880px;aspect-ratio:auto}.world-token{width:32px;height:32px}.world-encounter{width:40px;height:40px} }

/* Phase 7.11: world-map hex grid -- desktop-lg tier (radius 6). */
@media (min-width:1600px) { .wp-m6-m6{left:calc(50% - 882px);top:calc(50% - 504px)}.wp-m6-m5{left:calc(50% - 833px);top:calc(50% - 420px)}.wp-m6-m4{left:calc(50% - 784px);top:calc(50% - 336px)}.wp-m6-m3{left:calc(50% - 735px);top:calc(50% - 252px)}.wp-m6-m2{left:calc(50% - 686px);top:calc(50% - 168px)}.wp-m6-m1{left:calc(50% - 637px);top:calc(50% - 84px)}.wp-m6-0{left:calc(50% - 588px);top:50%}.wp-m6-1{left:calc(50% - 539px);top:calc(50% + 84px)}.wp-m6-2{left:calc(50% - 490px);top:calc(50% + 168px)}.wp-m6-3{left:calc(50% - 441px);top:calc(50% + 252px)}.wp-m6-4{left:calc(50% - 392px);top:calc(50% + 336px)}.wp-m6-5{left:calc(50% - 343px);top:calc(50% + 420px)}.wp-m6-6{left:calc(50% - 294px);top:calc(50% + 504px)}.wp-m5-m6{left:calc(50% - 784px);top:calc(50% - 504px)}.wp-m5-m5{left:calc(50% - 735px);top:calc(50% - 420px)}.wp-m5-m4{left:calc(50% - 686px);top:calc(50% - 336px)}.wp-m5-m3{left:calc(50% - 637px);top:calc(50% - 252px)}.wp-m5-m2{left:calc(50% - 588px);top:calc(50% - 168px)}.wp-m5-m1{left:calc(50% - 539px);top:calc(50% - 84px)}.wp-m5-0{left:calc(50% - 490px);top:50%}.wp-m5-1{left:calc(50% - 441px);top:calc(50% + 84px)}.wp-m5-2{left:calc(50% - 392px);top:calc(50% + 168px)}.wp-m5-3{left:calc(50% - 343px);top:calc(50% + 252px)}.wp-m5-4{left:calc(50% - 294px);top:calc(50% + 336px)}.wp-m5-5{left:calc(50% - 245px);top:calc(50% + 420px)}.wp-m5-6{left:calc(50% - 196px);top:calc(50% + 504px)}.wp-m4-m6{left:calc(50% - 686px);top:calc(50% - 504px)}.wp-m4-m5{left:calc(50% - 637px);top:calc(50% - 420px)}.wp-m4-m4{left:calc(50% - 588px);top:calc(50% - 336px)}.wp-m4-m3{left:calc(50% - 539px);top:calc(50% - 252px)}.wp-m4-m2{left:calc(50% - 490px);top:calc(50% - 168px)}.wp-m4-m1{left:calc(50% - 441px);top:calc(50% - 84px)}.wp-m4-0{left:calc(50% - 392px);top:50%}.wp-m4-1{left:calc(50% - 343px);top:calc(50% + 84px)}.wp-m4-2{left:calc(50% - 294px);top:calc(50% + 168px)}.wp-m4-3{left:calc(50% - 245px);top:calc(50% + 252px)}.wp-m4-4{left:calc(50% - 196px);top:calc(50% + 336px)}.wp-m4-5{left:calc(50% - 147px);top:calc(50% + 420px)}.wp-m4-6{left:calc(50% - 98px);top:calc(50% + 504px)}.wp-m3-m6{left:calc(50% - 588px);top:calc(50% - 504px)}.wp-m3-m5{left:calc(50% - 539px);top:calc(50% - 420px)}.wp-m3-m4{left:calc(50% - 490px);top:calc(50% - 336px)}.wp-m3-m3{left:calc(50% - 441px);top:calc(50% - 252px)}.wp-m3-m2{left:calc(50% - 392px);top:calc(50% - 168px)}.wp-m3-m1{left:calc(50% - 343px);top:calc(50% - 84px)}.wp-m3-0{left:calc(50% - 294px);top:50%}.wp-m3-1{left:calc(50% - 245px);top:calc(50% + 84px)}.wp-m3-2{left:calc(50% - 196px);top:calc(50% + 168px)}.wp-m3-3{left:calc(50% - 147px);top:calc(50% + 252px)}.wp-m3-4{left:calc(50% - 98px);top:calc(50% + 336px)}.wp-m3-5{left:calc(50% - 49px);top:calc(50% + 420px)}.wp-m3-6{left:50%;top:calc(50% + 504px)}.wp-m2-m6{left:calc(50% - 490px);top:calc(50% - 504px)}.wp-m2-m5{left:calc(50% - 441px);top:calc(50% - 420px)}.wp-m2-m4{left:calc(50% - 392px);top:calc(50% - 336px)}.wp-m2-m3{left:calc(50% - 343px);top:calc(50% - 252px)}.wp-m2-m2{left:calc(50% - 294px);top:calc(50% - 168px)}.wp-m2-m1{left:calc(50% - 245px);top:calc(50% - 84px)}.wp-m2-0{left:calc(50% - 196px);top:50%}.wp-m2-1{left:calc(50% - 147px);top:calc(50% + 84px)}.wp-m2-2{left:calc(50% - 98px);top:calc(50% + 168px)}.wp-m2-3{left:calc(50% - 49px);top:calc(50% + 252px)}.wp-m2-4{left:50%;top:calc(50% + 336px)}.wp-m2-5{left:calc(50% + 49px);top:calc(50% + 420px)}.wp-m2-6{left:calc(50% + 98px);top:calc(50% + 504px)}.wp-m1-m6{left:calc(50% - 392px);top:calc(50% - 504px)}.wp-m1-m5{left:calc(50% - 343px);top:calc(50% - 420px)}.wp-m1-m4{left:calc(50% - 294px);top:calc(50% - 336px)}.wp-m1-m3{left:calc(50% - 245px);top:calc(50% - 252px)}.wp-m1-m2{left:calc(50% - 196px);top:calc(50% - 168px)}.wp-m1-m1{left:calc(50% - 147px);top:calc(50% - 84px)}.wp-m1-0{left:calc(50% - 98px);top:50%}.wp-m1-1{left:calc(50% - 49px);top:calc(50% + 84px)}.wp-m1-2{left:50%;top:calc(50% + 168px)}.wp-m1-3{left:calc(50% + 49px);top:calc(50% + 252px)}.wp-m1-4{left:calc(50% + 98px);top:calc(50% + 336px)}.wp-m1-5{left:calc(50% + 147px);top:calc(50% + 420px)}.wp-m1-6{left:calc(50% + 196px);top:calc(50% + 504px)}.wp-0-m6{left:calc(50% - 294px);top:calc(50% - 504px)}.wp-0-m5{left:calc(50% - 245px);top:calc(50% - 420px)}.wp-0-m4{left:calc(50% - 196px);top:calc(50% - 336px)}.wp-0-m3{left:calc(50% - 147px);top:calc(50% - 252px)}.wp-0-m2{left:calc(50% - 98px);top:calc(50% - 168px)}.wp-0-m1{left:calc(50% - 49px);top:calc(50% - 84px)}.wp-0-0{left:50%;top:50%}.wp-0-1{left:calc(50% + 49px);top:calc(50% + 84px)}.wp-0-2{left:calc(50% + 98px);top:calc(50% + 168px)}.wp-0-3{left:calc(50% + 147px);top:calc(50% + 252px)}.wp-0-4{left:calc(50% + 196px);top:calc(50% + 336px)}.wp-0-5{left:calc(50% + 245px);top:calc(50% + 420px)}.wp-0-6{left:calc(50% + 294px);top:calc(50% + 504px)}.wp-1-m6{left:calc(50% - 196px);top:calc(50% - 504px)}.wp-1-m5{left:calc(50% - 147px);top:calc(50% - 420px)}.wp-1-m4{left:calc(50% - 98px);top:calc(50% - 336px)}.wp-1-m3{left:calc(50% - 49px);top:calc(50% - 252px)}.wp-1-m2{left:50%;top:calc(50% - 168px)}.wp-1-m1{left:calc(50% + 49px);top:calc(50% - 84px)}.wp-1-0{left:calc(50% + 98px);top:50%}.wp-1-1{left:calc(50% + 147px);top:calc(50% + 84px)}.wp-1-2{left:calc(50% + 196px);top:calc(50% + 168px)}.wp-1-3{left:calc(50% + 245px);top:calc(50% + 252px)}.wp-1-4{left:calc(50% + 294px);top:calc(50% + 336px)}.wp-1-5{left:calc(50% + 343px);top:calc(50% + 420px)}.wp-1-6{left:calc(50% + 392px);top:calc(50% + 504px)}.wp-2-m6{left:calc(50% - 98px);top:calc(50% - 504px)}.wp-2-m5{left:calc(50% - 49px);top:calc(50% - 420px)}.wp-2-m4{left:50%;top:calc(50% - 336px)}.wp-2-m3{left:calc(50% + 49px);top:calc(50% - 252px)}.wp-2-m2{left:calc(50% + 98px);top:calc(50% - 168px)}.wp-2-m1{left:calc(50% + 147px);top:calc(50% - 84px)}.wp-2-0{left:calc(50% + 196px);top:50%}.wp-2-1{left:calc(50% + 245px);top:calc(50% + 84px)}.wp-2-2{left:calc(50% + 294px);top:calc(50% + 168px)}.wp-2-3{left:calc(50% + 343px);top:calc(50% + 252px)}.wp-2-4{left:calc(50% + 392px);top:calc(50% + 336px)}.wp-2-5{left:calc(50% + 441px);top:calc(50% + 420px)}.wp-2-6{left:calc(50% + 490px);top:calc(50% + 504px)}.wp-3-m6{left:50%;top:calc(50% - 504px)}.wp-3-m5{left:calc(50% + 49px);top:calc(50% - 420px)}.wp-3-m4{left:calc(50% + 98px);top:calc(50% - 336px)}.wp-3-m3{left:calc(50% + 147px);top:calc(50% - 252px)}.wp-3-m2{left:calc(50% + 196px);top:calc(50% - 168px)}.wp-3-m1{left:calc(50% + 245px);top:calc(50% - 84px)}.wp-3-0{left:calc(50% + 294px);top:50%}.wp-3-1{left:calc(50% + 343px);top:calc(50% + 84px)}.wp-3-2{left:calc(50% + 392px);top:calc(50% + 168px)}.wp-3-3{left:calc(50% + 441px);top:calc(50% + 252px)}.wp-3-4{left:calc(50% + 490px);top:calc(50% + 336px)}.wp-3-5{left:calc(50% + 539px);top:calc(50% + 420px)}.wp-3-6{left:calc(50% + 588px);top:calc(50% + 504px)}.wp-4-m6{left:calc(50% + 98px);top:calc(50% - 504px)}.wp-4-m5{left:calc(50% + 147px);top:calc(50% - 420px)}.wp-4-m4{left:calc(50% + 196px);top:calc(50% - 336px)}.wp-4-m3{left:calc(50% + 245px);top:calc(50% - 252px)}.wp-4-m2{left:calc(50% + 294px);top:calc(50% - 168px)}.wp-4-m1{left:calc(50% + 343px);top:calc(50% - 84px)}.wp-4-0{left:calc(50% + 392px);top:50%}.wp-4-1{left:calc(50% + 441px);top:calc(50% + 84px)}.wp-4-2{left:calc(50% + 490px);top:calc(50% + 168px)}.wp-4-3{left:calc(50% + 539px);top:calc(50% + 252px)}.wp-4-4{left:calc(50% + 588px);top:calc(50% + 336px)}.wp-4-5{left:calc(50% + 637px);top:calc(50% + 420px)}.wp-4-6{left:calc(50% + 686px);top:calc(50% + 504px)}.wp-5-m6{left:calc(50% + 196px);top:calc(50% - 504px)}.wp-5-m5{left:calc(50% + 245px);top:calc(50% - 420px)}.wp-5-m4{left:calc(50% + 294px);top:calc(50% - 336px)}.wp-5-m3{left:calc(50% + 343px);top:calc(50% - 252px)}.wp-5-m2{left:calc(50% + 392px);top:calc(50% - 168px)}.wp-5-m1{left:calc(50% + 441px);top:calc(50% - 84px)}.wp-5-0{left:calc(50% + 490px);top:50%}.wp-5-1{left:calc(50% + 539px);top:calc(50% + 84px)}.wp-5-2{left:calc(50% + 588px);top:calc(50% + 168px)}.wp-5-3{left:calc(50% + 637px);top:calc(50% + 252px)}.wp-5-4{left:calc(50% + 686px);top:calc(50% + 336px)}.wp-5-5{left:calc(50% + 735px);top:calc(50% + 420px)}.wp-5-6{left:calc(50% + 784px);top:calc(50% + 504px)}.wp-6-m6{left:calc(50% + 294px);top:calc(50% - 504px)}.wp-6-m5{left:calc(50% + 343px);top:calc(50% - 420px)}.wp-6-m4{left:calc(50% + 392px);top:calc(50% - 336px)}.wp-6-m3{left:calc(50% + 441px);top:calc(50% - 252px)}.wp-6-m2{left:calc(50% + 490px);top:calc(50% - 168px)}.wp-6-m1{left:calc(50% + 539px);top:calc(50% - 84px)}.wp-6-0{left:calc(50% + 588px);top:50%}.wp-6-1{left:calc(50% + 637px);top:calc(50% + 84px)}.wp-6-2{left:calc(50% + 686px);top:calc(50% + 168px)}.wp-6-3{left:calc(50% + 735px);top:calc(50% + 252px)}.wp-6-4{left:calc(50% + 784px);top:calc(50% + 336px)}.wp-6-5{left:calc(50% + 833px);top:calc(50% + 420px)}.wp-6-6{left:calc(50% + 882px);top:calc(50% + 504px)}.world-hex{width:98px;height:113px}.world-map{width:min(100%,1290px);height:1190px;aspect-ratio:auto}.world-token{width:36px;height:36px}.world-encounter{width:46px;height:46px} }
.bg-m12-0{background-position:-145.000% 50.000%}.bg-m12-1{background-position:-136.875% 64.312%}.bg-m12-2{background-position:-128.750% 78.624%}.bg-m12-3{background-position:-120.625% 92.936%}.bg-m12-4{background-position:-112.500% 107.248%}.bg-m12-5{background-position:-104.375% 121.560%}.bg-m12-6{background-position:-96.250% 135.872%}.bg-m12-7{background-position:-88.125% 150.183%}.bg-m12-8{background-position:-80.000% 164.495%}.bg-m12-9{background-position:-71.875% 178.807%}.bg-m12-10{background-position:-63.750% 193.119%}.bg-m12-11{background-position:-55.625% 207.431%}.bg-m12-12{background-position:-47.500% 221.743%}.bg-m11-m1{background-position:-136.875% 35.688%}.bg-m11-0{background-position:-128.750% 50.000%}.bg-m11-1{background-position:-120.625% 64.312%}.bg-m11-2{background-position:-112.500% 78.624%}.bg-m11-3{background-position:-104.375% 92.936%}.bg-m11-4{background-position:-96.250% 107.248%}.bg-m11-5{background-position:-88.125% 121.560%}.bg-m11-6{background-position:-80.000% 135.872%}.bg-m11-7{background-position:-71.875% 150.183%}.bg-m11-8{background-position:-63.750% 164.495%}.bg-m11-9{background-position:-55.625% 178.807%}.bg-m11-10{background-position:-47.500% 193.119%}.bg-m11-11{background-position:-39.375% 207.431%}.bg-m11-12{background-position:-31.250% 221.743%}.bg-m10-m2{background-position:-128.750% 21.376%}.bg-m10-m1{background-position:-120.625% 35.688%}.bg-m10-0{background-position:-112.500% 50.000%}.bg-m10-1{background-position:-104.375% 64.312%}.bg-m10-2{background-position:-96.250% 78.624%}.bg-m10-3{background-position:-88.125% 92.936%}.bg-m10-4{background-position:-80.000% 107.248%}.bg-m10-5{background-position:-71.875% 121.560%}.bg-m10-6{background-position:-63.750% 135.872%}.bg-m10-7{background-position:-55.625% 150.183%}.bg-m10-8{background-position:-47.500% 164.495%}.bg-m10-9{background-position:-39.375% 178.807%}.bg-m10-10{background-position:-31.250% 193.119%}.bg-m10-11{background-position:-23.125% 207.431%}.bg-m10-12{background-position:-15.000% 221.743%}.bg-m9-m3{background-position:-120.625% 7.064%}.bg-m9-m2{background-position:-112.500% 21.376%}.bg-m9-m1{background-position:-104.375% 35.688%}.bg-m9-0{background-position:-96.250% 50.000%}.bg-m9-1{background-position:-88.125% 64.312%}.bg-m9-2{background-position:-80.000% 78.624%}.bg-m9-3{background-position:-71.875% 92.936%}.bg-m9-4{background-position:-63.750% 107.248%}.bg-m9-5{background-position:-55.625% 121.560%}.bg-m9-6{background-position:-47.500% 135.872%}.bg-m9-7{background-position:-39.375% 150.183%}.bg-m9-8{background-position:-31.250% 164.495%}.bg-m9-9{background-position:-23.125% 178.807%}.bg-m9-10{background-position:-15.000% 193.119%}.bg-m9-11{background-position:-6.875% 207.431%}.bg-m9-12{background-position:1.250% 221.743%}.bg-m8-m4{background-position:-112.500% -7.248%}.bg-m8-m3{background-position:-104.375% 7.064%}.bg-m8-m2{background-position:-96.250% 21.376%}.bg-m8-m1{background-position:-88.125% 35.688%}.bg-m8-0{background-position:-80.000% 50.000%}.bg-m8-1{background-position:-71.875% 64.312%}.bg-m8-2{background-position:-63.750% 78.624%}.bg-m8-3{background-position:-55.625% 92.936%}.bg-m8-4{background-position:-47.500% 107.248%}.bg-m8-5{background-position:-39.375% 121.560%}.bg-m8-6{background-position:-31.250% 135.872%}.bg-m8-7{background-position:-23.125% 150.183%}.bg-m8-8{background-position:-15.000% 164.495%}.bg-m8-9{background-position:-6.875% 178.807%}.bg-m8-10{background-position:1.250% 193.119%}.bg-m8-11{background-position:9.375% 207.431%}.bg-m8-12{background-position:17.500% 221.743%}.bg-m7-m5{background-position:-104.375% -21.560%}.bg-m7-m4{background-position:-96.250% -7.248%}.bg-m7-m3{background-position:-88.125% 7.064%}.bg-m7-m2{background-position:-80.000% 21.376%}.bg-m7-m1{background-position:-71.875% 35.688%}.bg-m7-0{background-position:-63.750% 50.000%}.bg-m7-1{background-position:-55.625% 64.312%}.bg-m7-2{background-position:-47.500% 78.624%}.bg-m7-3{background-position:-39.375% 92.936%}.bg-m7-4{background-position:-31.250% 107.248%}.bg-m7-5{background-position:-23.125% 121.560%}.bg-m7-6{background-position:-15.000% 135.872%}.bg-m7-7{background-position:-6.875% 150.183%}.bg-m7-8{background-position:1.250% 164.495%}.bg-m7-9{background-position:9.375% 178.807%}.bg-m7-10{background-position:17.500% 193.119%}.bg-m7-11{background-position:25.625% 207.431%}.bg-m7-12{background-position:33.750% 221.743%}.bg-m6-m6{background-position:-96.250% -35.872%}.bg-m6-m5{background-position:-88.125% -21.560%}.bg-m6-m4{background-position:-80.000% -7.248%}.bg-m6-m3{background-position:-71.875% 7.064%}.bg-m6-m2{background-position:-63.750% 21.376%}.bg-m6-m1{background-position:-55.625% 35.688%}.bg-m6-0{background-position:-47.500% 50.000%}.bg-m6-1{background-position:-39.375% 64.312%}.bg-m6-2{background-position:-31.250% 78.624%}.bg-m6-3{background-position:-23.125% 92.936%}.bg-m6-4{background-position:-15.000% 107.248%}.bg-m6-5{background-position:-6.875% 121.560%}.bg-m6-6{background-position:1.250% 135.872%}.bg-m6-7{background-position:9.375% 150.183%}.bg-m6-8{background-position:17.500% 164.495%}.bg-m6-9{background-position:25.625% 178.807%}.bg-m6-10{background-position:33.750% 193.119%}.bg-m6-11{background-position:41.875% 207.431%}.bg-m6-12{background-position:50.000% 221.743%}.bg-m5-m7{background-position:-88.125% -50.183%}.bg-m5-m6{background-position:-80.000% -35.872%}.bg-m5-m5{background-position:-71.875% -21.560%}.bg-m5-m4{background-position:-63.750% -7.248%}.bg-m5-m3{background-position:-55.625% 7.064%}.bg-m5-m2{background-position:-47.500% 21.376%}.bg-m5-m1{background-position:-39.375% 35.688%}.bg-m5-0{background-position:-31.250% 50.000%}.bg-m5-1{background-position:-23.125% 64.312%}.bg-m5-2{background-position:-15.000% 78.624%}.bg-m5-3{background-position:-6.875% 92.936%}.bg-m5-4{background-position:1.250% 107.248%}.bg-m5-5{background-position:9.375% 121.560%}.bg-m5-6{background-position:17.500% 135.872%}.bg-m5-7{background-position:25.625% 150.183%}.bg-m5-8{background-position:33.750% 164.495%}.bg-m5-9{background-position:41.875% 178.807%}.bg-m5-10{background-position:50.000% 193.119%}.bg-m5-11{background-position:58.125% 207.431%}.bg-m5-12{background-position:66.250% 221.743%}.bg-m4-m8{background-position:-80.000% -64.495%}.bg-m4-m7{background-position:-71.875% -50.183%}.bg-m4-m6{background-position:-63.750% -35.872%}.bg-m4-m5{background-position:-55.625% -21.560%}.bg-m4-m4{background-position:-47.500% -7.248%}.bg-m4-m3{background-position:-39.375% 7.064%}.bg-m4-m2{background-position:-31.250% 21.376%}.bg-m4-m1{background-position:-23.125% 35.688%}.bg-m4-0{background-position:-15.000% 50.000%}.bg-m4-1{background-position:-6.875% 64.312%}.bg-m4-2{background-position:1.250% 78.624%}.bg-m4-3{background-position:9.375% 92.936%}.bg-m4-4{background-position:17.500% 107.248%}.bg-m4-5{background-position:25.625% 121.560%}.bg-m4-6{background-position:33.750% 135.872%}.bg-m4-7{background-position:41.875% 150.183%}.bg-m4-8{background-position:50.000% 164.495%}.bg-m4-9{background-position:58.125% 178.807%}.bg-m4-10{background-position:66.250% 193.119%}.bg-m4-11{background-position:74.375% 207.431%}.bg-m4-12{background-position:82.500% 221.743%}.bg-m3-m9{background-position:-71.875% -78.807%}.bg-m3-m8{background-position:-63.750% -64.495%}.bg-m3-m7{background-position:-55.625% -50.183%}.bg-m3-m6{background-position:-47.500% -35.872%}.bg-m3-m5{background-position:-39.375% -21.560%}.bg-m3-m4{background-position:-31.250% -7.248%}.bg-m3-m3{background-position:-23.125% 7.064%}.bg-m3-m2{background-position:-15.000% 21.376%}.bg-m3-m1{background-position:-6.875% 35.688%}.bg-m3-0{background-position:1.250% 50.000%}.bg-m3-1{background-position:9.375% 64.312%}.bg-m3-2{background-position:17.500% 78.624%}.bg-m3-3{background-position:25.625% 92.936%}.bg-m3-4{background-position:33.750% 107.248%}.bg-m3-5{background-position:41.875% 121.560%}.bg-m3-6{background-position:50.000% 135.872%}.bg-m3-7{background-position:58.125% 150.183%}.bg-m3-8{background-position:66.250% 164.495%}.bg-m3-9{background-position:74.375% 178.807%}.bg-m3-10{background-position:82.500% 193.119%}.bg-m3-11{background-position:90.625% 207.431%}.bg-m3-12{background-position:98.750% 221.743%}.bg-m2-m10{background-position:-63.750% -93.119%}.bg-m2-m9{background-position:-55.625% -78.807%}.bg-m2-m8{background-position:-47.500% -64.495%}.bg-m2-m7{background-position:-39.375% -50.183%}.bg-m2-m6{background-position:-31.250% -35.872%}.bg-m2-m5{background-position:-23.125% -21.560%}.bg-m2-m4{background-position:-15.000% -7.248%}.bg-m2-m3{background-position:-6.875% 7.064%}.bg-m2-m2{background-position:1.250% 21.376%}.bg-m2-m1{background-position:9.375% 35.688%}.bg-m2-0{background-position:17.500% 50.000%}.bg-m2-1{background-position:25.625% 64.312%}.bg-m2-2{background-position:33.750% 78.624%}.bg-m2-3{background-position:41.875% 92.936%}.bg-m2-4{background-position:50.000% 107.248%}.bg-m2-5{background-position:58.125% 121.560%}.bg-m2-6{background-position:66.250% 135.872%}.bg-m2-7{background-position:74.375% 150.183%}.bg-m2-8{background-position:82.500% 164.495%}.bg-m2-9{background-position:90.625% 178.807%}.bg-m2-10{background-position:98.750% 193.119%}.bg-m2-11{background-position:106.875% 207.431%}.bg-m2-12{background-position:115.000% 221.743%}.bg-m1-m11{background-position:-55.625% -107.431%}.bg-m1-m10{background-position:-47.500% -93.119%}.bg-m1-m9{background-position:-39.375% -78.807%}.bg-m1-m8{background-position:-31.250% -64.495%}.bg-m1-m7{background-position:-23.125% -50.183%}.bg-m1-m6{background-position:-15.000% -35.872%}.bg-m1-m5{background-position:-6.875% -21.560%}.bg-m1-m4{background-position:1.250% -7.248%}.bg-m1-m3{background-position:9.375% 7.064%}.bg-m1-m2{background-position:17.500% 21.376%}.bg-m1-m1{background-position:25.625% 35.688%}.bg-m1-0{background-position:33.750% 50.000%}.bg-m1-1{background-position:41.875% 64.312%}.bg-m1-2{background-position:50.000% 78.624%}.bg-m1-3{background-position:58.125% 92.936%}.bg-m1-4{background-position:66.250% 107.248%}.bg-m1-5{background-position:74.375% 121.560%}.bg-m1-6{background-position:82.500% 135.872%}.bg-m1-7{background-position:90.625% 150.183%}.bg-m1-8{background-position:98.750% 164.495%}.bg-m1-9{background-position:106.875% 178.807%}.bg-m1-10{background-position:115.000% 193.119%}.bg-m1-11{background-position:123.125% 207.431%}.bg-m1-12{background-position:131.250% 221.743%}.bg-0-m12{background-position:-47.500% -121.743%}.bg-0-m11{background-position:-39.375% -107.431%}.bg-0-m10{background-position:-31.250% -93.119%}.bg-0-m9{background-position:-23.125% -78.807%}.bg-0-m8{background-position:-15.000% -64.495%}.bg-0-m7{background-position:-6.875% -50.183%}.bg-0-m6{background-position:1.250% -35.872%}.bg-0-m5{background-position:9.375% -21.560%}.bg-0-m4{background-position:17.500% -7.248%}.bg-0-m3{background-position:25.625% 7.064%}.bg-0-m2{background-position:33.750% 21.376%}.bg-0-m1{background-position:41.875% 35.688%}.bg-0-0{background-position:50.000% 50.000%}.bg-0-1{background-position:58.125% 64.312%}.bg-0-2{background-position:66.250% 78.624%}.bg-0-3{background-position:74.375% 92.936%}.bg-0-4{background-position:82.500% 107.248%}.bg-0-5{background-position:90.625% 121.560%}.bg-0-6{background-position:98.750% 135.872%}.bg-0-7{background-position:106.875% 150.183%}.bg-0-8{background-position:115.000% 164.495%}.bg-0-9{background-position:123.125% 178.807%}.bg-0-10{background-position:131.250% 193.119%}.bg-0-11{background-position:139.375% 207.431%}.bg-0-12{background-position:147.500% 221.743%}.bg-1-m12{background-position:-31.250% -121.743%}.bg-1-m11{background-position:-23.125% -107.431%}.bg-1-m10{background-position:-15.000% -93.119%}.bg-1-m9{background-position:-6.875% -78.807%}.bg-1-m8{background-position:1.250% -64.495%}.bg-1-m7{background-position:9.375% -50.183%}.bg-1-m6{background-position:17.500% -35.872%}.bg-1-m5{background-position:25.625% -21.560%}.bg-1-m4{background-position:33.750% -7.248%}.bg-1-m3{background-position:41.875% 7.064%}.bg-1-m2{background-position:50.000% 21.376%}.bg-1-m1{background-position:58.125% 35.688%}.bg-1-0{background-position:66.250% 50.000%}.bg-1-1{background-position:74.375% 64.312%}.bg-1-2{background-position:82.500% 78.624%}.bg-1-3{background-position:90.625% 92.936%}.bg-1-4{background-position:98.750% 107.248%}.bg-1-5{background-position:106.875% 121.560%}.bg-1-6{background-position:115.000% 135.872%}.bg-1-7{background-position:123.125% 150.183%}.bg-1-8{background-position:131.250% 164.495%}.bg-1-9{background-position:139.375% 178.807%}.bg-1-10{background-position:147.500% 193.119%}.bg-1-11{background-position:155.625% 207.431%}.bg-2-m12{background-position:-15.000% -121.743%}.bg-2-m11{background-position:-6.875% -107.431%}.bg-2-m10{background-position:1.250% -93.119%}.bg-2-m9{background-position:9.375% -78.807%}.bg-2-m8{background-position:17.500% -64.495%}.bg-2-m7{background-position:25.625% -50.183%}.bg-2-m6{background-position:33.750% -35.872%}.bg-2-m5{background-position:41.875% -21.560%}.bg-2-m4{background-position:50.000% -7.248%}.bg-2-m3{background-position:58.125% 7.064%}.bg-2-m2{background-position:66.250% 21.376%}.bg-2-m1{background-position:74.375% 35.688%}.bg-2-0{background-position:82.500% 50.000%}.bg-2-1{background-position:90.625% 64.312%}.bg-2-2{background-position:98.750% 78.624%}.bg-2-3{background-position:106.875% 92.936%}.bg-2-4{background-position:115.000% 107.248%}.bg-2-5{background-position:123.125% 121.560%}.bg-2-6{background-position:131.250% 135.872%}.bg-2-7{background-position:139.375% 150.183%}.bg-2-8{background-position:147.500% 164.495%}.bg-2-9{background-position:155.625% 178.807%}.bg-2-10{background-position:163.750% 193.119%}.bg-3-m12{background-position:1.250% -121.743%}.bg-3-m11{background-position:9.375% -107.431%}.bg-3-m10{background-position:17.500% -93.119%}.bg-3-m9{background-position:25.625% -78.807%}.bg-3-m8{background-position:33.750% -64.495%}.bg-3-m7{background-position:41.875% -50.183%}.bg-3-m6{background-position:50.000% -35.872%}.bg-3-m5{background-position:58.125% -21.560%}.bg-3-m4{background-position:66.250% -7.248%}.bg-3-m3{background-position:74.375% 7.064%}.bg-3-m2{background-position:82.500% 21.376%}.bg-3-m1{background-position:90.625% 35.688%}.bg-3-0{background-position:98.750% 50.000%}.bg-3-1{background-position:106.875% 64.312%}.bg-3-2{background-position:115.000% 78.624%}.bg-3-3{background-position:123.125% 92.936%}.bg-3-4{background-position:131.250% 107.248%}.bg-3-5{background-position:139.375% 121.560%}.bg-3-6{background-position:147.500% 135.872%}.bg-3-7{background-position:155.625% 150.183%}.bg-3-8{background-position:163.750% 164.495%}.bg-3-9{background-position:171.875% 178.807%}.bg-4-m12{background-position:17.500% -121.743%}.bg-4-m11{background-position:25.625% -107.431%}.bg-4-m10{background-position:33.750% -93.119%}.bg-4-m9{background-position:41.875% -78.807%}.bg-4-m8{background-position:50.000% -64.495%}.bg-4-m7{background-position:58.125% -50.183%}.bg-4-m6{background-position:66.250% -35.872%}.bg-4-m5{background-position:74.375% -21.560%}.bg-4-m4{background-position:82.500% -7.248%}.bg-4-m3{background-position:90.625% 7.064%}.bg-4-m2{background-position:98.750% 21.376%}.bg-4-m1{background-position:106.875% 35.688%}.bg-4-0{background-position:115.000% 50.000%}.bg-4-1{background-position:123.125% 64.312%}.bg-4-2{background-position:131.250% 78.624%}.bg-4-3{background-position:139.375% 92.936%}.bg-4-4{background-position:147.500% 107.248%}.bg-4-5{background-position:155.625% 121.560%}.bg-4-6{background-position:163.750% 135.872%}.bg-4-7{background-position:171.875% 150.183%}.bg-4-8{background-position:180.000% 164.495%}.bg-5-m12{background-position:33.750% -121.743%}.bg-5-m11{background-position:41.875% -107.431%}.bg-5-m10{background-position:50.000% -93.119%}.bg-5-m9{background-position:58.125% -78.807%}.bg-5-m8{background-position:66.250% -64.495%}.bg-5-m7{background-position:74.375% -50.183%}.bg-5-m6{background-position:82.500% -35.872%}.bg-5-m5{background-position:90.625% -21.560%}.bg-5-m4{background-position:98.750% -7.248%}.bg-5-m3{background-position:106.875% 7.064%}.bg-5-m2{background-position:115.000% 21.376%}.bg-5-m1{background-position:123.125% 35.688%}.bg-5-0{background-position:131.250% 50.000%}.bg-5-1{background-position:139.375% 64.312%}.bg-5-2{background-position:147.500% 78.624%}.bg-5-3{background-position:155.625% 92.936%}.bg-5-4{background-position:163.750% 107.248%}.bg-5-5{background-position:171.875% 121.560%}.bg-5-6{background-position:180.000% 135.872%}.bg-5-7{background-position:188.125% 150.183%}.bg-6-m12{background-position:50.000% -121.743%}.bg-6-m11{background-position:58.125% -107.431%}.bg-6-m10{background-position:66.250% -93.119%}.bg-6-m9{background-position:74.375% -78.807%}.bg-6-m8{background-position:82.500% -64.495%}.bg-6-m7{background-position:90.625% -50.183%}.bg-6-m6{background-position:98.750% -35.872%}.bg-6-m5{background-position:106.875% -21.560%}.bg-6-m4{background-position:115.000% -7.248%}.bg-6-m3{background-position:123.125% 7.064%}.bg-6-m2{background-position:131.250% 21.376%}.bg-6-m1{background-position:139.375% 35.688%}.bg-6-0{background-position:147.500% 50.000%}.bg-6-1{background-position:155.625% 64.312%}.bg-6-2{background-position:163.750% 78.624%}.bg-6-3{background-position:171.875% 92.936%}.bg-6-4{background-position:180.000% 107.248%}.bg-6-5{background-position:188.125% 121.560%}.bg-6-6{background-position:196.250% 135.872%}.bg-7-m12{background-position:66.250% -121.743%}.bg-7-m11{background-position:74.375% -107.431%}.bg-7-m10{background-position:82.500% -93.119%}.bg-7-m9{background-position:90.625% -78.807%}.bg-7-m8{background-position:98.750% -64.495%}.bg-7-m7{background-position:106.875% -50.183%}.bg-7-m6{background-position:115.000% -35.872%}.bg-7-m5{background-position:123.125% -21.560%}.bg-7-m4{background-position:131.250% -7.248%}.bg-7-m3{background-position:139.375% 7.064%}.bg-7-m2{background-position:147.500% 21.376%}.bg-7-m1{background-position:155.625% 35.688%}.bg-7-0{background-position:163.750% 50.000%}.bg-7-1{background-position:171.875% 64.312%}.bg-7-2{background-position:180.000% 78.624%}.bg-7-3{background-position:188.125% 92.936%}.bg-7-4{background-position:196.250% 107.248%}.bg-7-5{background-position:204.375% 121.560%}.bg-8-m12{background-position:82.500% -121.743%}.bg-8-m11{background-position:90.625% -107.431%}.bg-8-m10{background-position:98.750% -93.119%}.bg-8-m9{background-position:106.875% -78.807%}.bg-8-m8{background-position:115.000% -64.495%}.bg-8-m7{background-position:123.125% -50.183%}.bg-8-m6{background-position:131.250% -35.872%}.bg-8-m5{background-position:139.375% -21.560%}.bg-8-m4{background-position:147.500% -7.248%}.bg-8-m3{background-position:155.625% 7.064%}.bg-8-m2{background-position:163.750% 21.376%}.bg-8-m1{background-position:171.875% 35.688%}.bg-8-0{background-position:180.000% 50.000%}.bg-8-1{background-position:188.125% 64.312%}.bg-8-2{background-position:196.250% 78.624%}.bg-8-3{background-position:204.375% 92.936%}.bg-8-4{background-position:212.500% 107.248%}.bg-9-m12{background-position:98.750% -121.743%}.bg-9-m11{background-position:106.875% -107.431%}.bg-9-m10{background-position:115.000% -93.119%}.bg-9-m9{background-position:123.125% -78.807%}.bg-9-m8{background-position:131.250% -64.495%}.bg-9-m7{background-position:139.375% -50.183%}.bg-9-m6{background-position:147.500% -35.872%}.bg-9-m5{background-position:155.625% -21.560%}.bg-9-m4{background-position:163.750% -7.248%}.bg-9-m3{background-position:171.875% 7.064%}.bg-9-m2{background-position:180.000% 21.376%}.bg-9-m1{background-position:188.125% 35.688%}.bg-9-0{background-position:196.250% 50.000%}.bg-9-1{background-position:204.375% 64.312%}.bg-9-2{background-position:212.500% 78.624%}.bg-9-3{background-position:220.625% 92.936%}.bg-10-m12{background-position:115.000% -121.743%}.bg-10-m11{background-position:123.125% -107.431%}.bg-10-m10{background-position:131.250% -93.119%}.bg-10-m9{background-position:139.375% -78.807%}.bg-10-m8{background-position:147.500% -64.495%}.bg-10-m7{background-position:155.625% -50.183%}.bg-10-m6{background-position:163.750% -35.872%}.bg-10-m5{background-position:171.875% -21.560%}.bg-10-m4{background-position:180.000% -7.248%}.bg-10-m3{background-position:188.125% 7.064%}.bg-10-m2{background-position:196.250% 21.376%}.bg-10-m1{background-position:204.375% 35.688%}.bg-10-0{background-position:212.500% 50.000%}.bg-10-1{background-position:220.625% 64.312%}.bg-10-2{background-position:228.750% 78.624%}.bg-11-m12{background-position:131.250% -121.743%}.bg-11-m11{background-position:139.375% -107.431%}.bg-11-m10{background-position:147.500% -93.119%}.bg-11-m9{background-position:155.625% -78.807%}.bg-11-m8{background-position:163.750% -64.495%}.bg-11-m7{background-position:171.875% -50.183%}.bg-11-m6{background-position:180.000% -35.872%}.bg-11-m5{background-position:188.125% -21.560%}.bg-11-m4{background-position:196.250% -7.248%}.bg-11-m3{background-position:204.375% 7.064%}.bg-11-m2{background-position:212.500% 21.376%}.bg-11-m1{background-position:220.625% 35.688%}.bg-11-0{background-position:228.750% 50.000%}.bg-11-1{background-position:236.875% 64.312%}.bg-12-m12{background-position:147.500% -121.743%}.bg-12-m11{background-position:155.625% -107.431%}.bg-12-m10{background-position:163.750% -93.119%}.bg-12-m9{background-position:171.875% -78.807%}.bg-12-m8{background-position:180.000% -64.495%}.bg-12-m7{background-position:188.125% -50.183%}.bg-12-m6{background-position:196.250% -35.872%}.bg-12-m5{background-position:204.375% -21.560%}.bg-12-m4{background-position:212.500% -7.248%}.bg-12-m3{background-position:220.625% 7.064%}.bg-12-m2{background-position:228.750% 21.376%}.bg-12-m1{background-position:236.875% 35.688%}.bg-12-0{background-position:245.000% 50.000%}.world-hex.movable { border-color:#fff1a9; box-shadow:0 0 0 2px rgba(255,225,120,.4),inset 0 0 0 2px rgba(34,25,16,.18); }.world-hex.current { z-index:1; border-color:#bce5ff; }.world-hex.fogged { background:#151a20 url('../img/effects/fog_texture.jpg') center/220% no-repeat; border-color:#39434c; }.world-hex.fogged::after { content:''; position:absolute; inset:0; background:linear-gradient(135deg,rgba(10,14,18,.72),rgba(59,68,77,.6)); }
/* Phase 7.6 item #5: generated mist texture painted behind the existing dark overlay so unexplored
   hexes read as an ominous rolling fog instead of a flat colour block; overlay darkens it so the
   fogged tile still contrasts with revealed biome tiles. */
.biome-forest { background-image:url('../img/biomes/biome_forest.jpg'); }.biome-plains { background-image:url('../img/biomes/biome_plains.jpg'); }.biome-desert { background-image:url('../img/biomes/biome_desert.jpg'); }.biome-mountain { background-image:url('../img/biomes/biome_mountain.jpg'); }.biome-water { background-image:url('../img/biomes/biome_water.jpg'); }.biome-swamp { background-image:url('../img/biomes/biome_swamp.jpg'); }.biome-city { background-image:url('../img/biomes/biome_city.jpg'); }
/* Phase 7.6 item #1: the city image is a single 512x512 illustration meant to be seen as one
   coherent scene across the whole 7-hex cluster (core + 6 gates), not sliced into the same
   722%/619% per-hex window every other biome uses (that window was tuned for seamless tiling of a
   repeating texture, not for a one-off landmark image, so it made the city look like a random
   zoomed-in crop). These compound 2-class selectors target only the 7 absolute-coordinate city
   hexes and beat the giant single-class .bg-{q}-{r} table above via selector specificity, without
   touching any other biome's positioning. background-size:300% 300% keeps the crop tight enough to
   still read as "zoomed in" (matching the other biomes' zoomed aesthetic) while letting the fountain
   core sit dead-centre and the 6 gate hexes each show the correct surrounding slice of the same image.

   Phase 7.6 city-expansion follow-up: the city footprint grew from a 1-hex radius (7 hexes) to a
   2-hex radius (19 hexes, see migrate_phase7_6_city_expansion.php) so the district actually reads
   as a small city rather than a single landmark tile. background-size grew from 300% (3-cell
   window) to 500% (5-cell window) and every position below was recomputed with the same axial
   step formula (dx = step*(q_rel + r_rel/2), dy = step*r_rel, step = 100/(cells-1) = 25%) so the
   illustration still reads as one continuous scene across all 19 tiles, core dead-centre. */
.world-hex.bg-0-1  { background-size:500% 500%; background-position:50.000% 50.000%; }  /* city core (fountain) */
.world-hex.bg-1-1  { background-size:500% 500%; background-position:75.000% 50.000%; }  /* gate: east */
.world-hex.bg-1-0  { background-size:500% 500%; background-position:62.500% 25.000%; }  /* gate: north-east */
.world-hex.bg-0-0  { background-size:500% 500%; background-position:37.500% 25.000%; }  /* gate: north-west */
.world-hex.bg-m1-1 { background-size:500% 500%; background-position:25.000% 50.000%; }  /* gate: west */
.world-hex.bg-m1-2 { background-size:500% 500%; background-position:37.500% 75.000%; }  /* gate: south-west */
.world-hex.bg-0-2  { background-size:500% 500%; background-position:62.500% 75.000%; }  /* gate: south-east */
.world-hex.bg-2-1  { background-size:500% 500%; background-position:100.000% 50.000%; } /* outer ring: east */
.world-hex.bg-2-0  { background-size:500% 500%; background-position:87.500% 25.000%; }  /* outer ring: east-northeast */
.world-hex.bg-2-m1 { background-size:500% 500%; background-position:75.000% 0.000%; }   /* outer ring: north-northeast */
.world-hex.bg-1-m1 { background-size:500% 500%; background-position:50.000% 0.000%; }   /* outer ring: north */
.world-hex.bg-0-m1  { background-size:500% 500%; background-position:25.000% 0.000%; }  /* outer ring: north-northwest */
.world-hex.bg-m1-0  { background-size:500% 500%; background-position:12.500% 25.000%; } /* outer ring: north-west */
.world-hex.bg-m2-1  { background-size:500% 500%; background-position:0.000% 50.000%; }  /* outer ring: west */
.world-hex.bg-m2-2  { background-size:500% 500%; background-position:12.500% 75.000%; } /* outer ring: west-southwest */
.world-hex.bg-m2-3  { background-size:500% 500%; background-position:25.000% 100.000%; } /* outer ring: south-southwest */
.world-hex.bg-m1-3  { background-size:500% 500%; background-position:50.000% 100.000%; } /* outer ring: south */
.world-hex.bg-0-3   { background-size:500% 500%; background-position:75.000% 100.000%; } /* outer ring: south-southeast */
.world-hex.bg-1-2   { background-size:500% 500%; background-position:87.500% 75.000%; }  /* outer ring: south-east */

/* Phase 7.5: City Gates map integration — non-walkable core badge, gate hex highlight, move-cooldown timer, coordinate readout, off-screen city marker. */
.world-hex.city-gate { box-shadow:inset 0 0 0 2px rgba(255,225,120,.55),0 0 0 2px rgba(255,225,120,.28); }
.world-hex.city-core { cursor:default; box-shadow:inset 0 0 0 2px rgba(188,229,255,.65); filter:saturate(.82) brightness(.86); }
.world-hex.city-core::after { content:'🏰'; position:absolute; inset:0; display:grid; place-items:center; font-size:15px; text-shadow:0 1px 2px #241b12; }
.map-hud { display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap; margin:0 auto 8px; text-align:center; }
.map-move-timer { padding:6px 11px; border-radius:99px; background:rgba(0,0,0,.28); color:var(--muted); font-size:12px; font:600 12px ui-monospace,SFMono-Regular,Menlo,monospace; }
.map-move-timer.active { background:#f0bc71; color:#3a2b0f; }
.map-coords { padding:6px 11px; border-radius:99px; background:rgba(0,0,0,.2); color:var(--muted); font:600 12px ui-monospace,SFMono-Regular,Menlo,monospace; }
.city-direction-marker { position:absolute; z-index:2; width:28px; height:28px; margin:-14px 0 0 -14px; display:grid; place-items:center; border-radius:50%; background:rgba(58,43,25,.72); border:1px solid rgba(240,188,113,.7); color:#f0d59b; font-size:14px; box-shadow:0 2px 6px rgba(0,0,0,.4); pointer-events:none; }
/* Phase 7.5: CSP forbids inline style attributes (style-src 'self', no 'unsafe-inline'), so the
   marker's edge-of-viewport position is quantised into 16 compass directions (22.5° steps) and
   precompiled here, mirroring the existing .wp-*/.bg-* precompiled-position pattern above. */
.city-direction-marker.cdm-0 { left:96%; top:50%; }
.city-direction-marker.cdm-1 { left:92.5%; top:67.6%; }
.city-direction-marker.cdm-2 { left:82.53%; top:82.53%; }
.city-direction-marker.cdm-3 { left:67.6%; top:92.5%; }
.city-direction-marker.cdm-4 { left:50%; top:96%; }
.city-direction-marker.cdm-5 { left:32.4%; top:92.5%; }
.city-direction-marker.cdm-6 { left:17.47%; top:82.53%; }
.city-direction-marker.cdm-7 { left:7.5%; top:67.6%; }
.city-direction-marker.cdm-8 { left:4%; top:50%; }
.city-direction-marker.cdm-9 { left:7.5%; top:32.4%; }
.city-direction-marker.cdm-10 { left:17.47%; top:17.47%; }
.city-direction-marker.cdm-11 { left:32.4%; top:7.5%; }
.city-direction-marker.cdm-12 { left:50%; top:4%; }
.city-direction-marker.cdm-13 { left:67.6%; top:7.5%; }
.city-direction-marker.cdm-14 { left:82.53%; top:17.47%; }
.city-direction-marker.cdm-15 { left:92.5%; top:32.4%; }
/* Phase 7.6 item #3: persistent ambush countdown banner shown on the outskirts map while a mob-squad ambush timer is armed (see MapLogic::resolvePendingAmbush / app.js syncAmbushFromMapState). Uses --danger to read as an urgent alert, distinct from the neutral .map-hud row above it, with a slow pulse to draw the eye without being distracting during the ~30s countdown. */
.map-ambush-banner { margin:0 auto 10px; padding:9px 14px; max-width:360px; text-align:center; border:1px solid rgba(255,141,145,.55); border-radius:11px; background:rgba(255,141,145,.16); color:var(--danger); font-size:13px; font-weight:700; line-height:1.35; animation:ambush-pulse 1.4s ease-in-out infinite; }
@keyframes ambush-pulse { 0%,100% { opacity:1; } 50% { opacity:.72; } }
.gate-entry-panel { text-align:center; margin-top:10px; padding:10px; border:1px dashed rgba(126,229,173,.5); border-radius:11px; background:rgba(0,0,0,.16); }
.gate-entry-panel p { margin:0 0 8px; color:var(--muted); font-size:12px; line-height:1.4; }
.gate-entry-panel button { min-height:42px; padding:10px 13px; border-radius:11px; background:var(--accent); color:#132219; font-weight:750; }


/* Phase 7.6 item #2: generated icon badges replacing the old plain-glyph encounter markers.
   encounter_type -> enc-<type> class mapping happens client-side in outskirtsView() (app.js);
   the server-authored encounter_type value itself is untouched. */
.world-encounter.enc-resource { background-image:url('../img/map_icons/icon_resource.png'); }
.world-encounter.enc-mob_squad { background-image:url('../img/map_icons/icon_mob_squad.png'); }
.world-encounter.enc-dungeon { background-image:url('../img/map_icons/icon_dungeon.png'); }
.world-encounter.enc-event { background-image:url('../img/map_icons/icon_event.png'); }
.world-encounter.enc-mob_squad.hidden-mob { visibility:hidden; }.map-legend { display:flex; flex-wrap:wrap; gap:7px 12px; justify-content:center; font-size:11px; color:var(--muted); }.legend-token { display:inline-block; width:10px; height:10px; border-radius:50%; background:#3e78b5; }.map-encounter { text-align:center; }.map-encounter p { color:var(--muted); line-height:1.45; }.map-encounter-actions { display:flex; gap:8px; justify-content:center; }.map-encounter button { min-height:42px; padding:10px 13px; border-radius:11px; background:var(--accent); color:#132219; font-weight:750; }.gather-track { height:10px; margin:15px 0; overflow:hidden; border-radius:99px; background:rgba(0,0,0,.2); }.gather-track i { display:block; width:45%; height:100%; border-radius:inherit; background:linear-gradient(90deg,#f0bc71,var(--accent)); animation:gather-progress 1.8s linear forwards; }@keyframes gather-progress { to { width:100%; } }
@media (min-width:560px) { .bottom-nav { grid-template-columns:repeat(8,minmax(82px,1fr)); } }

/* Phase 4.1: compact event and escort additions retain the existing map palette. */
.escort-indicator { margin-top:6px; padding:6px 8px; border:1px solid rgba(240,188,113,.5); border-radius:9px; background:rgba(58,43,25,.45); color:#f0d59b; font-size:11px; line-height:1.35; }
.event-offer { margin:8px 0 0; padding:8px; border:1px dashed rgba(240,188,113,.55); border-radius:9px; color:#f0d59b !important; font-size:12px; }
/* Phase 7.10 item #3: resource-node capacity/respawn counter shown in the map encounter panel. */
.resource-counter { margin:6px 0 0; font-size:12px; color:#c9d6e3 !important; }
/* Phase 8.1: item name+icon preview shown before the player starts gathering a resource node. */
.resource-item-preview { display:flex; align-items:center; gap:8px; margin:6px 0 0; font-size:13px; color:#f4f7fb !important; }
.resource-item-preview .small-icon { width:28px; height:28px; border-radius:8px; }
.resource-item-preview .item-icon-fallback.small-icon { width:28px; height:28px; }
/* Phase 8.1: gem/rune socket bonus pill on itemStatsLine, visually distinct from the sharpen bonus. */
.item-stat-pill.has-gem { border-color:rgba(214,178,255,.45); }
.item-stat-pill.has-gem small { color:#d6b2ff; }
/* Phase 8.1: Forge screen materials panel (armor_scrap balance + raw_gem identify action). */
.materials-panel { margin-top:14px; }
.material-row { display:flex; align-items:center; gap:10px; padding:10px; border-radius:12px; background:rgba(0,0,0,.14); margin-bottom:8px; }
.material-row:last-child { margin-bottom:0; }
.material-row .item-icon,.material-row .item-icon-fallback { width:38px; height:38px; flex:0 0 auto; border-radius:9px; }
.material-row>div { min-width:0; flex:1; display:grid; gap:2px; }
.material-row strong { font-size:13px; }
.material-row small { color:var(--muted); font-size:11px; }
.material-count { font-size:13px; font-weight:750; white-space:nowrap; }
.material-row button { min-height:38px; padding:8px 11px; border-radius:10px; background:var(--accent); color:#132219; font-size:11px; font-weight:750; white-space:nowrap; }
.material-row button:disabled { opacity:.5; cursor:not-allowed; }
/* Phase 8.1: Forge screen equipment craft panel (common->rare->epic->legendary upgrade flow). */
.craft-panel { margin-top:14px; }
.craft-panel .item-with-icon { margin-bottom:10px; }
.craft-panel .item-with-icon .item-icon,.craft-panel .item-with-icon .item-icon-fallback { width:42px; height:42px; border-radius:10px; }
.craft-cost { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); margin-bottom:10px; }
.craft-cost .item-icon,.craft-cost .item-icon-fallback { width:26px; height:26px; border-radius:7px; }
.craft-cost.insufficient { color:#f28b82 !important; }
.craft-gem-slots { display:grid; gap:6px; margin-bottom:12px; }
.craft-gem-slots>span { font-size:11px; color:var(--muted); }
.craft-gem-slots select { width:100%; min-height:38px; border-radius:10px; padding:6px 10px; font-size:12px; }
.craft-panel>button[data-craft-item] { width:100%; min-height:44px; border-radius:11px; background:var(--accent); color:#132219; font-weight:750; }
.craft-panel>button[data-craft-item]:disabled { opacity:.5; cursor:not-allowed; }

/* Phase 6.1: compact moderated chat and deterministic NPC quest screens. */
.bottom-nav { grid-template-columns:repeat(10,minmax(82px,1fr)); }
.chat-messages,.quest-list { display:grid; gap:9px; }
.chat-message,.quest-card { padding:12px; border:1px solid var(--line); border-radius:13px; background:rgba(0,0,0,.14); }
.chat-message strong { font-size:13px; color:var(--accent); }.chat-message p,.quest-card p { margin:6px 0; color:var(--text); font-size:13px; line-height:1.4; }.chat-message small,.quest-card small { color:var(--muted); font-size:11px; }.chat-message.pending { border-color:rgba(240,188,113,.5); }.chat-message.pending small { color:#f0d59b; }
.chat-form { display:flex; gap:8px; margin-top:12px; }.chat-form input { min-width:0; flex:1; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--text); }.chat-form button,.quest-card button { min-height:42px; padding:10px 13px; border-radius:11px; background:var(--accent); color:#132219; font-weight:750; }
.quest-card { display:grid; gap:7px; }.quest-card h2 { margin:0; font-size:16px; }.quest-card progress { height:9px; }.quest-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:12px; }.quest-unavailable { color:#f0d59b!important; }
@media (min-width:560px) { .bottom-nav { grid-template-columns:repeat(10,minmax(82px,1fr)); } }

/* Phase 6.2: direct-message and referral controls retain the compact chat layout. */
.bottom-nav { grid-template-columns:repeat(11,minmax(82px,1fr)); }
.dm-dialogs { padding-bottom:8px; }
.chat-message.incoming { border-color:rgba(140,168,255,.34); }
.chat-message.outgoing { border-color:rgba(126,229,173,.34); }
.referral-screen .screen-head .hero-kicker { color: var(--workshop-ember-2); font-family: 'Manrope', sans-serif; font-weight: 800; letter-spacing: .14em; }
.tournaments-screen .screen-head .hero-kicker { color: var(--workshop-ember-2); font-family: 'Manrope', sans-serif; font-weight: 800; letter-spacing: .14em; }

.referral-code { width:100%; margin-top:12px; padding:13px; border:1px solid rgba(126,229,173,.35); border-radius:12px; background:rgba(0,0,0,.18); color:var(--accent); font:700 15px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.04em; text-align:center; }
.referral-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
.referral-actions button { min-height:42px; padding:10px; border-radius:11px; background:var(--accent); color:#132219; font-weight:750; font-size:12px; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (min-width:560px) { .bottom-nav { grid-template-columns:repeat(11,minmax(82px,1fr)); } }

/* Phase 6.3: battle chat, cosmetic pet dialogue and personalized notifications. */
.header-actions { margin-left:auto; display:flex; align-items:center; gap:8px; }
.header-actions .fullscreen { margin-left:0; }
.notification-bell { position:relative; width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); font-size:22px; }
.notification-bell b { position:absolute; top:-6px; right:-7px; min-width:18px; height:18px; padding:1px 4px; display:grid; place-items:center; border:2px solid var(--bg); border-radius:99px; background:var(--danger); color:#351117; font-size:10px; line-height:1; }
.notification-panel { position:absolute; top:calc(100% + 7px); right:12px; width:min(calc(100vw - 24px),390px); max-height:min(68vh,520px); overflow:auto; padding:14px; border:1px solid var(--line); border-radius:16px; background:linear-gradient(145deg,#242b38,#171c26); box-shadow:0 18px 38px rgba(0,0,0,.35); }
.notification-panel .panel-title h2 { font-size:16px; }
.notification-panel .panel-title button,.battle-chat-toggle { min-height:34px; padding:7px 9px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); color:var(--text); font-size:11px; font-weight:700; }
.notification-panel .panel-title button:disabled { opacity:.5; cursor:default; }
.notification-list { display:grid; gap:7px; margin-top:11px; }
.notification-item { width:100%; display:grid; gap:4px; padding:11px; border:1px solid var(--line); border-radius:11px; background:rgba(0,0,0,.15); color:var(--text); text-align:left; }
.notification-item.unread { border-color:rgba(126,229,173,.42); background:rgba(126,229,173,.08); }
.notification-item strong { font-size:13px; }.notification-item span { color:var(--muted); font-size:12px; line-height:1.35; }.notification-item small { color:var(--muted); font-size:10px; }
.pet-dialogue { position:relative; margin:12px 6px 0 88px; padding:11px 13px; border:1px solid rgba(126,229,173,.35); border-radius:15px 15px 15px 4px; background:rgba(126,229,173,.09); }
.pet-dialogue::before { content:''; position:absolute; left:-8px; bottom:9px; width:13px; height:13px; transform:rotate(45deg); border-left:1px solid rgba(126,229,173,.35); border-bottom:1px solid rgba(126,229,173,.35); background:#1e2c2c; }
.pet-dialogue p { position:relative; margin:3px 0 0; color:var(--text); font-size:13px; line-height:1.4; }.pet-dialogue.loading p { color:var(--muted); }
.pet-dialogue-trait { position:relative; color:var(--accent); font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.battle-chat { overflow:hidden; }.battle-chat.collapsed { padding-bottom:14px; }.battle-chat .panel-title { align-items:center; }.battle-chat .chat-messages { max-height:225px; margin-top:11px; overflow:auto; padding-right:2px; }
.battle-chat .chat-message { padding:9px; }.battle-chat .chat-message p { font-size:12px; }.battle-chat .empty { padding:18px 8px; }
@media (max-width:420px) { .pet-dialogue { margin-left:52px; } }

/* Phase 7.1: city-graph navigation shell (sidebar of locations + main location pane) replaces the
   old flat bottom-nav tab bar. nav()/.bottom-nav are no longer rendered by app.js; the old
   .bottom-nav rules above are left in place as harmless dead CSS. */
.app-shell { display:flex; align-items:stretch; min-height:calc(100vh - 92px); }
.sidebar { flex:0 0 clamp(108px,30%,150px); max-width:150px; min-width:0; display:flex; flex-direction:column; border-right:1px solid #4a3620; background-image:linear-gradient(165deg,rgba(20,14,8,.62) 0%,rgba(15,10,6,.74) 100%),url('../img/ui/sidebar_bg.jpg'); background-size:cover; background-position:center top; background-repeat:no-repeat; }
.sidebar-topbar { padding:12px 9px; display:grid; grid-template-columns:minmax(0,1fr); gap:9px; min-width:0; border-bottom:1px solid var(--line); }
.pet-name-row { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.pet-name-row b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; letter-spacing:-.01em; }
.pet-name-form { display:flex; align-items:center; gap:5px; }
.pet-name-form input { min-width:0; flex:1; padding:7px 8px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); color:var(--text); font-size:12px; }
.compact-meters { display:grid; gap:6px; }
.compact-meters label { display:block; margin-bottom:3px; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.04em; }
.compact-meters progress { height:7px; }
/* Phase 8.2: battle-attempts indicator -- deliberately text-only (not a progress bar like
   energy/mood) since it's a small integer count (0-5), not a 0-100 continuous meter. */
.battle-attempts-indicator { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-top:8px; padding:8px 11px; border-radius:11px; background:rgba(240,188,113,.08); border:1px solid rgba(240,188,113,.18); font-size:12px; flex-wrap:wrap; }
.battle-attempts-indicator label { color:var(--muted); text-transform:none; flex:0 0 auto; }
.battle-attempts-indicator .battle-attempts-value { color:var(--text); font:600 12px ui-monospace,SFMono-Regular,Menlo,monospace; display:inline-flex; align-items:baseline; gap:5px; flex-wrap:wrap; justify-content:flex-end; min-width:0; }
/* Баг 4: компактный бейдж с песочными часами вместо текста "· след. через" -- не растягивается в
   одну строку с числом попыток и при недостатке ширины переносится на новую строку целиком. */
.attempts-eta { display:inline-flex; align-items:center; gap:3px; padding:1px 7px; border-radius:999px; background:rgba(0,0,0,.22); color:var(--muted); font-size:11px; white-space:nowrap; }
.attempts-eta .misc-icon { width:11px; height:11px; margin:0; }
.pvp-arena .attempts-eta { color:var(--pa-muted); }
.battle-attempts-indicator.compact { margin-top:6px; padding:6px 9px; font-size:10px; }
.battle-attempts-indicator.compact label { text-transform:uppercase; letter-spacing:.04em; }
.sidebar-mode-toggle { display:flex; gap:5px; }
.sidebar-mode-toggle button { flex:1; min-height:30px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--muted); font-size:13px; }
.sidebar-mode-toggle button.active { background:var(--accent); border-color:var(--accent); color:#132219; font-weight:750; }
.sidebar-body { flex:1; min-width:0; overflow-x:hidden; overflow-y:auto; padding:9px; }
.sidebar-panel { display:grid; grid-template-columns:minmax(0,1fr); gap:9px; min-width:0; }
.location-list { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; min-width:0; }
.location-item { position:relative; display:flex; align-items:center; gap:8px; width:100%; min-width:0; box-sizing:border-box; padding:9px 8px; border:1px solid rgba(184,153,98,.32); border-radius:11px; background-image:linear-gradient(rgba(26,20,12,.42),rgba(26,20,12,.5)),url('../img/ui/parchment_button.jpg'); background-size:cover; background-position:center; color:#3a2c18; text-align:left; font-size:12px; line-height:1.25; text-shadow:0 1px 0 rgba(255,248,230,.4); }
.location-item span:nth-child(2) { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.location-item.active { border-color:var(--accent); box-shadow:inset 0 0 0 999px rgba(126,229,173,.28); color:#0f2318; text-shadow:none; }
.location-back { color:#5a4a30; }
.location-glyph { flex:0 0 auto; font-size:16px; filter:drop-shadow(0 1px 1px rgba(255,255,255,.3)); }
/* Фаза 23.1: emoji-глифы заменены инлайновыми SVG (.node-icon) -- базовый размер/цвет для всех
   контейнеров, где они используются (сайдбар/баннер/хаб -- тёмная тема переопределяет цвет ниже). */
.node-icon { width: 1em; height: 1em; display: block; }
.location-glyph .node-icon,
.hub-street-glyph .node-icon { width: 16px; height: 16px; color: currentColor; }
.location-banner-glyph .node-icon { width: 26px; height: 26px; color: #fff; margin: 0 auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.hub-major-tile-glyph .node-icon { width: 18px; height: 18px; color: var(--hlm-cyan, #52f1f8); }
.hub-minor-tile-icon--glyph .node-icon { width: 18px; height: 18px; color: var(--hlm-cyan, #52f1f8); }
.location-more { flex:0 0 auto; color:#5a4a30; font-size:13px; }
@keyframes location-pulse { 0% { box-shadow:0 0 0 0 rgba(126,229,173,.55); } 70% { box-shadow:0 0 0 7px rgba(126,229,173,0); } 100% { box-shadow:0 0 0 0 rgba(126,229,173,0); } }
.location-item.has-children { animation:location-pulse 2.2s ease-out infinite; }
.location-item.has-children.active { animation:none; }
.main-pane { flex:1; min-width:0; display:flex; flex-direction:column; }
.top-icon-strip { display:flex; align-items:center; gap:8px; padding:10px 14px; border-bottom:1px solid var(--line); }
.top-icon-button { width:38px; height:38px; flex:0 0 auto; display:grid; place-items:center; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); font-size:18px; }
.top-icon-group { display:flex; gap:8px; margin:0 auto; }
.top-icon-spacer { flex:0 0 38px; width:38px; }
.top-icon-img { width:20px; height:20px; object-fit:contain; }
.location-banner { position:relative; padding:18px 16px 30px; overflow:hidden; background-size:cover; background-position:center; }
.location-banner::before { content:''; position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.12) 0%,rgba(0,0,0,.32) 55%,rgba(0,0,0,.62) 100%); pointer-events:none; }
.location-banner>* { position:relative; z-index:1; }
.location-banner h1 { margin:6px 0 0; color:#fff; font-size:clamp(21px,5.6vw,29px); letter-spacing:-.03em; text-shadow:0 2px 10px rgba(0,0,0,.55); }
.location-banner-glyph { display:block; font-size:28px; filter:drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.banner-back { position:absolute; top:14px; right:16px; padding:7px 11px; border:1px solid rgba(255,255,255,.32); border-radius:99px; background:rgba(0,0,0,.3); color:#fff; font-size:11px; font-weight:700; backdrop-filter:blur(6px); z-index:2; }
.banner-hub { background-image:linear-gradient(135deg,rgba(58,74,107,.35),rgba(28,34,51,.55)),url('../img/locations/hub.jpg'); }
.banner-market { background-image:linear-gradient(135deg,rgba(140,168,255,.3),rgba(55,64,107,.55)),url('../img/locations/market.jpg'); }
.banner-armory { background-image:linear-gradient(135deg,rgba(96,103,114,.3),rgba(40,45,54,.55)),url('../img/locations/armory.jpg'); }
.banner-forge { background-image:linear-gradient(135deg,rgba(192,86,47,.3),rgba(67,32,26,.55)),url('../img/locations/forge.jpg'); }
.banner-arena_district { background-image:linear-gradient(135deg,rgba(200,84,72,.3),rgba(58,20,20,.55)),url('../img/locations/arena_district.jpg'); }
.banner-gate { background-image:linear-gradient(135deg,rgba(95,122,82,.3),rgba(33,44,28,.55)),url('../img/locations/gate.jpg'); }
.banner-outskirts { background-image:linear-gradient(135deg,rgba(47,92,63,.3),rgba(18,36,26,.55)),url('../img/locations/outskirts.jpg'); }
.banner-town_hall { background-image:linear-gradient(135deg,rgba(212,191,143,.3),rgba(92,74,38,.55)),url('../img/locations/town_hall.jpg'); }
.banner-guild { background-image:linear-gradient(135deg,rgba(126,229,173,.3),rgba(32,87,58,.55)),url('../img/locations/guild.jpg'); }
.location-content { flex:1; padding:16px; }
.city-hub { padding:26px 18px; }
.hub-compass { display:grid; grid-template-columns:repeat(2,1fr); gap:11px; margin-top:20px; }
.hub-street { display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:16px 14px; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--text); text-align:left; }
.hub-street:active { border-color:var(--accent); transform:scale(.98); }
.hub-street-glyph { font-size:26px; }
.chat-fab { position:fixed; right:max(16px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom)); width:56px; height:56px; display:grid; place-items:center; border-radius:50%; background:var(--accent); color:#132219; font-size:24px; box-shadow:0 10px 26px rgba(0,0,0,.4); z-index:4; }
.overlay-panel { position:fixed; top:0; bottom:0; left:50%; transform:translateX(-50%); width:min(100%,700px); z-index:8; display:flex; flex-direction:column; background:var(--bg); }
.overlay-header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:max(16px,env(safe-area-inset-top),var(--tg-safe-top)) 16px 12px; border-bottom:1px solid var(--line); background:rgba(16,19,26,.92); backdrop-filter:blur(16px); z-index:1; }
.overlay-header h2 { margin:0; font-size:18px; letter-spacing:-.02em; }
.overlay-body { flex:1; overflow-y:auto; padding:16px; padding-bottom:max(20px,env(safe-area-inset-bottom)); }
/* Phase 17.1: compact centered modal variant (used by the tournament/league leaderboard) instead
   of the default fullscreen overlay-panel -- a dismissible dim backdrop plus a rounded floating
   card capped to a sane max-height, so it never stretches edge-to-edge on mobile. */
.overlay-backdrop { position:fixed; inset:0; z-index:7; background:rgba(6,8,12,.62); backdrop-filter:blur(2px); animation:overlay-fade-in .15s ease; }
@keyframes overlay-fade-in { from { opacity:0; } to { opacity:1; } }
.overlay-panel--sheet { top:50%; bottom:auto; left:50%; transform:translate(-50%,-50%); width:min(92vw,520px); max-height:min(80vh,640px); border-radius:20px; border:1px solid var(--line); box-shadow:0 24px 64px rgba(0,0,0,.5); }
.overlay-panel--sheet .overlay-header { border-radius:20px 20px 0 0; padding:14px 16px 11px; }
.overlay-panel--sheet .overlay-body { padding:12px 14px 16px; }
@media (max-width:559.98px) { .overlay-panel--sheet { width:94vw; max-height:86vh; border-radius:18px; } .overlay-panel--sheet .overlay-header { border-radius:18px 18px 0 0; } }
.battle-history-list { display:grid; gap:9px; }
.battle-history-row { padding:12px; border:1px solid var(--line); border-radius:13px; background:rgba(0,0,0,.14); }
.battle-history-row.win { border-color:rgba(126,229,173,.4); }
.battle-history-row.loss { border-color:rgba(255,141,145,.4); }
.battle-history-row.draw { border-color:rgba(240,188,113,.4); }
.battle-history-row.win .battle-history-meta strong { color:var(--accent); }
.battle-history-row.loss .battle-history-meta strong { color:var(--danger); }
.battle-history-row.draw .battle-history-meta strong { color:#f0bc71; }
.battle-history-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; color:var(--muted); font-size:12px; }
.battle-history-meta strong { color:var(--text); font-size:14px; }
.battle-history-row small { display:block; margin-top:6px; color:var(--muted); font-size:11px; }
.quest-giver { margin-top:14px; }
.quest-list.compact { gap:7px; }
.quest-list.compact .quest-card { padding:10px; }
.icon-button.small { width:28px; height:28px; border-radius:8px; font-size:14px; }
.stats-grid.compact { grid-template-columns:1fr; gap:6px; }
@media (min-width:560px) { .sidebar { flex-basis:190px; max-width:190px; } .hub-compass { grid-template-columns:repeat(3,1fr); } }
.app { padding-bottom:28px; }

/* Phase 7.2: mobile off-canvas sidebar drawer. Below 560px the sidebar no longer shares
   horizontal space with the location image/content (which caused the earlier overflow bug and
   left very little room for either column) -- it becomes a fixed drawer that slides in ON TOP of
   the main pane and can be collapsed again via the toggle button or the backdrop. Desktop
   (>=560px, further down) resets all of this back to the original always-visible in-flow sidebar. */
.sidebar-toggle-btn { font-size:20px; }
.sidebar-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.55); opacity:0; pointer-events:none; transition:opacity .22s ease; z-index:5; }
@media (max-width:559.98px) {
  /* position:absolute (not fixed) so the drawer is anchored to .app-shell's own box, which
     already starts below the fixed app-header in normal flow -- this avoids the drawer sliding
     out over the header bar and clipping/overlapping its text. */
  .app-shell { position:relative; overflow:hidden; }
  /* top starts below .top-icon-strip (not top:0) so the open drawer never covers the
     sidebar-toggle button itself -- previously the drawer's z-index:6 box spatially overlapped
     the toggle (which lives in .main-pane's top-icon-strip, z-index:auto), making it impossible
     to click the hamburger again to close the sidebar (only the backdrop tap-outside worked). */
  .sidebar { position:absolute; top:59px; bottom:0; left:0; z-index:6; flex-basis:auto; width:min(80vw,270px); max-width:none; transform:translateX(-100%); transition:transform .24s ease; box-shadow:12px 0 28px rgba(0,0,0,.4); }
  .sidebar-backdrop { top:59px; }
  .app-shell.sidebar-open .sidebar { transform:translateX(0); }
  .app-shell.sidebar-open .sidebar-backdrop { opacity:1; pointer-events:auto; }
  .main-pane { width:100%; }
}
@media (min-width:560px) { .sidebar-toggle-btn { display:none; } .sidebar-backdrop { display:none; } .top-icon-spacer { display:none; } }

/* Phase 8.3: async-PvP target list + scout panel. .item-card is a flex row that assumes a
   fixed two-column layout (avatar/info + buy button); the scout panel needs to expand to a
   third full-width row underneath when a target is expanded, hence flex-wrap on the card. */
.pvp-target { flex-wrap:wrap; }
.pvp-scout-panel { flex-basis:100%; width:100%; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.pvp-scout-panel .stats-grid.compact { margin-top:0; }
.pvp-scout-panel button { margin-top:10px; width:100%; }
.pvp-online-dot { display:inline-block; width:10px; height:10px; border-radius:99px; background:var(--muted); opacity:.5; flex:0 0 auto; }
.pvp-online-dot.online { background:var(--accent); opacity:1; box-shadow:0 0 0 3px rgba(126,229,173,.18); }
.small-icon { width:18px; height:18px; border-radius:6px; vertical-align:middle; margin-right:5px; }
.arena-mode-tabs { justify-content:center; }
/* Phase 10.1: stat-point allocation grid on the character screen -- 5 flat +1 buttons, wraps to
   2 columns on narrow phones so no button ever gets clipped. */
.stat-allocate-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-top:12px; }
.stat-allocate-grid button { min-height:44px; }
@media (min-width:560px) { .stat-allocate-grid { grid-template-columns:repeat(3,1fr); } }
/* Phase 10.1: synthetic PvP bot fallback rows in pvpTargetsView() -- same card shell as a real
   target, direct single "Атаковать" action with no scout step. */
.pvp-target-bot .item-buy button { width:100%; }
.arena-intro-wrap { display:block; }
.pvp-attempts-indicator { max-width:420px; margin-left:auto; margin-right:auto; }

/* Phase 9.1: cosmetic pet color-variant reroll panel on the Equipment screen. */
.pet-variant-panel { display:grid; gap:10px; }
.pet-variant-panel #pet-variant-reroll { min-height:46px; padding:12px 15px; border-radius:12px; background:var(--accent); color:#132219; font-weight:750; }
.pet-variant-panel #pet-variant-reroll:disabled { opacity:.55; cursor:wait; }

/* Phase 11.1/11.2/11.3: pet quick actions (tap-to-pet, chat, play) + pet-chat panel (reuses
   .chat-messages/.chat-form/.chat-message, no new rules needed there) + the 3 reflex minigames. */
.pet-quick-actions { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.pet-quick-actions button { flex:1 1 auto; min-height:44px; min-width:104px; padding:10px 12px; border-radius:12px; font-size:13px; font-weight:600; }
.pet-tap-button { background:var(--accent)!important; color:#132219!important; border:1px solid var(--accent)!important; transition:transform .15s ease; }
.pet-tap-button.anim { animation:pet-tap-pulse .65s ease; }
@keyframes pet-tap-pulse { 0% { transform:scale(1); } 30% { transform:scale(1.12); box-shadow:0 0 0 6px rgba(126,229,173,.22); } 100% { transform:scale(1); box-shadow:none; } }

.overlay-panel .item-body h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--workshop-text);
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Phase 13.1: production canvas minigames. Each engine uses its own explicitly scoped canvas class and only this stage is redrawn per frame. */
.play-menu,.play-canvas-game,.play-result { display:grid; gap:12px; text-align:center; }
.play-game-list { display:grid; gap:10px; }
.play-game-card { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:3px 12px; padding:13px; border-radius:14px; background:var(--surface-2); border:1px solid var(--line); text-align:left; }
.play-game-card .play-game-glyph { grid-row:1/3; font-size:28px; }.play-game-card strong{font-size:14px}.play-game-card small{color:var(--muted);font-size:12px}
.play-daily-cap { margin:0; color:var(--accent); font-size:13px; font-weight:700; }
.play-round-head { display:flex; justify-content:space-between; gap:12px; align-items:baseline; font-size:13px; color:var(--muted); text-align:left; }.play-round-head strong{color:var(--text)}
.minigame-stage { min-height:286px; border:1px solid var(--line); border-radius:16px; overflow:hidden; background:#14222c; }.minigame-hud { display:flex; justify-content:space-between; gap:8px; padding:9px 12px; background:rgba(8,16,23,.82); color:#e8f5ee; font-size:12px; }.minigame-stat:last-child{color:#9ee6bd;font-weight:700}
.minigame-stage canvas { display:block; width:100%; height:auto; aspect-ratio:1.8/1; touch-action:manipulation; cursor:pointer; }.play-canvas-game.is-resolving .minigame-stage{opacity:.58;pointer-events:none}
.play-result-rewards { display:flex; flex-wrap:wrap; justify-content:center; gap:10px 14px; font-size:14px; }.play-result-actions{display:flex;gap:10px;justify-content:center}.play-result-actions button{min-height:42px;padding:9px 14px;border-radius:12px}
@media(max-width:480px){.play-round-head{display:grid;gap:3px}.minigame-stage{min-height:200px}.minigame-stage canvas{min-height:200px}.play-result-actions{display:grid}.play-result-actions button{width:100%}}

/* Canvas names are deliberately game-scoped so future prototype styling cannot leak into the app. */
.game-cat-run__canvas,.game-cat-run__hud { background:#152739; }.game-pet-feast__canvas,.game-pet-feast__hud { background:#21183a; }.game-resource-hunt__canvas,.game-resource-hunt__hud { background:#1d2d31; }.game-dungeon-dodge__canvas,.game-dungeon-dodge__hud { background:#18313d; }.game-rune-shards__canvas,.game-rune-shards__hud { background:#251e43; }


/* Phase 13.2: faithful mg1_runner presentation. All prototype rules are scoped to prevent leaks. */
.play-menu,.play-canvas-game,.play-result {
  --play-bg:#0d0912; --play-dungeon-1:#1a1024; --play-dungeon-2:#241536;
  --play-surface:rgba(30,18,45,.92); --play-border:rgba(180,140,255,.25);
  --play-text:#f1e9ff; --play-muted:#b8a8d8; --play-primary:#7c4dff;
  --play-gem:#40e0ff; --play-gem-glow:#baf6ff; --play-gold:#ffd166; --play-shield:#4dffb8;
  color:var(--play-text); font-family:'Nunito',ui-sans-serif,sans-serif;
}
.play-menu,.play-result { padding:6px; border-radius:18px; background:radial-gradient(ellipse at 50% 0%,#211133 0%,var(--play-bg) 82%); }
.play-menu .phase-note,.play-result .phase-note { color:var(--play-muted); font-size:14px; }
.play-game-list { gap:10px; }
.play-game-card { min-height:78px; padding:14px; color:var(--play-text); border:1px solid var(--play-border); border-radius:14px; background:linear-gradient(135deg,rgba(45,28,67,.95),rgba(23,13,35,.95)); box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 7px 18px rgba(0,0,0,.22); }
.play-game-card:hover,.play-game-card:focus-visible { border-color:rgba(64,224,255,.58); background:linear-gradient(135deg,rgba(58,35,86,.98),rgba(27,15,42,.98)); }
.play-game-card .play-game-glyph { font-size:30px; filter:drop-shadow(0 0 7px rgba(64,224,255,.24)); }
.play-game-card strong { color:var(--play-text); font-weight:800; font-size:15px; }.play-game-card small { color:var(--play-muted); font-size:12px; }
.play-daily-cap { padding:8px 11px; border:1px solid rgba(64,224,255,.28); border-radius:10px; color:var(--play-gem-glow); background:rgba(64,224,255,.08); }
.play-round-head { padding:4px 7px 8px; color:var(--play-muted); }.play-round-head strong { color:var(--play-text); font-family:'Press Start 2P',monospace; font-size:11px; line-height:1.45; }
.minigame-stage { border-color:var(--play-border); border-radius:18px; background:var(--play-bg); box-shadow:0 0 32px rgba(124,77,255,.18),inset 0 0 32px rgba(0,0,0,.38); }
.play-result { gap:16px; padding:26px 18px; border:2px solid var(--play-border); box-shadow:0 18px 46px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.06); text-align:center; }
.play-result::before { content:'🎉 Раунд завершён'; align-self:center; padding:7px 14px; border:1px solid rgba(255,77,109,.35); border-radius:999px; color:#ffc2cf; background:rgba(255,77,109,.12); font:800 13px/1 'Nunito',sans-serif; }
.play-result h2 { margin:0; color:var(--play-text); font-family:'Press Start 2P',monospace; font-size:clamp(21px,6vw,27px); line-height:1.35; text-shadow:0 3px 0 rgba(0,0,0,.5),0 0 20px rgba(124,77,255,.48); }
.play-result-rewards { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.play-result-rewards span { display:grid; gap:5px; min-height:78px; align-content:center; padding:10px 7px; border:1px solid var(--play-border); border-radius:11px; color:var(--play-gem-glow); background:rgba(255,255,255,.05); font-size:13px; font-weight:800; }
.play-result-actions { display:grid; gap:10px; }.play-result-actions button { width:100%; min-height:50px; color:#1a0f2b; border-radius:14px; background:linear-gradient(180deg,var(--play-gem-glow),var(--play-gem)); box-shadow:0 6px 0 #1a92a8,0 10px 20px rgba(64,224,255,.25); font:800 16px 'Nunito',sans-serif; }.play-result-actions button:active { transform:translateY(4px); box-shadow:0 2px 0 #1a92a8,0 4px 10px rgba(64,224,255,.2); }.play-result-actions .secondary-action { color:var(--play-text)!important; border:1px solid var(--play-border)!important; background:rgba(255,255,255,.06)!important; box-shadow:none; }

.cat-run-proto { position:relative; width:100%; aspect-ratio:4/7; max-height:min(700px,76dvh); overflow:hidden; background:#0d0912; touch-action:none; isolation:isolate; }
.cat-run-proto__canvas { display:block; width:100%; height:100%; max-width:none!important; max-height:none!important; aspect-ratio:auto!important; image-rendering:pixelated; image-rendering:-webkit-optimize-contrast; }
.cat-run-proto__tap-layer { position:absolute; inset:0; z-index:5; cursor:pointer; }
.cat-run-proto__screen { position:absolute; inset:0; z-index:20; display:flex; align-items:center; justify-content:center; padding:20px; background:linear-gradient(180deg,rgba(10,6,16,.55),rgba(6,4,10,.85)); backdrop-filter:blur(3px); }
.cat-run-proto__panel { width:100%; max-width:340px; padding:28px 22px 26px; border:2px solid rgba(180,140,255,.25); border-radius:22px; color:#f1e9ff; background:rgba(30,18,45,.88); box-shadow:0 20px 60px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.06); text-align:center; animation:cat-run-proto-panel-in 420ms cubic-bezier(.16,1,.3,1); }
@keyframes cat-run-proto-panel-in { from { opacity:0; transform:translateY(14px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }
.cat-run-proto__badge { display:inline-block; margin-bottom:16px; padding:6px 14px; border:1px solid rgba(64,224,255,.35); border-radius:999px; color:#baf6ff; background:rgba(64,224,255,.12); font:800 13px 'Nunito',sans-serif; }
.cat-run-proto__title { margin:0 0 14px; color:#f1e9ff; font:clamp(28px,9vw,38px)/1.25 'Press Start 2P',monospace; letter-spacing:1px; text-shadow:0 3px 0 rgba(0,0,0,.5),0 0 24px rgba(124,77,255,.5); }
.cat-run-proto__subtitle { margin:0 0 22px; color:#b8a8d8; font:500 14px/1.5 'Nunito',sans-serif; }.cat-run-proto__button { width:100%; padding:14px 36px; color:#1a0f2b; border-radius:16px; background:linear-gradient(180deg,#baf6ff,#40e0ff); box-shadow:0 6px 0 #1a92a8,0 10px 20px rgba(64,224,255,.25); font:800 17px 'Nunito',sans-serif; }.cat-run-proto__button:active { transform:translateY(4px); box-shadow:0 2px 0 #1a92a8,0 4px 10px rgba(64,224,255,.2); }
.cat-run-proto__hint { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:18px; color:#b8a8d8; font:500 13px 'Nunito',sans-serif; }.cat-run-proto__hint span { padding:4px 10px; border:1px solid rgba(180,140,255,.25); border-radius:8px; color:#f1e9ff; background:rgba(255,255,255,.08); font-weight:700; }.cat-run-proto__hint b { font-weight:500; }
.cat-run-proto__hidden,.cat-run-proto__screen.hidden,.cat-run-proto__hud.hidden,.cat-run-proto__combo.hidden { display:none!important; }.cat-run-proto__hud { position:absolute; inset:0; z-index:10; pointer-events:none; }.cat-run-proto__hud-top { position:absolute; top:max(14px,env(safe-area-inset-top)); right:14px; left:14px; display:flex; align-items:center; justify-content:space-between; gap:10px; }.cat-run-proto__score-wrap { display:flex; flex-direction:column; align-items:flex-start; min-width:84px; padding:8px 14px; border:1px solid rgba(180,140,255,.25); border-radius:10px; background:rgba(13,9,18,.65); backdrop-filter:blur(6px); }.cat-run-proto__score-wrap span { color:#b8a8d8; font:800 10px 'Nunito',sans-serif; letter-spacing:.08em; }.cat-run-proto__score-wrap strong { color:#baf6ff; font:20px 'Press Start 2P',monospace; font-variant-numeric:tabular-nums; text-shadow:0 0 10px rgba(64,224,255,.5); }.cat-run-proto__combo { padding:8px 16px; border:1px solid rgba(255,209,102,.45); border-radius:999px; color:#ffd166; background:rgba(255,209,102,.16); font:16px 'Press Start 2P',monospace; }.cat-run-proto__shields { display:flex; gap:6px; }.cat-run-proto .shield-icon { width:26px; height:26px; filter:drop-shadow(0 0 6px rgba(77,255,184,.6)); transition:opacity .18s,transform .18s; }.cat-run-proto .shield-icon.lost { opacity:.15; transform:scale(.7) rotate(15deg); filter:none; }
@media (max-height:700px) { .cat-run-proto__panel { padding:20px 18px; }.cat-run-proto__title { margin-bottom:10px; }.cat-run-proto__subtitle { margin-bottom:16px; } }
@media (max-width:480px) { .play-result-rewards { grid-template-columns:1fr 1fr; }.cat-run-proto { max-height:70dvh; } }


/* Phase 13.2 faithful mg2_rhythm source styles — fully scoped. */
.pet-feast-proto{
    --font-display:'Fredoka', sans-serif;
    --font-body:'Nunito', sans-serif;

    --color-bg-top:#3b2a55;
    --color-bg-bot:#1c1330;
    --color-panel:rgba(40,26,64,0.72);
    --color-panel-border:rgba(255,214,158,0.28);
    --color-text:#fff6ea;
    --color-text-muted:#c9b8e0;

    --color-accent:#ffb03b;
    --color-accent2:#ff7a6b;
    --color-perfect:#7CFFB2;
    --color-good:#FFD84A;
    --color-miss:#FF5A6E;

    --lane-w-pct: 30%;

    --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
    --space-6:24px; --space-8:32px;
  }

  .pet-feast-proto *{box-sizing:border-box;}
  .pet-feast-proto, .pet-feast-proto{
    margin:0; padding:0; width:100%; height:100%;
    overflow:hidden; background:#0d0716;
    font-family:var(--font-body);
    -webkit-tap-highlight-color:transparent;
    touch-action:none;
    user-select:none;
  }

  .pet-feast-proto #app{
    position:fixed; inset:0;
    display:flex; align-items:center; justify-content:center;
    background:
      radial-gradient(120% 90% at 50% -10%, #4a3466 0%, transparent 60%),
      linear-gradient(180deg, var(--color-bg-top) 0%, var(--color-bg-bot) 100%);
  }

  .pet-feast-proto #stage{
    position:relative;
    width:100%;
    max-width:430px;
    height:100vh;
    max-height:932px;
    overflow:hidden;
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
    display:flex;
    flex-direction:column;
  }

  .pet-feast-proto canvas#game{
    position:absolute; inset:0;
    width:100%; height:100%;
    display:block;
    touch-action:none;
  }

  .pet-feast-proto /* ---------- HUD ---------- */
  .hud{
    position:absolute; top:0; left:0; right:0;
    z-index:5;
    display:flex; align-items:center; justify-content:space-between;
    padding: max(10px, env(safe-area-inset-top)) var(--space-4) 0;
    pointer-events:none;
  }
  .pet-feast-proto .hud-chip{
    background:var(--color-panel);
    border:1px solid var(--color-panel-border);
    backdrop-filter: blur(8px);
    border-radius:14px;
    padding:6px 12px;
    display:flex; align-items:center; gap:6px;
    font-family:var(--font-body);
    font-weight:800;
    color:var(--color-text);
    font-size:14px;
    text-shadow:0 1px 2px rgba(0,0,0,0.4);
  }
  .pet-feast-proto .hud-chip .ico{ font-size:16px; display:inline-flex; align-items:center; }
  .pet-feast-proto .hud-score{ font-family:var(--font-display); font-size:20px; letter-spacing:0.5px; }
  .pet-feast-proto .hud-combo{
    position:absolute; top:56px; left:50%; transform:translateX(-50%);
    z-index:5; pointer-events:none;
    font-family:var(--font-display);
    font-weight:600;
    color:var(--color-perfect);
    font-size:15px;
    text-shadow:0 2px 8px rgba(0,0,0,0.5);
    opacity:0; transition:opacity .15s;
  }
  .pet-feast-proto .hud-combo.show{ opacity:1; }

  .pet-feast-proto .timerbar-wrap{
    position:absolute; top:0; left:0; right:0; height:6px;
    background:rgba(0,0,0,0.35); z-index:6;
  }
  .pet-feast-proto .timerbar{
    height:100%; width:100%;
    background:linear-gradient(90deg, var(--color-perfect), var(--color-accent));
    transform-origin:left center;
    transition:transform .1s linear;
  }

  .pet-feast-proto /* ---------- Overlays ---------- */
  .overlay{
    position:absolute; inset:0; z-index:20;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    background:radial-gradient(120% 90% at 50% 10%, rgba(75,50,110,1), rgba(13,7,22,1));
    padding: var(--space-6);
    text-align:center;
    gap: var(--space-4);
  }
  .pet-feast-proto .overlay.hidden{ display:none; }

  .pet-feast-proto .game-title{
    font-family:var(--font-display);
    font-weight:700;
    font-size:clamp(28px, 8vw, 40px);
    color:var(--color-text);
    text-shadow:0 4px 0 rgba(0,0,0,0.25), 0 0 24px rgba(255,176,59,0.35);
    margin:0;
    line-height:1.1;
  }
  .pet-feast-proto .game-subtitle{
    font-family:var(--font-body);
    font-weight:700;
    color:var(--color-text-muted);
    font-size:15px;
    max-width:300px;
    line-height:1.5;
    margin:0;
  }

  .pet-feast-proto .cat-hero-wrap{
    width:180px; height:180px;
    display:flex; align-items:center; justify-content:center;
    filter: drop-shadow(0 12px 20px rgba(0,0,0,0.4));
  }
  .pet-feast-proto .cat-hero-wrap img{
    width:100%; height:100%;
    image-rendering:pixelated;
    animation: pet-feast-proto-idleBob 2.2s ease-in-out infinite;
  }
  @keyframes pet-feast-proto-idleBob{
    0%,100%{ transform:translateY(0) rotate(0deg); }
    50%{ transform:translateY(-8px) rotate(-2deg); }
  }

  .pet-feast-proto .lane-legend{
    display:flex; gap:var(--space-3);
    margin-top:var(--space-2);
  }
  .pet-feast-proto .lane-legend-item{
    display:flex; flex-direction:column; align-items:center; gap:4px;
    background:var(--color-panel);
    border:1px solid var(--color-panel-border);
    border-radius:12px;
    padding:8px 10px;
  }
  .pet-feast-proto .lane-legend-item span{
    font-family:var(--font-body); font-weight:800; font-size:11px;
    color:var(--color-text-muted);
  }

  .pet-feast-proto .btn{
    font-family:var(--font-display);
    font-weight:600;
    font-size:18px;
    color:#3a2410;
    background:linear-gradient(180deg, #ffd479, var(--color-accent));
    border:none;
    border-radius:18px;
    padding:16px 40px;
    cursor:pointer;
    box-shadow: 0 6px 0 #c9791a, 0 10px 20px rgba(0,0,0,0.35);
    transition:transform .08s ease, box-shadow .08s ease;
    touch-action:manipulation;
  }
  .pet-feast-proto .btn:active{
    transform:translateY(4px);
    box-shadow: 0 2px 0 #c9791a, 0 4px 10px rgba(0,0,0,0.35);
  }
  .pet-feast-proto .btn.secondary{
    background:linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
    color:var(--color-text);
    box-shadow: 0 6px 0 rgba(0,0,0,0.35), 0 10px 20px rgba(0,0,0,0.3);
    border:1px solid var(--color-panel-border);
  }

  .pet-feast-proto .results-panel{
    background:var(--color-panel);
    border:1px solid var(--color-panel-border);
    border-radius:20px;
    padding:var(--space-6) var(--space-8);
    display:flex; flex-direction:column; gap:var(--space-3);
    min-width:250px;
  }
  .pet-feast-proto .result-row{
    display:flex; justify-content:space-between; gap:var(--space-6);
    font-family:var(--font-body); font-weight:700;
    color:var(--color-text-muted);
    font-size:15px;
  }
  .pet-feast-proto .result-row b{
    font-family:var(--font-display);
    color:var(--color-text);
    font-size:19px;
    font-variant-numeric: tabular-nums;
  }
  .pet-feast-proto .result-rank{
    font-family:var(--font-display);
    font-size:28px;
    color:var(--color-accent);
    text-shadow:0 0 20px rgba(255,176,59,0.5);
    margin:0;
  }

  .pet-feast-proto .countdown-num{
    font-family:var(--font-display);
    font-size:96px;
    color:var(--color-text);
    text-shadow:0 0 30px rgba(255,176,59,0.6);
  }

  .pet-feast-proto #screenflash{
    position:absolute; inset:0; z-index:15; pointer-events:none;
    background:transparent; opacity:0;
  }

  .pet-feast-proto .hint-tap{
    position:absolute; bottom:14px; left:0; right:0;
    text-align:center;
    font-size:12px;
    font-weight:700;
    color:var(--color-text-muted);
    z-index:6;
    pointer-events:none;
    text-shadow:0 1px 3px rgba(0,0,0,0.5);
  }

/* Phase 13.2 faithful mg3_tension source styles — fully scoped. */
.resource-hunt-proto /* ============ DESIGN TOKENS ============ */
:root {
  /* Swamp/cave fantasy palette — deep teal-green murk, glowing gem accent, warm amber danger */
  --color-bg: #0a1210;
  --color-surface: rgba(20, 34, 30, 0.72);
  --color-surface-2: rgba(28, 46, 40, 0.85);
  --color-border: rgba(120, 200, 170, 0.18);
  --color-text: #eaf3ee;
  --color-text-muted: #9db8ac;
  --color-text-faint: #5d7a6e;

  --color-primary: #3ddc97;
  --color-primary-dim: #1f7a56;
  --color-gem: #6ce8ff;
  --color-gem-glow: #a7f3ff;
  --color-danger: #ff4d6a;
  --color-warning: #ffb84d;
  --color-gold: #ffd166;

  --font-display: 'Cinzel', serif;
  --font-body: 'Manrope', sans-serif;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-2xl: 38px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --transition-ui: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.resource-hunt-proto /* ============ BASE ============ */
*, .resource-hunt-proto *::before, .resource-hunt-proto *::after { box-sizing: border-box; margin: 0; padding: 0; }

.resource-hunt-proto {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
}

.resource-hunt-proto {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: radial-gradient(120% 100% at 50% 0%, #10231d 0%, #060c0a 70%, #030504 100%);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.resource-hunt-proto button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
.resource-hunt-proto img, .resource-hunt-proto svg, .resource-hunt-proto canvas { display: block; }

.resource-hunt-proto /* ============ APP SHELL ============ */
#app {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.resource-hunt-proto .screen {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 430px;
  min-width: 340px;
  margin: 0 auto;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.resource-hunt-proto .screen.active { display: flex; }

.resource-hunt-proto .bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 20%, rgba(61, 220, 151, 0.10), transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(4, 10, 8, 0.9), transparent 60%);
  pointer-events: none;
}

.resource-hunt-proto /* ============ START SCREEN ============ */
#screen-start { justify-content: center; align-items: center; padding: var(--space-6); }

.resource-hunt-proto .start-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  max-width: 360px;
}

.resource-hunt-proto .game-logo { color: var(--color-primary); filter: drop-shadow(0 0 14px rgba(61, 220, 151, 0.5)); }

.resource-hunt-proto .game-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 8vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #eafff2 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 24px rgba(61, 220, 151, 0.25);
}

.resource-hunt-proto .game-sub {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  max-width: 320px;
}

.resource-hunt-proto .howto {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  backdrop-filter: blur(10px);
  margin-top: var(--space-2);
}
.resource-hunt-proto .howto-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-align: left;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.resource-hunt-proto .howto-ico { font-size: 20px; flex: none; width: 28px; text-align: center; }

.resource-hunt-proto .btn-primary {
  margin-top: var(--space-2);
  width: 100%;
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
  color: #06231a;
  background: linear-gradient(180deg, #5cf0ac, var(--color-primary));
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(61, 220, 151, 0.35), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform var(--transition-ui), box-shadow var(--transition-ui);
}
.resource-hunt-proto .btn-primary:active { transform: scale(0.96); box-shadow: 0 4px 12px rgba(61, 220, 151, 0.3); }

.resource-hunt-proto .game-hint { color: var(--color-text-faint); font-size: var(--text-xs); }

.resource-hunt-proto /* ============ GAME SCREEN ============ */
#screen-game {
  background: #060c0a;
  touch-action: none;
}

.resource-hunt-proto .hud-top {
  position: relative;
  z-index: 3;
  display: flex;
  gap: var(--space-2);
  padding: max(var(--space-3), env(safe-area-inset-top)) var(--space-3) var(--space-2);
}
.resource-hunt-proto .hud-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-1);
  backdrop-filter: blur(8px);
}
.resource-hunt-proto .hud-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
}
.resource-hunt-proto .hud-value {
  font-size: var(--text-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text);
}
.resource-hunt-proto .hud-chip-timer .hud-value { color: var(--color-gold); }

.resource-hunt-proto #game-canvas {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.resource-hunt-proto .hold-zone {
  position: relative;
  z-index: 3;
  margin: 0 var(--space-3) max(var(--space-4), env(safe-area-inset-bottom));
  height: 76px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(61,220,151,0.16), rgba(61,220,151,0.06));
  border: 1.5px solid rgba(61, 220, 151, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-ui), border-color var(--transition-ui), transform 90ms ease;
}
.resource-hunt-proto .hold-zone.pressed {
  background: linear-gradient(180deg, rgba(61,220,151,0.32), rgba(61,220,151,0.12));
  border-color: rgba(61, 220, 151, 0.7);
  transform: scale(0.98);
}
.resource-hunt-proto .hold-label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--text-sm);
  letter-spacing: 0.12em;
  color: var(--color-primary);
  text-shadow: 0 0 12px rgba(61, 220, 151, 0.5);
  pointer-events: none;
}

.resource-hunt-proto /* Ambush overlay */
.ambush-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  background: rgba(20, 4, 8, 0.35);
  pointer-events: none;
}
.resource-hunt-proto .ambush-flash.hidden { display: none; }
.resource-hunt-proto .ambush-flash.visible { pointer-events: auto; }
.resource-hunt-proto .ambush-banner {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-2xl);
  color: var(--color-danger);
  text-shadow: 0 0 20px rgba(255, 77, 106, 0.8), 0 2px 8px rgba(0,0,0,0.6);
  letter-spacing: 0.05em;
  animation: resource-hunt-proto-ambushPulse 0.5s ease-in-out infinite;
}
@keyframes resource-hunt-proto-ambushPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.resource-hunt-proto .ambush-target {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  filter: drop-shadow(0 0 18px rgba(255, 77, 106, 0.6));
  animation: resource-hunt-proto-ambushSpin 3s linear infinite;
}
@keyframes resource-hunt-proto-ambushSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.resource-hunt-proto /* ============ RESULT SCREEN ============ */
#screen-result {
  justify-content: center;
  align-items: center;
  padding: var(--space-6);
}
.resource-hunt-proto .result-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  width: 100%;
  max-width: 340px;
}
.resource-hunt-proto .result-quality {
  font-size: 56px;
  filter: drop-shadow(0 0 24px rgba(61, 220, 151, 0.5));
  animation: resource-hunt-proto-floatIcon 2.4s ease-in-out infinite;
}
@keyframes resource-hunt-proto-floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.resource-hunt-proto .result-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-text);
}
.resource-hunt-proto .result-quality-label {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 700;
}
.resource-hunt-proto .result-stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-2);
}
.resource-hunt-proto .result-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-1) 0;
}
.resource-hunt-proto .result-stat-label { color: var(--color-text-muted); font-size: var(--text-sm); }
.resource-hunt-proto .result-stat-value {
  font-weight: 800;
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text);
}

.resource-hunt-proto /* ============ RESPONSIVE ============ */
@media (max-width: 380px) {
  .game-title { font-size: 1.7rem; }
  .howto { padding: var(--space-3); }
  .hold-zone { height: 68px; }
}

@media (min-height: 780px) {
  .resource-hunt-proto .hold-zone { height: 88px; }
}


/* Phase 13.2 faithful mg4_dodge source styles — fully scoped. */
.dungeon-dodge-proto *, .dungeon-dodge-proto *::before, .dungeon-dodge-proto *::after { box-sizing: border-box; margin: 0; padding: 0; }

.dungeon-dodge-proto {
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;

  --color-bg: #0a0810;
  --color-void: #050409;
  --color-surface: rgba(20, 16, 30, 0.72);
  --color-surface-2: rgba(30, 24, 44, 0.85);
  --color-border: rgba(150, 120, 200, 0.28);
  --color-text: #ece7f5;
  --color-text-muted: #a79cc4;
  --color-primary: #7d5fff;
  --color-primary-hover: #9376ff;
  --color-ember: #ff7a4d;
  --color-danger: #ff3b5c;
  --color-success: #3ee6a8;
  --color-gold: #f0c34d;
  --shield: #5fd0ff;

  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --transition-ui: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.dungeon-dodge-proto, .dungeon-dodge-proto {
  width: 100%;
  height: 100%;
  background: var(--color-void);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}

.dungeon-dodge-proto {
  font-family: var(--font-body);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dungeon-dodge-proto .game-shell {
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(125, 95, 255, 0.10), transparent 60%),
    var(--color-void);
}

.dungeon-dodge-proto .stage {
  position: relative;
  width: min(430px, 100vw);
  height: 100dvh;
  max-height: 900px;
  background: var(--color-bg);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
  isolation: isolate;
}

@media (min-height: 901px) {
  .dungeon-dodge-proto .stage { border-radius: var(--radius-lg); }
}

.dungeon-dodge-proto #gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.dungeon-dodge-proto /* ---------- Touch zones ---------- */
.touch-zones {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 5;
}
.dungeon-dodge-proto .touch-zone {
  flex: 1;
  height: 100%;
}

.dungeon-dodge-proto /* ---------- HUD ---------- */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: max(12px, env(safe-area-inset-top)) 14px 8px;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dungeon-dodge-proto .hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dungeon-dodge-proto .hud-lives {
  display: flex;
  gap: 4px;
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  min-width: 76px;
}
.dungeon-dodge-proto .hud-lives .heart {
  transition: transform var(--transition-ui);
}
.dungeon-dodge-proto .hud-lives .heart--lost {
  opacity: 0.25;
  transform: scale(0.8);
}

.dungeon-dodge-proto .hud-timer {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 18px;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 10px rgba(125,95,255,0.35);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  backdrop-filter: blur(8px);
}

.dungeon-dodge-proto .hud-streak {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 76px;
  justify-content: flex-end;
  font-size: 13px;
  color: var(--color-text-muted);
}
.dungeon-dodge-proto .hud-streak-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dungeon-dodge-proto .hud-streak-value {
  font-weight: 800;
  font-size: 16px;
  color: var(--color-gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.dungeon-dodge-proto .hud-shield-bar {
  position: relative;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  border: 1px solid rgba(95, 208, 255, 0.4);
}
.dungeon-dodge-proto .hud-shield-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--shield), #a6f0ff);
  width: 100%;
  transform-origin: left;
  box-shadow: 0 0 10px rgba(95,208,255,0.7);
}
.dungeon-dodge-proto .hud-shield-label {
  position: absolute;
  right: 8px;
  top: -16px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--shield);
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

.dungeon-dodge-proto /* ---------- Overlays ---------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse 100% 80% at 50% 30%, rgba(60, 40, 100, 0.55), rgba(4,3,8,0.92));
  backdrop-filter: blur(3px);
}

.dungeon-dodge-proto .overlay-card {
  width: 100%;
  max-width: 360px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(125,95,255,0.08) inset;
  animation: dungeon-dodge-proto-cardIn 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dungeon-dodge-proto-cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dungeon-dodge-proto .overlay-emblem {
  font-size: 40px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(125,95,255,0.5));
}
.dungeon-dodge-proto .overlay-emblem--dim {
  filter: drop-shadow(0 4px 12px rgba(255,59,92,0.45));
}

.dungeon-dodge-proto .overlay-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 7vw, 2.4rem);
  line-height: 1.12;
  color: var(--color-text);
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(125,95,255,0.35);
}

.dungeon-dodge-proto .overlay-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

.dungeon-dodge-proto .overlay-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
  text-align: left;
}
.dungeon-dodge-proto .control-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}
.dungeon-dodge-proto .control-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.dungeon-dodge-proto .btn-primary {
  width: 100%;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #0a0810;
  background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
  box-shadow: 0 8px 24px rgba(125,95,255,0.4);
  cursor: pointer;
  transition: transform var(--transition-ui), box-shadow var(--transition-ui), filter var(--transition-ui);
}
.dungeon-dodge-proto .btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(125,95,255,0.5);
}
.dungeon-dodge-proto .btn-primary:active {
  transform: translateY(0px) scale(0.98);
}

.dungeon-dodge-proto .result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.dungeon-dodge-proto .result-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dungeon-dodge-proto .result-stat--score {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(125,95,255,0.18), rgba(240,195,77,0.10));
  border-color: rgba(240,195,77,0.35);
}
.dungeon-dodge-proto .result-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.dungeon-dodge-proto .result-stat--score .result-value {
  font-size: 30px;
  color: var(--color-gold);
}
.dungeon-dodge-proto .result-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.dungeon-dodge-proto /* ---------- Countdown ---------- */
.countdown {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 96px;
  font-weight: 900;
  color: var(--color-text);
  text-shadow: 0 0 30px rgba(125,95,255,0.7);
  background: rgba(4,3,8,0.5);
  pointer-events: none;
}

.dungeon-dodge-proto [hidden] { display: none !important; }


/* Phase 13.2 faithful mg5_match source styles — fully scoped. */
.rune-shards-proto /* ===== base.css reset (per skill) ===== */
*, .rune-shards-proto *::before, .rune-shards-proto *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rune-shards-proto {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.rune-shards-proto img, .rune-shards-proto picture, .rune-shards-proto video, .rune-shards-proto canvas, .rune-shards-proto svg { display: block; max-width: 100%; height: auto; }
.rune-shards-proto button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
.rune-shards-proto ::selection { background: rgba(255,255,255,0.2); }

.rune-shards-proto /* ===== design tokens ===== */
:root {
  --font-display: 'Cabinet Grotesk', 'Georgia', serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;

  /* Runic dusk palette — deep indigo dungeon + jewel-tone runes */
  --color-bg: #120a24;
  --color-bg-2: #1b1038;
  --color-surface: rgba(255,255,255,0.06);
  --color-surface-strong: rgba(255,255,255,0.1);
  --color-border: rgba(255,255,255,0.14);
  --color-text: #f3ecff;
  --color-text-muted: #b7a8db;
  --color-text-faint: #7c6ca3;

  --color-accent: #f6c453;      /* gold — raw_gem crystal accent, CTAs */
  --color-accent-hover: #ffd76e;

  /* Gem colors — bright, distinguishable, jewel-toned (armor_scrap/raw_gem craft theme) */
  --gem-ruby: #ff4d6d;
  --gem-ruby-lt: #ff8fa3;
  --gem-sapphire: #3da5ff;
  --gem-sapphire-lt: #8fcaff;
  --gem-emerald: #39e08a;
  --gem-emerald-lt: #8ff7bf;
  --gem-amber: #ffb020;
  --gem-amber-lt: #ffd280;
  --gem-amethyst: #b366ff;
  --gem-amethyst-lt: #d9a8ff;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;

  --radius-sm: 8px; --radius-md: 14px; --radius-lg: 20px; --radius-full: 999px;

  --transition-ui: 180ms cubic-bezier(0.16,1,0.3,1);

  --text-xs: 12px; --text-sm: 14px; --text-base: 16px;
  --text-lg: 20px; --text-xl: 28px; --text-2xl: 40px;
  
}

@media (prefers-reduced-motion: reduce) {
  .rune-shards-proto *, .rune-shards-proto *::before, .rune-shards-proto *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.rune-shards-proto {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--color-text);
  background: radial-gradient(circle at 50% 0%, var(--color-bg-2), var(--color-bg) 70%);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.rune-shards-proto .stage {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-width: 340px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(179,102,255,0.16), transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(61,165,255,0.14), transparent 55%),
    var(--color-bg);
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.rune-shards-proto /* subtle rune-carved background texture */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

.rune-shards-proto .screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}
.rune-shards-proto .screen.hidden { display: none; }

.rune-shards-proto /* ===== START SCREEN ===== */
#screen-start {
  justify-content: center;
  padding: var(--space-6) var(--space-6) var(--space-10);
  gap: var(--space-5);
  text-align: center;
  position: relative;
}

.rune-shards-proto .glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
}
.rune-shards-proto .glow-1 { width: 220px; height: 220px; background: var(--gem-amethyst); top: -60px; left: -60px; }
.rune-shards-proto .glow-2 { width: 200px; height: 200px; background: var(--gem-sapphire); bottom: -40px; right: -60px; }

.rune-shards-proto .title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-2xl);
  line-height: 1.05;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff, var(--color-accent-hover) 60%, var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 24px rgba(246,196,83,0.25);
  z-index: 2;
}

.rune-shards-proto .subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 300px;
  z-index: 2;
}

.rune-shards-proto .hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  z-index: 2;
}

.rune-shards-proto .cat-wrap { position: relative; z-index: 2; }
.rune-shards-proto .start-cat { width: 190px; height: 190px; margin: var(--space-4) 0; }
.rune-shards-proto .cat-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.45));
}

@keyframes rune-shards-proto-cat-idle-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.01); }
}
.rune-shards-proto #cat-start { animation: rune-shards-proto-cat-idle-bob 3.2s ease-in-out infinite; }

.rune-shards-proto .btn-primary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: #241206;
  background: linear-gradient(180deg, var(--color-accent-hover), var(--color-accent));
  padding: var(--space-4) var(--space-10);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(246,196,83,0.35), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: transform var(--transition-ui), box-shadow var(--transition-ui);
  z-index: 2;
}
.rune-shards-proto .btn-primary:active {
  transform: scale(0.95);
  box-shadow: 0 4px 12px rgba(246,196,83,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
}

.rune-shards-proto /* ===== GAME SCREEN ===== */
#screen-game {
  padding: var(--space-3) var(--space-3) var(--space-4);
  gap: var(--space-2);
  justify-content: flex-start;
}

.rune-shards-proto .hud {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  z-index: 3;
}
.rune-shards-proto .hud-block {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  text-align: center;
  backdrop-filter: blur(8px);
}
.rune-shards-proto .hud-label {
  display: block;
  font-size: 11px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.rune-shards-proto .hud-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text);
}
.rune-shards-proto .hud-timer .hud-value { color: var(--color-accent); }
.rune-shards-proto .hud-timer.time-low .hud-value { color: var(--gem-ruby); }

.rune-shards-proto .timer-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  z-index: 3;
}
.rune-shards-proto .timer-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gem-emerald), var(--color-accent));
  border-radius: var(--radius-full);
  transform-origin: left center;
  transition: transform 0.2s linear, background 0.3s ease;
}
.rune-shards-proto .timer-bar-fill.low { background: linear-gradient(90deg, var(--gem-amber), var(--gem-ruby)); }

.rune-shards-proto .board-area {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.rune-shards-proto #game-canvas {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(0,0,0,0.15));
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.03);
  touch-action: none;
}

.rune-shards-proto .game-cat {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 56px;
  height: 56px;
  pointer-events: none;
  z-index: 4;
}
.rune-shards-proto .cat-shadow {
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 34px;
  height: 8px;
  background: radial-gradient(rgba(0,0,0,0.35), transparent 70%);
  border-radius: 50%;
  transform: translateX(-50%);
}
.rune-shards-proto #cat-game {
  animation: rune-shards-proto-cat-idle-bob 2.6s ease-in-out infinite;
  transform-origin: center bottom;
}
.rune-shards-proto #cat-game.react-happy { animation: rune-shards-proto-cat-happy 0.6s ease-out; }
.rune-shards-proto #cat-game.react-wow { animation: rune-shards-proto-cat-wow 0.7s ease-out; }

@keyframes rune-shards-proto-cat-happy {
  0% { transform: translateY(0) scale(1) rotate(0deg); }
  25% { transform: translateY(-14px) scale(1.12) rotate(-6deg); }
  50% { transform: translateY(-2px) scale(1.05) rotate(5deg); }
  75% { transform: translateY(-10px) scale(1.1) rotate(-3deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes rune-shards-proto-cat-wow {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.25) rotate(-8deg); }
  40% { transform: scale(0.92) rotate(6deg); }
  60% { transform: scale(1.18) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.rune-shards-proto .combo-banner {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  text-align: center;
  color: var(--color-accent);
  text-shadow: 0 0 24px rgba(246,196,83,0.7), 0 4px 12px rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}
.rune-shards-proto .combo-banner.show {
  animation: rune-shards-proto-combo-pop 1.1s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes rune-shards-proto-combo-pop {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.4) rotate(-4deg); }
  15% { opacity: 1; transform: translate(-50%, -55%) scale(1.15) rotate(2deg); }
  30% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  80% { opacity: 1; transform: translate(-50%, -55%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(0.9) rotate(0deg); }
}

.rune-shards-proto /* ===== RESULT SCREEN ===== */
#screen-result {
  justify-content: center;
  padding: var(--space-6);
  gap: var(--space-3);
  text-align: center;
}
.rune-shards-proto .result-cat { width: 120px; height: 120px; }
.rune-shards-proto #cat-result { animation: rune-shards-proto-cat-happy 1.4s ease-in-out infinite; }

.rune-shards-proto .result-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-text);
}

.rune-shards-proto .result-card {
  width: 100%;
  max-width: 320px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.rune-shards-proto .result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.rune-shards-proto .result-row:last-child { border-bottom: none; padding-bottom: 0; }
.rune-shards-proto .result-label { font-size: var(--text-sm); color: var(--color-text-muted); }
.rune-shards-proto .result-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}

.rune-shards-proto .result-quip {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 300px;
}

.rune-shards-proto /* floating score popups drawn via canvas, .rune-shards-proto no DOM needed */

@media (max-height: 700px) {
  .start-cat { width: 130px; height: 130px; }
  .title { font-size: clamp(1.8rem, 8vw, 2.3rem); }
}

.rune-shards-proto /* Decorative rune row to balance start screen composition on tall viewports */
.rune-row {
  display: flex;
  gap: var(--space-3);
  z-index: 2;
  margin-top: var(--space-2);
}
.rune-shards-proto .rune-row .rune-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  transform: rotate(45deg);
  opacity: 0.85;
  animation: rune-shards-proto-rune-float 2.4s ease-in-out infinite;
}
.rune-shards-proto .rune-row .rune-dot:nth-child(1) { background: var(--gem-ruby); animation-delay: 0s; }
.rune-shards-proto .rune-row .rune-dot:nth-child(2) { background: var(--gem-sapphire); animation-delay: 0.15s; }
.rune-shards-proto .rune-row .rune-dot:nth-child(3) { background: var(--gem-emerald); animation-delay: 0.3s; }
.rune-shards-proto .rune-row .rune-dot:nth-child(4) { background: var(--gem-amber); animation-delay: 0.45s; }
.rune-shards-proto .rune-row .rune-dot:nth-child(5) { background: var(--gem-amethyst); animation-delay: 0.6s; }
@keyframes rune-shards-proto-rune-float {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(-8px); }
}

/* Phase 14: tournament arena and social profiles inherit the app's panel palette while giving
   time-sensitive tournament data a stronger visual hierarchy. */
.tournaments-screen,.friends-screen { display:grid; gap:14px; }
.tournaments-screen .screen-head,.friends-screen .screen-head { margin-bottom:0; }
.tournament-group { display:grid; gap:9px; }
.tournament-group>h2 { margin:4px 2px 0; font-size:15px; color:var(--muted); }
.tournament-list { display:grid; gap:12px; }
.tournament-card { position:relative; display:grid; gap:13px; padding:17px; overflow:hidden; border:1px solid var(--line); border-radius:20px; background:linear-gradient(145deg,rgba(36,43,56,.98),rgba(26,31,42,.97)); box-shadow:0 12px 32px rgba(0,0,0,.16); cursor:pointer; }
.tournament-card::after { content:'🏆'; position:absolute; right:-10px; top:-16px; opacity:.08; font-size:94px; pointer-events:none; }
.tournament-card.active { border-color:rgba(240,188,113,.48); background:linear-gradient(145deg,rgba(61,53,38,.72),rgba(26,31,42,.98)); }
.tournament-card.scheduled { border-color:rgba(140,168,255,.3); }
.tournament-card.finished { opacity:.82; }
.tournament-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; position:relative; z-index:1; }
.tournament-card h2 { margin:0; font-size:20px; letter-spacing:-.025em; }
.tournament-card>p { position:relative; z-index:1; margin:0; color:var(--muted); font-size:13px; line-height:1.45; }
.tournament-status { flex:0 0 auto; padding:5px 8px; border-radius:99px; background:rgba(255,255,255,.08); color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.tournament-status.active { color:#1d1710; background:#f0bc71; }.tournament-status.scheduled { color:#101725; background:var(--accent-2); }.tournament-status.finished { color:#132219; background:var(--accent); }
.tournament-timer { position:relative; z-index:1; display:flex; align-items:end; justify-content:space-between; gap:12px; padding:12px 13px; border:1px solid rgba(240,188,113,.25); border-radius:14px; background:rgba(0,0,0,.16); }
.tournament-timer span,.tournament-meta small { color:var(--muted); font-size:11px; }.tournament-timer strong { color:#f4d39d; font:800 21px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:-.05em; white-space:nowrap; }
.tournament-meta { position:relative; z-index:1; display:grid; gap:5px; }.tournament-meta b { font-size:15px; }
.tournament-prize { display:flex; flex-wrap:wrap; gap:8px; font-size:13px; font-weight:750; }.tournament-prize span { white-space:nowrap; }
.profile-link { min-width:0; padding:0; overflow:hidden; border:0; background:transparent; color:inherit; font:inherit; font-weight:inherit; text-align:left; text-overflow:ellipsis; white-space:nowrap; }.profile-link:hover,.profile-link:focus-visible { color:var(--accent); text-decoration:underline; outline:none; }
/* Фаза 23.1: .item-card button { background:var(--accent); padding:12px 15px; ... } (общая заготовка
   под кнопки покупки/действия) выигрывает у .profile-link по специфичности, когда
   имя игрока-цели рендерится как <button class="profile-link"> внутри .item-card (async-рейд,
   pvpTargetsView) -- имя превращалось в зелёную кнопку-пилюлю вместо простой ссылки, как в концепте.
   Двойной класс-селектор восстанавливает исходный вид profile-link внутри .item-card. */
.item-card .profile-link { background:transparent; color:inherit; padding:0; min-height:auto; border-radius:0; font-weight:inherit; }
.tournament-join,.profile-actions>button,.friend-actions button { min-height:43px; padding:10px 13px; border-radius:11px; background:var(--accent); color:#132219; font-size:13px; font-weight:800; }.tournament-joined,.tournament-closed { position:relative; z-index:1; padding:10px 12px; border-radius:11px; background:rgba(126,229,173,.1); color:var(--accent); font-size:12px; font-weight:750; }.tournament-closed { background:rgba(255,255,255,.06); color:var(--muted); }.tournament-open-hint { position:relative; z-index:1; color:var(--muted); font-size:10px; text-align:center; }
.tournament-leaderboard { display:grid; gap:14px; }.tournament-leaderboard-hero { display:grid; gap:8px; padding:17px; border:1px solid rgba(240,188,113,.28); border-radius:17px; background:linear-gradient(145deg,rgba(61,53,38,.68),rgba(26,31,42,.95)); }.tournament-leaderboard-hero h2 { margin:0; font-size:21px; }
/* Phase 17.1: card-style leaderboard rows with a rank badge (medal color for top 3) instead of
   the old plain grid table -- gives the top ranks clear visual weight and reads better at the
   new compact modal width. */
.leaderboard-table { display:grid; gap:7px; }
.leaderboard-row { width:100%; display:grid; grid-template-columns:40px minmax(0,1fr) auto; gap:10px; align-items:center; min-height:54px; padding:9px 12px; border:1px solid var(--line); border-radius:13px; background:rgba(0,0,0,.14); color:var(--text); text-align:left; font-size:12px; transition:background .12s ease,border-color .12s ease; }
.leaderboard-row:hover { background:rgba(140,168,255,.08); border-color:rgba(140,168,255,.22); }
.leaderboard-row.mine { background:rgba(126,229,173,.12); border-color:rgba(126,229,173,.4); box-shadow:inset 3px 0 var(--accent); }
.leaderboard-rank { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; background:var(--surface-2); color:var(--muted); font-size:13px; font-weight:800; }
.leaderboard-rank.gold { background:linear-gradient(155deg,#ffe3a1,#e0a53a); color:#3a2a05; box-shadow:0 3px 10px rgba(224,165,58,.35); }
.leaderboard-rank.silver { background:linear-gradient(155deg,#eef2f8,#a9b4c4); color:#232a35; box-shadow:0 3px 10px rgba(169,180,196,.28); }
.leaderboard-rank.bronze { background:linear-gradient(155deg,#e7b384,#a9673a); color:#301d0c; box-shadow:0 3px 10px rgba(169,103,58,.3); }
.leaderboard-player { display:grid; gap:2px; min-width:0; }
.leaderboard-player strong { font-size:13.5px; letter-spacing:-.01em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.leaderboard-player small { color:var(--muted); font-size:10.5px; }
.leaderboard-reward { justify-self:end; padding:4px 8px; border-radius:8px; background:rgba(240,188,113,.12); color:#f4d39d; font-size:10.5px; font-weight:750; white-space:nowrap; }
.leaderboard-row.gold .leaderboard-player strong { color:#f4d39d; }
/* Фаза 17.3: экран сезонной лиги -- переиспользует .leaderboard-row/.tournament-group из турнирного
   экрана (Фаза 17.1), добавляя только героический блок с бейджем текущего тира/прогресс-баром и
   маленький бейдж тира внутри каждой строки таблицы лидеров. */
.league-screen { display:grid; gap:14px; }
.league-screen .screen-head { margin-bottom:0; }
.league-hero { display:flex; gap:16px; align-items:center; padding:18px; border:1px solid var(--line); border-radius:20px; background:linear-gradient(145deg,rgba(36,43,56,.98),rgba(26,31,42,.97)); box-shadow:0 12px 32px rgba(0,0,0,.16); }
.league-badge { width:84px; height:84px; flex:0 0 auto; object-fit:contain; }
.league-hero-info { flex:1; min-width:0; display:grid; gap:8px; }
.league-stats-row { display:flex; gap:14px; font-size:13px; color:var(--muted); font-weight:750; }
.league-stats-row span:first-child { color:var(--text); }
.league-record { color:var(--muted); font-size:12px; }
.league-progress { display:grid; gap:5px; }
.league-progress-track { height:10px; border-radius:8px; overflow:hidden; background:#11151d; }
.league-progress-track i { display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:inherit; }
.league-progress-labels { color:var(--muted); font-size:11px; }
.league-progress--max { padding:6px 0; color:var(--accent); font-size:12px; font-weight:750; }
.leaderboard-player.with-badge { display:flex; align-items:center; gap:8px; }
.leaderboard-player.with-badge>span { display:grid; gap:2px; min-width:0; }
.league-row-badge { width:30px; height:30px; flex:0 0 auto; object-fit:contain; }
/* Фикс (лига, баги #3-#5): стили для иконки-картинки кубка (замена эмодзи), кнопок в шапке экрана,
   строки предварительного приза в таблице лидеров, призового фонда сезона и инфо-модалки по тирам.
*/
.screen-head-actions { display:flex; gap:8px; align-items:center; }
.league-trophy-icon { width:18px; height:18px; object-fit:contain; vertical-align:-3px; margin-right:4px; }
.league-progress-icon { width:14px; height:14px; object-fit:contain; vertical-align:-2px; margin:0 2px; }
.league-info-icon { width:14px; height:14px; object-fit:contain; vertical-align:-2px; margin-left:3px; }
.leaderboard-reward { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.leaderboard-prize { color:#f4d39d; font-size:10.5px; font-weight:750; }
.league-prize-pool { padding:11px 14px; border-radius:14px; background:rgba(240,188,113,.08); border:1px solid rgba(240,188,113,.22); color:#f4d39d; }
.league-info-table { width:100%; border-collapse:collapse; font-size:12px; }
.league-info-table th { text-align:left; padding:8px 6px; color:var(--muted); font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; border-bottom:1px solid var(--line); white-space:nowrap; }
.league-info-table td { padding:8px 6px; border-bottom:1px solid rgba(255,255,255,.06); white-space:nowrap; }
.league-info-tier { display:flex; align-items:center; gap:8px; font-weight:700; }
.league-info-badge { width:26px; height:26px; flex:0 0 auto; object-fit:contain; }
.league-info-table .positive { color:#7ee5ad; font-weight:750; }
.league-info-table .negative { color:#ff8d91; font-weight:750; }
.league-info-topn { margin-top:16px; }
.league-info-topn h3 { margin:0 0 8px; font-size:13px; }
.league-info-topn ul { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.league-info-topn li { display:flex; justify-content:space-between; padding:7px 10px; border-radius:10px; background:rgba(0,0,0,.14); border:1px solid var(--line); font-size:12px; }
@media (max-width:559.98px) {
  .league-info-table { display:block; overflow-x:auto; }
  /* Фикс: закрепляем колонку с названием лиги слева при горизонтальном скролле,
     чтобы игрок не терял контекст (какому рангу принадлежит строка), пока
     смотрит колонки "за поражение"/"награда за сезон" за пределами экрана. */
  .league-info-table th:first-child,
  .league-info-table td:first-child { position:sticky; left:0; z-index:2; background:var(--bg); box-shadow:2px 0 6px rgba(0,0,0,.35); }
}
.friends-list { display:grid; gap:10px; }.friend-card { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:16px; background:linear-gradient(145deg,rgba(36,43,56,.94),rgba(26,31,42,.94)); }.friend-card h2 { margin:0; font-size:16px; }.friend-card p { margin:4px 0 0; color:var(--muted); font-size:12px; }.friend-online { width:10px; height:10px; border-radius:50%; background:var(--muted); opacity:.45; }.friend-online.online { background:var(--accent); opacity:1; box-shadow:0 0 0 4px rgba(126,229,173,.13); }.friend-actions { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr 1fr; gap:7px; }.friend-actions button { min-width:0; padding:9px 6px; font-size:11px; }
.secondary-action { background:var(--surface-2)!important; color:var(--text)!important; border:1px solid var(--line)!important; }.danger-action { background:rgba(255,141,145,.14)!important; color:#ffc1c4!important; border:1px solid rgba(255,141,145,.3)!important; }
.social-profile { display:grid; gap:14px; }.profile-showcase { display:grid; place-items:center; min-height:230px; overflow:hidden; border:1px solid rgba(140,168,255,.28); border-radius:20px; background:radial-gradient(circle at 50% 28%,rgba(140,168,255,.22),transparent 56%),linear-gradient(145deg,rgba(36,43,56,.95),rgba(16,19,26,.95)); }.profile-showcase img,.profile-showcase .pet-layers { width:min(100%,280px); aspect-ratio:1; object-fit:contain; }.profile-title h2 { margin:4px 0; font-size:25px; letter-spacing:-.035em; }.profile-title p { margin:0 0 8px; color:var(--muted); }.profile-equipment { display:grid; grid-template-columns:1fr 1fr; gap:7px; padding:13px; border-radius:14px; background:rgba(0,0,0,.14); border:1px solid var(--line); font-size:11px; }.profile-equipment>span { grid-column:1/-1; color:var(--muted); font-weight:800; text-transform:uppercase; letter-spacing:.07em; }.profile-equipment b { color:var(--text); font-size:11px; }.profile-actions { display:grid; gap:8px; }.profile-request-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.profile-request-actions small { grid-column:1/-1; color:var(--muted); font-size:11px; text-align:center; }.profile-actions button:disabled { opacity:.55; cursor:not-allowed; }
@media (min-width:560px) { .friend-card { grid-template-columns:auto minmax(0,1fr) auto; }.friend-actions { grid-column:auto; grid-template-columns:repeat(3,minmax(76px,auto)); }.profile-equipment { grid-template-columns:repeat(3,1fr); }.tournament-card { padding:19px; } }
@media (max-width:559.98px) {
  .tournament-card { gap:10px; padding:14px; }
  .tournament-card h2 { font-size:18px; }
  .tournament-timer { padding:10px 11px; }
  .tournament-timer strong { font-size:19px; }
  .tournaments-screen { padding-bottom:76px; }
  .league-screen { padding-bottom:76px; }
  .league-hero { flex-direction:column; text-align:center; }
  .league-stats-row { justify-content:center; }
}

/* Phase 14.3: custodial TON wallet uses the established card surfaces and compact mobile rows. */
.wallet-screen { display:grid; gap:14px; min-width:0; }
.wallet-screen .screen-head { margin-bottom:0; }
.wallet-network-badge { padding:10px 12px; border:1px solid var(--line); border-radius:12px; font-size:12px; font-weight:750; line-height:1.4; }
.wallet-network-badge.testnet { border-color:rgba(240,188,113,.45); background:rgba(240,188,113,.12); color:#f4d39d; }
.wallet-network-badge.mainnet { border-color:rgba(126,229,173,.3); background:rgba(126,229,173,.1); color:var(--accent); }
.wallet-balance-card,.wallet-deposit-card,.wallet-history-list { display:grid; gap:13px; min-width:0; padding:17px; border:1px solid var(--line); border-radius:20px; background:linear-gradient(145deg,rgba(36,43,56,.94),rgba(26,31,42,.94)); box-shadow:0 12px 32px rgba(0,0,0,.14); }
.wallet-balance-card { border-color:rgba(126,229,173,.28); background:radial-gradient(circle at 92% 9%,rgba(126,229,173,.14),transparent 36%),linear-gradient(145deg,rgba(36,43,56,.94),rgba(26,31,42,.94)); }
.wallet-balance-card>span,.wallet-address-row small,.wallet-memo-row small,.wallet-history-main small,.wallet-history-amount small { color:var(--muted); font-size:11px; }
.wallet-balance-card>strong { color:var(--accent); font:800 clamp(30px,8vw,42px) ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:-.07em; line-height:1; font-variant-numeric:tabular-nums; }
.wallet-balance-card>strong small { color:var(--text); font-family:inherit; font-size:15px; font-weight:700; letter-spacing:0; }
.wallet-balance-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.45; }
.wallet-deposit-card h2,.wallet-history-title h2 { margin:3px 0 0; font-size:18px; letter-spacing:-.025em; }
.wallet-address-row,.wallet-memo-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:14px; background:rgba(0,0,0,.13); }
.wallet-address-row>div,.wallet-memo-row>div { display:grid; gap:5px; min-width:0; }
.wallet-address-row code { display:block; overflow:hidden; color:var(--text); font:650 13px ui-monospace,SFMono-Regular,Menlo,monospace; text-overflow:ellipsis; white-space:nowrap; }
.wallet-memo-row { border-color:rgba(126,229,173,.28); background:rgba(126,229,173,.08); }
.wallet-memo-row strong { color:var(--accent); font:800 18px ui-monospace,SFMono-Regular,Menlo,monospace; word-break:break-all; }
.wallet-address-row button,.wallet-memo-row button,.wallet-withdraw-form button { min-height:42px; padding:10px 12px; border-radius:11px; background:var(--accent); color:#132219; font-size:12px; font-weight:800; }
.wallet-deposit-warning { margin:0; color:#f4d39d; font-size:12px; line-height:1.45; }
.wallet-withdraw-form { display:grid; gap:11px; }
.wallet-withdraw-form label { display:grid; gap:6px; color:var(--muted); font-size:12px; font-weight:700; }
.wallet-withdraw-form input { width:100%; min-width:0; min-height:44px; padding:11px 12px; border:1px solid var(--line); border-radius:11px; outline:0; background:var(--surface-2); color:var(--text); font:500 14px ui-monospace,SFMono-Regular,Menlo,monospace; }
.wallet-withdraw-form input:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(126,229,173,.12); }
.wallet-withdraw-form button:disabled { opacity:.55; cursor:wait; }
.wallet-history-list { gap:0; padding:0; overflow:hidden; }
.wallet-history-title { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 17px 13px; }
.wallet-history-title>span { min-width:27px; padding:4px 7px; border-radius:99px; background:var(--surface-2); color:var(--muted); font-size:11px; font-weight:800; text-align:center; }
.wallet-history-list>.empty { margin:0; padding:34px 12px; border-top:1px solid var(--line); }
.wallet-history-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; padding:12px 17px; border-top:1px solid var(--line); }
.wallet-history-main,.wallet-history-amount { display:grid; gap:4px; min-width:0; }
.wallet-history-main strong { overflow:hidden; color:var(--text); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.wallet-history-main small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wallet-history-amount { text-align:right; font-variant-numeric:tabular-nums; }
.wallet-history-amount strong { font-size:13px; white-space:nowrap; }
.wallet-history-amount.positive strong { color:var(--accent); }
.wallet-history-amount.negative strong { color:#ffc1c4; }
@media (min-width:560px) {
  .wallet-balance-card,.wallet-deposit-card { padding:19px; }
  .wallet-withdraw-form { grid-template-columns:minmax(0,1fr) 150px auto; align-items:end; }
  .wallet-withdraw-form button { min-width:150px; }
}
@media (max-width:559.98px) {
  .wallet-screen { padding-top:76px; }
  .wallet-screen .screen-head { scroll-margin-top:76px; }
  .wallet-balance-card,.wallet-deposit-card { padding:15px; }
  .wallet-address-row,.wallet-memo-row { padding:10px; }
  .wallet-history-row { padding:11px 13px; }
  .wallet-history-title { padding:14px 13px 12px; }
}

/* Фаза 15.1: офлайн-экспедиции -- панель выбора длительности на экране Городских ворот, плюс
   полноэкранный блокирующий сплэш (активная экспедиция / итоги забора). z-index:9 сознательно
   превышает .overlay-panel (z-index:8) и .app-header (z-index:2), т.к. этот сплэш должен
   полностью перекрывать любой другой игровой экран, независимо от того, что было открыто до
   старта путешествия (подтверждённое требование "полной блокировки"). */
.expedition-panel { background:linear-gradient(145deg,rgba(126,229,173,.08),rgba(36,43,56,.94)); border:1px solid rgba(126,229,173,.18); }
.expedition-options { display:grid; gap:10px; margin-top:14px; }
.expedition-choice { padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); color:var(--text); font-size:14px; font-weight:700; text-align:left; }
.expedition-choice:active { border-color:var(--accent); transform:scale(.98); }
.expedition-splash { position:fixed; inset:0; z-index:9; display:flex; align-items:center; justify-content:center; padding:20px max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); background:radial-gradient(circle at 50% 20%,rgba(126,229,173,.1),transparent 55%),var(--bg); overflow-y:auto; }
.expedition-card { width:min(100%,420px); padding:26px 22px; border-radius:22px; background:linear-gradient(160deg,rgba(36,43,56,.96),rgba(22,26,35,.98)); border:1px solid var(--line); box-shadow:0 22px 50px rgba(0,0,0,.45); text-align:center; }
.expedition-card h1 { margin:6px 0 12px; font-size:22px; letter-spacing:-.02em; }
.expedition-card .phase-note { text-align:center; margin:14px 0; }
.expedition-countdown { margin:22px auto 4px; font:800 34px 'Nunito',sans-serif; font-variant-numeric:tabular-nums; color:var(--accent); }
.expedition-primary { display:block; width:100%; margin-top:18px; padding:15px; border-radius:14px; background:var(--accent); color:#132219; font-size:15px; font-weight:800; }
.expedition-primary:active { transform:scale(.98); }
.expedition-stats { display:grid; grid-template-columns:repeat(2,1fr); gap:9px; margin:18px 0; }
.expedition-stats .stat { min-height:64px; padding:10px; display:grid; grid-template-columns:1fr auto; align-items:center; background:rgba(0,0,0,.18); border-radius:11px; color:var(--muted); font-size:12px; }
.expedition-stats .stat strong { color:var(--text); font-size:20px; }
.expedition-stats .stat small { grid-column:1/-1; margin-top:3px; text-align:left; }
.expedition-loot { list-style:none; margin:0 0 8px; padding:0; display:grid; gap:7px; text-align:left; }
.expedition-loot li { padding:9px 12px; border-radius:11px; background:rgba(126,229,173,.08); border:1px solid rgba(126,229,173,.14); font-size:13px; font-weight:700; }
.expedition-loot + .empty,.expedition-card .empty { color:var(--muted); font-size:13px; margin:10px 0; }
/* Фаза 15.2: декоративный раннер сплэша экспедиции -- три абсолютно позиционированные слоя
биом-фона внутри .expedition-splash (она уже position:fixed, так что служит своим же
содержащим блоком для них), поднятый JS-кросс-фейд по opacity и бегущий на месте кот
поверх. Сама карточка (.expedition-card) остаётся сверху всего на своём z-index, весь блок карточки
ничего не трогает, меняется только визуальный фон за ней. */
.expedition-splash--runner { overflow:hidden; }
/* Фаза 15.5: фон больше не background-size:cover -- на портретных экранах cover масштабировал
   1376x768 сцену ВЫШЕ её нативного разрешения (чтобы покрыть высоту), из-за чего фон выглядел
   огромным/замыленным и была видна лишь узкая центральная полоса по ширине. auto 100% сохраняет
   пропорции картинки (высота = высота контейнера, ширина считается по соотношению сторон, без
   искажений) и вместе с repeat-x даёт бесшовный повтор по горизонтали -- на этом и построен
   скролл влево (см. mountExpeditionRunner(): backgroundPositionX двигается по rAF, обёртка сама
   бесшовно оборачивает паттерн, потому что оба соседних повтора -- один и тот же кадр). */
/* Фаза 15.6: один слой вместо трёх -- без opacity, без кросс-фейда, всегда полностью видим. Фон
   подключён прекомпилированным правилом, а не инлайн-атрибутом style="background-image:..." --
   CSP fix (Фаза 15.4) остаётся в силе (прод style-src без 'unsafe-inline' блокирует инлайн-атрибут). */
.expedition-runner-bg { position:absolute; inset:0; z-index:0; background-repeat:repeat-x; background-position:0 0; background-size:auto 100%; will-change:background-position; background-image:url('../expedition/world_strip.jpg'); }
.expedition-runner-veil { position:absolute; inset:0; z-index:1; background:radial-gradient(circle at 50% 62%,rgba(10,12,16,.32),rgba(10,12,16,.74)); pointer-events:none; }
.expedition-runner-ground { position:absolute; left:0; right:0; bottom:0; height:30%; z-index:1; background:linear-gradient(to top,rgba(8,10,14,.6),rgba(8,10,14,0)); pointer-events:none; }
.expedition-runner-cat { position:absolute; left:50%; bottom:14%; z-index:2; width:104px; height:auto; transform:translateX(-50%); filter:drop-shadow(0 12px 16px rgba(0,0,0,.45)); animation:expedition-runner-bob .42s ease-in-out infinite; pointer-events:none; }
@keyframes expedition-runner-bob { 0%,100% { transform:translateX(-50%) translateY(0); } 50% { transform:translateX(-50%) translateY(-7px); } }
.expedition-splash--runner .expedition-card { position:relative; z-index:3; }
@media (prefers-reduced-motion:reduce) { .expedition-runner-cat { animation:none; } }
/* Фаза 18 §18.7-18.8: панель отряда компаньонов на экране питомца + вкладки переключения питомца
   на экране экипировки + squad-режим боевой арены (несколько целей атаки, союзники на гексагрид).
   Карточки компаньонов используют тот же премиальный "стеклянный" градиент, что и .panel/.item-card,
   но с более тёмной, слегка приподнятой art-плашкой сверху -- решётчатая композиция (арт | статы |
   действие) читается с одного взгляда даже на мобильном экране 375px. */
.companions-panel { padding-bottom:14px; }
.companions-grid { display:grid; grid-template-columns:1fr; gap:12px; margin-top:14px; }
@media (min-width:560px) { .companions-grid { grid-template-columns:repeat(2,1fr); } }
.companion-card { position:relative; display:flex; gap:14px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(150deg,rgba(40,47,61,.92),rgba(24,28,38,.96)); box-shadow:0 10px 26px rgba(0,0,0,.22); overflow:hidden; transition:transform .18s, border-color .18s; }
.companion-card::before { content:''; position:absolute; inset:0; background:radial-gradient(circle at 15% 0%,rgba(126,229,173,.1),transparent 55%); pointer-events:none; }
.companion-card:active { transform:scale(.985); }
.companion-card-art { position:relative; flex:0 0 auto; width:78px; height:78px; display:grid; place-items:center; border-radius:16px; background:rgba(0,0,0,.22); box-shadow:inset 0 0 0 1px rgba(255,255,255,.05); overflow:hidden; z-index:1; }
.companion-card-art .pet-layers,.companion-card-art img { width:100%; height:100%; object-fit:contain; }
.companion-card-body { position:relative; flex:1; min-width:0; z-index:1; }
.companion-card-body h3 { margin:0 0 8px; font-size:15px; letter-spacing:-.01em; line-height:1.25; }
.companion-stats-row { display:flex; gap:6px; margin-bottom:10px; }
.companion-stats-row .stat { flex:1; min-height:auto; padding:6px 8px; display:grid; grid-template-columns:1fr; gap:1px; text-align:center; background:rgba(0,0,0,.2); border-radius:9px; }
.companion-stats-row .stat span { font-size:9px; text-transform:uppercase; letter-spacing:.04em; }
.companion-stats-row .stat strong { font-size:15px; }
.companion-card-body .secondary-action { width:100%; min-height:38px; padding:8px 12px; font-size:12px; border-radius:11px; }
/* Phase 19.2: per-companion stat-point spend mini panel (mirrors .stat-allocate-grid's intent
   at companion-card scale -- .companion-stat-btn is deliberately its own class rather than
   .secondary-action, since that selector is forced to width:100% right above for the equipment
   button and would otherwise stack these 5 buttons into a tall single column). */
.companion-stat-allocate { margin:2px 0 10px; padding-top:8px; border-top:1px dashed var(--line); }
.companion-stat-allocate-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.companion-stat-allocate-head strong { font-size:13px; color:var(--accent); letter-spacing:0; text-transform:none; }
.companion-stat-allocate-grid { display:flex; flex-wrap:wrap; gap:6px; }
.companion-stat-btn { flex:1 1 30%; min-width:56px; min-height:32px; padding:4px 6px; font-size:11px; border-radius:9px; background:var(--surface-2); color:var(--text); border:1px solid var(--line); }
.companion-stat-btn:active { transform:scale(.96); }
.companion-card-empty { background:linear-gradient(150deg,rgba(30,35,46,.7),rgba(20,24,32,.78)); border-style:dashed; border-color:rgba(255,255,255,.14); align-items:flex-start; }
.companion-card-empty::before { display:none; }
.companion-card-empty-icon { flex:0 0 auto; width:44px; height:44px; display:grid; place-items:center; font-size:20px; color:var(--accent); background:rgba(126,229,173,.1); border:1px solid rgba(126,229,173,.22); border-radius:14px; }
.companion-card-empty .phase-note { padding:0; margin:2px 0 10px; }
.companion-locked-note { color:#f0bc71; }
.companion-species-choice { display:flex; gap:8px; }
.pet-choice.compact { min-height:44px; flex:1; padding:9px 10px; flex-direction:row; align-items:center; justify-content:center; gap:6px; font-size:13px; font-weight:750; }
.pet-choice.compact:disabled { opacity:.4; }
/* equipment screen's pet-switcher reuses .tabs styling verbatim -- only wraps it with margin so it
   sits cleanly above the existing equipment-slots grid without extra JS changes there. */
.equipment-pet-tabs { margin-top:0; padding-bottom:11px; }
/* Squad battle (§18.8): multiple simultaneous attack targets replace the single Attack button, and
   living squadmates occupy their own hex + HP bar. Ally token/hex get their own cyan-leaning tone
   distinct from both "you" (accent-2 blue) and "enemy" (danger red) so a busy squad fight still reads
   at a glance. */
.arena-actions-squad { display:flex; flex-direction:column; gap:8px; }
.squad-attack-button { width:100%; min-height:46px; padding:10px 14px; border-radius:12px; color:#132219; background:var(--accent); font-weight:750; font-size:13px; }
.squad-attack-button:disabled { opacity:.45; cursor:not-allowed; }
.arena-token.ally { background:#57c2a8; }
.hex.ally { background:rgba(87,194,168,.42); color:#0c2621; box-shadow:0 0 0 1px rgba(87,194,168,.6); }
.arena-battle .hex.ally { background:rgba(255,246,218,.26); }
.arena-battle .arena-token.ally { background:#3e9c78; }

/* ===================================================================
   Фаза 20.1 — редизайн экрана "Мой питомец" (концепт B: Тёмная арена).
   Полностью самодостаточная тема, отделённая от глобальной палитры
   --accent/--surface через собственные --arena-* переменные, заданные
   на .pet-arena. Три раздела (характеристики, отряд компаньонов,
   экипировка) выводятся как independent .pet-arena секции внутри
   одного .overlay-body — margin-top на смежных секциях создаёт
   единый непрерывный лист без явного общего wrapper-а.
   =================================================================== */
.pet-arena {
  --arena-bg: #060b15;
  --arena-ink: #f0f8ff;
  --arena-muted: #8ea8c5;
  --arena-cyan: #52f1f8;
  --arena-cyan-2: #22bdde;
  --arena-violet: #a770ff;
  --arena-violet-2: #6d49d8;
  --arena-orange: #ffbd55;
  --arena-red: #ff637e;
  --arena-line: rgba(151,233,255,.24);
  --arena-panel: rgba(13,29,52,.88);
  --arena-panel-deep: rgba(7,16,31,.92);
  --arena-cut: polygon(0 13px,13px 0,calc(100% - 13px) 0,100% 13px,100% calc(100% - 13px),calc(100% - 13px) 100%,13px 100%,0 calc(100% - 13px));
  --arena-cut-sm: polygon(0 8px,8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px));
  --arena-ease: cubic-bezier(.16,1,.3,1);
  position: relative;
  display: block;
  margin: -16px -16px 0;
  padding: 0 16px 20px;
  color: var(--arena-ink);
  background: var(--arena-bg);
  font-family: 'Exo 2', Inter, ui-sans-serif, system-ui, sans-serif;
  isolation: isolate;
  overflow: hidden;
}
.pet-arena::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .5;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(94,60,190,.24), transparent 46%),
    radial-gradient(circle at 86% 6%, rgba(30,160,190,.22), transparent 42%),
    repeating-linear-gradient(60deg, transparent 0 50px, rgba(94,240,255,.045) 51px 52px, transparent 53px 101px);
  mask-image: linear-gradient(#000, transparent 88%);
}
.pet-arena + .pet-arena { margin-top: 14px; padding-top: 18px; }
.pet-arena h1 { font-family: 'Russo One', 'Exo 2', sans-serif; letter-spacing: .01em; }
.pet-arena h2 { font-family: 'Russo One', 'Exo 2', sans-serif; letter-spacing: .02em; margin: 0; }

/* -- верхний блок: ресурсы + герой-карточка питомца -- */
.arena-top { position: relative; padding-top: 14px; }
.arena-resources { position: relative; z-index: 1; margin-bottom: 12px; }
.arena-resources .currency-bar { margin: 0; background: linear-gradient(180deg, rgba(59,92,128,.7), rgba(13,28,54,.82)); border: 1px solid rgba(140,236,255,.32); border-radius: 0; clip-path: var(--arena-cut-sm); box-shadow: inset 0 1px rgba(255,255,255,.14), 0 4px 13px rgba(0,0,0,.3); }
.arena-resources .currency-bar span { font-weight: 800; font-size: 13px; color: var(--arena-ink); }
.arena-resources .currency-bar span:last-child { color: #d5baff; }

.arena-hero {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: linear-gradient(142deg, rgba(28,60,94,.8), rgba(8,19,40,.95) 55%, rgba(28,15,63,.86));
  clip-path: var(--arena-cut);
  box-shadow: 0 18px 32px rgba(0,0,0,.42), inset 0 0 0 1px rgba(145,224,255,.28);
}
.arena-hero::before {
  content: ''; position: absolute; inset: 0; opacity: .75;
  background: radial-gradient(circle at 51% 46%, rgba(63,250,255,.28), transparent 24%), radial-gradient(circle at 70% 10%, rgba(149,69,255,.34), transparent 29%), repeating-linear-gradient(30deg, transparent 0 26px, rgba(152,237,255,.045) 27px 28px);
}
.arena-hero::after {
  content: ''; position: absolute; left: 50%; bottom: 40px; width: 240px; height: 78px; translate: -50% 0;
  background: radial-gradient(ellipse, rgba(40,234,253,.5), rgba(50,122,255,.15) 48%, transparent 71%); filter: blur(6px);
}
.arena-corner { position: absolute; z-index: 3; width: 36px; height: 36px; border-color: rgba(103,240,255,.84); border-style: solid; filter: drop-shadow(0 0 6px rgba(65,227,255,.4)); }
.arena-corner.tl { top: 10px; left: 10px; border-width: 2px 0 0 2px; clip-path: polygon(0 0,100% 0,0 100%); }
.arena-corner.tr { top: 10px; right: 10px; border-width: 2px 2px 0 0; clip-path: polygon(0 0,100% 0,100% 100%); }
.arena-corner.bl { bottom: 10px; left: 10px; border-width: 0 0 2px 2px; clip-path: polygon(0 0,0 100%,100% 100%); }
.arena-corner.br { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; clip-path: polygon(100% 0,100% 100%,0 100%); }
.arena-rank {
  position: absolute; z-index: 4; top: 12px; left: 50%; translate: -50% 0; max-width: calc(100% - 96px);
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  background: rgba(4,13,29,.74); border: 1px solid rgba(129,238,255,.42); clip-path: var(--arena-cut-sm);
  font-size: 10px; font-weight: 800; letter-spacing: .07em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.arena-rank::before { content: ''; flex: none; width: 6px; height: 6px; background: var(--arena-violet); transform: rotate(45deg); box-shadow: 0 0 8px var(--arena-violet); }
.arena-platform {
  position: absolute; z-index: 2; left: 50%; bottom: 18px; translate: -50% 0; width: 68%; height: 36px;
  clip-path: polygon(13% 0,87% 0,100% 56%,88% 100%,12% 100%,0 56%);
  border: 1px solid rgba(148,244,255,.4); background: linear-gradient(180deg, rgba(53,124,154,.78), rgba(23,39,90,.94));
  box-shadow: inset 0 8px 17px rgba(100,244,255,.22), 0 11px 14px rgba(0,0,0,.44);
}
.arena-platform::after { content: ''; position: absolute; left: 23%; right: 23%; top: 7px; height: 1px; background: rgba(144,251,255,.8); box-shadow: 0 0 11px 3px rgba(87,238,255,.5); }
.arena-hero-cat { position: relative; z-index: 2; width: min(62%, 240px); margin: 46px auto 0; animation: arena-float 4s var(--arena-ease) infinite alternate; }
.arena-hero-cat .pet-layers,
.arena-hero-cat img { width: 100%; height: auto; aspect-ratio: 1/1; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 15px 1px rgba(0,0,0,.55)) drop-shadow(0 0 16px rgba(74,255,255,.32)); }
@keyframes arena-float { to { translate: 0 -8px; } }
.arena-hero-label { position: absolute; z-index: 4; left: 18px; bottom: 16px; text-shadow: 0 3px 6px #000; }
.arena-hero-label strong { display: block; font-family: 'Russo One', sans-serif; font-size: 18px; line-height: 1.1; }
.arena-hero-label span { display: block; margin-top: 2px; color: #acd5e7; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.arena-level-chip {
  position: absolute; z-index: 4; right: 16px; bottom: 18px; width: 50px; height: 50px;
  display: grid; place-content: center; text-align: center;
  background: linear-gradient(135deg, #a15df5, #4725a8); border: 2px solid #d6b6ff;
  clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);
  box-shadow: 0 0 0 3px rgba(15,15,52,.85), 0 0 16px rgba(170,95,255,.55);
}
.arena-level-chip span { display: block; color: #ede3ff; font-size: 9px; line-height: 1; font-weight: 800; letter-spacing: .04em; }
.arena-level-chip b { font: 800 17px/1 'Russo One', sans-serif; }

.arena-hero-actions { position: relative; z-index: 5; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 10px; }
.arena-action {
  min-height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 5px;
  background: linear-gradient(180deg, rgba(37,58,92,.98), rgba(12,23,47,.98));
  border: 1px solid rgba(139,220,255,.3); clip-path: var(--arena-cut-sm);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 8px 16px rgba(0,0,0,.27);
  color: var(--arena-ink); transition: transform 180ms var(--arena-ease), filter 180ms var(--arena-ease), border-color 180ms var(--arena-ease);
}
.arena-action span { font-size: 10px; font-weight: 800; color: #e7f8ff; }
.arena-action svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.arena-action:hover { transform: translateY(-2px); filter: brightness(1.12); border-color: var(--arena-cyan); }
.arena-action:active { transform: translateY(1px) scale(.97); }
.pet-arena .arena-action.primary.pet-tap-button {
  background: linear-gradient(135deg, #23c6d8, #3d43c8) !important;
  border: 1px solid #a4f9ff !important; color: #eafeff !important;
}
.pet-arena .pet-tap-button.anim { animation: pet-tap-pulse .65s ease; }

/* -- состояние / опыт -- */
.arena-split { display: grid; grid-template-columns: 1.32fr .93fr; gap: 10px; margin-top: 14px; }
.arena-panel {
  position: relative; min-width: 0;
  background: linear-gradient(135deg, rgba(19,41,70,.92), rgba(7,17,35,.97));
  border: 1px solid var(--arena-line); clip-path: var(--arena-cut-sm);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 9px 22px rgba(0,0,0,.25);
}
.arena-vitals { padding: 11px 12px; }
.arena-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #b8d2e7; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.arena-points-chip { flex: none; color: #111a2a; background: linear-gradient(135deg,#99f7ff,#67c6ff); padding: 3px 6px; clip-path: var(--arena-cut-sm); font: 800 10px/1 'Russo One', sans-serif; white-space: nowrap; }
.arena-vital { margin-top: 9px; }
.arena-vital:first-of-type { margin-top: 8px; }
.arena-vital-top { display: flex; justify-content: space-between; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #cbdcec; }
.arena-vital-top b { color: var(--arena-ink); font-family: 'Russo One'; font-size: 12px; }
.arena-bar { height: 7px; overflow: hidden; margin-top: 4px; background: #07101d; clip-path: polygon(3px 0,100% 0,calc(100% - 3px) 100%,0 100%); box-shadow: inset 0 1px 3px #000; }
.arena-bar i { display: block; height: 100%; background: linear-gradient(90deg,#ff7b65,#ffb44b); box-shadow: 0 0 8px #ff9857; transition: width 260ms var(--arena-ease); }
.arena-bar.mood i { background: linear-gradient(90deg,#9f72ff,#55eafa); box-shadow: 0 0 8px #60eaff; }
.arena-bar.low i { background: linear-gradient(90deg,#ff5f6d,#ff2f52); box-shadow: 0 0 8px #ff415c; }

.arena-side { padding: 11px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.arena-micro { display: flex; align-items: center; gap: 7px; min-width: 0; }
.arena-micro svg { flex: none; width: 17px; height: 17px; color: var(--arena-cyan); }
.arena-micro div { min-width: 0; }
.arena-micro span { display: block; color: #9ab4cc; font-size: 9px; font-weight: 700; line-height: 1.15; text-transform: uppercase; letter-spacing: .05em; }
.arena-micro b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.2; font-weight: 800; }
.arena-side-line { height: 1px; background: rgba(141,230,255,.17); }
.arena-mini-xp { position: relative; height: 5px; overflow: hidden; margin-top: 4px; background: #080e1e; clip-path: var(--arena-cut-sm); }
.arena-mini-xp i { display: block; height: 100%; background: linear-gradient(90deg,var(--arena-violet),var(--arena-cyan)); box-shadow: 0 0 7px var(--arena-cyan); transition: width 260ms var(--arena-ease); }

/* -- реплика питомца -- */
.arena-dialogue { position: relative; margin-top: 12px; padding: 12px 14px 12px 17px; background: linear-gradient(125deg,rgba(10,37,51,.93),rgba(20,27,57,.89)); border: 1px solid rgba(91,239,230,.35); clip-path: var(--arena-cut-sm); }
.arena-dialogue::before { content: ''; position: absolute; left: 15px; top: -1px; width: 19px; height: 1px; background: var(--arena-cyan); box-shadow: 0 0 9px 2px rgba(67,242,255,.7); }
.arena-dialogue p { margin: 6px 0 0; color: #e5f0f7; font-size: 13px; line-height: 1.3; font-weight: 600; }
.arena-trait { color: #7cf6cb; font: 800 10px/1 'Russo One', sans-serif; letter-spacing: .12em; }
.arena-dialogue-loading p { color: var(--arena-muted); font-weight: 600; }

/* -- характеристики -- */
.arena-stats { margin-top: 12px; padding: 13px; }
.arena-stats-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.arena-stats-head h2 { font-size: 15px; }
.arena-avail { color: #8aeeff; font-size: 10px; font-weight: 800; white-space: nowrap; }
.arena-avail b { color: #fff; font-family: 'Russo One'; }
.arena-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
.arena-stat { min-width: 0; min-height: 42px; display: grid; grid-template-columns: 1fr auto 27px; align-items: center; gap: 5px; padding: 6px 5px 6px 9px; background: rgba(3,12,27,.64); border: 1px solid rgba(123,205,244,.14); clip-path: var(--arena-cut-sm); }
.arena-stat-label { color: #9ab9d5; font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.arena-stat b { font: 800 15px/1 'Russo One', sans-serif; color: var(--arena-ink); }
.arena-stat-plus { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; color: #0b1b2b; background: linear-gradient(135deg,#c6fffb,#5dd2ff); clip-path: polygon(50% 0,100% 29%,100% 71%,50% 100%,0 71%,0 29%); box-shadow: 0 0 9px rgba(83,238,255,.42); transition: transform 180ms var(--arena-ease), filter 180ms var(--arena-ease); }
.arena-stat-plus:hover { filter: brightness(1.12); transform: scale(1.08); }
.arena-stat-plus:active { transform: scale(.92); }
.arena-stat-plus svg { width: 13px; height: 13px; }
.arena-stat-spacer { width: 25px; height: 25px; }
.arena-note { margin: 12px 0 0; padding: 0 2px; color: var(--arena-muted); font-size: 11px; line-height: 1.4; }

/* -- отряд компаньонов -- */
.arena-companions { padding: 13px; }
.arena-companions .arena-panel-title { margin-bottom: 11px; }
.arena-companions-grid { display: grid; gap: 10px; }
.arena-companion-card {
  display: flex; gap: 12px; padding: 12px; background: linear-gradient(150deg, rgba(19,41,70,.88), rgba(7,17,35,.94));
  border: 1px solid var(--arena-line); clip-path: var(--arena-cut-sm);
}
.arena-companion-card.empty { border-style: dashed; border-color: rgba(151,233,255,.32); background: rgba(7,16,31,.55); align-items: center; }
.arena-companion-art { flex: none; width: 72px; height: 72px; display: grid; place-items: center; background: rgba(3,12,27,.55); clip-path: var(--arena-cut-sm); overflow: hidden; }
.arena-companion-art .pet-layers, .arena-companion-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.arena-companion-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.arena-companion-body h3 { margin: 0; font-family: 'Russo One'; font-size: 13px; letter-spacing: .01em; color: var(--arena-ink); }
.arena-companion-badge { align-self: flex-start; color: #8aeeff; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 3px 7px; background: rgba(82,241,248,.12); border: 1px solid rgba(82,241,248,.3); clip-path: var(--arena-cut-sm); }
.arena-companion-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.arena-companion-mini-stat { display: flex; align-items: baseline; gap: 4px; font-size: 11px; }
.arena-companion-mini-stat span { color: var(--arena-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 9px; }
.arena-companion-mini-stat b { color: var(--arena-ink); font-family: 'Russo One'; font-size: 12px; }
.arena-companion-allocate { margin-top: 2px; padding: 8px; background: rgba(3,12,27,.5); border: 1px solid rgba(123,205,244,.14); clip-path: var(--arena-cut-sm); }
.arena-companion-allocate-head { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #9ab9d5; }
.arena-companion-allocate-head strong { color: var(--arena-cyan); font-family: 'Russo One'; font-size: 12px; }
.arena-companion-allocate-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.arena-companion-stat-btn { padding: 6px 9px; font-size: 10px; font-weight: 800; color: #0b1b2b; background: linear-gradient(135deg,#c6fffb,#5dd2ff); clip-path: var(--arena-cut-sm); box-shadow: 0 0 8px rgba(83,238,255,.35); transition: transform 160ms var(--arena-ease), filter 160ms var(--arena-ease); }
.arena-companion-stat-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.arena-companion-btn { align-self: flex-start; margin-top: auto; padding: 8px 13px; font-size: 11px; font-weight: 800; color: var(--arena-ink); background: linear-gradient(180deg, rgba(37,58,92,.98), rgba(12,23,47,.98)); border: 1px solid rgba(139,220,255,.3); clip-path: var(--arena-cut-sm); transition: transform 160ms var(--arena-ease), filter 160ms var(--arena-ease); }
.arena-companion-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.arena-companion-empty-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 20px; color: var(--arena-cyan); background: rgba(82,241,248,.08); border: 1px solid rgba(82,241,248,.28); clip-path: var(--arena-cut-sm); }
.arena-companion-locked-note { color: var(--arena-orange); }
.arena-companion-species-choice { display: flex; gap: 7px; margin-top: 4px; }
.arena-species-btn { flex: 1; padding: 9px 6px; font-size: 12px; font-weight: 800; color: var(--arena-ink); background: linear-gradient(180deg, rgba(37,58,92,.98), rgba(12,23,47,.98)); border: 1px solid rgba(139,220,255,.3); clip-path: var(--arena-cut-sm); transition: transform 160ms var(--arena-ease), filter 160ms var(--arena-ease); }
.arena-species-btn:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-1px); }
.arena-species-btn:disabled { opacity: .4; cursor: not-allowed; }

/* -- экипировка -- */
.arena-equipment { padding-top: 18px; }
.arena-equip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.arena-equip-head h1 { margin: 5px 0 0; font-size: 21px; }
.pet-arena .eyebrow { display: flex; gap: 8px; align-items: center; color: var(--arena-cyan); font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pet-arena .eyebrow::before { content: ''; width: 7px; height: 7px; background: var(--arena-cyan); clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%); box-shadow: 0 0 10px var(--arena-cyan); }
.arena-icon-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; color: #d8f9ff; background: linear-gradient(145deg, rgba(59,83,118,.82), rgba(8,17,32,.9)); border: 1px solid rgba(139,218,255,.3); clip-path: var(--arena-cut-sm); box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 5px 15px rgba(0,0,0,.28); font-size: 18px; transition: transform 180ms var(--arena-ease), filter 180ms var(--arena-ease); }
.arena-icon-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.arena-equipment-tabs.tabs { margin: 0 0 12px; padding: 0 0 4px; }
.arena-equipment-tabs.tabs .arena-tab-btn { border: 1px solid rgba(139,220,255,.28); color: var(--arena-muted); background: linear-gradient(180deg, rgba(37,58,92,.7), rgba(12,23,47,.85)); clip-path: var(--arena-cut-sm); border-radius: 0; font-weight: 700; }
.arena-equipment-tabs.tabs .arena-tab-btn.active { color: #04141c; background: linear-gradient(135deg,#99f7ff,#67c6ff); border-color: rgba(153,247,255,.7); font-weight: 800; }
.arena-equip-showcase.pet-showcase { background: linear-gradient(142deg, rgba(28,60,94,.65), rgba(8,19,40,.85) 55%, rgba(28,15,63,.7)); border: 1px solid var(--arena-line); border-radius: 0; clip-path: var(--arena-cut); box-shadow: 0 14px 26px rgba(0,0,0,.35), inset 0 0 0 1px rgba(145,224,255,.22); margin-bottom: 12px; }
.arena-equip-showcase.pet-showcase .pet-layers,
.arena-equip-showcase.pet-showcase img { image-rendering: pixelated; filter: drop-shadow(0 10px 14px rgba(0,0,0,.4)) drop-shadow(0 0 14px rgba(74,255,255,.25)); }
.arena-equipment-slots.equipment-slots { margin: 0 0 4px; }
.arena-equipment-slot.equipment-slot { border-radius: 0; clip-path: var(--arena-cut-sm); background: linear-gradient(135deg, rgba(19,41,70,.7), rgba(7,17,35,.85)); border-style: solid; border-color: var(--arena-line); }
.arena-equipment-slot.equipment-slot.occupied { border-color: rgba(82,241,248,.4); background: linear-gradient(135deg, rgba(19,41,70,.92), rgba(7,17,35,.97)); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.arena-equipment-slot.equipment-slot span:first-child { color: var(--arena-muted); }
.arena-equipment-slot.equipment-slot strong { color: var(--arena-ink); }
.arena-equipment-slot.equipment-slot small,
.arena-equipment-slot .slot-state { color: var(--arena-cyan); }
.pet-arena .panel.arena-panel { border-radius: 0; }
.pet-arena .panel.arena-panel .panel-title h2 { color: var(--arena-ink); }

/* -- мобильная адаптация (Telegram Mini App, ~360-414px) -- */
@media (max-width: 380px) {
  .pet-arena { padding: 0 12px 18px; margin: -16px -12px 0; }
  .arena-hero { min-height: 296px; }
  .arena-hero-cat { width: min(58%, 210px); margin-top: 40px; }
  .arena-split { grid-template-columns: 1fr; }
  .arena-side { padding: 10px 12px; }
  .arena-stat-grid { gap: 6px; }
}
@media (min-width: 560px) {
  .arena-companions-grid { grid-template-columns: repeat(2,1fr); }
}

/* Фаза 20.1: точечная гармонизация блока раскраски питомца внутри .pet-arena --
   .pet-variant-panel использует глобальный .panel (без фона/рамки), из-за чего
   между светящейся витриной экипировки и неоновыми слотами появлялся "голый"
   разрыв стиля. Оформляем карточкой в духе арены без изменения структуры/логики. */
.pet-arena .pet-variant-panel {
  padding: 16px;
  margin-top: 14px;
  border-radius: var(--arena-cut-sm, 14px);
  background: var(--arena-panel, rgba(13,29,52,.88));
  border: 1px solid var(--arena-line, rgba(151,233,255,.24));
}
.pet-arena .pet-variant-panel .panel-title h2 {
  color: var(--arena-ink, #f0f8ff);
  font-family: 'Russo One', sans-serif;
  font-size: 15px;
  letter-spacing: .01em;
}
.pet-arena .pet-variant-panel .phase-note {
  color: var(--arena-muted, #8ea8c5);
}
.pet-arena .pet-variant-panel #pet-variant-reroll {
  background: linear-gradient(135deg, var(--arena-cyan, #52f1f8), var(--arena-violet, #a770ff));
  color: #06121b;
  border: none;
  font-family: 'Russo One', sans-serif;
  letter-spacing: .02em;
}
.pet-arena .pet-variant-panel #pet-variant-reroll:disabled {
  opacity: .55;
}

/* =====================================================================
   Фаза 21: «Кристалл призыва» — оверлей создания/покупки питомца.
   Адаптация прототипа /home/user/workspace/prototypes/pet_summon_showcase/
   concept-c-final/ (script.js/style.css) под продакшн-разметку и CSP.
   Все узлы строятся/очищаются через JS (app.js, openSummonOverlay()) внутрь
   #summon-overlay — в HTML остаётся только пустой контейнер-сиблинг #toast.
   Явно НЕ перенесено из прототипа: shine-sweep (световая полоса на карточке,
   удалена по требованию до этой фазы), PNG-рамка редкости (свечение только
   процедурное, .summon-card-glow ниже), кнопка «Повторить призыв» (призыв
   не повторяем).
   ===================================================================== */
.summon-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 120% 60% at 50% -10%, rgba(167,112,255,0.22), transparent 60%),
              radial-gradient(ellipse 100% 50% at 50% 105%, rgba(82,241,248,0.16), transparent 60%),
              linear-gradient(180deg, #060b15 0%, #0a0f1c 45%, #10131a 100%);
  overflow: hidden;
  touch-action: none;
}
.summon-overlay[hidden] { display: none; }
.summon-overlay * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.summon-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
  font-family: var(--font-body, 'Exo 2', sans-serif);
  color: #f4faff;
}

.summon-topbar { flex: 0 0 auto; text-align: center; margin-bottom: 6px; }
.summon-title {
  font-family: 'Russo One', 'Exo 2', sans-serif;
  font-size: 22px;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, #52f1f8, #a770ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(167,112,255,0.4));
}
.summon-subtitle { margin-top: 6px; font-size: 12.5px; color: #8ea3c2; letter-spacing: 0.03em; min-height: 16px; }

.summon-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
  background: rgba(16,19,26,0.6);
  color: #f4faff;
  font-size: 18px;
  display: grid; place-items: center;
  z-index: 5;
}

/* ---- Crystal tap stage ---- */
.summon-counter { display: flex; gap: 8px; justify-content: center; margin: 4px 0; }
.summon-pip {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid rgba(82,241,248,0.5);
  background: rgba(82,241,248,0.08);
  transition: background .25s, box-shadow .25s, border-color .25s, transform .25s;
}
.summon-pip.filled {
  background: linear-gradient(135deg, #52f1f8, #a770ff);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(82,241,248,0.9);
  transform: scale(1.15);
}

.summon-crystal-area {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.summon-floor-glow {
  position: absolute; bottom: 8%; left: 50%;
  width: 220px; height: 60px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 100% at 50% 50%, rgba(82,241,248,0.35), transparent 75%);
  filter: blur(2px); opacity: 0.8; z-index: 1;
  animation: summon-floor-pulse 3s ease-in-out infinite;
  transition: background .4s ease;
}
@keyframes summon-floor-pulse { 0%,100%{ opacity:.55; transform:translateX(-50%) scaleX(1); } 50%{ opacity:.9; transform:translateX(-50%) scaleX(1.12); } }

.summon-crystal-wrap {
  position: relative; z-index: 3;
  width: min(300px, 78vw); height: min(376px, 96vw);
  border: none; background: transparent; padding: 0;
  display: flex; align-items: center; justify-content: center;
  animation: summon-crystal-float 3.6s ease-in-out infinite;
}
@keyframes summon-crystal-float { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-10px); } }

.summon-crystal-aura {
  position: absolute; inset: -20%; border-radius: 50%;
  filter: blur(6px); z-index: 0;
  animation: summon-aura-pulse 2.4s ease-in-out infinite;
  transition: opacity .2s, background .4s ease;
}
@keyframes summon-aura-pulse { 0%,100%{ opacity:.55; transform:scale(.96); } 50%{ opacity:.95; transform:scale(1.06); } }

.summon-crystal-shake { position: relative; z-index: 2; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.summon-crystal-img {
  position: relative; z-index: 2;
  width: 78%; height: auto; max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(82,241,248,0.55)) drop-shadow(0 0 46px rgba(167,112,255,0.35));
  transition: filter .25s ease, opacity .15s ease;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.summon-crystal-cracks {
  position: absolute; top: 50%; left: 50%;
  width: 78%; height: 90%;
  transform: translate(-50%,-50%);
  pointer-events: none; overflow: visible; z-index: 3;
}
.summon-crystal-cracks path { fill: none; stroke: #ffffff; stroke-width: 2.4; stroke-linecap: round; opacity: 0; filter: drop-shadow(0 0 4px rgba(82,241,248,0.9)); }
.summon-crystal-cracks path.lit { stroke: #eafcff; }

.summon-spark-canvas { position: absolute; inset: -30%; z-index: 4; pointer-events: none; width: 160%; height: 160%; }

.summon-materialize-wrap {
  position: absolute; top: 50%; left: 50%;
  width: min(230px, 62vw); height: min(288px, 78vw);
  transform: translate(-50%,-46%); z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
}
.summon-materialize-pet, .summon-materialize-pet .pet-layers, .summon-materialize-pet .pet-layer {
  width: 100%; height: 100%; object-fit: contain;
}
.summon-materialize-pet .pet-layers { position: relative; display: block; }
.summon-materialize-pet .pet-layer { position: absolute; inset: 0; }
.summon-materialize-pet { filter: brightness(2.4) saturate(0.15) blur(9px) drop-shadow(0 0 30px rgba(255,255,255,0.9)); }
.summon-materialize-wrap.materialize-emerge { animation: summon-materialize-emerge 1.5s cubic-bezier(.18,.9,.22,1) forwards; }
.summon-materialize-wrap.materialize-emerge .summon-materialize-pet { animation: summon-materialize-filter 1.5s cubic-bezier(.18,.9,.22,1) forwards; }
@keyframes summon-materialize-emerge {
  0%{ opacity:0; transform:translate(-50%,-32%) scale(.4); }
  28%{ opacity:1; transform:translate(-50%,-42%) scale(.82); }
  60%{ opacity:1; transform:translate(-50%,-48%) scale(1.06); }
  80%{ transform:translate(-50%,-45%) scale(.98); }
  100%{ opacity:1; transform:translate(-50%,-46%) scale(1); }
}
@keyframes summon-materialize-filter {
  0%{ filter:brightness(2.6) saturate(.1) blur(10px) drop-shadow(0 0 34px rgba(255,255,255,.95)); }
  35%{ filter:brightness(1.9) saturate(.4) blur(5px) drop-shadow(0 0 24px rgba(255,255,255,.6)); }
  70%{ filter:brightness(1.2) saturate(.85) blur(1px) drop-shadow(0 8px 16px rgba(0,0,0,.4)); }
  100%{ filter:brightness(1) saturate(1) blur(0px) drop-shadow(0 8px 16px rgba(0,0,0,.5)); }
}

.summon-shatter-canvas { position: absolute; inset: 0; z-index: 6; pointer-events: none; width: 100%; height: 100%; }
.summon-confetti-canvas { position: absolute; inset: 0; z-index: 10; pointer-events: none; width: 100%; height: 100%; }
.summon-flash-overlay { position: absolute; inset: 0; z-index: 7; background: #fbfeff; opacity: 0; pointer-events: none; }
.summon-flash-overlay.firing { animation: summon-flash-burst .7s ease-out forwards; }
@keyframes summon-flash-burst { 0%{ opacity:0; } 8%{ opacity:1; } 100%{ opacity:0; } }

.summon-crystal-wrap.impact .summon-crystal-shake { animation: summon-impact-shake .28s ease-out; }
@keyframes summon-impact-shake {
  0%{ transform:translate(0,0) rotate(0deg); }
  20%{ transform:translate(-6px,2px) rotate(-1.5deg); }
  40%{ transform:translate(5px,-3px) rotate(1.5deg); }
  60%{ transform:translate(-4px,3px) rotate(-1deg); }
  80%{ transform:translate(3px,-2px) rotate(.6deg); }
  100%{ transform:translate(0,0) rotate(0deg); }
}
.summon-crystal-wrap.darker .summon-crystal-img { filter: drop-shadow(0 0 30px rgba(82,241,248,0.75)) drop-shadow(0 0 60px rgba(167,112,255,0.55)) brightness(0.86) saturate(1.15); }
.summon-crystal-wrap.vanish .summon-crystal-img,
.summon-crystal-wrap.vanish .summon-crystal-cracks { opacity: 0; transition: opacity .08s ease; }
.summon-crystal-wrap.vanish .summon-crystal-aura { opacity: 0; transition: opacity .1s ease; }

.summon-tap-hint { font-size: 13px; color: #8ea3c2; letter-spacing: 0.03em; margin: 2px 0 4px; min-height: 18px; text-align: center; transition: opacity .2s; }

/* ---- Error state inside the overlay (409 / network) ---- */
.summon-error {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; padding: 0 20px; max-width: 320px;
}
.summon-error-icon { font-size: 40px; }
.summon-error-icon .misc-icon { width: 40px; height: 40px; margin: 0; opacity: 1; }

/* Фаза 23.3 (баг 2): шаг выбора вида компаньона внутри оверлея призыва -- две светящиеся
   карточки выбора кот/собака, отображены перед экраном кристалла (image-3.jpg). */
.summon-species-choice {
  flex: 1 1 auto; width: 100%; max-width: 360px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 0 4px;
}
.summon-species-card {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 12px 16px; border-radius: 20px;
  background: linear-gradient(165deg, rgba(82,241,248,0.08), rgba(167,112,255,0.04));
  border: 1px solid rgba(82,241,248,0.22);
  color: #f4faff; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.summon-species-card:hover, .summon-species-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(82,241,248,0.55);
  box-shadow: 0 0 22px rgba(82,241,248,0.28), 0 0 40px rgba(167,112,255,0.18);
  background: linear-gradient(165deg, rgba(82,241,248,0.14), rgba(167,112,255,0.08));
}
.summon-species-card:active { transform: translateY(-1px) scale(0.98); }
.summon-species-art {
  width: 96px; height: 96px; display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 16px rgba(82,241,248,0.35));
}
.summon-species-art .pet-layers, .summon-species-art img { width: 100%; height: 100%; object-fit: contain; }
.summon-species-name {
  font-family: 'Russo One', 'Exo 2', sans-serif;
  font-size: 14px; letter-spacing: 0.04em; color: #eafcff;
}
.summon-species-hint {
  flex: 0 0 auto; margin-top: 14px; font-size: 12.5px; color: #8ea3c2;
  letter-spacing: 0.03em; text-align: center;
}
.summon-error-message { font-size: 14px; color: #f4faff; line-height: 1.5; }

/* ---- Final reveal card — no PNG rarity frame, procedural glow only ---- */
.summon-card-stage { flex: 1 1 auto; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; animation: summon-reveal-in .5s ease-out; }
@keyframes summon-reveal-in { 0%{ opacity:0; transform:translateY(10px); } 100%{ opacity:1; transform:translateY(0); } }

.summon-pet-card {
  position: relative; width: 100%; max-width: 300px;
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 22px 20px; border-radius: 22px;
  background: linear-gradient(165deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid var(--rarity-line, rgba(157,180,201,0.25));
  box-shadow: 0 0 50px var(--rarity-shadow, rgba(157,180,201,0.16)), 0 20px 60px rgba(0,0,0,0.5);
  animation: summon-card-in .6s cubic-bezier(.16,1,.3,1) both;
}
@keyframes summon-card-in { 0%{ opacity:0; transform:translateY(24px) scale(.94); } 100%{ opacity:1; transform:translateY(0) scale(1); } }

.summon-pet-frame { position: relative; width: 190px; height: 190px; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; }
/* Процедурный радиальный свечение/аура — БЕЗ PNG-рамки редкости (запрещено спекой) */
.summon-card-glow {
  position: absolute; inset: -35%; border-radius: 50%;
  background: radial-gradient(ellipse 48% 48% at 50% 50%, var(--rarity-color, #9db4c9) 0%, var(--rarity-color-soft, rgba(157,180,201,0.35)) 42%, transparent 72%);
  filter: blur(14px); z-index: 0;
  animation: summon-card-glow-pulse 2.4s ease-in-out infinite;
}
@keyframes summon-card-glow-pulse { 0%,100%{ opacity:.65; transform:scale(.96); } 50%{ opacity:1; transform:scale(1.07); } }
.summon-card-glow::after {
  content: '';
  position: absolute; inset: 6%; border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg, var(--rarity-color-soft, rgba(157,180,201,0.28)) 4deg, transparent 10deg,
    transparent 40deg, var(--rarity-color-soft, rgba(157,180,201,0.28)) 44deg, transparent 50deg,
    transparent 80deg, var(--rarity-color-soft, rgba(157,180,201,0.28)) 84deg, transparent 90deg,
    transparent 120deg, var(--rarity-color-soft, rgba(157,180,201,0.28)) 124deg, transparent 130deg,
    transparent 160deg, var(--rarity-color-soft, rgba(157,180,201,0.28)) 164deg, transparent 170deg,
    transparent 200deg, var(--rarity-color-soft, rgba(157,180,201,0.28)) 204deg, transparent 210deg,
    transparent 240deg, var(--rarity-color-soft, rgba(157,180,201,0.28)) 244deg, transparent 250deg,
    transparent 280deg, var(--rarity-color-soft, rgba(157,180,201,0.28)) 284deg, transparent 290deg,
    transparent 320deg, var(--rarity-color-soft, rgba(157,180,201,0.28)) 324deg, transparent 330deg,
    transparent 360deg);
  opacity: 0.55;
  animation: summon-rays-spin 12s linear infinite;
  mix-blend-mode: screen;
}
@keyframes summon-rays-spin { to{ transform:rotate(360deg); } }

.summon-pet-frame .pet-layers { position: relative; width: 68%; height: 68%; z-index: 1; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5)) drop-shadow(0 0 22px var(--rarity-color-soft, rgba(157,180,201,0.35))); }
.summon-pet-frame .pet-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

.summon-rarity-tag { font-family: 'Russo One', 'Exo 2', sans-serif; font-size: 12px; letter-spacing: 0.18em; color: var(--rarity-color, #9db4c9); text-shadow: 0 0 14px var(--rarity-color-soft, rgba(157,180,201,0.6)); margin: 4px 0 0; }
.summon-pet-name { font-family: 'Russo One', 'Exo 2', sans-serif; font-size: 22px; margin: 4px 0 2px; color: #f4faff; }
.summon-pet-sub { font-size: 12px; color: #8ea3c2; margin: 0 0 16px; text-align: center; }

.summon-stats { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.summon-stat { display: flex; align-items: center; gap: 10px; }
.summon-stat-label { width: 70px; font-size: 11px; color: #8ea3c2; flex-shrink: 0; }
.summon-stat-bar { flex: 1; height: 6px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; display: block; }
.summon-stat-bar-fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #52f1f8, #a770ff); width: 0%; transition: width 1s cubic-bezier(.16,1,.3,1); }

.summon-card-actions { display: flex; gap: 10px; width: 100%; max-width: 300px; margin-top: 4px; padding: 0 24px; }
.summon-claim-btn {
  flex: 1; padding: 14px 10px; border-radius: 14px;
  font-family: 'Russo One', 'Exo 2', sans-serif; font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; text-align: center;
  color: #04121a; background: linear-gradient(120deg, #52f1f8, #a770ff);
  box-shadow: 0 8px 24px rgba(82,241,248,0.25);
  border: none;
}
.summon-claim-btn:disabled { opacity: .7; }
.summon-error-close-btn {
  padding: 12px 20px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(82,241,248,0.08); color: #52f1f8; font-weight: 700; font-size: 13px;
}

@media (max-height: 700px) {
  .summon-crystal-wrap { width: min(230px, 68vw); height: min(288px, 84vw); }
  .summon-materialize-wrap { width: min(180px, 54vw); height: min(226px, 68vw); }
  .summon-pet-frame { width: 150px; height: 150px; }
}
html.summon-scroll-lock, body.summon-scroll-lock { overflow: hidden !important; touch-action: none; }

/* Фаза 22: персистентный нижний навигатор (визуальный стиль концепта B, редизайн экрана
   «Мой питомец» — тёмный градиент, cyan-глоу активного пункта, верхняя подсветка-индикатор).
   Правила ниже добавлены в конец файла (append-only), чтобы не трогать хрупкие
   переплетённые старые правила .bottom-nav/.app из ранних строк (см. комментарий у строки 298). */
.app-bottom-nav {
  position: fixed; z-index: 15; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 700px);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 10px 6px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(14,25,49,.93), rgba(5,11,24,.98));
  border-top: 1px solid rgba(131,226,255,.27);
  box-shadow: 0 -8px 30px rgba(0,0,0,.32);
  backdrop-filter: blur(18px);
}
.app-nav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px 2px; border-radius: 10px; background: transparent; border: none;
  color: #7190ad; font-family: 'Russo One', 'Exo 2', sans-serif; font-size: 9px; font-weight: 800;
  letter-spacing: .01em; text-transform: uppercase; line-height: 1.1;
}
.app-nav-item svg { width: 22px; height: 22px; flex: 0 0 auto; }
.app-nav-item.active { color: #52f1f8; text-shadow: 0 0 9px rgba(82,241,248,.65); }
.app-nav-item.active::before {
  content: ''; position: absolute; top: 0; left: 50%; translate: -50% 0;
  width: 34px; height: 2px; border-radius: 2px; background: #52f1f8;
  box-shadow: 0 0 8px 2px rgba(82,241,248,.7);
}
/* .app-bottom-nav рендерится только вместе с .app-shell (см. app.js render()) — эти правки
   резервируют место под неё без затрагивания экрана создания персонажа/блокирующей экспедиции. */
.app:has(> .app-shell) { padding-bottom: 112px; }
.overlay-body { padding-bottom: max(112px, calc(20px + env(safe-area-inset-bottom))); }
.chat-fab { bottom: max(96px, calc(80px + env(safe-area-inset-bottom))); }

/* ===========================================================================
   Фаза 23 — редизайн центральной площади ("Живая карта города"), сайдбара
   (миниатюрные текстовые кнопки + SVG-иконки режимов) и арены PvP (концепт A
   "Неонит"). Append-only блок, не трогает существующие правила выше.
   =========================================================================== */

/* --- Живая карта города (hubView, концепт A) ---------------------------- */
.hub-live-map {
  --hlm-cyan: #52f1f8; --hlm-cyan-2: #22bdde; --hlm-violet: #a770ff;
  --hlm-ink: #f0f8ff; --hlm-muted: #9fb6cc; --hlm-line: rgba(151,233,255,.24);
  --hlm-panel: rgba(13,29,52,.88);
  padding: 16px 0 18px;
}
.hub-live-map-intro { margin: 0 16px 14px; color: var(--hlm-muted); font-size: 13px; line-height: 1.4; max-width: 560px; }
.hub-major-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 0 16px; margin-bottom: 14px;
}
.hub-major-tile {
  position: relative; aspect-ratio: 1 / 1.05; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--hlm-line); background: var(--hlm-panel);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 8px;
  text-align: left; transition: transform .16s var(--hlm-ease, ease), border-color .16s;
}
.hub-major-tile:active { transform: scale(.96); border-color: var(--hlm-cyan); }
.hub-major-tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hub-major-tile-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,11,21,.08) 0%, rgba(6,11,21,.5) 55%, rgba(6,11,21,.92) 100%);
}
.hub-major-tile-glyph { position: relative; font-size: 20px; line-height: 1; margin-bottom: 4px; filter: drop-shadow(0 0 6px rgba(82,241,248,.5)); }
.hub-major-tile-name { position: relative; color: var(--hlm-ink); font-weight: 750; font-size: 12.5px; line-height: 1.2; }
.hub-minor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 9px;
  padding: 0 16px;
}
.hub-minor-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px;
  border: 1px solid var(--hlm-line); border-radius: 13px; background: var(--hlm-panel);
  color: var(--hlm-ink); text-align: center; transition: transform .14s, border-color .14s;
}
.hub-minor-tile:active { transform: scale(.95); border-color: var(--hlm-cyan-2); }
.hub-minor-tile-icon {
  /* Фаза 23.1: круглая 36px миниатюра как в концепте (.minor-tile-img), а не скваженный квадрат. */
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(82,241,248,.08); border: 1.5px solid rgba(139,220,255,.4);
}
.hub-minor-tile-icon img { width: 100%; height: 100%; object-fit: cover; }
.hub-minor-tile-icon--glyph { font-size: 19px; }
.hub-minor-tile-name { font-size: 10.5px; font-weight: 650; line-height: 1.2; color: var(--hlm-muted); }
@media (min-width: 560px) {
  .hub-minor-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}
/* Фаза 23.1: на широком десктопе .main-pane растягивается на всю ширину экрана без
   ограничения, из-за чего 3-колоночная сетка .hub-major-row растягивала крупные
   плитки локаций до огромного размера. Ограничиваем ширину живой карты города и
   центрируем её, как на мобильном макете концепта. */
@media (min-width: 900px) {
  .hub-live-map-intro,
  .hub-major-row,
  .hub-minor-grid { max-width: 620px; margin-left: auto; margin-right: auto; }
}

/* --- Сайдбар (фаза 23.1) — полная концепт-точная тёмная неоновая тема (концепт A
   "Живая карта города"). Предыдущая версия меняла только .location-item, оставив
   парчментный фон .sidebar/.sidebar-topbar и базовые цвета .stat/.currency-bar — что и было
   главной жалобой. Селекторы скоплены внутри #city-sidebar, т.к. .stat/.currency-bar/.phase-note/
   .empty переиспользуются вне сайдбара (карточка персонажа, итоги боя и т.д.) и там их
   светлый парчментный стиль должен остаться как есть. */
#city-sidebar.sidebar {
  background-image: linear-gradient(165deg, rgba(11,22,42,.95), rgba(5,10,20,.98));
  background-color: #050b16; border-right: 1px solid rgba(103,240,255,.16);
  box-shadow: 6px 0 24px rgba(0,0,0,.35);
}
#city-sidebar .sidebar-topbar { border-bottom: 1px solid rgba(103,240,255,.14); }
#city-sidebar .pet-name-row b { color: #eef7ff; }
#city-sidebar .compact-meters label { color: #86a2c2; }
#city-sidebar .compact-meters progress::-webkit-progress-bar { background: #060d1b; }
#city-sidebar .compact-meters progress::-webkit-progress-value { background: linear-gradient(90deg, #ff7b65, #ffb44b); }
#city-sidebar .compact-meters progress.mood::-webkit-progress-value { background: linear-gradient(90deg, #a770ff, #52f1f8); }
#city-sidebar .sidebar-mode-toggle button {
  background: rgba(15,28,50,.7); border: 1px solid rgba(103,240,255,.2); color: #86a2c2;
}
#city-sidebar .sidebar-mode-toggle button.active {
  background: linear-gradient(135deg, #22bdde, #6d49d8); border-color: transparent; color: #fff;
  box-shadow: 0 0 10px rgba(82,241,248,.4);
}
#city-sidebar .sidebar-mode-toggle button svg { width: 15px; height: 15px; display: block; margin: 0 auto; color: currentColor; }
#city-sidebar .sidebar-mode-toggle button { display: flex; align-items: center; justify-content: center; }
/* карточки локаций: вертикальная плитка с фото-миниатюрой сверху (как в концепте), а не
   горизонтальный ряд иконка+текст. */
.location-item {
  background-image: none; background-color: transparent;
  background: linear-gradient(160deg, rgba(23,42,72,.85), rgba(9,17,33,.92));
  border: 1px solid rgba(103,240,255,.16); color: #eef7ff; text-shadow: none;
  border-radius: 10px; padding: 8px 4px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.location-item span:nth-child(2) { white-space: normal; overflow: visible; text-overflow: initial; }
.loc-thumb {
  width: 100%; height: 34px; border-radius: 6px; overflow: hidden; position: relative;
  background: #0a1526; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
}
.loc-thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.8); transition: filter .18s; }
.loc-thumb--glyph { background: rgba(82,241,248,.08); }
.loc-thumb--glyph .node-icon { width: 17px; height: 17px; color: #52f1f8; }
.loc-name { font-size: 9.5px; font-weight: 700; line-height: 1.15; color: #eef7ff; }
.location-item .location-more { position: absolute; top: 4px; right: 5px; font-size: 9px; color: #52f1f8; }
.location-item.active {
  border-color: #52f1f8; box-shadow: 0 0 0 1px #52f1f8, 0 0 14px rgba(82,241,248,.35);
  color: #eafeff; text-shadow: none;
}
.location-item.active .loc-thumb img { filter: saturate(1.05) brightness(1); }
.location-item.active .loc-thumb--glyph .node-icon { color: #eafeff; }
.location-back {
  flex-direction: row; justify-content: flex-start; padding: 8px 8px; gap: 6px;
  background: rgba(15,28,50,.7); color: #8ea8c5;
}
.location-back .loc-name { font-size: 10px; color: #8ea8c5; }
.location-back .location-glyph { flex: 0 0 auto; }
#city-sidebar .stat { background: rgba(6,11,21,.6); border: 1px solid rgba(151,233,255,.24); color: #86a2c2; }
#city-sidebar .stat strong { color: #52f1f8; text-shadow: 0 0 6px rgba(82,241,248,.35); }
#city-sidebar .currency-bar { background: rgba(15,28,50,.7); border: 1px solid rgba(151,233,255,.24); }
#city-sidebar .currency-bar span:last-child { color: #a770ff; }
#city-sidebar .phase-note, #city-sidebar .empty { color: #86a2c2; }

/* --- Арена PvP (концепт A "Неонит") — скин через отдельный класс .pvp-arena,
   добавленный ТОЛЬКО как дополнительный токен к существующим классам секций.
   Гекс-позиционирование (.ap-*, arenaHexPosClass) и вся боевая логика/атрибуты
   data-arena-* остаются без изменений — здесь только визуальное оформление. */
.pvp-arena {
  --pa-bg: #060b15; --pa-ink: #f0f8ff; --pa-muted: #8ea8c5;
  --pa-cyan: #52f1f8; --pa-cyan-2: #22bdde; --pa-violet: #a770ff; --pa-violet-2: #6d49d8;
  --pa-orange: #ffbd55; --pa-red: #ff637e;
  --pa-line: rgba(151,233,255,.24); --pa-panel: rgba(13,29,52,.88); --pa-panel-deep: rgba(7,16,31,.92);
  --pa-cut: polygon(0 13px,13px 0,calc(100% - 13px) 0,100% 13px,100% calc(100% - 13px),calc(100% - 13px) 100%,13px 100%,0 calc(100% - 13px));
  --pa-cut-sm: polygon(0 8px,8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px));
  --pa-ease: cubic-bezier(.16,1,.3,1);
  background: var(--pa-bg); color: var(--pa-ink);
  font-family: 'Exo 2', sans-serif;
  border-radius: 0; position: relative;
}
.pvp-arena.hero,
.pvp-arena.arena-intro-wrap,
.pvp-arena.loading-card,
.pvp-arena.arena-result,
.pvp-arena.arena-battle {
  padding: 20px 16px 26px; border: 1px solid var(--pa-line); clip-path: var(--pa-cut);
}
.pvp-arena .hero-kicker { color: var(--pa-cyan); text-shadow: 0 0 8px rgba(82,241,248,.5); }
.pvp-arena h1 { font-family: 'Russo One', 'Exo 2', sans-serif; color: var(--pa-ink); letter-spacing: -.01em; }
.pvp-arena p { color: var(--pa-muted); }
.pvp-arena #arena-find,
.pvp-arena .arena-actions button:not(.secondary-action):not(:disabled),
.pvp-arena button[data-arena-attack]:not(:disabled) {
  background: linear-gradient(135deg, var(--pa-cyan), var(--pa-cyan-2)); color: #041018;
  border: none; font-weight: 800; clip-path: var(--pa-cut-sm);
  box-shadow: 0 0 14px rgba(82,241,248,.35);
}
.pvp-arena .secondary-action { background: var(--pa-panel); color: var(--pa-ink); border: 1px solid var(--pa-line); clip-path: var(--pa-cut-sm); }
.pvp-arena .arena-mode-tabs { background: var(--pa-panel-deep); border: 1px solid var(--pa-line); border-radius: 12px; padding: 3px; }

.pvp-arena .arena-mode-tabs button img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
    opacity: .75;
}

.pvp-arena .arena-mode-tabs button { 
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--workshop-muted);
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .15s, color .15s;
    
}

.pvp-arena .arena-mode-tabs button.active {
    background: linear-gradient(180deg, var(--workshop-amber), var(--workshop-amber-2));
    color: #2a1608;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.pvp-arena .hex-grid { background: radial-gradient(120% 100% at 50% 0%, rgba(167,112,255,.14), transparent 60%), var(--pa-panel-deep); border: 1px solid var(--pa-line); border-radius: 16px; }
.pvp-arena .hex { background: rgba(151,233,255,.05); border: 1px solid rgba(151,233,255,.15); }
.pvp-arena .hex.available { background: rgba(82,241,248,.16); border-color: var(--pa-cyan); box-shadow: 0 0 10px rgba(82,241,248,.35) inset; }
.pvp-arena .hex.you .arena-token { color: var(--pa-cyan); text-shadow: 0 0 8px rgba(82,241,248,.8); }
.pvp-arena .hex.ally .arena-token { color: var(--pa-violet); text-shadow: 0 0 8px rgba(167,112,255,.7); }
.pvp-arena .hex.enemy .arena-token { color: var(--pa-red); text-shadow: 0 0 8px rgba(255,99,126,.7); }
.pvp-arena .arena-status-header { border-bottom: 1px solid var(--pa-line); padding-bottom: 10px; margin-bottom: 12px; }
.pvp-arena .arena-cooldown { background: var(--pa-panel); border: 1px solid var(--pa-line); color: var(--pa-muted); border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 750; }
.pvp-arena .arena-cooldown.active { color: var(--pa-orange); border-color: rgba(255,189,85,.4); }
.pvp-arena .arena-autopass.urgent { color: var(--pa-red); border-color: rgba(255,99,126,.4); }
.pvp-arena .arena-fighter { background: var(--pa-panel); border: 1px solid var(--pa-line); border-radius: 12px; padding: 8px 10px; }
.pvp-arena .arena-fighter progress { accent-color: var(--pa-cyan); }
.pvp-arena .arena-fighter.self progress { accent-color: var(--pa-violet); }
.pvp-arena .battle-log,
.pvp-arena .battle-chat,
.pvp-arena .pvp-scout-panel { background: var(--pa-panel); border: 1px solid var(--pa-line); border-radius: 14px; }
.pvp-arena .result-score > div { background: var(--pa-panel); border: 1px solid var(--pa-line); border-radius: 12px; }
.pvp-arena .item-card.pvp-target { background: var(--pa-panel); border: 1px solid var(--pa-line); }
.pvp-arena .item-card.pvp-target.expanded { border-color: var(--pa-cyan-2); }
.pvp-arena #arena-return {
  background: linear-gradient(135deg, var(--pa-violet), var(--pa-violet-2)); color: #fff;
  border: none; font-weight: 800; clip-path: var(--pa-cut-sm);
  box-shadow: 0 0 14px rgba(167,112,255,.35); margin-top: 18px;
}

/* Фаза 23.1: продакшн-тестирование показало, что скин 23-й фазы покрывал только часть
   базовых классов, переиспользуемых на асинхронном экране разведки/атаки (pvpTargetsView/
   pvpScoutPanel) и на экране итогов боя (награды/кубки лиги) -- .panel/.stat/.badge/
   .item-buy button/.phase-note/.empty/.profile-link/.pvp-online-dot/.battle-attempts-indicator
   рендерились с базовыми (светлыми парчментными) стилями внутри тёмной неоновой арены. */
.pvp-arena .panel { background: var(--pa-panel-deep); border: 1px solid var(--pa-line); border-radius: 16px; box-shadow: none; }
.pvp-arena .panel h2 { color: var(--pa-ink); }
.pvp-arena .stat { background: rgba(6,11,21,.6); border: 1px solid var(--pa-line); color: var(--pa-muted); }
.pvp-arena .stat strong { color: var(--pa-cyan); text-shadow: 0 0 6px rgba(82,241,248,.35); }
.pvp-arena .badge { border: 1px solid var(--pa-cyan-2); color: var(--pa-cyan); background: rgba(82,241,248,.08); }
.pvp-arena .phase-note,
.pvp-arena .empty { color: var(--pa-muted); }
.pvp-arena .item-with-icon h2 { color: var(--pa-ink); }
.pvp-arena .item-with-icon p { color: var(--pa-muted); }
.pvp-arena .profile-link { color: var(--pa-ink); }
.pvp-arena .profile-link:hover,
.pvp-arena .profile-link:focus-visible { color: var(--pa-cyan); }
.pvp-arena .pvp-online-dot { background: var(--pa-muted); }
.pvp-arena .pvp-online-dot.online { background: var(--pa-cyan); box-shadow: 0 0 0 3px rgba(82,241,248,.2); }
.pvp-arena .battle-attempts-indicator,
.pvp-arena .pvp-attempts-indicator { background: rgba(255,189,85,.08); border: 1px solid rgba(255,189,85,.22); }
.pvp-arena .battle-attempts-indicator label { color: var(--pa-muted); }
.pvp-arena .battle-attempts-indicator .battle-attempts-value { color: var(--pa-ink); }
/* Атака (challenge) -- красно-оранжевая акцентная кнопка, как .atk-btn в концепте "Неонит";
   Разведка (scout, уже .secondary-action) остаётся циановой контурной кнопкой без изменений. */
.pvp-arena [data-pvp-challenge]:not(:disabled),
.pvp-arena [data-pvp-challenge-bot]:not(:disabled),
.pvp-arena [data-pvp-match-attack]:not(:disabled) {
  background: linear-gradient(135deg, var(--pa-red), #d8455f); color: #fff;
  border: none; font-weight: 800; clip-path: var(--pa-cut-sm);
  box-shadow: 0 0 14px rgba(255,99,126,.35);
}
.pvp-arena [data-pvp-challenge]:disabled,
.pvp-arena [data-pvp-challenge-bot]:disabled,
.pvp-arena [data-pvp-match-attack]:disabled { background: var(--pa-panel); color: var(--pa-muted); border: 1px solid var(--pa-line); clip-path: var(--pa-cut-sm); }
.pvp-arena [data-pvp-scout],
.pvp-arena [data-pvp-match-reroll] { background: var(--pa-panel); color: var(--pa-ink); border: 1px solid var(--pa-cyan-2); clip-path: var(--pa-cut-sm); }

/* Фаза 23.2: "Найти бой" (асинхронный рейд) -- заменяет прежний список целей одним раскрытым
   соперником + 30-секундным автобоем. Классы .intro-card/.hex-badge/.cta-btn/.targets-head/
   .attempts-chip скопированы буквально из concept-a (см. prototypes/arena_battle_redesign_
   redesign_showcase/concept-a/index.html), но заведены через var(--pa-*) вместо жёстких hex-
   значений, чтобы совпасть 1:1 с уже принятой цветовой темой .pvp-arena. Карточка соперника
   переиспользует .arena-companion-* (тот же визуальный язык, что и вывод питомцев/компаньонов,
   как попросил пользователь) -- эти классы определены глобально и читают var(--arena-*), которых
   в .pvp-arena нет, поэтому здесь алиасим --arena-* на уже заданные --pa-* значения. */
.pvp-arena {
  --arena-ink: var(--pa-ink); --arena-muted: var(--pa-muted);
  --arena-cyan: var(--pa-cyan); --arena-cyan-2: var(--pa-cyan-2);
  --arena-violet: var(--pa-violet); --arena-violet-2: var(--pa-violet-2);
  --arena-orange: var(--pa-orange); --arena-red: var(--pa-red);
  --arena-line: var(--pa-line); --arena-panel: var(--pa-panel); --arena-panel-deep: var(--pa-panel-deep);
  --arena-cut: var(--pa-cut); --arena-cut-sm: var(--pa-cut-sm); --arena-ease: var(--pa-ease);
}
@keyframes pvp-match-sheen { 0%, 15% { translate: -120% 0; } 55%, 100% { translate: 120% 0; } }
.pvp-arena .intro-card.pvp-match-intro {
  position: relative; margin-top: 6px; padding: 22px 18px 24px;
  background: linear-gradient(150deg, rgba(24,45,78,.85), rgba(8,16,32,.94) 60%, rgba(28,15,60,.82));
  clip-path: var(--pa-cut); border: 1px solid var(--pa-line);
  box-shadow: 0 18px 32px rgba(0,0,0,.45), inset 0 0 0 1px rgba(140,225,255,.22);
  text-align: center; overflow: hidden;
}
.pvp-arena .intro-card.pvp-match-intro::before {
  content: ''; position: absolute; inset: 0; opacity: .7; pointer-events: none;
  background: radial-gradient(circle at 30% 12%, rgba(150,90,255,.32), transparent 40%), radial-gradient(circle at 78% 85%, rgba(60,240,255,.25), transparent 42%);
}
.pvp-arena .intro-card.pvp-match-intro h1 { position: relative; font-size: 24px; margin: 8px 0 8px; }
.pvp-arena .intro-card.pvp-match-intro p { position: relative; color: #c3d8ec; font-size: 13.5px; line-height: 1.45; max-width: 280px; margin: 0 auto; }
.pvp-arena .intro-card.pvp-match-intro .pvp-attempts-indicator { position: relative; margin: 12px auto 0; display: inline-flex; }
.pvp-arena .hex-badge {
  position: relative; width: 70px; height: 80px; margin: 2px auto 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pa-cyan-2), var(--pa-violet-2));
  clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);
  box-shadow: 0 0 0 3px rgba(6,12,26,.9), 0 0 24px rgba(90,235,255,.45);
}
.pvp-arena .hex-badge svg { width: 32px; height: 32px; color: #04131c; }
.pvp-arena .cta-btn {
  position: relative; display: block; width: 100%; margin-top: 14px; padding: 15px; text-align: center;
  font-family: 'Russo One', 'Exo 2', sans-serif; font-size: 15px; letter-spacing: .03em; color: #02141c;
  background: linear-gradient(120deg, var(--pa-cyan), #7fd8ff 45%, var(--pa-violet));
  clip-path: var(--pa-cut-sm); box-shadow: 0 12px 26px rgba(79,242,255,.28), inset 0 1px rgba(255,255,255,.4);
  overflow: hidden; border: none; font-weight: 800;
}
.pvp-arena .cta-btn::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, transparent 60%);
  translate: -120% 0; animation: pvp-match-sheen 3.2s ease-in-out infinite;
}
.pvp-arena .targets-head.pvp-match-head { margin-top: 4px; text-align: left; }
.pvp-arena .targets-head.pvp-match-head h1 { font-size: 21px; margin: 6px 0 6px; }
.pvp-arena .targets-head.pvp-match-head p { color: #b7cde3; font-size: 13px; line-height: 1.4; margin: 0; }
.pvp-arena .targets-head.pvp-match-head .pvp-attempts-indicator { margin-top: 10px; }
/* Карточка соперника -- тот же .arena-companion-card, что использует вывод компаньонов, плюс
   собственный статус/таймер/кнопки под .pvp-match-card. */
.pvp-arena .arena-companion-card.pvp-match-card { margin-top: 14px; align-items: flex-start; }
.pvp-arena .arena-companion-card.pvp-match-card .arena-companion-art { width: 84px; height: 84px; }
.pvp-match-status { margin: 2px 0 0; }
.pvp-match-countdown {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 10px;
  font-family: 'Russo One', 'Exo 2', sans-serif; font-size: 12px; letter-spacing: .02em;
  color: var(--pa-cyan); background: rgba(82,241,248,.1); border: 1px solid rgba(82,241,248,.32);
  clip-path: var(--pa-cut-sm);
}
.pvp-match-countdown.urgent { color: var(--pa-red); background: rgba(255,99,126,.12); border-color: rgba(255,99,126,.4); animation: pvp-match-urgent-pulse 1s ease-in-out infinite; }
@keyframes pvp-match-urgent-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.pvp-match-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pvp-match-actions button { flex: 1 1 auto; min-width: 128px; }
/* Мобильная адаптация карточки соперника (Фаза 23.2): на ~375px 5 мини-статов в .arena-companion-stats
   (flex+wrap, gap:10px) не помещались в одну строку -- LUCK уезжал на вторую строку и раздувал
   карточку, из-за чего кнопки "Сменить/Атаковать" наезжали на плавающий пузырь чата питомца.
   Фиксируем 5 равных колонок только для .pvp-match-card, чтобы ряд стат гарантированно был в одну строку. */
@media (max-width: 480px) {
  .pvp-arena .arena-companion-card.pvp-match-card .arena-companion-art { width: 64px; height: 64px; }
  .pvp-arena .pvp-match-card .arena-companion-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .pvp-arena .pvp-match-card .arena-companion-mini-stat { flex-direction: column; align-items: flex-start; gap: 0; }
  .pvp-arena .pvp-match-card .arena-companion-mini-stat span { font-size: 8px; }
  .pvp-arena .pvp-match-card .arena-companion-mini-stat b { font-size: 11px; }
}

/* Фаза 23.3: инлайн SVG-иконки валют и общих символов вместо emoji (нестабильный рендер на
   разных устройствах/платформах). currency-icon покрывает мягкую/твёрдую валюту и TON,
   misc-icon -- песочные часы, предупреждение, смену цели и т.п. По умолчанию иконка ведёт себя
   как текстовый символ (inline-block, выравнивание по базовой линии) -- размер/цвет настраиваются
   через font-size/color родителя, если явный модификатор ниже не переопределяет их. */
.currency-icon,.misc-icon { display:inline-block; width:1em; height:1em; vertical-align:-0.16em; flex:0 0 auto; }
.currency-icon { margin:0 .2em; }
.currency-icon--soft { color:#f0bc71; }
.currency-icon--hard { color: #ffb020; }
.currency-icon--ton { color:#5aa9ff; }
.misc-icon { margin:0 .18em; color:currentColor; opacity:.85; }
.misc-icon--hourglass { color:#f0bc71; opacity:1; }
.misc-icon--warning { color:#ff8d91; opacity:1; }
.misc-icon--swap { color:inherit; opacity:1; }
/* Иконки покрупнее в контексте наград/списков лидеров -- заданы явно, а не через наследование
   font-size, чтобы не зависеть от размера окружающего текста. */
.leaderboard-trophy-icon,.leaderboard-prize-icon { width:13px; height:13px; margin:0 3px 0 0; }
.pvp-match-actions .misc-icon,.pvp-match-actions .currency-icon { width:14px; height:14px; }
/* Баг 3 (арена): .secondary-action тянет нейтральный !important-фон из общего пресета, из-за
   чего на тёмном фоне арены кнопка выглядит почти без стилей рядом с ярким «Атаковать» --
   даём ей собственный !important-пресет на базе pa-* переменных темы арены. */
.pvp-arena .pvp-match-actions .secondary-action { background:var(--pa-panel-deep)!important; color:var(--pa-ink)!important; border:1px solid var(--pa-cyan-2)!important; }
.pvp-arena .pvp-match-actions .secondary-action:hover,.pvp-arena .pvp-match-actions .secondary-action:focus-visible { border-color:var(--pa-cyan)!important; background:rgba(82,241,248,.08)!important; }

/* Баг 5 (итоги боя): компактные блоки наград по концепту -- иконка+подпись сверху одной строкой,
   крупное значение снизу. Базовый (не-pvp-arena) вид на случай использования вне арены. */
.result-rewards-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:9px; margin-top:13px; }
.result-reward { position:relative; padding:12px 12px 12px 33px; min-height:64px; background:rgba(0,0,0,.14); border-radius:12px; text-align:left; }
.result-reward-icon { position:absolute; top:12px; left:12px; display:flex; color:var(--muted); }
.result-reward-icon .result-reward-icon-svg,.result-reward-icon .result-reward-icon-img { width:15px; height:15px; }
.result-reward-label { display:block; color:var(--muted); font-size:11px; }
.result-reward-value { display:block; margin-top:8px; font-size:21px; font-weight:800; color:var(--text); }
.result-reward-note { margin-top:-2px; color:var(--accent-2); font-size:11px; font-weight:650; }
/* Заголовок итогов: маленький ромб-маркер перед текстом кикера, как в концепте. */
.result-kicker-mark { display:inline-block; width:7px; height:7px; margin-right:6px; transform:rotate(45deg); background:currentColor; vertical-align:middle; }

/* pvp-arena-специфичные цвета/свечение для блоков наград и общего свечения карточки итогов. */
.pvp-arena.arena-result { border-color:rgba(167,112,255,.4); box-shadow:0 0 34px rgba(167,112,255,.16), inset 0 0 46px rgba(167,112,255,.06); }
.pvp-arena.arena-result .hero-kicker { color:var(--pa-violet); text-shadow:0 0 8px rgba(167,112,255,.55); }
.pvp-arena.arena-result .result-kicker-mark { box-shadow:0 0 8px rgba(167,112,255,.8); }
.pvp-arena.arena-result.outcome-loss .hero-kicker,
.pvp-arena.arena-result.outcome-loss .arena-result-subtitle { color:var(--pa-red); }
.pvp-arena.arena-result.outcome-loss.arena-result { border-color:rgba(255,99,126,.4); box-shadow:0 0 34px rgba(255,99,126,.16), inset 0 0 46px rgba(255,99,126,.06); }
.pvp-arena.arena-result.outcome-loss .result-kicker-mark { box-shadow:0 0 8px rgba(255,99,126,.8); }
.pvp-arena .arena-result-subtitle { color:var(--pa-muted); }
.pvp-arena .result-reward { background:rgba(6,11,21,.6); border:1px solid var(--pa-line); }
.pvp-arena .result-reward-icon,.pvp-arena .result-reward-label { color:var(--pa-muted); }
.pvp-arena .result-reward-value { color:var(--pa-cyan); text-shadow:0 0 6px rgba(82,241,248,.35); }
.pvp-arena .result-reward-note { color:var(--pa-cyan); }
@media (min-width:560px) { .result-rewards-grid { grid-template-columns:repeat(4,1fr); } }

/* Фаза 23.3 (баг 6): кнопки приёма/отклонения заявки в друзья -- профиль питомца отдавал их
   безо всякого класса, из-за чего "Принять" рендерилась как голый нестилизованный текст
   браузера. Приём заявок перенесён в «Список друзей» (см. friendsView()/app.js), но общие
   стили кнопок нужны и там, и в информационной подсказке профиля. */
.profile-request-hint { display:flex; align-items:center; gap:8px; }
.profile-request-hint .misc-icon { width:16px; height:16px; flex:0 0 auto; color:var(--accent-2); }
.friend-requests-block { margin-bottom:18px; }
.friend-requests-title { margin:0 0 10px; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.07em; font-weight:800; }
.friend-requests-list { display:grid; gap:10px; }
.friend-request-card { display:grid; gap:12px; padding:14px; border-radius:16px; border:1px solid rgba(126,229,173,.28); background:linear-gradient(145deg,rgba(126,229,173,.09),rgba(36,43,56,.94)); }
.friend-request-card h2 { margin:0; font-size:15px; }
.friend-request-card p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.friend-request-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.friend-request-actions button { min-height:42px; padding:10px 12px; border-radius:11px; font-size:13px; font-weight:750; display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.friend-request-actions button:not(.secondary-action) { background:var(--accent); color:#132219; }
.friend-request-actions .misc-icon { width:15px; height:15px; }



/* ==========================================================================================
   Фаза 24.1: Мастерская -- чертежи снаряжения (Уголь/Закалка, наём кузнецов, архив+доска
   заказов+обмен обрывков, реформация со страховкой). Append-only, никакие существующие правила
   выше не изменялись. Namespace: .ws-* / --ws-* -- полностью изолировано от Кузницы/.forge-.
   ПРАВКА (композиция): общая структура/сетка карточек -- по образцу concept-b (верхняя строка
   ресурсов, герой-панель с фоном+иконкой предмета, карточка предмета, блок Закала, сетка
   снаряжения, нижние табы). Точечные компоненты (прогресс-бар Закала, кнопка «Закалка»,
   карточка подмастерья, карточки найма кузнецов) + вся палитра/шрифты экрана -- по образцу
   concept-a (тёплый угольно-коричневый фон, оранжево-золотые акценты, Cinzel+Manrope).
   Все токены ниже -- НОВЫЕ переменные с префиксом --workshop-, не пересекаются с глобальными
   --bg/--surface/--text/--muted/--line/--accent. .ws-root -- единственный корневой скоуп:
   все дочерние правила читают только --workshop-* и переопределяют фон/шрифт/цвет с достаточной
   специфичностью, чтобы полностью перебить унаследованные .app/.screen/:root правила. */
.ws-root {
  --workshop-bg: #1a1210;
  --workshop-bg-2: #241713;
  --workshop-surface: #251a15;
  --workshop-success: #7fdc94;
  --workshop-surface-2: #2e1f18;
  --workshop-card: rgba(37,26,21,.86);
  --workshop-card-2: rgba(20,14,11,.7);
  --workshop-line: rgba(214,150,90,.22);
  --workshop-line-soft: rgba(214,150,90,.14);
  --workshop-text: #f3e6d8;
  --workshop-muted: #b9a08d;
  --workshop-ember: #ff7a33;
  --workshop-ember-2: #ff9a3d;
  --workshop-gold: #ffcf6b;
  --workshop-gold-2: #e0a53a;
  --workshop-amber: #f0a24e;
  --workshop-amber-2: #d9862f;
  --workshop-gold-light: #ffcf8a;
  --workshop-heat-red: #e0453f;
  --workshop-heat-orange: #f0812f;
  --workshop-heat-yellow: #ffce4d;
  --workshop-cyan: #52d8f8;
  --workshop-cyan-soft: rgba(82,216,248,.14);
  --workshop-green: #7ee5ad;
  --workshop-green-soft: rgba(126,229,173,.12);
  --workshop-green-line: rgba(126,229,173,.32);
  --workshop-parchment: #e8d9b8;
  --workshop-brass: #b98a4a;
  --workshop-danger: #ff8d91;
  --workshop-font-display2: 'Cinzel', serif;
  --workshop-font-display: 'Manrope', ui-sans-serif, sans-serif;
  --workshop-font-body: 'Manrope', ui-sans-serif, sans-serif;
  --cut: polygon(0 12px, 12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
  --cut-sm: polygon(0 7px, 7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px));
  --ease: cubic-bezier(.16,1,.3,1);

  display:grid; 
  gap:1px;
  background: transparent;
  margin:-16px -16px 0; padding:16px; border-radius:0 0 18px 18px;
  font-family: var(--workshop-font-body) !important;
  color: var(--workshop-text) !important;
}
.ws-root, .ws-root * { box-sizing:border-box; }
.ws-root h1, .ws-root h2, .ws-root h3 { font-family: var(--workshop-font-display) !important; color: var(--workshop-text); letter-spacing:-.01em; }
.ws-root .screen-head h1 { color: var(--workshop-text) !important; }
.ws-root .screen-head .hero-kicker { color: var(--workshop-amber); font-family: var(--workshop-font-body); }
.ws-root .icon-button { background: var(--workshop-surface-2) !important; border:1px solid var(--workshop-line) !important; color: var(--workshop-amber) !important; }
.ws-root .badge { background: rgba(0,0,0,.24); border:1px solid var(--workshop-line); color: var(--workshop-muted); }
.ws-root .empty { color: var(--workshop-muted); }

/* Верхние табы Мастерская/Чертежи/Реформация -- перестилизованы под тёплую палитру,
   заменяют зелёный активный таб общего стиля приложения (.tabs button.active) */
.ws-root .ws-tabs { display:flex; gap:8px; margin:2px 0 4px; flex-wrap:wrap; }
.ws-root .ws-tabs button { flex:1 1 auto; min-height:40px; padding:9px 14px; border-radius:12px; font-size:12px; font-weight:700; font-family: var(--workshop-font-body); background: var(--workshop-card-2) !important; color: var(--workshop-muted) !important; border:1px solid var(--workshop-line) !important; transition: background .14s, color .14s, border-color .14s; }
.ws-root .ws-tabs button.active { background: linear-gradient(135deg, var(--workshop-amber), var(--workshop-amber-2)) !important; color:#241304 !important; border-color: transparent !important; box-shadow:0 6px 16px rgba(240,162,78,.28); }

/* Верхняя строка ресурсов -- композиция как в concept-b (бейджи угля/монет/кристаллов
   в ряд над героем), перекрашена в тёплую палитру. Пока подключён только Уголь -- монеты
   и кристаллы уже отображаются в общем sidebar приложения, не дублируются здесь. */
.ws-root .ws-resource-row { display:flex; gap:10px; flex-wrap:wrap; }
.ws-root .ws-coal-badge { display:flex; align-items:center; gap:9px; padding:8px 12px; border-radius:13px; background: var(--workshop-card) !important; border:1px solid var(--workshop-line) !important; }
.ws-root .ws-coal-icon { width:26px; height:26px; flex:0 0 auto; border-radius:8px; object-fit:cover; }
.ws-root .ws-coal-badge strong { display:block; font-family: var(--workshop-font-display); font-size:16px; color: var(--workshop-amber); line-height:1.1; }
.ws-root .ws-coal-badge small { color: var(--workshop-muted); font-size:10px; }

/* Карточка подмастерья-питомца -- отдельный законченный компонент (НЕ оверлей поверх фона
   героя): тёмно-зелёная рамка/фон, круглая иконка питомца слева, 2 строки текста справа. */
.ws-root .assist-strip {
    position: relative;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .26);
    border: 1px solid var(--workshop-line);
    border-radius: 12px;
    text-align: left;
}

.ws-root .assist-strip .txt {
    flex: 1;
    min-width: 0;
}

.ws-root .assist-strip .txt b {
    display: block;
    font-size: 12px;
    font-family: 'Manrope';
    font-weight: 800;
    color: var(--workshop-success);
}

.ws-root .assist-strip .txt span {
    display: block;
    font-size: 10.5px;
    color: var(--workshop-muted);
    margin-top: 1px;
}

.ws-root .assist-strip img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    border: 2px solid var(--workshop-success);
}

.ws-root .ws-apprentice-card { display:flex; align-items:center; gap:12px; padding:11px 14px; border-radius:16px; background: linear-gradient(145deg, var(--workshop-green-soft), rgba(20,14,11,.55)) !important; border:1px solid var(--workshop-green-line) !important; }
.ws-root .ws-apprentice-card--muted { background: linear-gradient(145deg, rgba(185,160,141,.08), rgba(20,14,11,.55)) !important; border-color: var(--workshop-line) !important; }
.ws-root .ws-apprentice-avatar { width:44px; height:44px; border-radius:50%; flex:0 0 auto; display:grid; place-items:center; background: rgba(126,229,173,.16); border:2px solid var(--workshop-green); color: var(--workshop-green); }
.ws-root .ws-apprentice-card--muted .ws-apprentice-avatar { background: rgba(185,160,141,.14); border-color: var(--workshop-muted); color: var(--workshop-muted); }
.ws-root .ws-apprentice-avatar .ws-icon { width:22px; height:22px; }
.ws-root .ws-apprentice-text { display:grid; gap:2px; min-width:0; }
.ws-root .ws-apprentice-text strong { font-family: var(--workshop-font-display); font-size:13px; color: var(--workshop-text); }
.ws-root .ws-apprentice-text span { font-size:11.5px; color: var(--workshop-green); line-height:1.4; }
.ws-root .ws-apprentice-card--muted .ws-apprentice-text span { color: var(--workshop-muted); }

/* Герой-панель -- фон мастерской, карточка активного предмета (иконка+статы), блок Закала.
   Композиция: как в concept-b (карточка предмета -- отдельный тёмный блок под героем,
   не полупрозрачная плашка), палитра/типографика -- как в concept-a. */
.ws-root .ws-hero-card { position:relative; background-size:cover; background-position:center; display:grid; gap:14px; min-height:160px; }
.ws-root .ws-active-summary { 
    display:flex; 
    margin: 0 auto;
    gap:13px; 
    align-items:center; 
    padding:13px; 
    
}
.ws-root .ws-active-summary h2 { margin:3px 0; font-size:17px; }
.ws-root .ws-active-summary small { color: var(--workshop-muted); font-size:11px; }
.ws-root .ws-empty-hero { padding:16px; border-radius:14px; background: var(--workshop-card) !important; border:1px dashed var(--workshop-line) !important; text-align:center; display:grid; gap:10px; backdrop-filter:blur(6px); }
.ws-root .ws-empty-hero p { margin:0; color: var(--workshop-muted); font-size:13px; line-height:1.5; }

/* Блок Закала -- прогресс-бар и кнопка «Закалка», точь-в-точь стиль concept-a */
.ws-root .ws-heat-block { padding:13px; border-radius:14px; border:1px solid var(--workshop-line) !important; backdrop-filter:blur(6px); display:grid; gap:10px; }
.ws-root .temper-block {
    position: relative;
    text-align: left;
}
.ws-root .temper-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    color: #c9a688;
    margin-bottom: 5px;
}
.ws-root .temper-track {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .4);
    border: 1px solid var(--line);
    overflow: hidden;
}
.ws-root .temper-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff4d1f, #ff9a3d, #ffcf6b);
    box-shadow: 0 0 12px rgba(255, 140, 60, .6);
    transition: width .5s cubic-bezier(.16,1,.3,1);
}

.ws-root .temper-btn {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 16px;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .02em;
    color: #1a0d04;
    background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
    clip-path: var(--cut-sm);
    box-shadow: 0 12px 26px rgba(255, 140, 60, .3), inset 0 1px rgba(255, 255, 255, .4);
    overflow: hidden;
}
.ws-root .temper-btn .cost-line {
    display: block;
    font-family: 'Manrope';
    font-size: 11px;
    font-weight: 700;
    margin-top: 3px;
    opacity: .85;
}
.ws-root .temper-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .5) 45%, transparent 60%);
    translate: -120% 0;
    animation: sheen 3.2s ease-in-out infinite;
}

@keyframes sheen{0%,55%{translate:-120% 0;}75%{translate:130% 0;}100%{translate:130% 0;}}

.ws-root .heat-session {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--workshop-muted);
    font-weight: 600;
}
.ws-root .heat-session .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--workshop-ember-2);
    box-shadow: 0 0 6px var(--workshop-ember-2);
}
.ws-root


.ws-root .ws-heat-label { display:flex; justify-content:space-between; font-size:12px; color: var(--workshop-muted); }
.ws-root .ws-heat-label strong { color: var(--workshop-amber); font-size:15px; font-family: var(--workshop-font-display); }
.ws-root .ws-heat-bar { width:100%; height:12px; border-radius:99px; overflow:hidden; border:0; }
.ws-root .ws-heat-bar::-webkit-progress-bar { background:#150e0b; }
.ws-root .ws-heat-bar::-webkit-progress-value { background: linear-gradient(90deg, var(--workshop-heat-red), var(--workshop-heat-orange), var(--workshop-heat-yellow)); border-radius:99px; }
.ws-root .ws-heat-bar { color: var(--workshop-heat-orange); } /* firefox value fill */
.ws-root .ws-heat-bar::-moz-progress-bar { background: linear-gradient(90deg, var(--workshop-heat-red), var(--workshop-heat-orange), var(--workshop-heat-yellow)); border-radius:99px; }
.ws-root .ws-heat-note { margin:0; color: var(--workshop-amber); font-size:12px; }

/* Кнопка «Закалка» -- крупная, двухстрочная (жирный заголовок + мелкая подпись), золотисто-
   оранжевый градиент -- копия формы/раскладки кнопки из concept-a 1_home_desktop.png */
.ws-root .ws-heat-button { width:100%; min-height:60px; padding:12px 18px; display:grid; gap:3px; justify-items:center; }
.ws-root .ws-heat-button-title { display:inline-flex; align-items:center; gap:8px; font-family: var(--workshop-font-display); font-size:16px; font-weight:800; }
.ws-root .ws-heat-button-sub { font-family: var(--workshop-font-body); font-size:11px; font-weight:600; opacity:.82; }

/* Кнопки Мастерской -- база .ws-btn плюс модификаторы accent/ghost, тёплая палитра */
.ws-root .ws-btn { min-height:44px; padding:10px 16px; border-radius:12px; font-size:13px; font-weight:700; font-family: var(--workshop-font-body); background: var(--workshop-surface-2) !important; color: var(--workshop-text) !important; border:1px solid var(--workshop-line) !important; display:inline-flex; align-items:center; justify-content:center; gap:7px; transition:transform .12s, border-color .12s; }
.ws-root .ws-btn:active { transform:scale(.97); }
.ws-root .ws-btn--accent { background: linear-gradient(135deg, var(--workshop-amber), var(--workshop-amber-2)) !important; color:#241304 !important; border-color:transparent !important; box-shadow:0 6px 16px rgba(240,162,78,.28); }
.ws-root .ws-btn--ghost { background: rgba(16,19,26,.0) !important; background-color: rgba(37,26,21,.55) !important; border-color: var(--workshop-line) !important; color: var(--workshop-text) !important; }
.ws-root .ws-btn.active { border-color: var(--workshop-cyan) !important; color: var(--workshop-cyan) !important; }
.ws-root .ws-btn:disabled { opacity:.45; cursor:not-allowed; box-shadow:none; }

/* Экран 2: Найм кузнеца -- карточки как в concept-a 2_hire_desktop.png: тёмная угловая
   карточка, имя/бейдж редкости/время найма слева, кнопка «Нанять N монет» справа */
.ws-root .ws-panel { display:grid; gap:13px; }
.ws-root .ws-panel-head { display:flex; justify-content:space-between; align-items:baseline; gap:10px; flex-wrap:wrap; }
.ws-root .ws-panel-head h2 { margin:0; font-size:18px; }
.ws-root .ws-panel-head span { color: var(--workshop-muted); font-size:12px; }
.ws-root .ws-hire-slots { margin:0; color: var(--workshop-muted); font-size:12px; }
.ws-root .ws-smith-list { display:grid; gap:11px; }
.ws-root .ws-smith-card { display:grid; grid-template-columns:56px 1fr; gap:12px; align-items:center; padding:14px; border-radius:15px; background: var(--workshop-card-2) !important; border:1px solid var(--workshop-line) !important; }
.ws-root .ws-smith-card--locked { opacity:.55; }
.ws-root .ws-smith-portrait { width:56px; height:56px; border-radius:50%; object-fit:cover; border:2px solid var(--workshop-brass); grid-row:1/3; }
.ws-root .ws-smith-info h3 { margin:2px 0; font-size:15px; }
.ws-root .ws-smith-info small { color: var(--workshop-muted); font-size:11px; }
.ws-root .ws-smith-info .badge { color: var(--workshop-amber); border-color: var(--workshop-line); }
.ws-root .ws-smith-action { grid-column:2; display:flex; align-items:center; justify-content:space-between; gap:9px; flex-wrap:wrap; }
.ws-root .ws-smith-action strong { font-size:13px; display:flex; align-items:center; gap:4px; white-space:nowrap; color: var(--workshop-text); }
.ws-root .ws-locked-note { width:100%; color: var(--workshop-danger); font-size:10px; }

/* Экран 3: ожидание найма (countdown внутри карточки чертежа) */
.ws-root .ws-hire-countdown { display:inline-flex; align-items:center; gap:6px; padding:9px 12px; border-radius:10px; background: var(--workshop-cyan-soft) !important; color: var(--workshop-cyan) !important; font-size:13px; font-weight:700; }

/* Экран 4: Чертежи + Доска заказов + Обмен обрывков -- сетка снаряжения как в concept-b,
   перекрашенная. Механика/разметка не меняется, только палитра. */
.ws-root .ws-create-row { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; }
.ws-root .ws-create-row select { min-height:40px; padding:0 10px; border-radius:10px; background: var(--workshop-surface-2) !important; border:1px solid var(--workshop-line) !important; color: var(--workshop-text) !important; font-size:12px; }
.ws-root .ws-limit-note { margin:0; color: var(--workshop-danger); font-size:11px; }
.ws-root .ws-blueprint-list { display:grid; gap:11px; }
.ws-root .ws-blueprint-card { padding:13px; border-radius:15px; background: var(--workshop-card-2) !important; border:1px solid var(--workshop-line) !important; display:grid; gap:10px; }
.ws-root .ws-blueprint-card--active { border-color: rgba(240,162,78,.5) !important; box-shadow:0 0 0 1px rgba(240,162,78,.2) inset; }
.ws-root .ws-blueprint-head { display:flex; gap:12px; align-items:center; }
.ws-root .ws-blueprint-head h3 { margin:3px 0; font-size:15px; }
.ws-root .ws-blueprint-status { color: var(--workshop-muted); font-size:11px; }
.ws-root .ws-progress { display:grid; gap:5px; }
.ws-root .ws-progress progress { width:100%; height:9px; border-radius:99px; border:0; }
.ws-root .ws-progress progress::-webkit-progress-bar { background:#150e0b; }
.ws-root .ws-progress progress::-webkit-progress-value { background: linear-gradient(90deg, var(--workshop-cyan), #8fe9ff); border-radius:99px; }
.ws-root .ws-progress progress::-moz-progress-bar { background: linear-gradient(90deg, var(--workshop-cyan), #8fe9ff); border-radius:99px; }
.ws-root .ws-progress span { color: var(--workshop-muted); font-size:11px; }
.ws-root .ws-blueprint-actions { display:flex; justify-content:flex-end; }
.ws-root .ws-subpanel { padding-top:13px; border-top:1px solid var(--workshop-line) !important; display:grid; gap:11px; }
.ws-root .ws-subpanel .panel-title h2 { font-family: var(--workshop-font-display); }
.ws-root .ws-subpanel-icon { width:22px; height:22px; border-radius:7px; object-fit:cover; }
.ws-root .ws-orders-list { display:grid; gap:9px; }
.ws-root .ws-order-card { padding:11px; border-radius:12px; background: rgba(240,162,78,.09) !important; border:1px solid rgba(240,162,78,.26) !important; }
.ws-root .ws-order-card p { margin:5px 0 0; font-size:12px; color: var(--workshop-text); }
.ws-root .ws-order-card small { color: var(--workshop-muted); font-size:10px; }
.ws-root .ws-exchange-row { display:grid; grid-template-columns:1fr 1fr 64px auto; gap:8px; }
.ws-root .ws-exchange-row select, .ws-root .ws-exchange-row input { min-height:40px; padding:0 8px; border-radius:10px; background: var(--workshop-surface-2) !important; border:1px solid var(--workshop-line) !important; color: var(--workshop-text) !important; font-size:12px; }
.ws-root .ws-exchange-note { display:flex; align-items:center; gap:6px; margin:0; color: var(--workshop-muted); font-size:11px; }
.ws-root .ws-scrap-icon-inline { width:15px; height:15px; flex:0 0 auto; object-fit:cover; border-radius:4px; }
.ws-root .ws-scrap-inventory { display:flex; flex-wrap:wrap; gap:7px; }
.ws-root .ws-scrap-chip { padding:6px 10px; border-radius:99px; background: rgba(0,0,0,.24) !important; border:1px solid var(--workshop-line) !important; font-size:11px; color: var(--workshop-muted); }
.ws-root .ws-scrap-chip strong { color: var(--workshop-text); }
.ws-root .ws-scrap-chip--empty { color: var(--workshop-muted); font-style:italic; }

/* Экран 5: Реформация -- механика не меняется, только палитра */
.ws-root .ws-reform-intro { margin:0; color: var(--workshop-muted); font-size:12px; line-height:1.5; }
.ws-root .ws-reform-group-select { display:flex; gap:7px; overflow-x:auto; padding-bottom:2px; scrollbar-width:none; }
.ws-root .ws-reform-group-select .ws-btn { flex:0 0 auto; white-space:nowrap; }
.ws-root .ws-reform-items { display:grid; grid-template-columns:repeat(2,1fr); gap:9px; }
.ws-root .ws-reform-item { position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; padding:11px; border-radius:13px; background: var(--workshop-card-2) !important; border:1px solid var(--workshop-line) !important; text-align:center; font-size:11px; color: var(--workshop-muted); }
.ws-root .ws-reform-item--selected { border-color: var(--workshop-cyan) !important; background: rgba(82,216,248,.1) !important; color: var(--workshop-text); }
.ws-root .ws-reform-check { position:absolute; top:8px; right:8px; width:18px; height:18px; color: var(--workshop-cyan); pointer-events:none; }
.ws-root .ws-reform-stat-row { display:flex; align-items:center; gap:10px; font-size:12px; color: var(--workshop-muted); }
.ws-root .ws-reform-stat-row select { min-height:38px; padding:0 10px; border-radius:10px; background: var(--workshop-surface-2) !important; border:1px solid var(--workshop-line) !important; color: var(--workshop-text) !important; font-size:12px; }
.ws-root .ws-reform-chance { margin:0; color: var(--workshop-amber); font-size:12px; }
.ws-root .ws-reform-submit { width:100%; }

/* Экран 6: Реалиция -- оверлей после успешного крафта/реформации */
.ws-root .ws-reveal-overlay,
.ws-reveal-overlay { position:fixed; inset:0; z-index:9; display:grid; place-items:center; padding:20px; background:rgba(8,6,5,.76); backdrop-filter:blur(3px); }
.ws-root .ws-reveal-card,
.ws-reveal-card { width:min(100%,420px); padding:22px; border-radius:22px; background-size:cover; background-position:center; background-color: var(--workshop-surface, #251a15); border:1px solid rgba(240,162,78,.4); box-shadow:0 20px 50px rgba(0,0,0,.5); text-align:center; display:grid; gap:14px; justify-items:center; font-family: var(--workshop-font-body, 'Manrope', sans-serif); color: var(--workshop-text, #f3e6d8); }
.ws-reveal-kicker { text-transform:uppercase; letter-spacing:.1em; font-size:11px; font-weight:800; color: var(--workshop-amber, #f0a24e); }
.ws-reveal-item { display:flex; flex-direction:column; align-items:center; gap:8px; }
.ws-reveal-item h2 { margin:0; font-family: var(--workshop-font-display, 'Cinzel', serif); font-size:20px; color: var(--workshop-text, #f3e6d8); }
.ws-reveal-item small { color: var(--workshop-cyan, #52d8f8); font-size:12px; }
.ws-reveal-note { margin:0; color: var(--workshop-muted, #b9a08d); font-size:12px; line-height:1.4; max-width:320px; }

@media (min-width:560px) {
  .ws-root .ws-reform-items { grid-template-columns:repeat(3,1fr); }
  .ws-root .ws-exchange-row { grid-template-columns:1fr 1fr 80px auto; }
}

/* Чекпоинт-фиксы главного экрана "Мастерская": (1) .ws-btn перебивал display:grid у кнопки
   закалки из-за одинаковой специфичности и порядка после в исходной таблице -- заголовок/подпись
   считались в одну строку; (2) кнопка закалки/блок закала обрезалась нижним fixed-таббаром
   (.app-bottom-nav, высота ~65при z-index:15) -- глобальный отступ .app{padding-bottom:112px} оказался
   недостаточен для этого конкретного блока -- даём блоку закала собственный зазор внизу;
   (3) подпись процента закала перекрывалась плавающей кнопкой чата (.chat-fab, fixed сверху всего) --
   даём самой карточке закала достаточный правый отступ, чтобы текст не заезжал под неё. */
.ws-root .ws-heat-button.ws-btn { display:grid !important; gap:3px; justify-items:center; align-content:center; }
/* Настоящий padding-bottom на .ws-root (а не margin на последнем блоке) -- чтобы реально увеличить
   высоту корневого элемента и гарантированно вытолкнуть кнопку закалки выше fixed-таббара
   независимо от того, был инициативный скролл или нет (маргин/padding на внутреннем блоке не увеличивает
   высоту скролла, пока контент и без него помещается в вьюпорт). */
.ws-root { padding-bottom:96px !important; }
@media (max-width:559px) {
  .ws-root { padding-bottom:120px !important; }
}
/* Процент закала и вся карточка закала не должны заходить под плавающую кнопку чата (.chat-fab,
   width:56px + right:16px → занятая зона ~72px справа) независимо от вертикальной позиции скролла --
   даём самому блоку закала постоянный правый отступ. */
.ws-root .ws-heat-block { margin-right:76px; }
@media (max-width:559px) {
  .ws-root .ws-heat-block { margin-right:0; }
  .ws-root .ws-heat-label { padding-right:76px; }
}

/* Фаза 24.3 (баг 2): мобильный оверфлоу вкладки «Чертежи» -- корень в том, что
.ws-panel сам — grid без явной ширины колонок (одна неявная колонка -- максимальный min-content
её детей), а grid-элементы по умолчанию имеют min-width:auto (= min-content своих детей),
что заставляет долгий <select> растягивать весь .ws-panel (и всё, включая заголовок
и картами) шире вьюпорта на мобилайном — точно как на скрине от пользователя. Убрав выбора
слота/редкости убрал половину причины (.ws-create-row), но .ws-exchange-row остаётся -- даём
защитный min-width:0 всем grid-детям обеих рядов и ставим аккуратнее чертёж на узком. */
.ws-root .ws-create-row > *,
.ws-root .ws-exchange-row > * { min-width:0; }
.ws-root .ws-create-row--single { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; grid-template-columns:none; }
.ws-root .ws-create-row--single .ws-btn { flex:0 0 auto; }
.ws-root .ws-create-hint { color: var(--workshop-muted); font-size:11px; }
.ws-root .ws-coal-countdown { display:block; color: var(--workshop-muted); font-size:10px; margin-top:2px; }
@media (max-width:479px) {
  .ws-root .ws-exchange-row { grid-template-columns:1fr 1fr; }
}

/* Фаза 24.4: инвентарь экипировки для закалки на герой-экране Мастерской -- карточки зеркалят
.ws-blueprint-card/.ws-blueprint-head/.ws-blueprint-actions (тот же паттерн, свои классы, чтобы
не задевать существующую вёрстку чертежей append-only правилом проекта). */
.ws-root .ws-section-title { margin:18px 0 0; font-size:14px; color: var(--workshop-text); font-family: var(--workshop-font-display); }
.ws-root .ws-equip-inventory { display:grid; gap:8px; margin-top:4px; }
.ws-root .ws-equip-legend { margin:0; color: var(--workshop-muted); font-size:11px; }
/* Фаза 24.4 (фикс по фидбеку x2): компактная одна строка с горизонтальной прокруткой вместо
сетки, переносящейся на несколько строк -- тот же паттерн, что .tabs/.forge-picker/
.ws-reform-group-select (flex nowrap + overflow-x:auto + scrollbar-width:none). Карточка = иконка
(фон по редкости через --rarity-soft, без декоративной рамки RARITY_FRAMES) + жирное название +
одна строка "Ур. X · статус". Вся карточка -- один клик = один action. */
.ws-root .ws-equip-grid { display:flex; flex-wrap:nowrap; overflow-x:auto; gap:9px; padding-bottom:4px; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.ws-root .ws-equip-grid::-webkit-scrollbar { display:none; }
.ws-root .ws-equip-card { flex:0 0 84px; width:84px; padding:9px 7px 10px; border-radius:13px; background: var(--workshop-card-2) !important; border:1.5px solid var(--rarity-color, var(--workshop-line)) !important; box-shadow:0 0 0 1px var(--rarity-soft, transparent) inset; display:flex; flex-direction:column; align-items:center; gap:5px; text-align:center; font-family:inherit; cursor:pointer; transition:transform .12s ease, box-shadow .12s ease; }
.ws-root button.ws-equip-card:hover { transform:translateY(-1px); }
.ws-root div.ws-equip-card { cursor:default; opacity:.72; }
.ws-root .ws-equip-card--active { box-shadow:0 0 0 2px var(--rarity-color, var(--workshop-cyan)) inset; }
.ws-root .ws-equip-card--ready { animation:ws-equip-ready-pulse 1.6s ease-in-out infinite; }
.ws-root .ws-equip-card--max { opacity:.6; }
.ws-root .ws-equip-icon { width:40px; height:40px; border-radius:11px; display:flex; align-items:center; justify-content:center; background: var(--rarity-soft, rgba(157,180,201,.18)) !important; }
.ws-root .ws-equip-icon .item-icon,.ws-root .ws-equip-icon .item-icon-fallback { width:26px; height:26px; border-radius:0; }
.ws-root .ws-equip-name { margin:0; font-size:11px; line-height:1.25; color: var(--workshop-text); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.ws-root .ws-equip-status { display:flex; align-items:center; justify-content:center; gap:3px; color: var(--workshop-muted); font-size:9.5px; line-height:1.3; }
.ws-root .ws-equip-mini-icon { width:10px; height:10px; flex:0 0 auto; }
@keyframes ws-equip-ready-pulse { 0%,100% { box-shadow:0 0 0 1px var(--rarity-soft, transparent) inset; } 50% { box-shadow:0 0 0 2px var(--rarity-color, var(--workshop-cyan)) inset; } }
.ws-root .ws-empty-note { margin:0; color: var(--workshop-muted); font-size:12px; line-height:1.5; }
/* Фаза 24.4: строка-стрик под прогресс-баром Закалки (переехала из сабтекста кнопки) и
опцион-ин галочка платного слота найма на экране «Найм кузнеца» (исправление бага D). */
.ws-root .ws-heat-session-note { display:block; color: var(--workshop-muted); font-size:11px; margin-top:2px; }
.ws-root .ws-extra-slot-toggle { display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:10px; background: rgba(240,162,78,.09) !important; border:1px solid rgba(240,162,78,.26) !important; font-size:12px; color: var(--workshop-text); cursor:pointer; }
.ws-root .ws-extra-slot-toggle input { width:16px; height:16px; accent-color: var(--workshop-amber); }
@media (max-width:479px) {
  .ws-root .ws-equip-grid { gap:7px; }
  .ws-root .ws-equip-card { flex:0 0 72px; width:72px; }
  .ws-root .ws-equip-icon { width:36px; height:36px; }
}

/* Фаза 24.5: полосы разогрева на карточках экипировки (E), полноразмерный градиент редкости
на карточке (G, точечный override поверх правила выше -- append-only, не трогаем исходную
строку), окно-таймер цены найма (B), ссылка-кнопка "нанять в ростер" и бейдж максимума (D),
модалка платной докупки уголя (H). */
.ws-root .ws-equip-heatbar { width:100%; height:4px; border-radius:3px; background: rgba(255,255,255,.12) !important; overflow:hidden; margin-top:2px; }
.ws-root .ws-equip-heatbar-fill { display:block; height:100%; border-radius:3px; background: linear-gradient(90deg, var(--workshop-amber), var(--workshop-amber-2)) !important; transition:width .25s ease; }
.ws-root .ws-equip-card { background: linear-gradient(165deg, var(--rarity-soft, rgba(157,180,201,.18)) 0%, var(--workshop-card-2) 78%) !important; }
.ws-root .ws-heat-window-note { display:flex; align-items:center; gap:5px; color: var(--workshop-amber) !important; }
.ws-root .ws-link-btn { background:none !important; border:none !important; padding:0 !important; margin:0; min-height:auto !important; color: var(--workshop-cyan) !important; text-decoration:underline; font-size:inherit; font-weight:700; display:inline; cursor:pointer; }
.ws-root .ws-roster-max { display:inline-flex; align-items:center; gap:5px; color: var(--workshop-cyan) !important; font-size:12px; font-weight:700; }
.ws-root .ws-roster-max .ws-icon { width:14px; height:14px; flex:0 0 auto; }
.ws-root .ws-coal-refill-card { width:min(100%,420px); padding:22px; border-radius:22px; text-align:left; position:relative; background: linear-gradient(150deg, var(--workshop-surface), var(--workshop-bg-2)) !important; border:1px solid var(--workshop-line) !important; display:grid; gap:14px; }
.ws-root .ws-modal-close { position:absolute; top:14px; right:14px; width:30px; height:30px; min-height:auto !important; padding:0 !important; border-radius:50%; display:flex; align-items:center; justify-content:center; background: var(--workshop-surface-2) !important; border:1px solid var(--workshop-line) !important; color: var(--workshop-muted) !important; }
.ws-root .ws-modal-close .ws-icon { width:14px; height:14px; }
.ws-root .ws-coal-refill-head { display:flex; align-items:center; gap:12px; padding-right:30px; }
.ws-root .ws-coal-refill-head h2 { margin:0 0 2px; font-size:18px; }
.ws-root .ws-coal-refill-head span { color: var(--workshop-muted); font-size:12px; }
.ws-root .ws-coal-refill-icon { width:44px; height:44px; border-radius:12px; }
.ws-root .ws-coal-refill-hint { margin:0; color: var(--workshop-muted); font-size:12px; line-height:1.5; }
.ws-root .ws-coal-refill-actions { display:grid; gap:9px; }
.ws-root .ws-coal-refill-actions .ws-btn { width:100%; justify-content:space-between; }
.ws-root .ws-coal-refill-actions .ws-btn[disabled] { opacity:.45; cursor:default; box-shadow:none; }

/* Фаза 24.5: страховочное правило размера для инлайновых SVG-иконок MISC_ICON_PATHS внутри
Мастерской -- без явного width/height атрибута такие <svg> рендерятся браузерным дефолтом
(огромный блок), что стало видно на QA у нового окна-таймера цены. Более специфичные точечные
правила (например .ws-apprentice-avatar .ws-icon) остаются приоритетнее и не ломаются. */
.ws-root svg.ws-icon { width:16px; height:16px; flex:0 0 auto; }

/* Фаза 24.6 (баг 1): видимый отсчёт до полного восстановления бункера уголя, теперь живёт только в
ws-coal-refill-card (главный экран без таймера -- см. баг 1). */
.ws-root .ws-coal-refill-countdown { display:flex; align-items:center; gap:6px; margin:0; padding:9px 12px; border-radius:10px; background: rgba(240,162,78,.09); border:1px solid rgba(240,162,78,.22); color: var(--workshop-amber); font-size:12px; }
.ws-root .ws-coal-refill-countdown .ws-icon { width:14px; height:14px; flex:0 0 auto; }

/* Фаза 24.6 (баг 4): компактная метка редкости кузнеца под именем в карточках найма/ростера
(заменяет старый отдельный .badge сверху -- сам базовый .badge стиль не трогается). */
.ws-root .ws-smith-info .badge.ws-smith-rarity-compact { display:inline-block; margin:2px 0 4px; }

/* Фаза 24.7: компактный вывод финальных статов HP/ATK/DEF/AGI/LUCK вещи в стиле мини-статов
компаньона (.arena-companion-stats/.arena-companion-mini-stat), но со своими ws-scoped классами --
не переиспользуем arena- классы напрямую (тема Мастерской своя, тёмно-янтарная). Используется в
.ws-active-summary (герой-экран), .ws-equip-card (инвентарь) и .ws-reform-item (реформация). */
.ws-root .ws-item-stats { display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }
.ws-root .ws-item-mini-stat { display:flex; align-items:baseline; gap:3px; font-size:10px; }
.ws-root .ws-item-mini-stat span { color: var(--workshop-muted); font-weight:700; text-transform:uppercase; letter-spacing:.04em; font-size:8px; }
.ws-root .ws-item-mini-stat b { color: var(--workshop-text); font-family: var(--workshop-font-display); font-size:11px; }
/* Карточка инвентаря закалки -- статы компактнее, чем в герой-панели (карточка сама узкая). */
.ws-root .ws-equip-card .ws-item-stats { gap:5px; margin-top:3px; }
.ws-root .ws-equip-card .ws-item-mini-stat { font-size:9px; gap:2px; }
.ws-root .ws-equip-card .ws-item-mini-stat span { font-size:7px; }
.ws-root .ws-equip-card .ws-item-mini-stat b { font-size:10px; }
/* Карточка реформации -- статы центрируются вместе с остальным содержимым кнопки. */
.ws-root .ws-reform-item .ws-item-stats { justify-content:center; margin-top:2px; }
@media (max-width:479px) {
  .ws-root .ws-active-summary .ws-item-stats { gap:6px; }
  .ws-root .ws-active-summary .ws-item-mini-stat { font-size:9px; }
  .ws-root .ws-active-summary .ws-item-mini-stat span { font-size:7px; }
  .ws-root .ws-active-summary .ws-item-mini-stat b { font-size:10px; }
}

/* =========================================================================
   Экран запуска (boot splash) — интеграция прелоадера в продакшен.
   Шапка/прогресс-бар/советы — 1:1 копия прототипа "Уютная сказка" (концепт C),
   фон случайно выбирается из 4 вариантов (концепты A/E/F/G), см. boot-splash.js.
   Классы намеренно с уникальным префиксом boot-splash__, чтобы не конфликтовать
   с .hero/.stage и другими именами, уже занятыми в остальном приложении.
   ========================================================================= */

.boot-splash {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  background: #0d1710;
  isolation: isolate;
  font-family: 'Nunito', 'Segoe UI', sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .boot-splash, .boot-splash * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Hero art layer ---- */

.boot-splash__hero { position: absolute; inset: 0; overflow: hidden; }

.boot-splash__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 26%;
  transform: scale(1.06);
  animation: bsHeroDrift 9s ease-in-out infinite alternate;
  filter: saturate(1.06) brightness(1.01);
}

@keyframes bsHeroDrift {
  0%   { transform: scale(1.06) translate(0, 0); }
  100% { transform: scale(1.1) translate(-0.6%, -1%); }
}

.boot-splash__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* база — тёплое затемнение концепта C, используется как фолбэк до применения модификатора варианта */
  background:
    linear-gradient(to bottom,
      rgba(15, 22, 12, 0.72) 0%,
      rgba(15, 22, 12, 0.06) 20%,
      rgba(15, 22, 12, 0.02) 52%,
      rgba(13, 18, 10, 0.55) 74%,
      rgba(9, 13, 7, 0.94) 100%),
    radial-gradient(120% 70% at 50% 8%, rgba(0,0,0,0.35), transparent 60%);
}

/* Вариант «gate» — затемнение из концепта A + светлые лучи */
.boot-splash--gate .boot-splash__vignette {
  background:
    radial-gradient(120% 70% at 50% 8%, rgba(18, 12, 10, 0) 45%, rgba(18, 12, 10, 0.55) 100%),
    linear-gradient(to bottom, rgba(18, 12, 10, 0.12) 0%, rgba(18, 12, 10, 0) 22%, rgba(18, 12, 10, 0.05) 55%, rgba(18, 12, 10, 0.92) 88%, #120c0a 100%);
}

/* Вариант «dawn» — затемнение из концепта E (тёмно-бирюзовое) */
.boot-splash--dawn .boot-splash__vignette {
  background:
    linear-gradient(to bottom,
      rgba(8, 20, 20, 0.6) 0%,
      rgba(8, 20, 20, 0.05) 22%,
      rgba(8, 20, 20, 0.02) 50%,
      rgba(7, 16, 15, 0.6) 76%,
      rgba(5, 12, 12, 0.95) 100%),
    radial-gradient(120% 65% at 50% 6%, rgba(0, 0, 0, 0.32), transparent 58%);
}

/* Вариант «arena» — затемнение из концепта F (фиолетовое) + прожекторы */
.boot-splash--arena .boot-splash__vignette {
  background:
    radial-gradient(120% 65% at 50% 6%, rgba(23, 11, 38, 0) 42%, rgba(23, 11, 38, 0.6) 100%),
    linear-gradient(to bottom, rgba(23, 11, 38, 0.14) 0%, rgba(23, 11, 38, 0) 20%, rgba(23, 11, 38, 0.06) 50%, rgba(20, 10, 34, 0.92) 86%, #12081e 100%);
}

/* Вариант «campfire» — затемнение из концепта G (тёмно-синее) */
.boot-splash--campfire .boot-splash__vignette {
  background:
    linear-gradient(to bottom,
      rgba(6, 8, 17, 0.62) 0%,
      rgba(6, 8, 17, 0.04) 22%,
      rgba(6, 8, 17, 0.02) 50%,
      rgba(6, 8, 17, 0.5) 76%,
      rgba(4, 5, 10, 0.95) 100%),
    radial-gradient(120% 70% at 50% 6%, rgba(0,0,0,0.4), transparent 60%);
}

/* Светлые лучи (только вариант gate, взято из концепта A) */
.boot-splash__rays {
  position: absolute;
  inset: -10% -20%;
  background: repeating-linear-gradient(
    115deg,
    rgba(255, 214, 140, 0) 0%,
    rgba(255, 214, 140, 0.16) 4%,
    rgba(255, 214, 140, 0) 9%,
    rgba(255, 214, 140, 0) 20%
  );
  mix-blend-mode: screen;
  animation: bsRaysDrift 9s linear infinite;
  pointer-events: none;
  opacity: 0;
}

.boot-splash--gate .boot-splash__rays { opacity: 1; }

@keyframes bsRaysDrift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-6%, 4%); }
}

/* Прожекторный сдвиг (только вариант arena, взято из концепта F) */
.boot-splash__spotlight {
  position: absolute;
  inset: -8% -25%;
  background:
    linear-gradient(100deg, rgba(255, 226, 122, 0) 0%, rgba(255, 226, 122, 0.12) 6%, rgba(255, 226, 122, 0) 13%, transparent 40%),
    linear-gradient(80deg, rgba(139, 92, 246, 0) 55%, rgba(139, 92, 246, 0.1) 63%, rgba(139, 92, 246, 0) 70%);
  mix-blend-mode: screen;
  animation: bsSpotlightDrift 8.5s ease-in-out infinite;
  pointer-events: none;
  opacity: 0;
}

.boot-splash--arena .boot-splash__spotlight { opacity: 1; }

@keyframes bsSpotlightDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3%); }
}

/* ---- Частицы: светлячки + следы лап (база концепта C, без изменений) ---- */

.boot-splash__particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }

.boot-splash__particle { position: absolute; }

.boot-splash__particle--firefly {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3c2 0%, #ffce6b 45%, rgba(255, 206, 107, 0) 100%);
  box-shadow: 0 0 8px 2px rgba(255, 214, 130, 0.85);
  animation: bsFireflyFloat 6s ease-in-out infinite;
}

.boot-splash__particle--paw {
  font-size: 15px;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(255, 220, 150, 0.6));
  animation: bsPawFloat 7s ease-in-out infinite;
}

.bsp1 { left: 12%; top: 30%; animation-delay: 0s; }
.bsp2 { left: 78%; top: 24%; animation-delay: 1.1s; }
.bsp3 { left: 20%; top: 52%; animation-delay: 2.3s; }
.bsp4 { left: 85%; top: 46%; animation-delay: 0.6s; }
.bsp5 { left: 50%; top: 18%; animation-delay: 3s; }
.bsp6 { left: 65%; top: 60%; animation-delay: 1.8s; }
.bsp7 { left: 18%; top: 68%; animation-delay: 0.4s; }
.bsp8 { left: 72%; top: 74%; animation-delay: 2.6s; }
.bsp9 { left: 40%; top: 40%; animation-delay: 4.2s; }

@keyframes bsFireflyFloat {
  0%   { transform: translate(0, 0) scale(0.8); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: translate(6px, -22px) scale(1.15); opacity: 0.9; }
  85%  { opacity: 0.5; }
  100% { transform: translate(-4px, -38px) scale(0.7); opacity: 0; }
}

@keyframes bsPawFloat {
  0%   { transform: translateY(0) rotate(-6deg) scale(0.85); opacity: 0; }
  20%  { opacity: 0.75; }
  60%  { transform: translateY(-26px) rotate(4deg) scale(1); opacity: 0.55; }
  100% { transform: translateY(-46px) rotate(10deg) scale(0.8); opacity: 0; }
}

/* ---- Foreground UI layer (1:1 из концепта C) ---- */

.boot-splash__ui {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  padding-top: max(56px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.boot-splash__spacer { flex: 1 1 auto; }

/* ---- Логотип ---- */

.boot-splash__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  animation: bsLogoIn 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes bsLogoIn {
  0%   { opacity: 0; transform: translateY(-14px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.boot-splash__logo-badge {
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
  animation: bsBadgeBob 3.6s ease-in-out infinite;
}

@keyframes bsBadgeBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}

.boot-splash__logo-type {
  width: min(300px, 82%);
  height: auto;
  overflow: visible;
}

.boot-splash__logo-line1 {
  font-family: 'Fredoka', 'Trebuchet MS', sans-serif;
  font-weight: 700;
  font-size: 46px;
  letter-spacing: 0.5px;
}

.boot-splash__logo-line2 {
  font-family: 'Fredoka', 'Trebuchet MS', sans-serif;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.2px;
}

.boot-splash__logo-sub {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(0.82rem, 0.78rem + 0.3vw, 0.9rem);
  color: #ffe9c4;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  text-align: center;
}

/* ---- Карточка (пергамент) ---- */

.boot-splash__card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 244, 219, 0.98), rgba(243, 220, 174, 0.98));
  border: 1px solid rgba(139, 88, 33, 0.35);
  border-radius: 26px;
  padding: 24px 20px 20px;
  box-shadow: 0 18px 40px rgba(20, 12, 4, 0.35), 0 2px 0 rgba(255, 255, 255, 0.08) inset;
  animation: bsCardIn 900ms 150ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.boot-splash__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: repeating-linear-gradient(135deg, rgba(139, 88, 33, 0.05) 0 2px, transparent 2px 10px);
  opacity: 0.5;
  pointer-events: none;
}

@keyframes bsCardIn {
  0%   { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---- Прогресс-бар: свиток с сургучной печатью ---- */

.boot-splash__progress { display: flex; align-items: center; gap: 12px; }

.boot-splash__progress-track {
  position: relative;
  flex: 1 1 auto;
  height: 22px;
  display: flex;
  align-items: center;
}

.boot-splash__progress-scroll {
  position: relative;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6b431f, #4a2c14);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.boot-splash__progress-fill {
  position: absolute;
  inset: 2px;
  left: 2px;
  width: 4%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c97a1f, #e7a13c 45%, #ffd27a 100%);
  box-shadow: 0 0 10px rgba(231, 161, 60, 0.7);
  /* Ширину теперь напрямую и монотонно двигает boot-splash.js (см. currentProgressPct) --
     без CSS-анимации, чтобы при медленной загрузке полоса не перезаполнялась с нуля. */
}

.boot-splash__progress-shine {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 30%;
  left: -30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: bsShineSweep 3.6s linear infinite;
  mix-blend-mode: screen;
}

@keyframes bsShineSweep {
  0%   { left: -30%; }
  70%  { left: 110%; }
  100% { left: 110%; }
}

.boot-splash__progress-seal {
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translate(50%, -50%);
  animation: bsSealPulse 3.6s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

@keyframes bsSealPulse {
  0%, 60% { transform: translate(50%, -50%) scale(0.94); }
  75% { transform: translate(50%, -50%) scale(1.12); }
  85%, 100% { transform: translate(50%, -50%) scale(0.94); }
}

.boot-splash__progress-label {
  flex: 0 0 auto;
  min-width: 3.2em;
  text-align: right;
  font-family: 'Fredoka', 'Trebuchet MS', sans-serif;
  font-weight: 600;
  font-size: clamp(0.9rem, 0.85rem + 0.3vw, 1rem);
  color: #3a2010;
  font-variant-numeric: tabular-nums;
}

.boot-splash__progress-pct { display: inline-block; min-width: 1.6em; text-align: right; }

.boot-splash__status {
  margin-top: 12px;
  font-size: clamp(0.82rem, 0.78rem + 0.3vw, 0.9rem);
  font-weight: 600;
  color: #5b3414;
  text-align: center;
  opacity: 0.85;
  transition: opacity 220ms ease;
}

/* ---- Разделитель перед советом ---- */

.boot-splash__tip-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 12px;
}

.boot-splash__tip-divider span {
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(90deg, transparent, rgba(139, 88, 33, 0.4), transparent);
}

/* ---- Совет дня ---- */

.boot-splash__tip { text-align: center; min-height: 56px; }

.boot-splash__tip-label {
  font-family: 'Fredoka', 'Trebuchet MS', sans-serif;
  font-weight: 600;
  font-size: clamp(0.72rem, 0.7rem + 0.2vw, 0.8rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c97a1f;
  margin-bottom: 4px;
}

.boot-splash__tip-text {
  font-size: clamp(0.9rem, 0.85rem + 0.3vw, 1rem);
  line-height: 1.45;
  color: #3a2a15;
  font-weight: 600;
  min-height: 2.9em;
  display: block;
  text-align: center;
  text-wrap: balance;
  padding: 0 4px;
  animation: bsTipIn 500ms ease both;
}

.boot-splash__tip-text strong { color: #2f4a30; font-weight: 700; }

@keyframes bsTipIn {
  0%   { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.boot-splash__tip-text.is-leaving { animation: bsTipOut 260ms ease both; }

@keyframes bsTipOut {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}


/* ================================================================================================
   Фаза 27 — HUD-хедер (Концепт A) + редизайн экранов «Мой питомец» / «Экипировка» / «Рюкзак».
   Append-only блок: ничего выше не меняется/не удаляется. Новый скоуп .game-hud (см. задачу) для
   HUD; .pet-screen/.equip-content/.inv-tabs и другие новые классы для остальных трёх экранов —
   размётка/классы скопированы 1:1 из соответствующих концептов в /prototypes/, кроме двух
   документированных исключений на экране «Экипировка» (арт питомца вместо эмодзи, компактные
   карточки инвентаря).
   Концепты: /prototypes/top_hud_showcase/concept-a/index.html,
   /prototypes/screens_showcase/{pet,equipment,inventory}/index.html
   ================================================================================================ */

/* ---- HUD (.game-hud), палитра "Мастерской" -- локальные CSS-переменные --workshop-* по образцу
   концепта, скопированы внутрь .game-hud, чтобы не трогать :root. ---- */
.game-hud {
  --workshop-bg: #1a1210; --workshop-bg-2: #241713;
  --workshop-surface: #251a15; --workshop-surface-2: #2e1f18;
  --workshop-card: rgba(37,26,21,.86);
  --workshop-line: rgba(214,150,90,.22);
  --workshop-text: #f3e6d8; --workshop-muted: #b9a08d;
  --workshop-ember: #ff7a33; --workshop-ember-2: #ff9a3d;
  --workshop-gold: #ffcf6b; --workshop-gold-2: #e0a53a;
  --workshop-amber: #f0a24e; --workshop-amber-2: #d9862f;
  --workshop-parchment: #e8d9b8; --workshop-brass: #b98a4a;
  --workshop-green: #7ee5ad;
  position: relative;
  z-index: 5;
  padding: 10px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'Manrope', 'Inter', sans-serif;
}
.game-hud .ribbon { display: flex; align-items: center; gap: 5px; height: 46px; }
.game-hud .level-xp {
  display: flex; align-items: center; height: 100%; flex: 1 1 30%; max-width: 136px; min-width: 104px;
  background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface));
  border: 1px solid var(--workshop-line); border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
  padding-right: 8px; overflow: hidden;
}
.game-hud .level-badge {
  flex: 0 0 auto; width: 36px; height: 36px; margin: 3px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 32% 28%, var(--workshop-gold), var(--workshop-amber-2) 60%, var(--workshop-brass) 100%);
  border: 2px solid var(--workshop-parchment);
  box-shadow: 0 2px 6px rgba(0,0,0,.5), inset 0 1px 2px rgba(255,255,255,.5);
  font-family: 'Cinzel', 'Georgia', serif; font-weight: 700; font-size: 17px; color: #3a2210;
  text-shadow: 0 1px 0 rgba(255,255,255,.35); flex-shrink: 0;
}
.game-hud .xp-wrap { flex: 1 1 auto; min-width: 0; margin-left: 8px; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.game-hud .xp-track { position: relative; height: 9px; border-radius: 999px; background: rgba(0,0,0,.45); box-shadow: inset 0 1px 2px rgba(0,0,0,.6); overflow: hidden; }
.game-hud .xp-fill { position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--workshop-ember), var(--workshop-gold)); box-shadow: 0 0 6px rgba(255,207,107,.55); transition: width .3s ease; }
.game-hud .xp-label { font-size: 10px; font-weight: 700; color: var(--workshop-muted); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.game-hud .xp-label b { color: var(--workshop-parchment); font-weight: 800; }
.game-hud .capsule {
  display: flex; align-items: center; height: 100%; flex: 1 1 auto; min-width: 0; gap: 2px; padding: 0 6px 0 1px;
  background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface));
  border: 1px solid var(--workshop-line); border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
}
.game-hud .capsule .icon {
  flex: 0 0 auto; width: 27px; height: 27px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,207,107,.28), rgba(0,0,0,0) 70%);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.game-hud .capsule .icon .hud-capsule-icon,
.game-hud .capsule .icon .league-trophy-icon,
.game-hud .capsule .icon img { width: 76%; height: 76%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.game-hud .capsule .value { font-family: 'Cinzel', 'Georgia', serif; font-weight: 700; font-size: 12px; color: var(--workshop-text); white-space: nowrap; overflow: visible; min-width: 0; letter-spacing: -.01em; }
.game-hud .capsule.gold .value { color: var(--workshop-gold); }
.game-hud .capsule.gold .icon { color: var(--workshop-gold); }
.game-hud .capsule.crystal .value { color: #ffb020; }
.game-hud .capsule.crystal .icon { color: #ffb020; }
.game-hud .capsule.trophy .value { color: var(--workshop-amber); }
.game-hud .capsule.trophy .icon { color: var(--workshop-amber); }
.game-hud .navrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 44px; }
.game-hud .left-nav { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.game-hud .burger-btn {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; padding: 0;
  background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface));
  border: 1px solid var(--workshop-line);
  box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer;
}
.game-hud .burger-btn span, .game-hud .burger-btn::before, .game-hud .burger-btn::after {
  content: ''; position: absolute; width: 18px; height: 2px; border-radius: 2px; background: var(--workshop-parchment);
}
.game-hud .burger-btn::before { transform: translateY(-5px); }
.game-hud .burger-btn::after { transform: translateY(5px); }
/* Фаза 46.1 (верификация доступа к Стычке отрядов): на мобильных экранах вход в узел с дочерними узлами (например, arena_district -> lane_clash)
   автоматически закрывает шторку-сайдбар (switchLocation() сбрасывает state.sidebarOpen), оставляя игрока без
   видимой возможности увидеть/открыть соседний узел (например «Стычка отрядов» рядом с Маршалом
   Арены) без случайного повторного тапа по ☰. Тот же пульсирующийся акцент (--workshop-amber), что и у .location-item.has-children
   в сайдбаре -- просто в виде маленькой точки на самой кнопке ☰, так как внутри неё нет места для box-shadow-кольца. */
.game-hud .burger-btn.has-children { animation: burger-has-children-pulse 2.2s ease-out infinite; }
@keyframes burger-has-children-pulse { 0% { box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05), 0 0 0 0 rgba(255,176,32,.55); } 70% { box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05), 0 0 0 7px rgba(255,176,32,0); } 100% { box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05), 0 0 0 0 rgba(255,176,32,0); } }
.game-hud .burger-btn.has-children .burger-badge-dot {
  content: ''; position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--workshop-amber, #ffb020); border: 1.5px solid var(--workshop-surface, #1a1410);
}
.game-hud .location-chip {
  display: flex; align-items: center; gap: 6px; min-width: 0; height: 40px; padding: 0 12px 0 4px;
  background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface));
  border: 1px solid var(--workshop-line); border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
  flex: 1 1 auto;
}
.game-hud .location-chip .dot {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--workshop-ember-2), var(--workshop-ember) 70%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', 'Georgia', serif; font-size: 13px; color: #2a140a;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.35); flex-shrink: 0;
}
.game-hud .location-chip .text { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.game-hud .location-chip .name { font-family: 'Cinzel', 'Georgia', serif; font-weight: 600; font-size: 12.5px; color: var(--workshop-parchment); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-hud .location-chip .sub { font-size: 10px; color: var(--workshop-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-hud .medallions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.game-hud .medallion {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 32% 28%, var(--workshop-surface-2), var(--workshop-surface) 65%);
  border: 2px solid var(--workshop-brass);
  box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.6), inset 0 2px 3px rgba(255,255,255,.08), 0 0 0 1px rgba(255,207,107,.12);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--workshop-parchment);
}
.game-hud .medallion::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(185,138,74,.35); pointer-events: none; }
.game-hud .medallion .medallion-icon { width: 62%; height: 62%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.game-hud .medallion .item-icon-fallback { font-size: 18px; }
.game-hud .medallion .notif-badge {
  position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: linear-gradient(180deg, var(--workshop-ember-2), var(--workshop-ember));
  border: 1.5px solid var(--workshop-bg); color: #2a0f00; font-size: 9.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
@media (max-width: 360px) {
  .game-hud .capsule .value { font-size: 12.5px; }
  .game-hud .medallion { width: 40px; height: 40px; }
  .game-hud .location-chip .sub { display: none; }
}
@media (min-width: 480px) {
  .game-hud { padding: 16px 16px 0; }
  .game-hud .ribbon { height: 50px; gap: 8px; }
  .game-hud .capsule { padding: 0 12px 0 4px; }
  .game-hud .capsule .value { font-size: 15px; }
  .game-hud .medallion { width: 48px; height: 48px; }
  .game-hud .location-chip { height: 44px; }
}

/* .sidebar-topbar нужен position:relative, чтобы #notification-bell/#fullscreen (перенесённые
   сюда из старого .app-header, см. sidebarTopBar() в app.js) и notificationPanel() анкерились
   корректно (.notification-panel { position:absolute; top:calc(100% + 7px) }) -- чистая добавка,
   существующие правила .sidebar-topbar не меняются. */
.sidebar-topbar { position: relative; }
.sidebar-header-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
.sidebar-header-actions .notification-bell,
.sidebar-header-actions .fullscreen { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; color: var(--text); width: 34px; height: 34px; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.sidebar-header-actions .notification-bell b { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #ff7a33; color: #2a0f00; font-size: 9.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ================================================================================================
   Экран «Мой питомец» (Концепт «Мастерская») -- переверстка characterView(). Скоуп: .pet-screen.
   ================================================================================================ */
.pet-arena.pet-screen {
  --workshop-bg: #1a1210; --workshop-bg-2: #241713; --workshop-surface: #251a15; --workshop-surface-2: #2e1f18;
  --workshop-card: rgba(37,26,21,.86); --workshop-card-2: rgba(20,14,11,.7);
  --workshop-line: rgba(214,150,90,.22); --workshop-line-soft: rgba(214,150,90,.14);
  --workshop-text: #f3e6d8; --workshop-muted: #b9a08d;
  --workshop-ember: #ff7a33; --workshop-ember-2: #ff9a3d;
  --workshop-gold: #ffcf6b; --workshop-gold-2: #e0a53a;
  --workshop-amber: #f0a24e; --workshop-amber-2: #d9862f;
  --workshop-parchment: #e8d9b8; --workshop-brass: #b98a4a;
  --workshop-green: #7ee5ad; --workshop-danger: #ff8d91;
  --pet-cut: polygon(0 14px,14px 0,calc(100% - 14px) 0,100% 14px,100% calc(100% - 14px),calc(100% - 14px) 100%,14px 100%,0 calc(100% - 14px));
  --pet-cut-sm: polygon(0 8px,8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px));
  background: transparent; box-shadow: none; border: none; padding: 0;
  display: flex; flex-direction: column; gap: 12px; color: var(--workshop-text); font-family: 'Manrope', 'Inter', sans-serif;
}
.pet-arena.pet-screen::before { display: none; }
.pet-arena.pet-screen .pet-hero-card {
  position: relative; overflow: hidden; flex-shrink: 0; clip-path: var(--pet-cut);
  background: linear-gradient(150deg, rgba(70,42,20,.88), rgba(20,14,11,.95) 62%, rgba(60,26,12,.85));
  border: 1px solid var(--workshop-line);
  box-shadow: 0 18px 32px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,170,90,.18);
  padding: 14px 14px 12px;
}
.pet-arena.pet-screen .pet-hero-card::before {
  content: ''; position: absolute; inset: 0; opacity: .7; pointer-events: none;
  background: radial-gradient(circle at 28% 6%, rgba(255,154,61,.28), transparent 42%), radial-gradient(circle at 82% 90%, rgba(255,90,40,.2), transparent 45%);
}
.pet-arena.pet-screen .pet-corner { position: absolute; z-index: 3; width: 20px; height: 20px; border-color: var(--workshop-gold-2); border-style: solid; opacity: .75; }
.pet-arena.pet-screen .pet-corner.tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; border-radius: 6px 0 0 0; }
.pet-arena.pet-screen .pet-corner.tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; border-radius: 0 6px 0 0; }
.pet-arena.pet-screen .pet-corner.bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; border-radius: 0 0 0 6px; }
.pet-arena.pet-screen .pet-corner.br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; border-radius: 0 0 6px 0; }
.pet-arena.pet-screen .pet-rank {
  position: relative; z-index: 2; margin: 0 auto 4px; display: block; width: max-content; max-width: calc(100% - 20px);
  padding: 5px 12px; text-align: center;
  font-family: 'Cinzel', 'Georgia', serif; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--workshop-gold); background: rgba(10,7,6,.55); border: 1px solid var(--workshop-line-soft); border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pet-arena.pet-screen .pet-stage { position: relative; z-index: 2; height: 184px; margin: 4px auto 6px; display: flex; align-items: flex-end; justify-content: center; }
.pet-arena.pet-screen .pet-platform {
  position: absolute; left: 50%; bottom: 6px; translate: -50% 0; width: 64%; height: 30px;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,154,61,.34), rgba(255,154,61,0) 72%);
  border-radius: 50%; filter: blur(1px);
}
.pet-arena.pet-screen .pet-portrait-ring {
  position: absolute; z-index: 1; left: 50%; bottom: 4px; translate: -50% 0; width: 172px; height: 172px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,170,90,.32), transparent 68%);
}
.pet-arena.pet-screen .pet-portrait-ring::before {
  content: ''; position: absolute; inset: 10px; border-radius: 50%; border: 2px solid var(--workshop-amber-2);
  box-shadow: 0 0 22px rgba(240,162,78,.5), inset 0 0 16px rgba(240,162,78,.22);
}
.pet-arena.pet-screen .pet-portrait { position: relative; z-index: 2; width: 168px; height: 168px; }
.pet-arena.pet-screen .pet-portrait .pet-layers,
.pet-arena.pet-screen .pet-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(0,0,0,.5)); }
.pet-arena.pet-screen .pet-name-row { position: relative; z-index: 2; text-align: center; margin-bottom: 10px; }
.pet-arena.pet-screen .pet-name-row strong { display: block; font-family: 'Cinzel', 'Georgia', serif; font-size: 16px; color: var(--workshop-text); letter-spacing: .01em; }
.pet-arena.pet-screen .pet-name-row span { display: block; margin-top: 2px; font-size: 11px; color: var(--workshop-muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pet-arena.pet-screen .pet-actions { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pet-arena.pet-screen .pet-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 9px;
  border-radius: 14px; cursor: pointer; border: 1px solid var(--workshop-line);
  background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface));
  box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
  color: var(--workshop-text); transition: transform .15s ease, filter .15s ease; min-height: 0;
}
.pet-arena.pet-screen .pet-action-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.pet-arena.pet-screen .pet-action-btn:active { transform: translateY(1px) scale(.97); }
.pet-arena.pet-screen .pet-action-btn.primary {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
  border-color: rgba(255,207,107,.5); color: #2a0f00;
  box-shadow: 0 4px 12px rgba(255,122,51,.35), inset 0 1px 0 rgba(255,255,255,.25);
}
/* Точец: существующий старый глобальный `.pet-tap-button { background:var(--accent)!important; ... }`
   (стр. ~460, не трогаем) перебивает новый янтарный градиент кнопки «Погладить» своим
   !important -- нужен новый, более специфичный !important-перебивающий селектор в скопе .pet-screen. */
.pet-arena.pet-screen .pet-action-btn.primary.pet-tap-button {
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold)) !important;
  color: #2a0f00 !important; border: 1px solid rgba(255,207,107,.5) !important;
}
.pet-arena.pet-screen .pet-action-btn svg { width: 20px; height: 20px; }
.pet-arena.pet-screen .pet-action-btn span { font-size: 10.5px; font-weight: 800; letter-spacing: .01em; }
.pet-arena.pet-screen .pet-split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; align-items: stretch; }
.pet-arena.pet-screen .pet-panel { background: var(--workshop-card); border: 1px solid var(--workshop-line); clip-path: var(--pet-cut); padding: 12px 13px; box-shadow: 0 10px 20px rgba(0,0,0,.3); }
.pet-arena.pet-screen .pet-panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.pet-arena.pet-screen .pet-panel-title span { font-family: 'Cinzel', 'Georgia', serif; font-size: 12px; font-weight: 700; color: var(--workshop-gold); letter-spacing: .04em; text-transform: uppercase; }
.pet-arena.pet-screen .pet-points-chip { font-family: 'Manrope', 'Inter', sans-serif; font-size: 10px; font-weight: 800; color: #2a1608; background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); padding: 3px 8px; border-radius: 999px; }
.pet-arena.pet-screen .pet-vital { margin-top: 9px; }
.pet-arena.pet-screen .pet-vital:first-of-type { margin-top: 0; }
.pet-arena.pet-screen .pet-vital-top { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 700; color: var(--workshop-muted); margin-bottom: 4px; }
.pet-arena.pet-screen .pet-vital-top b { color: var(--workshop-parchment); font-family: 'Cinzel', 'Georgia', serif; font-size: 12px; }
.pet-arena.pet-screen .pet-bar { height: 9px; border-radius: 999px; background: rgba(0,0,0,.45); box-shadow: inset 0 1px 3px rgba(0,0,0,.6); overflow: hidden; }
.pet-arena.pet-screen .pet-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--workshop-ember), var(--workshop-gold)); box-shadow: 0 0 6px rgba(255,154,61,.5); transition: width .3s ease; }
.pet-arena.pet-screen .pet-bar.mood i { background: linear-gradient(90deg, #7a5cff, #7ee5ad); box-shadow: 0 0 6px rgba(126,229,173,.5); }
.pet-arena.pet-screen .pet-bar.low i { background: linear-gradient(90deg, #c23c3c, var(--workshop-danger)); box-shadow: 0 0 6px rgba(255,141,145,.55); }
.pet-arena.pet-screen .pet-side { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.pet-arena.pet-screen .pet-micro { display: flex; gap: 9px; align-items: flex-start; }
.pet-arena.pet-screen .pet-micro-icon { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(255,154,61,.1); border: 1px solid var(--workshop-line-soft); color: var(--workshop-gold); }
.pet-arena.pet-screen .pet-micro-icon svg { width: 16px; height: 16px; }
.pet-arena.pet-screen .pet-micro div { min-width: 0; flex: 1 1 auto; }
.pet-arena.pet-screen .pet-micro span { display: block; font-size: 10px; color: var(--workshop-muted); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.pet-arena.pet-screen .pet-micro b { display: block; margin-top: 1px; font-family: 'Cinzel', 'Georgia', serif; font-size: 12.5px; color: var(--workshop-parchment); }
.pet-arena.pet-screen .pet-mini-xp { margin-top: 5px; height: 6px; border-radius: 999px; background: rgba(0,0,0,.45); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.pet-arena.pet-screen .pet-mini-xp i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--workshop-ember), var(--workshop-gold)); }
.pet-arena.pet-screen .pet-side-line { height: 1px; background: var(--workshop-line-soft); margin: 0 -13px; }
.pet-arena.pet-screen .pet-dialogue {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--workshop-card-2); border: 1px dashed var(--workshop-line); clip-path: var(--pet-cut-sm); padding: 10px 12px; box-shadow: none;
}
.pet-arena.pet-screen .pet-dialogue-trait {
  flex: 0 0 auto; font-family: 'Cinzel', 'Georgia', serif; font-size: 9px; font-weight: 700; letter-spacing: .08em;
  color: #2a1608; background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2));
  padding: 4px 8px; border-radius: 999px; text-transform: uppercase; white-space: nowrap;
}
.pet-arena.pet-screen .pet-dialogue p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--workshop-text); }
.pet-arena.pet-screen .pet-stats-panel { background: var(--workshop-card); border: 1px solid var(--workshop-line); clip-path: var(--pet-cut); padding: 13px; box-shadow: 0 10px 20px rgba(0,0,0,.3); }
.pet-arena.pet-screen .pet-stats-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.pet-arena.pet-screen .pet-stats-head h2 { margin: 0; font-family: 'Cinzel', 'Georgia', serif; font-size: 14px; color: var(--workshop-parchment); letter-spacing: .02em; }
.pet-arena.pet-screen .pet-avail { font-size: 11px; color: var(--workshop-muted); }
.pet-arena.pet-screen .pet-avail b { color: var(--workshop-gold); }
.pet-arena.pet-screen .pet-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Примечание: в концепте .pet-stat -- 3-колоночный грид (иконка/лейбл/значение), но реальный
   statCell() в app.js никогда не рисовал иконку стата (только label+value) -- с 3-колоночным
   шаблоном без иконки label сжимался в 26px, а кнопка "+" (grid-column:1/-1) растягивалась на всю
   ширину. Адаптировано под реальные 2 доцерних элемента (label+value), кнопка "+" -- компактная
   круглая иконка в правом углу ячейки, а не полноширинная полоса. */
.pet-arena.pet-screen .pet-stat {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px;
  padding: 7px 34px 7px 8px; background: rgba(0,0,0,.28); border: 1px solid var(--workshop-line-soft); clip-path: var(--pet-cut-sm);
}
.pet-arena.pet-screen .pet-stat-label { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; color: var(--workshop-muted); text-transform: uppercase; }
.pet-arena.pet-screen .pet-stat b { font-family: 'Cinzel', 'Georgia', serif; font-size: 15px; color: var(--workshop-parchment); text-align: right; }
.pet-arena.pet-screen .pet-stat-plus {
  position: absolute; top: 50%; right: 6px; translate: 0 -50%;
  width: 22px; height: 22px; padding: 0; display: flex; align-items: center; justify-content: center; flex: none;
  border-radius: 50%; background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); color: #2a1608;
  border: none; cursor: pointer; min-height: 0;
}
.pet-arena.pet-screen .pet-stat-plus svg { width: 12px; height: 12px; }
.pet-arena.pet-screen .pet-stat-spacer { display: none; }
.pet-arena.pet-screen .pet-note { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: var(--workshop-muted); }
.pet-arena.pet-screen .arena-resources { margin-bottom: 0; }
@media (max-width: 360px) {
  .pet-arena.pet-screen .pet-stat-grid { gap: 6px; }
  .pet-arena.pet-screen .pet-portrait { width: 148px; height: 148px; }
  .pet-arena.pet-screen .pet-stage { height: 156px; }
}

/* ================================================================================================
   Экран «Экипировка» (Концепт «Мастерская») -- переверстка equipmentView(). Скоуп: .equip-content.
   Исключения от концепта (по прямому указанию пользователя): витрина использует настоящий арт
   питомца (petArtHtml(), см. app.js) вместо эмодзи-кота; .inv-card заметно компактнее по высоте,
   чем в концепте (там ~150px+, здесь ограничено min-height/max-height ниже).
   ================================================================================================ */
.arena-equipment.equip-content {
  --workshop-bg: #1a1210; --workshop-surface: #251a15; --workshop-surface-2: #2e1f18;
  --workshop-card: rgba(37,26,21,.86); --workshop-card-2: rgba(20,14,11,.7);
  --workshop-line: rgba(214,150,90,.22); --workshop-line-soft: rgba(214,150,90,.14);
  --workshop-text: #f3e6d8; --workshop-muted: #b9a08d;
  --workshop-ember: #ff7a33; --workshop-ember-2: #ff9a3d;
  --workshop-gold: #ffcf6b; --workshop-gold-2: #e0a53a;
  --workshop-amber: #f0a24e; --workshop-amber-2: #d9862f;
  --workshop-parchment: #e8d9b8; --workshop-brass: #b98a4a;
  --rarity-common: #9db4c9; --rarity-common-soft: rgba(157,180,201,.18);
  --rarity-rare: #49aaf1; --rarity-rare-soft: rgba(73,170,241,.18);
  --rarity-epic: #b26bff; --rarity-epic-soft: rgba(178,107,255,.20);
  --rarity-legendary: #ffcf6b; --rarity-legendary-soft: rgba(255,207,107,.20);
  --eq-cut: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  --eq-cut-sm: polygon(0 7px, 7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px));
  background: transparent; box-shadow: none; border: none; padding: 0;
  display: flex; flex-direction: column; gap: 0; color: var(--workshop-text); font-family: 'Manrope', 'Inter', sans-serif;
}
.arena-equipment.equip-content::before { display: none; }
.arena-equipment.equip-content .equip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.arena-equipment.equip-content .equip-head .eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--workshop-amber); font-weight: 700; }
.arena-equipment.equip-content .equip-head h1 { font-family: 'Cinzel', 'Georgia', serif; font-weight: 700; font-size: 21px; margin: 4px 0 0; color: var(--workshop-parchment); text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.arena-equipment.equip-content .refresh-btn { flex: 0 0 auto; width: 38px; height: 38px; min-height: 0; border-radius: 12px; background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface)); border: 1px solid var(--workshop-line); color: var(--workshop-parchment); font-size: 17px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05); }
.arena-equipment.equip-content .pet-tabs-wrap { position: relative; margin: 0 -2px 12px; }
.arena-equipment.equip-content .pet-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 0 2px 4px; scrollbar-width: none; }
.arena-equipment.equip-content .pet-tabs::-webkit-scrollbar { display: none; }
.arena-equipment.equip-content .pet-tab {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px; border: 1px solid var(--workshop-line);
  color: var(--workshop-muted); background: var(--workshop-card-2); padding: 8px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; font-family: 'Manrope', 'Inter', sans-serif; cursor: pointer; white-space: nowrap; min-height: 0;
}
.arena-equipment.equip-content .pet-tab svg { width: 14px; height: 14px; flex: 0 0 auto; }
.arena-equipment.equip-content .pet-tab.active { color: #2a140a; background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); border-color: var(--workshop-gold-2); font-weight: 800; }
.arena-equipment.equip-content .equip-showcase {
  position: relative; margin-bottom: 14px; padding: 20px 14px 16px; clip-path: var(--eq-cut); text-align: center;
  background: linear-gradient(150deg, rgba(70,42,20,.72), rgba(20,13,10,.92) 60%, rgba(60,26,14,.65));
  border: 1px solid var(--workshop-line); box-shadow: 0 16px 32px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,207,107,.14);
}
.arena-equipment.equip-content .equip-showcase::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background: radial-gradient(circle at 28% 8%, rgba(255,170,90,.24), transparent 42%), radial-gradient(circle at 78% 90%, rgba(255,122,51,.18), transparent 46%);
}
.arena-equipment.equip-content .pet-portrait { position: relative; width: 132px; height: 132px; margin: 2px auto 10px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(255,207,107,.3), transparent 70%); }
.arena-equipment.equip-content .pet-portrait .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ring-color, var(--rarity-epic)); box-shadow: 0 0 22px var(--ring-glow, rgba(178,107,255,.5)), inset 0 0 14px var(--ring-glow-soft, rgba(178,107,255,.24)); }
/* Фаза 47: кольцо витрины теперь отражает редкость АКТИВНОй карты питомца (раньше был всегда
   зашито-фиолетовым epic-кольцом даже для common/rare/epic карт -- найдено при QA). */
.arena-equipment.equip-content .pet-portrait.rarity-common { --ring-color: var(--rarity-common); --ring-glow: rgba(157,180,201,.5); --ring-glow-soft: rgba(157,180,201,.24); }
.arena-equipment.equip-content .pet-portrait.rarity-rare { --ring-color: var(--rarity-rare); --ring-glow: rgba(73,170,241,.5); --ring-glow-soft: rgba(73,170,241,.24); }
.arena-equipment.equip-content .pet-portrait.rarity-epic { --ring-color: var(--rarity-epic); --ring-glow: rgba(178,107,255,.5); --ring-glow-soft: rgba(178,107,255,.24); }
.arena-equipment.equip-content .pet-portrait.rarity-legendary { --ring-color: var(--rarity-legendary); --ring-glow: rgba(255,207,107,.5); --ring-glow-soft: rgba(255,207,107,.24); }
/* Важно: Не трогаем `position` у .pet-layer -- базовый глобальный правило `.pet-layer {
   position:absolute; inset:0 }` держит слои друг на друге -- переопределение его в relative здесь
   ломало бы слоёность (каждый слой вставал в normal flow вместо наложения на предыдущий). */
.arena-equipment.equip-content .pet-portrait .pet-layers { position: relative; width: 100%; height: 100%; display: block; }
.arena-equipment.equip-content .pet-portrait .pet-layers .pet-layer { filter: drop-shadow(0 10px 16px rgba(0,0,0,.5)); }
.arena-equipment.equip-content .pet-portrait > img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(0,0,0,.5)); }
.arena-equipment.equip-content .reroll-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px;
  padding: 11px 13px; border-radius: 16px; background: var(--workshop-card); border: 1px solid var(--workshop-line);
}
.arena-equipment.equip-content .reroll-panel .panel-title { margin: 0; }
.arena-equipment.equip-content .reroll-panel h2 { margin: 0 0 2px; font-family: 'Cinzel', 'Georgia', serif; font-size: 12.5px; color: var(--workshop-parchment); }
.arena-equipment.equip-content .reroll-panel p { margin: 0; font-size: 11px; color: var(--workshop-muted); line-height: 1.4; }
.arena-equipment.equip-content .reroll-panel button {
  position: relative; overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; gap: 5px;
  font-family: 'Manrope', 'Inter', sans-serif; font-weight: 800; font-size: 11.5px; color: #2a140a;
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
  border: 1px solid var(--workshop-gold-2); border-radius: 999px; padding: 9px 13px; white-space: nowrap; cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,.3); min-height: 0;
}
.arena-equipment.equip-content .section-label {
  display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 8px;
  font-family: 'Cinzel', 'Georgia', serif; font-size: 13.5px; color: var(--workshop-gold);
}
.arena-equipment.equip-content .section-label .count { font-family: 'Manrope', 'Inter', sans-serif; font-size: 11px; color: var(--workshop-muted); font-weight: 700; }
.arena-equipment.equip-content .slots-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 16px; }
.arena-equipment.equip-content .slot-card {
  position: relative; grid-column: span 1; min-height: 96px; display: flex; align-items: center; gap: 10px;
  padding: 11px; border-radius: 16px; border: 1px dashed var(--workshop-line);
  background: var(--workshop-card-2); color: var(--workshop-muted); text-align: left;
}
.arena-equipment.equip-content .slot-card.occupied {
  border-style: solid; border-color: var(--rarity-color, var(--workshop-line));
  background: linear-gradient(150deg, var(--rarity-soft, var(--workshop-line-soft)) 0%, var(--workshop-card) 70%);
  color: var(--workshop-text); box-shadow: 0 0 0 1px var(--rarity-soft, transparent) inset;
}
.arena-equipment.equip-content .slot-card.rarity-common { --rarity-color: var(--rarity-common); --rarity-soft: var(--rarity-common-soft); }
.arena-equipment.equip-content .slot-card.rarity-rare { --rarity-color: var(--rarity-rare); --rarity-soft: var(--rarity-rare-soft); }
.arena-equipment.equip-content .slot-card.rarity-epic { --rarity-color: var(--rarity-epic); --rarity-soft: var(--rarity-epic-soft); }
.arena-equipment.equip-content .slot-card.rarity-legendary { --rarity-color: var(--rarity-legendary); --rarity-soft: var(--rarity-legendary-soft); }
.arena-equipment.equip-content .slot-card.weapon-slot { grid-column: span 2; }
.arena-equipment.equip-content .slot-icon { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: rgba(0,0,0,.28); }
.arena-equipment.equip-content .slot-card.occupied .slot-icon { background: var(--rarity-soft, rgba(0,0,0,.28)); box-shadow: 0 0 0 2px var(--rarity-color, transparent), 0 0 12px var(--rarity-soft, transparent); }
.arena-equipment.equip-content .slot-icon .item-art { width: 78%; height: 78%; object-fit: contain; }
.arena-equipment.equip-content .slot-body { min-width: 0; flex: 1 1 auto; display: grid; gap: 2px; }
.arena-equipment.equip-content .slot-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--workshop-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arena-equipment.equip-content .slot-name { display: block; font-size: 13px; font-weight: 800; color: var(--workshop-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arena-equipment.equip-content .slot-card:not(.occupied) .slot-name { color: var(--workshop-muted); font-weight: 700; }
.arena-equipment.equip-content .slot-meta { display: flex; font-size: 10.5px; font-weight: 700; color: var(--rarity-color, var(--workshop-amber)); align-items: center; gap: 5px; text-transform: uppercase; letter-spacing: .03em; }
.arena-equipment.equip-content .slot-meta::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; flex: 0 0 auto; }
.arena-equipment.equip-content .slot-meta.empty-meta { color: var(--workshop-muted); }
.arena-equipment.equip-content .slot-meta.empty-meta::before { display: none; }
.arena-equipment.equip-content .slot-card .item-stats-line { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.arena-equipment.equip-content .slot-card .item-stat-pill { font-size: 9.5px; font-weight: 700; color: var(--workshop-muted); background: rgba(0,0,0,.22); border-radius: 999px; padding: 2px 6px; }
.arena-equipment.equip-content .slot-card .item-stat-pill small { display: none; }
.arena-equipment.equip-content .slot-state-pill {
  position: absolute; top: 8px; right: 8px; font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--workshop-green); background: rgba(126,229,173,.14); border: 1px solid rgba(126,229,173,.35); border-radius: 999px; padding: 2px 6px;
}
.arena-equipment.equip-content .inv-panel { border-radius: 20px; padding: 14px 12px 16px; margin-bottom: 14px; background: var(--workshop-card); border: 1px solid var(--workshop-line); box-shadow: 0 12px 26px rgba(0,0,0,.32); }
/* Исключение от концепта (компактность по прямому указанию пользователя): карточка инвентаря
   ограничена max-height, паддинги/шрифты уменьшены относительно концепта. */
.arena-equipment.equip-content .inv-ribbon { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 2px 2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.arena-equipment.equip-content .inv-ribbon::-webkit-scrollbar { display: none; }
.arena-equipment.equip-content .inv-card {
  flex: 0 0 88px; width: 88px; min-height: 0; max-height: 118px; padding: 7px 6px 8px; border-radius: 14px;
  background: linear-gradient(165deg, var(--rarity-soft, rgba(157,180,201,.14)) 0%, var(--workshop-card-2) 78%);
  border: 1.5px solid var(--rarity-color, var(--workshop-line)); box-shadow: 0 0 0 1px var(--rarity-soft, transparent) inset;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.arena-equipment.equip-content .inv-card.disabled { opacity: .6; }
.arena-equipment.equip-content .inv-card .inv-icon { width: 42px; height: 42px; border-radius: 12px; position: relative; overflow: hidden; background: var(--rarity-soft, rgba(157,180,201,.18)); flex: 0 0 auto; }
.arena-equipment.equip-content .inv-card .inv-icon .item-art { width: 100%; height: 100%; object-fit: contain; }
.arena-equipment.equip-content .inv-card .item-with-icon.inv-card-body { display: block; width: 100%; gap: 0; }
.arena-equipment.equip-content .inv-card .badge { display: none; }
.arena-equipment.equip-content .inv-card .inv-name { margin: 0; font-size: 10px; font-weight: 800; line-height: 1.2; color: var(--workshop-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arena-equipment.equip-content .inv-card .inv-name em { font-style: normal; color: var(--workshop-gold); font-weight: 700; margin-left: 2px; }
.arena-equipment.equip-content .inv-card .item-stats-line { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 2px; }
.arena-equipment.equip-content .inv-card .item-stat-pill { font-size: 8px; font-weight: 700; color: var(--workshop-muted); background: transparent; padding: 0; }
.arena-equipment.equip-content .inv-card .item-stat-pill small { display: none; }
.arena-equipment.equip-content .inv-card .inv-elsewhere { margin: 2px 0 0; font-size: 8px; color: var(--workshop-muted); line-height: 1.2; }
.arena-equipment.equip-content .inv-card .inv-action {
  width: 100%; margin-top: auto; border: none; border-radius: 999px; padding: 5px 4px; font-size: 9.5px; font-weight: 800;
  font-family: 'Manrope', 'Inter', sans-serif; cursor: pointer; min-height: 0;
  background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); color: #2a140a;
}
.arena-equipment.equip-content .inv-card .inv-action.unequip { background: rgba(255,141,145,.16); color: var(--workshop-danger); border: 1px solid rgba(255,141,145,.4); }
.arena-equipment.equip-content .inv-card .inv-action.disabled { background: rgba(255,255,255,.06); color: var(--workshop-muted); border: 1px solid var(--workshop-line); cursor: not-allowed; }
.arena-equipment.equip-content .skins-panel { border-radius: 18px; padding: 13px 14px; margin-top: 4px; background: var(--workshop-card-2); border: 1px solid var(--workshop-line-soft); }
@media (max-width: 360px) {
  .arena-equipment.equip-content .inv-card { flex: 0 0 78px; width: 78px; max-height: 108px; }
}

/* ================================================================================================
   Экран «Рюкзак» (Концепт A) -- переверстка inventoryView(). Скоуп: .inv-tabs / карточки внутри
   overlay «Рюкзак» (см. inventoryOverlayView() -> overlayWrapper()).
   ================================================================================================ */
.overlay-panel .inv-tabs.tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none;
}
.overlay-panel .inv-tabs.tabs::-webkit-scrollbar { display: none; }
.overlay-panel .inv-tabs.tabs .inv-tab {
  flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 6px 13px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font-family: 'Manrope', 'Inter', sans-serif; font-weight: 700; font-size: 12.5px; cursor: pointer; min-height: 0;
  transition: border-color .15s, color .15s, background .15s;
}
.overlay-panel .inv-tabs.tabs .inv-tab .tab-glyph {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, rgba(255,207,107,.28), rgba(0,0,0,0) 70%);
  display: flex; align-items: center; justify-content: center; color: var(--accent-2);
}
.overlay-panel .inv-tabs.tabs .inv-tab .tab-glyph-icon { width: 60%; height: 60%; }
.overlay-panel .inv-tabs.tabs .inv-tab.active {
  color: #f3e6d8; background: linear-gradient(180deg, rgba(255,154,61,.22), rgba(255,122,51,.10));
  border-color: #f0a24e; box-shadow: 0 0 0 1px rgba(255,207,107,.18) inset;
}
.overlay-panel .inv-tabs.tabs .inv-tab .count { font-family: 'Cinzel', 'Georgia', serif; color: var(--muted); font-size: 10.5px; }
.overlay-panel .inv-tabs.tabs .inv-tab.active .count { color: #ffcf6b; }
.overlay-panel[aria-label] .item-card,
#inventory-overlay .item-card,
.overlay-panel .items .item-card2 {
  position: relative; border-radius: 16px; flex-wrap: wrap;
  background: linear-gradient(160deg, var(--rarity-tint, rgba(157,180,201,.16)), rgba(20,14,11,.4) 72%), var(--surface);
  border: 1px solid var(--rarity-line, var(--line));
}

.overlay-panel .item-card {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 11px 12px;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--rarity-tint, rgba(157, 180, 201, .16)), rgba(20, 14, 11, .92) 72%), var(--workshop-card);
    border: 1px solid var(--rarity-line, var(--workshop-line));
    box-shadow: 0 8px 20px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .04);
    transition: box-shadow .15s ease;
}
/* Важно: базовый .item-with-icon идёт с flex:1 (без flex-basis) -- в узком .item-card (без flex-wrap
   в старом базовом правиле) он сжимался до нескольких пикселей рядом с .use-btn, загоняя
   каждое слово названия/описания на свою строку -- задаём явный flex-basis, чтобы текст переносился
   нормально (по словам), а кнопка "Использовать" уверенно переносится ниже на узких экранах. */
.overlay-panel .items .item-card .item-with-icon { flex: 1 1 220px; }
.overlay-panel .items .item-card:has(.badge.rarity-common) { --rarity-tint: rgba(157,180,201,.16); --rarity-line: rgba(157,180,201,.32); }

.overlay-panel .badge.rarity-common {
    color: #c9d6e0;
    background: rgba(157, 180, 201, .14);
    border-color: rgba(157, 180, 201, .35);
}
.overlay-panel .badge.rarity-rare {
    color: #7fc4ff;
    background: rgba(127, 196, 255, .14);
    border-color: rgba(127, 196, 255, .35);
}
.overlay-panel .badge.rarity-epic {
    color: #cdb0ff;
    background: rgba(178, 107, 255, .16);
    border-color: rgba(178, 107, 255, .4);
}
.overlay-panel .badge.rarity-legendary {
    color: #ffcf6b;
    background: rgba(255, 207, 107, .16);
    border-color: rgba(255, 207, 107, .42);
}
.overlay-panel .items .item-card:has(.badge.rarity-rare) { --rarity-tint: rgba(111,182,255,.20); --rarity-line: rgba(111,182,255,.4); }
.overlay-panel .items .item-card:has(.badge.rarity-epic) { --rarity-tint: rgba(195,123,255,.22); --rarity-line: rgba(195,123,255,.45); }
.overlay-panel .items .item-card:has(.badge.rarity-legendary) { --rarity-tint: rgba(255,207,107,.22); --rarity-line: rgba(255,207,107,.46); }
.overlay-panel .items .item-card .use-btn {
  flex: 1 1 auto; margin-left: auto; min-width: 116px; max-width: 100%; padding: 10px 14px; border-radius: 12px;
  border: 1px solid #d9862f; background: linear-gradient(180deg, #ff9a3d, #ff7a33); color: #2a0f00;
  font-family: 'Manrope', 'Inter', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: .01em;
  box-shadow: 0 4px 10px rgba(255,122,51,.3), inset 0 1px 0 rgba(255,255,255,.25); cursor: pointer; white-space: nowrap; text-align: center; min-height: 0;
}
@media (max-width: 360px) {
  .overlay-panel .items .item-card p { display: none; }
}

/* ================================================================================================
   Фаза 27.5 — багфиксы после Фазы 27.1-27.4: (1) «Отряд компаньонов» на экране «Мой питомец»
   пересобран в тёплую палитру «Мастерской» (был пропущен рестайлингом Фазы 27, оставался в
   старой сине-sci-fi палитре .arena-*); (2) `.game-hud` теперь position:fixed и виден поверх
   всех `.overlay-panel` (раньше скрывался под «Мой питомец»/«Экипировка»/«Рюкзак»); (3) safe-area
   отступ сверху для `.game-hud` в fullscreen Telegram Mini App. Append-only: правила ниже —
   override поверх старых `.arena-companion-*`/`.game-hud`/`.overlay-panel` (последние два —
   свои же правила Фазы 27, редактируются в рамках той же фичи по проектной конвенции), сами
   старые декларации выше не удаляются/не редактируются.
   ================================================================================================ */

/* ---- Баг 1: «Отряд компаньонов» -- ресскин в палитру «Мастерской», СТРОГО в скоупе
   .pet-screen .arena-companions, чтобы не задеть .pvp-arena .arena-companion-card.pvp-match-card
   (тот же класс .arena-companion-card переиспользуется в PvP-карточке соперника, которая
   Фазой 27 не затрагивалась и должна остаться в старой sci-fi палитре). ---- */
.pet-arena.pet-screen ~ .arena-companions {
  background: var(--workshop-card, rgba(37,26,21,.86));
  border: 1px solid var(--workshop-line, rgba(214,150,90,.22));
  clip-path: var(--pet-cut, none);
  box-shadow: 0 10px 20px rgba(0,0,0,.3);
  padding: 12px 13px;
}
.pet-arena.pet-screen ~ .arena-companions .arena-panel-title {
  color: var(--workshop-muted, #b9a08d);
  font-family: 'Manrope', 'Inter', sans-serif;
}
.pet-arena.pet-screen ~ .arena-companions .arena-panel-title span:first-child {
  font-family: 'Cinzel', 'Georgia', serif; font-size: 12px; font-weight: 700;
  color: var(--workshop-gold, #ffcf6b); letter-spacing: .04em; text-transform: uppercase;
}
.pet-arena.pet-screen ~ .arena-companions .arena-points-chip {
  color: #2a1608; background: linear-gradient(180deg, var(--workshop-gold, #ffcf6b), var(--workshop-amber-2, #d9862f));
  clip-path: none; border-radius: 999px; font: 800 10px/1 'Manrope', 'Inter', sans-serif;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-card {
  background: var(--workshop-card-2, rgba(20,14,11,.7));
  border: 1px solid var(--workshop-line, rgba(214,150,90,.22));
  clip-path: var(--pet-cut-sm, none);
  box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-card.empty {
  border-style: dashed; border-color: var(--workshop-line, rgba(214,150,90,.22));
  background: rgba(20,14,11,.5);
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-art {
  background: rgba(0,0,0,.28); clip-path: var(--pet-cut-sm, none);
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-body h3 {
  font-family: 'Cinzel', 'Georgia', serif; font-weight: 700; color: var(--workshop-parchment, #e8d9b8);
  letter-spacing: .01em;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-badge {
  color: #2a1608; background: linear-gradient(180deg, var(--workshop-gold, #ffcf6b), var(--workshop-amber-2, #d9862f));
  border: none; clip-path: none; border-radius: 999px;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-mini-stat span {
  color: var(--workshop-muted, #b9a08d); font-family: 'Manrope', 'Inter', sans-serif;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-mini-stat b {
  color: var(--workshop-parchment, #e8d9b8); font-family: 'Cinzel', 'Georgia', serif;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-allocate {
  background: rgba(0,0,0,.24); border: 1px solid var(--workshop-line-soft, rgba(214,150,90,.14));
  clip-path: var(--pet-cut-sm, none);
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-allocate-head {
  color: var(--workshop-muted, #b9a08d); font-family: 'Manrope', 'Inter', sans-serif;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-allocate-head strong {
  color: var(--workshop-gold, #ffcf6b); font-family: 'Cinzel', 'Georgia', serif;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-stat-btn {
  color: #2a1608; background: linear-gradient(180deg, var(--workshop-gold, #ffcf6b), var(--workshop-amber-2, #d9862f));
  clip-path: none; border-radius: 999px; box-shadow: 0 2px 8px rgba(255,207,107,.3);
  font-family: 'Manrope', 'Inter', sans-serif;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-stat-btn:hover { filter: brightness(1.1); }
.pet-arena.pet-screen ~ .arena-companions .arena-companion-btn {
  color: var(--workshop-text, #f3e6d8);
  background: linear-gradient(180deg, var(--workshop-surface-2, #2e1f18), var(--workshop-surface, #251a15));
  border: 1px solid var(--workshop-line, rgba(214,150,90,.22));
  clip-path: none; border-radius: 12px; font-family: 'Manrope', 'Inter', sans-serif;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-btn:hover { filter: brightness(1.12); }
.pet-arena.pet-screen ~ .arena-companions .arena-companion-empty-icon {
  color: var(--workshop-gold, #ffcf6b); background: rgba(255,207,107,.1);
  border: 1px solid var(--workshop-line, rgba(214,150,90,.22)); clip-path: none; border-radius: 12px;
}
.pet-arena.pet-screen ~ .arena-companions .arena-companion-locked-note { color: var(--workshop-amber, #f0a24e); }
.pet-arena.pet-screen ~ .arena-companions .arena-companion-summon-btn {
  color: #2a1608; background: linear-gradient(120deg, var(--workshop-ember, #ff7a33), #ffb85c 45%, var(--workshop-gold, #ffcf6b));
  border-color: rgba(255,207,107,.5);
}

/* ---- Баг 2: `.game-hud` становится position:fixed, чтобы оставаться видимым НАД
   `.overlay-panel` (z-index:8) во время «Мой питомец»/«Экипировка»/«Рюкзак». Правит собственные
   декларации .game-hud из Фазы 27.1 (position/z-index/padding-top) в рамках той же фичи. ---- */
.game-hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9;
  /* Баг 3: safe-area отступ сверху (см. --tg-safe-top, устанавливается в initialiseTelegram()) --
     иначе в fullscreen Telegram Mini App нативные кнопки («Закрыть»/гамбургер/шеврон) перекрывают
     верх HUD. Left/right/bottom из исходного padding (10px 10px 0) не меняются. */
  padding-top: max(10px, env(safe-area-inset-top), var(--tg-safe-top, 0px));
  padding-left: 10px; padding-right: 10px; padding-bottom: 0;
  background: linear-gradient(180deg, rgba(26,18,16,.97), rgba(26,18,16,.9) 80%, rgba(26,18,16,0));
}
@media (min-width: 480px) {
  .game-hud { padding-left: 16px; padding-right: 16px; }
}
/* Пожелание пользователя (после Фазы 33.4): затемнение .game-hud менее тёмное -- средняя точка
   градиента ослаблена с rgba(26,18,16,.9) до rgb(26 18 16 / 57%), чтобы карта хаба (видна сквозь
   HUD после Фазы 33.4) была лучше различима под шапкой. Override поверх декларации выше по
   каскаду (append-only). */
.game-hud {
  background: linear-gradient(180deg, rgba(26, 18, 16, .97), rgb(26 18 16 / 57%) 80%, rgba(26, 18, 16, 0));
}
/* Контент, который раньше шёл сразу за .game-hud в потоке (main-pane), теперь нуждается в
   эквивалентном отступе сверху -- используем --hud-height, точную высоту HUD, измеренную и
   установленную через JS в render() (см. app.js, measureHudHeight()). Фоллбэк 92px -- на случай,
   если переменная ещё не установлена (первый кадр до layout). */
.main-pane { padding-top: var(--hud-height, 92px); }
/* Регрессия, найденная главным агентом после фикса выше: отступ был добавлен только `.main-pane`, но
   не `.sidebar` -- на десктопе (>=560px) `.sidebar` и `.main-pane` являются сиблингами внутри
   `.app-shell` (flex-ряд), оба начинаются с `top:0` в общем потоке -- теперь, когда `.game-hud`
   стал `position:fixed; left:0; right:0` и перекрывает всю ширину вьюпорта, верх `.sidebar`
   (`.sidebar-topbar` с «сытость»/«настроение») оказывался обрезан под HUD на десктопе (подтверждено
   скриншотами пользователя -- виден обрезанный текст «сытость»). `.sidebar` сам по себе не
   скроллится (`display:flex; flex-direction:column`, без overflow) -- скролл есть только у
   внутреннего `.sidebar-body`, поэтому безопасно сдвинуть всю колонку целиком тем же
   `padding-top`, что и у `.main-pane` (выравнивается по высоте с ним). */
@media (min-width: 560px) {
  .sidebar { padding-top: var(--hud-height, 92px); }
}
/* На мобильной версии (<560px) `.sidebar` -- position:absolute drawer с зашитым `top:59px`
   (строка ~421, калибровался под высоту старого однорядного `.top-icon-strip`) -- теперь
   двухрядный `.game-hud` выше (~92-110px), тот же зашитый отступ оказывался недостаточным --
   переключаем на `var(--hud-height)`. Закрывающий бэкдроп `.sidebar-backdrop { top:59px }`
   (строка ~422) аналогично переключается, чтобы затемнение тоже не начиналось выше
   HUD и не перекрывало его. */
@media (max-width: 559.98px) {
  .sidebar { top: var(--hud-height, 92px); }
  .sidebar-backdrop { top: var(--hud-height, 92px); }
}
/* .overlay-panel теперь тоже должен начинаться под HUD, а не под самым верхом экрана -- HUD
   остаётся видимым и над оверлеями (см. .game-hud z-index:9 > .overlay-panel z-index:8 выше). */
/* :not(.overlay-panel--sheet) — иначе это правило (та же специфичность, но позже в источнике) перебивает
   оригинальный `.overlay-panel--sheet { top:50%; ... }` (строка ~382) по каскаду, сломав центрирование
   турнирного/лигового лидерборда (подтверждено эмпирически в Playwright -- без :not() этот
   аппенд перебивал top:50% на var(--hud-height), т.к. равная специфичность разрешается по порядку
   в источнике, а мой аппенд всегда последний). */
.overlay-panel:not(.overlay-panel--sheet) { top: var(--hud-height, 92px); }
/* .overlay-panel--sheet — компактная центрированная модалка (турнирный/лиговый лидерборд) --
   благодаря :not() выше её собственный top:50% (строка ~382) теперь сохраняется нетронутым,
   центрирование не ломается. HUD (position:fixed, z-index:9) отображается поверх и
   затемнения .overlay-backdrop (z-index:7), и самого sheet -- это ожидаемый побочный эффект,
   не баг. */

/* ---- Дополнительное уточнение по прямому указанию пользователя (вторая итерация в рамках той же
   фичи): на десктопе три первичные оверлея («Мой питомец»/«Экипировка»/«Рюкзак») должны
   выглядеть как обычная городская локация (вся ширина `.main-pane` справа от `.sidebar`),
   а не как узкая центрированная модалка 700px с зазорами по бокам (так было до этого
   уточнения, см. `width:min(100%,700px); left:50%; transform:translateX(-50%)` выше). Новый
   модификатор `.overlay-panel--primary` (добавлен третьим классом в `overlayWrapper()` вызовах
   внутри petPanelView()/equipmentPanelView()/inventoryOverlayView() в app.js) не трогает остальные
   модалки (pet-chat/pet-play/battle-history/tournament-leaderboard/league-info/profile не добавляют
   этот класс).
   Технически: `position:fixed` сохранён (не переводили на position:absolute внутри .main-pane --
   потребовало бы реструктурировать render() в app.js, т.к. ${overlay} рендерится как сиблинг
   .app-shell, не внутри .main-pane) -- вместо этого на десктопе (>=560px) `left` сдвинут на
   фактическую ширину `.sidebar` на этом брейкпойнте -- 190px, зашитая в существующем
   `@media (min-width:560px) { .sidebar { flex-basis:190px; max-width:190px; } ... }` (строка ~402,
   постоянная величина, не clamp/% -- безопасно зеркально повторить готовым числом, подтверждено
   измерением реального getBoundingClientRect().width в Playwright на 1280px/900px/600px — везде 190px).
   `width:auto; right:0;` вместе с `left` растягивает панель на всю оставшуюся ширину вьюпорта
   справа от сайдбара, без `transform` (сбрасывает центрирующий `translateX(-50%)` базового
   `.overlay-panel`). На мобильной версии (<560px) сайдбар -- выезжающий drawer, скрытый по
   умолчанию, поэтому там базовые `left:50%; width:min(100%,700px); transform:translateX(-50%)` от `.overlay-panel`
   уже дают правильный полноэкранный вид -- media query ниже намеренно скопирован только
   на (min-width:560px), чтобы мобильный вид остался нетронутым. */
@media (min-width: 560px) {
  .overlay-panel--primary {
    left: 190px;
    right: 0;
    width: auto;
    transform: none;
    max-width: none;
  }
}

/* ================================================================================================
   Конец блока Фазы 27.5.
   ================================================================================================ */

/* ================================================================================================
   Фаза 28 — редизайн 5 экранов (Магазин / Бойцовский квартал / Ратуша / Лига / Профиль) в стиле
   утверждённого Концепта A («Мастерская»: тёплая янтарно-медная палитра, Cinzel/Manrope,
   painted-fantasy иконки, notch-clip карточки, glow-акценты). Append-only блок: ничего выше не
   меняется/не удаляется. HUD (.game-hud) уже глобальный/fixed с Фазы 27.5 и не дублируется здесь.
   Концепты: /prototypes/screens_showcase/{shop,arena_district,town_hall,league,profile}/index.html
   Меняется только визуал -- функциональность/данные/data-атрибуты обработчиков не затронуты.
   ================================================================================================ */

/* ---------------------------------------------------------------------------------------------
   Экран «Магазин» (Концепт «Мастерская») -- переверстка shopView()/shopSellView(). Скоуп: .shop-screen.
   Локальные --workshop-* переопределены внутри селектора экрана (не в :root), по конвенции Фазы 27.
   --------------------------------------------------------------------------------------------- */
.shop-screen {
  --workshop-bg: #1a1210; --workshop-bg-2: #241713; --workshop-surface: #251a15; --workshop-surface-2: #2e1f18;
  --workshop-card: rgba(37,26,21,.86); --workshop-card-2: rgba(20,14,11,.7);
  --workshop-line: rgba(214,150,90,.22); --workshop-line-soft: rgba(214,150,90,.14);
  --workshop-text: #f3e6d8; --workshop-muted: #b9a08d;
  --workshop-ember: #ff7a33; --workshop-ember-2: #ff9a3d;
  --workshop-gold: #ffcf6b; --workshop-gold-2: #e0a53a;
  --workshop-amber: #f0a24e; --workshop-amber-2: #d9862f;
  --workshop-parchment: #e8d9b8; --workshop-brass: #b98a4a;
  --workshop-green: #7ee5ad; --workshop-danger: #ff8d91;
  --rarity-common: #9db4c9; --rarity-common-soft: rgba(157,180,201,.20);
  --rarity-rare: #49aaf1; --rarity-rare-soft: rgba(73,170,241,.20);
  --rarity-epic: #b26bff; --rarity-epic-soft: rgba(178,107,255,.22);
  --rarity-legendary: #ffcf6b; --rarity-legendary-soft: rgba(255,207,107,.22);
  position: relative;
  background:
    linear-gradient(180deg, rgba(10,7,6,.86) 0%, rgba(15,10,8,.7) 30%, rgba(16,10,8,.86) 68%, rgba(10,6,5,.94) 100%),
    url('../img/locations/market.jpg') center 38% / cover no-repeat fixed;
  margin: -16px -16px 0; padding: 16px; border-radius: 0 0 18px 18px;
  color: var(--workshop-text); font-family: 'Manrope', 'Inter', sans-serif;
}
.shop-screen, .shop-screen * { box-sizing: border-box; }
.shop-screen h1, .shop-screen h2 { font-family: 'Cinzel', 'Georgia', serif; letter-spacing: -.01em; color: var(--workshop-parchment); text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.shop-screen .screen-head { margin-bottom: 8px; }
.shop-screen .screen-head .hero-kicker { color: var(--workshop-ember-2); font-family: 'Manrope', sans-serif; font-weight: 800; letter-spacing: .14em; }
.shop-screen .icon-button { background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface)); border: 1px solid var(--workshop-line); color: var(--workshop-parchment); box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05); }
.shop-screen .currency-bar { display: flex; gap: 8px; background: none; border: none; padding: 0; margin: 0 0 10px; }
.shop-screen .currency-bar span { flex: 1 1 auto; display: flex; align-items: center; gap: 7px; padding: 8px 12px; background: var(--workshop-card); border: 1px solid var(--workshop-line); border-radius: 13px; box-shadow: 0 6px 16px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.04); font-family: 'Cinzel', serif; font-weight: 700; font-size: 13px; color: var(--workshop-gold); }
.shop-screen .currency-bar span:last-child { color: #cdb8ff; }
.shop-screen .currency-bar img, .shop-screen .currency-bar .hud-capsule-icon { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.shop-screen .phase-note { color: var(--workshop-muted); }
.shop-screen .tabs { padding: 2px 0 10px; }
.shop-screen .tabs button { font-family: 'Manrope', sans-serif; border: 1px solid var(--workshop-line); color: var(--workshop-muted); background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface)); font-weight: 650; }
.shop-screen .tabs button.active { color: #2a1706; background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); border-color: var(--workshop-gold-2); font-weight: 800; box-shadow: 0 4px 12px rgba(255,207,107,.25); }
.shop-screen .items { gap: 11px; }
.shop-screen .item-card {
  position: relative; background: linear-gradient(145deg, var(--workshop-card), var(--workshop-card-2)); border: 1px solid var(--workshop-line);
  border-radius: 18px; box-shadow: 0 12px 26px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.03);
}
.shop-screen .item-card.rarity-legendary { border-color: var(--rarity-legendary); box-shadow: 0 12px 26px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.03), 0 0 0 1px var(--rarity-legendary-soft) inset; }
.shop-screen .item-card.rarity-rare { border-color: var(--rarity-rare); box-shadow: 0 12px 26px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.03), 0 0 0 1px var(--rarity-rare-soft) inset; }
.shop-screen .item-card.rarity-epic { border-color: var(--rarity-epic); box-shadow: 0 12px 26px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.03), 0 0 0 1px var(--rarity-epic-soft) inset; }
.shop-screen .item-card.rarity-common { border-color: var(--rarity-common); }
.shop-screen .icon-frame-wrap { border-radius: 14px; background: radial-gradient(circle at 35% 28%, var(--workshop-line-soft), rgba(0,0,0,0) 72%), var(--workshop-surface); border: 1.5px solid var(--workshop-line); box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.shop-screen .item-card.rarity-legendary .icon-frame-wrap { border-color: var(--rarity-legendary); box-shadow: 0 4px 10px rgba(0,0,0,.35), 0 0 16px var(--rarity-legendary-soft); }
.shop-screen .item-card.rarity-rare .icon-frame-wrap { border-color: var(--rarity-rare); box-shadow: 0 4px 10px rgba(0,0,0,.35), 0 0 16px var(--rarity-rare-soft); }
.shop-screen .item-card.rarity-epic .icon-frame-wrap { border-color: var(--rarity-epic); box-shadow: 0 4px 10px rgba(0,0,0,.35), 0 0 16px var(--rarity-epic-soft); }
.shop-screen .badge { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--workshop-line); border-radius: 999px; color: var(--workshop-muted); background: transparent; font-family: 'Manrope', sans-serif; }
.shop-screen .badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; flex-shrink: 0; }
.shop-screen .badge.rarity-common { color: var(--rarity-common); border-color: var(--rarity-common); background: var(--rarity-common-soft); }
.shop-screen .badge.rarity-legendary { color: var(--rarity-legendary); border-color: var(--rarity-legendary); background: var(--rarity-legendary-soft); }
.shop-screen .badge.rarity-rare { color: var(--rarity-rare); border-color: var(--rarity-rare); background: var(--rarity-rare-soft); }
.shop-screen .badge.rarity-epic { color: var(--rarity-epic); border-color: var(--rarity-epic); background: var(--rarity-epic-soft); }
.shop-screen .item-card h2 { font-size: 15px; font-weight: 600; }
.shop-screen .item-card h2 em { color: var(--workshop-gold); }
.shop-screen .item-card p { color: var(--workshop-muted); }
.shop-screen .item-card small { color: var(--workshop-amber); }
.shop-screen .item-buy strong { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-family: 'Cinzel', serif; color: var(--workshop-gold); }
.shop-screen .item-buy.hard-price strong { color: #cdb8ff; }
.shop-screen .item-buy img, .shop-screen .item-buy .hard-currency-icon, .shop-screen .item-buy .soft-currency-icon { width: 15px; height: 15px; object-fit: contain; }
.shop-screen .qty-input { border: 1px solid var(--workshop-line); background: var(--workshop-surface); color: var(--workshop-text); }
.shop-screen .item-buy button, .shop-screen .item-card button { border: none; font-family: 'Manrope', sans-serif; font-weight: 750; color: #2a1706; background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); box-shadow: 0 6px 14px rgba(255,207,107,.28), inset 0 1px 0 rgba(255,255,255,.4); }
.shop-screen .item-buy button:disabled, .shop-screen .item-card button:disabled { opacity: .5; box-shadow: none; }
.shop-screen .empty { color: var(--workshop-muted); }
@media (max-width: 480px) {
  .shop-screen { margin: -12px -12px 0; padding: 12px; }
  .shop-screen .item-card { padding: 12px; gap: 10px; }
}

/* ---------------------------------------------------------------------------------------------
   Экран «Бойцовский квартал» (Концепт «Мастерская») -- переверстка arenaView()/pvpMatchView().
   Скоуп: .pvp-arena.workshop-arena (второй класс добавлен рядом с существующим .pvp-arena на
   ВСЕХ состояниях функции -- idle/queued/battle/finished/result), переопределяет прежний
   неоновый скин "Неонит" (Фаза 23) тёплой палитрой «Мастерской».
   КРИТИЧЕСКИ ВАЖНО (прямое указание пользователя): механика асинхронного рейда с Фазы 23.2
   (один найденный соперник, слепой матчмейкинг, «Найти бой» -> карточка одной цели ->
   «Сменить»/«Атаковать») НЕ меняется -- устаревший список из нескольких выбираемых целей
   (как в концепте arena_district/index.html) НЕ используется. Меняется только палитра/шрифты/
   карточный стиль поверх существующей структуры. Локальные --workshop- и --pa- переменные
   переопределены внутри селектора экрана (не в :root), по конвенции Фазы 27. Гекс-позиционирование
   и боевая логика (data-arena- / data-pvp- атрибуты) не затронуты -- только CSS-переменные темы.
   --------------------------------------------------------------------------------------------- */
.pvp-arena.workshop-arena {
  --pa-bg: #1a1210; --pa-ink: #f3e6d8; --pa-muted: #b9a08d;
  --pa-cyan: #ffcf6b; --pa-cyan-2: #e0a53a; --pa-violet: #ff7a33; --pa-violet-2: #d9862f;
  --pa-orange: #f0a24e; --pa-red: #ff8d91;
  --pa-line: rgba(214,150,90,.24); --pa-panel: rgba(37,26,21,.86); --pa-panel-deep: rgba(20,14,11,.78);
  --pa-cut: polygon(0 14px,14px 0,calc(100% - 14px) 0,100% 14px,100% calc(100% - 14px),calc(100% - 14px) 100%,14px 100%,0 calc(100% - 14px));
  --pa-cut-sm: polygon(0 8px,8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px));
  --tier-novice: #9aa0ab; --tier-fighter: #6fb6ff; --tier-veteran: #c37bff; --tier-champion: #ffb23d;
    --workshop-bg: #1a1210;
    --workshop-bg-2: #241713;
    --workshop-surface: #251a15;
    --workshop-surface-2: #2e1f18;
    --workshop-card: rgba(37, 26, 21, .86);
    --workshop-card-2: rgba(20, 14, 11, .7);
    --workshop-line: rgba(214, 150, 90, .22);
    --workshop-line-soft: rgba(214, 150, 90, .14);
    --workshop-text: #f3e6d8;
    --workshop-muted: #b9a08d;
    --workshop-ember: #ff7a33;
    --workshop-ember-2: #ff9a3d;
    --workshop-gold: #ffcf6b;
    --workshop-gold-2: #e0a53a;
    --workshop-amber: #f0a24e;
    --workshop-amber-2: #d9862f;
    --workshop-parchment: #e8d9b8;
    --workshop-brass: #b98a4a;
    --workshop-green: #7ee5ad;
    --workshop-danger: #ff8d91;
    --tier-novice: #9aa0ab;
    --tier-fighter: #6fb6ff;
    --tier-veteran: #c37bff;
    --tier-champion: #ffb23d;
  background:
    linear-gradient(180deg, rgba(10,7,6,.82) 0%, rgba(16,10,8,.5) 20%, rgba(19,12,9,.68) 46%, rgba(13,9,7,.9) 78%, rgba(10,7,6,.97) 100%),
    url('../img/locations/arena_district.jpg') center 38% / cover no-repeat fixed;
  font-family: 'Manrope', 'Inter', sans-serif;
}
.workshop-arena h1, .workshop-arena .cta-btn, .workshop-arena .pvp-match-countdown { font-family: 'Cinzel', 'Georgia', serif; }
.workshop-arena .hero-kicker { text-shadow: none; color: var(--pa-cyan); }
.workshop-arena .arena-mode-tabs { border-radius: 14px; }
.workshop-arena .arena-mode-tabs button.active { color: #2a1608; box-shadow: 0 3px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.25); }
.workshop-arena #arena-find,
.workshop-arena .arena-actions button:not(.secondary-action):not(:disabled),
.workshop-arena button[data-arena-attack]:not(:disabled) { color: #2a1706; box-shadow: 0 6px 14px rgba(255,207,107,.28), inset 0 1px 0 rgba(255,255,255,.4); }
.workshop-arena .intro-card.pvp-match-intro { background: linear-gradient(150deg, rgba(240,162,78,.14), var(--pa-panel) 55%, rgba(255,122,51,.1)); box-shadow: 0 18px 32px rgba(0,0,0,.45), inset 0 0 0 1px rgba(214,150,90,.14); }
.workshop-arena .intro-card.pvp-match-intro::before { background: radial-gradient(circle at 26% 8%, rgba(255,159,77,.22), transparent 45%), radial-gradient(circle at 82% 92%, rgba(255,122,51,.16), transparent 48%); }
.workshop-arena .intro-card.pvp-match-intro p { color: var(--pa-muted); }
.workshop-arena .hex-badge { background: radial-gradient(circle at 32% 26%, var(--workshop-surface-2, #2e1f18), var(--workshop-bg-2, #241713) 70%); box-shadow: 0 0 0 1px var(--pa-line), 0 4px 10px rgba(0,0,0,.35); border: 1px solid var(--pa-line); }
.workshop-arena .hex-badge svg { color: var(--pa-cyan); }
.workshop-arena .cta-btn { color: #2a1608; background: linear-gradient(120deg, var(--pa-violet), var(--pa-cyan) 55%, var(--pa-cyan-2)); box-shadow: 0 10px 22px rgba(255,140,60,.3), inset 0 1px 0 rgba(255,255,255,.4); }
.workshop-arena .targets-head.pvp-match-head p { color: var(--pa-muted); }
.workshop-arena .arena-companion-art { background: var(--pa-panel-deep); }
.workshop-arena .arena-companion-badge { color: var(--pa-cyan); background: rgba(255,207,107,.12); border: 1px solid rgba(255,207,107,.32); }
.workshop-arena .pvp-match-countdown { color: var(--pa-cyan); background: rgba(255,207,107,.1); border: 1px solid rgba(255,207,107,.32); }
.workshop-arena .pvp-match-countdown.urgent { color: var(--pa-red); background: rgba(255,141,145,.12); border-color: rgba(255,141,145,.4); }
.workshop-arena [data-pvp-challenge]:not(:disabled),
.workshop-arena [data-pvp-challenge-bot]:not(:disabled),
.workshop-arena [data-pvp-match-attack]:not(:disabled) { background: linear-gradient(180deg, var(--pa-violet), #d9622a); color: #2a0f00; box-shadow: 0 3px 8px rgba(255,122,51,.35), inset 0 1px 0 rgba(255,255,255,.25); }
.workshop-arena [data-pvp-scout],
.workshop-arena [data-pvp-match-reroll] { background: var(--pa-panel); border: 1px solid var(--pa-cyan-2); }
.workshop-arena .pvp-match-actions .secondary-action { background: var(--pa-panel-deep) !important; color: var(--pa-ink) !important; border: 1px solid var(--pa-cyan-2) !important; }
.workshop-arena .pvp-match-actions .secondary-action:hover,
.workshop-arena .pvp-match-actions .secondary-action:focus-visible { border-color: var(--pa-cyan) !important; background: rgba(255,207,107,.08) !important; }
.workshop-arena .hex-grid { background: radial-gradient(120% 100% at 50% 0%, rgba(255,159,77,.14), transparent 60%), var(--pa-panel-deep); }
.workshop-arena .hex { background: rgba(214,150,90,.05); border: 1px solid rgba(214,150,90,.15); }
.workshop-arena .hex.available { background: rgba(255,207,107,.16); border-color: var(--pa-cyan); box-shadow: 0 0 10px rgba(255,207,107,.35) inset; }
.workshop-arena .hex.you .arena-token { color: var(--pa-cyan); text-shadow: 0 0 8px rgba(255,207,107,.8); }
.workshop-arena .hex.ally .arena-token { color: var(--pa-violet); text-shadow: 0 0 8px rgba(255,122,51,.7); }
.workshop-arena .hex.enemy .arena-token { color: var(--pa-red); text-shadow: 0 0 8px rgba(255,141,145,.7); }
.workshop-arena .stat strong { color: var(--pa-cyan); text-shadow: none; }
.workshop-arena .badge { border: 1px solid var(--pa-cyan-2); color: var(--pa-cyan); background: rgba(255,207,107,.08); }
.workshop-arena .profile-link:hover,
.workshop-arena .profile-link:focus-visible { color: var(--pa-cyan); }
.workshop-arena .pvp-online-dot.online { background: var(--pa-cyan); box-shadow: 0 0 0 3px rgba(255,207,107,.2); }
.workshop-arena #arena-return { background: linear-gradient(180deg, var(--workshop-gold, #ffcf6b), var(--workshop-amber-2, #d9862f)); color: #2a1608; box-shadow: 0 0 14px rgba(255,207,107,.35); }
.workshop-arena .arena-companion-badge { display: inline-flex; align-items: center; gap: 5px; }
.workshop-arena .arena-companion-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; flex-shrink: 0; }
.workshop-arena .arena-companion-badge.tier-novice { color: var(--tier-novice); background: rgba(154,160,171,.14); border-color: rgba(154,160,171,.35); }
.workshop-arena .arena-companion-badge.tier-fighter { color: var(--tier-fighter); background: rgba(111,182,255,.14); border-color: rgba(111,182,255,.35); }
.workshop-arena .arena-companion-badge.tier-veteran { color: var(--tier-veteran); background: rgba(195,123,255,.14); border-color: rgba(195,123,255,.35); }
.workshop-arena .arena-companion-badge.tier-champion { color: var(--tier-champion); background: rgba(255,178,61,.16); border-color: rgba(255,178,61,.4); }

/* ---------------------------------------------------------------------------------------------
   Экран «Ратуша» (Концепт «Мастерская») -- переверстка questsView() (доска объявлений). Скоуп:
   .quests-screen. Также затрагивает questCardActive()/questCardAvailable() -- переиспользуются и
   на street-level npcLocationView() (.quest-list.compact), поэтому оформление квест-карточки не
   заскоплено под .quests-screen, а стилизуется классом .quest-card напрямую (виден на любом фоне).
   Локальные --workshop- переменные переопределены внутри селектора экрана (не в :root).
   --------------------------------------------------------------------------------------------- */
.quests-screen {
  --workshop-bg: #1a1210; --workshop-bg-2: #241713; --workshop-surface: #251a15; --workshop-surface-2: #2e1f18;
  --workshop-card: rgba(37,26,21,.86); --workshop-card-2: rgba(20,14,11,.7);
  --workshop-line: rgba(214,150,90,.22); --workshop-line-soft: rgba(214,150,90,.14);
  --workshop-text: #f3e6d8; --workshop-muted: #b9a08d;
  --workshop-ember: #ff7a33; --workshop-ember-2: #ff9a3d;
  --workshop-gold: #ffcf6b; --workshop-gold-2: #e0a53a;
  --workshop-amber: #f0a24e; --workshop-amber-2: #d9862f;
  --workshop-parchment: #e8d9b8; --workshop-brass: #b98a4a;
  --workshop-green: #7ee5ad; --workshop-danger: #ff8d91;
  --qh-cut: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  --qh-cut-sm: polygon(0 6px, 6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px));
  position: relative;
  background:
    linear-gradient(180deg, rgba(10,7,6,.7) 0%, rgba(10,7,6,.16) 32%, rgba(10,7,6,.04) 46%, rgba(13,9,7,.84) 78%, rgba(13,9,7,.95) 100%),
    url('../img/locations/town_hall.jpg') center 30% / cover no-repeat fixed;
  margin: -16px -16px 0; padding: 16px; border-radius: 0 0 18px 18px;
  color: var(--workshop-text); font-family: 'Manrope', 'Inter', sans-serif;
}
.quests-screen, .quests-screen * { box-sizing: border-box; }
.quests-screen h1, .quests-screen h2 { font-family: 'Cinzel', 'Georgia', serif; letter-spacing: -.01em; color: var(--workshop-parchment); text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.quests-screen .screen-head .hero-kicker { 
    display: block;
    font-family: 'Manrope', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--workshop-amber);
    margin-bottom: 3px;
}

.quests-screen .icon-button { background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface)); border: 1px solid var(--workshop-line); color: var(--workshop-parchment); box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05); }
.phase-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 10px 12px; background: var(--workshop-card-2); border: 1px solid var(--workshop-line-soft); border-radius: 12px; color: var(--workshop-muted); }
.phase-note.board-note img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; margin-top: 1px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.quests-screen .panel { background: transparent; border: none; box-shadow: none; padding: 0; margin-top: 16px; }
.quests-screen .panel-title { padding: 0 4px 10px; }
.quests-screen .panel-title h2 { font-size: 15px; color: var(--workshop-gold); }
.quests-screen .panel-title span { font-family: 'Cinzel', serif; font-size: 11.5px; font-weight: 700; color: var(--workshop-parchment); background: rgba(0,0,0,.35); border: 1px solid var(--workshop-line); border-radius: 999px; padding: 3px 10px; }
.quests-screen .quest-list { display: flex; flex-direction: column; gap: 12px; }

/* .quest-card -- unscoped (also reused by npcLocationView()'s .quest-list.compact), warm
   "notice board" card with ember accent stripe + notch-clip corners, per the concept. */
.quest-card {
  position: relative; display: flex; gap: 10px; padding: 13px 13px 13px 12px;
  background: linear-gradient(155deg, var(--workshop-card, rgba(37,26,21,.86)), var(--workshop-card-2, rgba(20,14,11,.7)));
  border: 1px solid var(--workshop-line, rgba(214,150,90,.22));
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  box-shadow: 0 8px 18px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.03);
}
.quest-card::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  background: linear-gradient(180deg, var(--workshop-ember, #ff7a33), var(--workshop-gold-2, #e0a53a));
  box-shadow: 0 0 8px rgba(255,154,61,.6); opacity: .85;
}
.quest-card.is-completed { border-color: rgba(126,229,173,.4); box-shadow: 0 8px 18px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.03), 0 0 0 1px rgba(126,229,173,.12), 0 0 22px rgba(126,229,173,.18); animation: quest-glow-pulse 2.6s ease-in-out infinite; }
.quest-card.is-completed::before { background: linear-gradient(180deg, var(--workshop-green, #7ee5ad), #4fbf85); box-shadow: 0 0 8px rgba(126,229,173,.6); }
.quest-card.is-locked { opacity: .68; }
@keyframes quest-glow-pulse {
  0%, 100% { box-shadow: 0 8px 18px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.03), 0 0 0 1px rgba(126,229,173,.12), 0 0 14px rgba(126,229,173,.14); }
  50% { box-shadow: 0 8px 18px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.03), 0 0 0 1px rgba(126,229,173,.22), 0 0 26px rgba(126,229,173,.32); }
}
.quest-type-icon {
  flex: 0 0 auto; width: 44px; height: 44px;
  background: radial-gradient(circle at 35% 28%, rgba(255,207,107,.22), rgba(0,0,0,0) 72%), var(--workshop-surface, #251a15);
  border: 1px solid var(--workshop-line, rgba(214,150,90,.22));
  clip-path: polygon(0 6px, 6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px));
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.quest-type-icon img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.quest-card .quest-body { flex: 1 1 auto; min-width: 0; }
.quest-card .badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .03em; color: var(--workshop-amber, #f0a24e); background: rgba(240,162,78,.12); border: 1px solid rgba(240,162,78,.28); border-radius: 999px; padding: 2px 8px 2px 6px; }
.quest-card .badge::before { content: ''; flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: var(--workshop-amber, #f0a24e); box-shadow: 0 0 6px var(--workshop-amber, #f0a24e); }
.quest-card h2 { margin: 6px 0 0; font-family: 'Cinzel', serif; font-weight: 600; font-size: 14px; color: var(--workshop-parchment, #e8d9b8); line-height: 1.3; }
.quest-card p { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: var(--workshop-muted, #b9a08d); }
.quest-card small { color: var(--workshop-muted, #b9a08d); font-size: 11px; }
.quest-card progress { height: 8px; margin-top: 6px; }
.quest-card progress::-webkit-progress-value { background: linear-gradient(90deg, var(--workshop-ember, #ff7a33), var(--workshop-gold, #ffcf6b)); box-shadow: 0 0 6px rgba(255,207,107,.5); }
.quest-card.is-completed progress::-webkit-progress-value { background: linear-gradient(90deg, #4fbf85, var(--workshop-green, #7ee5ad)); box-shadow: 0 0 6px rgba(126,229,173,.5); }
.quest-meta { margin-top: 4px; }
.quest-meta span { color: var(--workshop-muted, #b9a08d); font-size: 11px; font-weight: 700; }
.quest-card button[data-quest-claim] {
  position: relative; overflow: hidden; font-family: 'Cinzel', serif; font-weight: 700; font-size: 11.5px; letter-spacing: .02em;
  padding: 7px 16px; border: none; color: #24160a;
  background: linear-gradient(115deg, var(--workshop-ember, #ff7a33) 0%, var(--workshop-amber, #f0a24e) 45%, var(--workshop-gold, #ffcf6b) 100%);
  box-shadow: 0 3px 10px rgba(255,122,51,.35), 0 0 14px rgba(255,207,107,.3), inset 0 1px 0 rgba(255,255,255,.4);
}
.quest-card button[data-quest-claim]::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 66%);
  translate: -120% 0; animation: quest-claim-sheen 3.2s ease-in-out infinite;
}
@keyframes quest-claim-sheen { 0%, 55% { translate: -120% 0; } 75%, 100% { translate: 130% 0; } }
.quest-card button[data-quest-accept] {
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 11.5px; letter-spacing: .02em;
  padding: 7px 14px; border: 1px solid var(--workshop-brass, #b98a4a); color: var(--workshop-parchment, #e8d9b8);
  background: linear-gradient(180deg, var(--workshop-surface-2, #2e1f18), var(--workshop-surface, #251a15));
  box-shadow: 0 3px 8px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
}
.quest-unavailable { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .01em; color: var(--workshop-amber-2, #d9862f) !important; background: rgba(217,134,47,.1); border: 1px solid rgba(217,134,47,.26); border-radius: 999px; padding: 3px 9px 3px 7px; }
.quest-unavailable::before { content: ''; flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; margin-top: 1px; background: var(--workshop-danger, #ff8d91); box-shadow: 0 0 5px var(--workshop-danger, #ff8d91); }
/* Багфикс (Ратуша, найдено в Playwright QA): длинный тег недоступности переполнял правый край
   карточки на 375px -- переводим footer-строку карточки на flex-wrap с полноширинным переносом. */
.quest-card .quest-meta,
.quest-card > .quest-body > small + .quest-unavailable,
.quest-card .quest-unavailable {
  max-width: 100%;
}
.quests-screen .empty { color: var(--workshop-muted); }
@media (max-width: 480px) {
  .quests-screen { margin: -12px -12px 0; padding: 12px; }
  .quest-card { padding: 11px; flex-wrap: wrap; }
  .quest-card .quest-body { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------------------------------------
   Экран «Лига» (Концепт «Мастерская») -- переверстка leagueView(). Скоуп: .league-screen.
   Переиспользует .leaderboard-row/.tournament-group/.tournament-prize из турнирного экрана
   (Фаза 17.1) -- палитра/карточный стиль переопределены только внутри .league-screen, чтобы не
   затронуть турнирный экран. Локальные --workshop- переменные внутри селектора экрана.
   --------------------------------------------------------------------------------------------- */
.league-screen {
  --workshop-bg: #1a1210; --workshop-bg-2: #241713; --workshop-surface: #251a15; --workshop-surface-2: #2e1f18;
  --workshop-card: rgba(37,26,21,.86); --workshop-card-2: rgba(20,14,11,.7);
  --workshop-line: rgba(214,150,90,.22); --workshop-line-soft: rgba(214,150,90,.14);
  --workshop-text: #f3e6d8; --workshop-muted: #b9a08d;
  --workshop-ember: #ff7a33; --workshop-ember-2: #ff9a3d;
  --workshop-gold: #ffcf6b; --workshop-gold-2: #e0a53a;
  --workshop-amber: #f0a24e; --workshop-amber-2: #d9862f;
  --workshop-parchment: #e8d9b8; --workshop-brass: #b98a4a;
  --workshop-green: #7ee5ad; --workshop-danger: #ff8d91;
  --lg-cut: polygon(0 14px, 14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px));
  --lg-cut-sm: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  position: relative;
  background:
    linear-gradient(180deg, rgba(10,7,6,.78) 0%, rgba(15,10,8,.62) 30%, rgba(16,10,8,.82) 68%, rgba(10,6,5,.92) 100%),
    url('../img/locations/town_hall.jpg') center 30% / cover no-repeat fixed;
  margin: -16px -16px 0; padding: 16px; border-radius: 0 0 18px 18px;
  color: var(--workshop-text); font-family: 'Manrope', 'Inter', sans-serif;
}
.league-screen, .league-screen * { box-sizing: border-box; }
.league-screen h1, .league-screen h2 { font-family: 'Cinzel', 'Georgia', serif; letter-spacing: -.01em; color: var(--workshop-parchment); text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.league-screen .screen-head .hero-kicker { color: var(--workshop-amber); font-family: 'Manrope', sans-serif; font-weight: 700; letter-spacing: .14em; }
.league-screen .icon-button { background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface)); border: 1px solid var(--workshop-line); color: var(--workshop-parchment); box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05); }
.league-screen .phase-note { color: var(--workshop-muted); }
.league-screen .tournament-prize.league-prize-pool {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  border-radius: 14px; clip-path: var(--lg-cut-sm);
  background: linear-gradient(145deg, rgba(240,162,78,.14), rgba(240,162,78,.05));
  border: 1px solid rgba(240,162,78,.32); color: var(--workshop-parchment);
}
.league-screen .league-prize-chest-icon { width: 20px; height: 20px; object-fit: contain; vertical-align: -4px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.league-screen .league-info-icon { width: 13px; height: 13px; }
/* Карточка ранга -- нотч-срез углов + радиальное тёплое свечение, как .item-hero в референсе Мастерской */
.league-screen .league-hero {
  position: relative; overflow: hidden; clip-path: var(--lg-cut);
  background: linear-gradient(145deg, var(--workshop-card), var(--workshop-card-2));
  border: 1px solid var(--workshop-line); box-shadow: 0 14px 34px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04);
}
.league-screen .league-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 14% 8%, rgba(255,207,107,.16), rgba(0,0,0,0) 55%);
}
.league-screen .league-hero > * { position: relative; z-index: 1; }
.league-screen .league-badge { filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.league-screen .league-hero-info .badge {
  align-self: flex-start; font-family: 'Cinzel', serif; font-weight: 700; font-size: 13px; color: var(--workshop-bg);
  background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); padding: 3px 12px; border-radius: 999px;
  border: none; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.league-screen .league-stats-row { color: var(--workshop-muted); }
.league-screen .league-stats-row span:first-child { color: var(--workshop-parchment); }
.league-screen .league-record { color: var(--workshop-muted); }
.league-screen .league-record b { color: var(--workshop-parchment); }
.league-screen .xp-track,
.league-screen progress { background: rgba(0,0,0,.5); }
.league-screen .league-progress-track { background: rgba(0,0,0,.5); box-shadow: inset 0 1px 3px rgba(0,0,0,.6); }
.league-screen .league-progress-track i { background: linear-gradient(90deg, var(--workshop-ember), var(--workshop-gold)); box-shadow: 0 0 6px rgba(255,207,107,.5); }
.league-screen .league-progress-labels { color: var(--workshop-muted); }
.league-screen .league-progress--max { color: var(--workshop-green); }
.league-screen .tournament-group > h2 { font-family: 'Cinzel', serif; color: var(--workshop-parchment); font-size: 15.5px; }
/* Строки лидерборда — тёплая карточная палитра поверх переиспользуемого .leaderboard-row */
.league-screen .leaderboard-row { background: linear-gradient(150deg, var(--workshop-card), var(--workshop-card-2)); border: 1px solid var(--workshop-line-soft); }
.league-screen .leaderboard-row:hover { background: linear-gradient(150deg, rgba(255,207,107,.08), var(--workshop-card-2)); border-color: var(--workshop-line); }
.league-screen .leaderboard-row.mine { background: linear-gradient(150deg, rgba(126,229,173,.1), var(--workshop-card-2)); border-color: rgba(126,229,173,.45); box-shadow: inset 3px 0 var(--workshop-green); }
.league-screen .leaderboard-row.gold { border-color: rgba(255,207,107,.5); box-shadow: 0 6px 18px rgba(224,165,58,.22), 0 4px 12px rgba(0,0,0,.35); }
.league-screen .leaderboard-row.silver { border-color: rgba(197,206,222,.4); }
.league-screen .leaderboard-row.bronze { border-color: rgba(200,140,90,.4); }
.league-screen .leaderboard-row.gold .leaderboard-player strong { color: var(--workshop-gold); }
.league-screen .leaderboard-rank { position: relative; background: var(--workshop-surface-2); color: var(--workshop-muted); font-family: 'Cinzel', serif; }
.league-screen .leaderboard-rank .rank-num { position: relative; z-index: 1; }
.league-screen .rank-medallion-frame { position: absolute; inset: -10px; pointer-events: none; background-image: url('../img/league_ui/medallion_frame_gold.png'); background-size: 100% 100%; z-index: 0; }
.league-screen .leaderboard-player strong { color: var(--workshop-text); }
.league-screen .leaderboard-player small { color: var(--workshop-muted); }
.league-screen .leaderboard-prize { color: #f4d39d; background: rgba(240,188,113,.12); }
.league-screen .leaderboard-prize--empty { color: var(--workshop-muted); background: transparent; }
.league-screen .leaderboard-reward { background: transparent; padding: 0; }
@media (max-width: 480px) {
  .league-screen { margin: -12px -12px 0; padding: 12px; }
}

/* ---------------------------------------------------------------------------------------------
   Экран «Профиль игрока» (Концепт «Мастерская») -- переверстка socialProfileView(), показывается
   через socialProfileOverlayView() = overlayWrapper('Профиль игрока', socialProfileView()) с
   вариантом по умолчанию (''), т.е. это НЕПЕРВИЧНЫЙ оверлей -- узкая центрированная .overlay-panel
   с крестиком закрытия (как pet-chat/battle-history). overlayWrapper()/showClose-логика НЕ
   изменены. Скоуп стилизации: .social-profile (используется только здесь) + родительский
   .overlay-panel:has(.social-profile) для темизации заголовка/фона панели без затрагивания
   overlay-panel--primary/--sheet вариантов других оверлеев. Локальные --workshop- переменные
   внутри селектора.
   --------------------------------------------------------------------------------------------- */
.overlay-panel:has(> .overlay-body > .social-profile) {
  --workshop-bg: #1a1210; --workshop-bg-2: #241713; --workshop-surface: #251a15; --workshop-surface-2: #2e1f18;
  --workshop-card: rgba(37,26,21,.86); --workshop-card-2: rgba(20,14,11,.7);
  --workshop-line: rgba(214,150,90,.22); --workshop-line-soft: rgba(214,150,90,.14);
  --workshop-text: #f3e6d8; --workshop-muted: #b9a08d;
  --workshop-ember: #ff7a33; --workshop-ember-2: #ff9a3d;
  --workshop-gold: #ffcf6b; --workshop-gold-2: #e0a53a;
  --workshop-amber: #f0a24e; --workshop-amber-2: #d9862f;
  --workshop-parchment: #e8d9b8; --workshop-brass: #b98a4a;
  --workshop-green: #7ee5ad; --workshop-danger: #ff8d91;
  background: var(--workshop-bg);
}
.overlay-panel:has(> .overlay-body > .social-profile) .overlay-header {
  background: linear-gradient(180deg, var(--workshop-surface-2), var(--workshop-surface));
  border-bottom: 1px solid var(--workshop-line);
}
.overlay-panel:has(> .overlay-body > .social-profile) .overlay-header h2 {
  font-family: 'Cinzel', 'Georgia', serif; color: var(--workshop-parchment); text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.overlay-panel:has(> .overlay-body > .social-profile) .overlay-header .icon-button {
  background: var(--workshop-surface-2); border: 1px solid var(--workshop-line); color: var(--workshop-parchment);
}
.overlay-panel:has(> .overlay-body > .social-profile) .overlay-body { background: var(--workshop-bg); color: var(--workshop-text); font-family: 'Manrope', 'Inter', sans-serif; }

.social-profile { position: relative; }
.social-profile .profile-showcase {
  position: relative; overflow: hidden;
  clip-path: polygon(0 16px, 16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px));
  border: 1px solid var(--workshop-line);
  background:
    radial-gradient(circle at 28% 8%, rgba(255,154,61,.3), transparent 42%),
    radial-gradient(circle at 82% 92%, rgba(255,207,107,.16), transparent 45%),
    radial-gradient(circle at 50% 26%, rgba(255,154,61,.16), transparent 58%),
    linear-gradient(145deg, var(--workshop-surface-2), var(--workshop-surface));
}
.social-profile .profile-showcase::before {
  content: ''; position: absolute; inset: 8%; border-radius: 50%; z-index: 1;
  border: 2px solid var(--workshop-ember-2);
  box-shadow: 0 0 22px rgba(255,154,61,.45), inset 0 0 16px rgba(255,154,61,.2);
  opacity: .55; pointer-events: none;
}
.social-profile .profile-showcase::after {
  content: ''; position: absolute; inset: 0; opacity: .3; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,170,90,.05) 3px 4px);
  mask-image: linear-gradient(#000, transparent 85%);
}
.social-profile .profile-showcase > * { position: relative; z-index: 2; }
.social-profile .hero-kicker { color: var(--workshop-amber); font-family: 'Manrope', sans-serif; font-weight: 700; letter-spacing: .14em; }
.social-profile .profile-title h2 { font-family: 'Cinzel', 'Georgia', serif; color: var(--workshop-parchment); text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.social-profile .profile-title p { color: var(--workshop-muted); }
.social-profile .profile-title .badge {
  display: inline-flex; align-items: center; font-family: 'Cinzel', serif; font-weight: 700; font-size: 11px;
  color: var(--workshop-bg); background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2));
  padding: 3px 10px; border-radius: 999px; border: none;
}
.social-profile .profile-equipment {
  background: var(--workshop-card-2); border: 1px solid var(--workshop-line-soft); border-radius: 14px;
}
.social-profile .profile-equipment > span { color: var(--workshop-amber); }
.social-profile .profile-equipment b { position: relative; padding-left: 12px; color: var(--workshop-text); }
.social-profile .profile-equipment b::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--workshop-muted); opacity: .5;
}
.social-profile .profile-equipment b.rarity-common::before { background: #d7c9b8; box-shadow: 0 0 6px #d7c9b8; opacity: 1; }
.social-profile .profile-equipment b.rarity-legendary::before { background: #ffcf6b; box-shadow: 0 0 6px #ffcf6b; opacity: 1; }
.social-profile .profile-equipment b.rarity-rare::before { background: #8fc2ff; box-shadow: 0 0 6px #8fc2ff; opacity: 1; }
.social-profile .profile-equipment b.rarity-epic::before { background: #d8a6ff; box-shadow: 0 0 6px #d8a6ff; opacity: 1; }
.social-profile .profile-actions button:not(.secondary-action):not(.danger-action) {
  background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); color: #2a1706;
  box-shadow: 0 6px 14px rgba(255,207,107,.28), inset 0 1px 0 rgba(255,255,255,.4);
}
.social-profile .profile-actions .secondary-action {
  background: var(--workshop-surface-2); border: 1px solid var(--workshop-line); color: var(--workshop-parchment);
}
.social-profile .profile-actions .danger-action {
  background: linear-gradient(180deg, var(--workshop-danger), #d8455f); color: #2a0f00;
}
.social-profile .profile-request-hint {
  background: rgba(255,207,107,.08); border: 1px solid rgba(255,207,107,.25); color: var(--workshop-parchment); border-radius: 12px;
}
.social-profile .profile-request-hint .misc-icon { color: var(--workshop-gold); }

/* ================================================================================================
   Фаза 29.1: HUD-оверлеи и баннеры -- append-only блок.
   ================================================================================================ */
/* Баг 1а (скролл-лик): .game-hud (position:fixed) и .overlay-panel (position:fixed, сиблинг
   .app-shell внутри #app) визуально накрывают текущую локацию только через z-index -- DOM-предок
   HUD/оверлея это body, а не сам overlay-panel, поэтому свайп/скролл в зоне HUD раньше доходил до
   body/html и скроллил подложку (.main-pane) под фиксированными HUD/overlay-panel. Когда открыт
   первичный оверлей (pet/equipment/inventory), app.js ставит класс `overlay-locked` на <body>
   (см. render() ~строка 2695) -- ниже блокируем скролл и touch-жесты у body/html и у .main-pane
   в этом состоянии. .overlay-body у самого оверлея НЕ трогаем -- overflow-y:auto там уже есть
   (строка ~376), она остаётся единственным скроллируемым элементом на экране. */
body.overlay-locked,
html:has(body.overlay-locked) {
  overflow: hidden !important;
  touch-action: none;
}
body.overlay-locked .main-pane,
body.overlay-locked .location-content {
  overflow: hidden !important;
  touch-action: none;
}
/* Баг 1в (визуальная утечка подложки под HUD): корень утечки -- ровно тот же скролл-лик 1а.
   .overlay-header ( строка ~374) имеет полупрозрачный фон `rgba(16,19,26,.92)` + `backdrop-filter:
   blur(16px)` -- это осознанный стеклянный эффект, но он размывает/просвечивает ЛЮБОЙ контент,
   оказавшийся позади него в момент рендера кадра. Пока подложка (.main-pane, включая
   .location-banner и view) могла скроллиться независимо от зафиксированного HUD (см. баг 1а),
   скролл двигал текст локации ровно в полосу под HUD/над overlay-header, и полупрозрачный blur
   давал забаненному тексту "просветиться" сквозь шапку оверлея (подтверждено Playwright:
   .location-banner/view текст виден сквозь .overlay-header после программного scroll(0, N) при
   открытом первичном оверлее). Блокировка скролла подложки в правиле `overlay-locked` выше убирает
   саму возможность появления этой утечки -- отдельного визуального фикса для .overlay-header не
   требуется, т.к. подложка больше не может физически сдвинуться под открытым первичным оверлеем.
   Задача 2 (удаление .location-banner ниже) дополнительно убирает сам протекающий контент для
   всех локаций, кроме edge-case арены (см. ниже) -- двойная защита от той же категории утечки. */

/* Задача 2: убираем .location-banner как самостоятельный элемент рендера. Функция locationBanner()
   в app.js больше не вызывается из render() (только как fallback внутри неё же для одного edge
   case -- PvE-бой в arena_district, см. комментарий в самой функции) -- сохраняем существующие
   декларации `.location-banner`/`.banner-*`/`.banner-back` НЕТРОНУТЫМИ (append-only конвенция),
   они просто больше не попадают в разметку для обычных локаций. Новый универсальный компонент
   locationPreview(nodeId, description) (см. app.js) переиспользует те же `.banner-${nodeId}`
   фоновые декларации через общий класс .location-preview-<nodeId>, но с собственной вёрсткой
   (крупная картинка, градиент-скрим, заголовок над градиентом, короткий флейвор-текст под
   заголовком) -- по образцу hero-блока концепта Бойцовского квартала. */
.location-preview { position: relative; overflow: hidden; padding: 22px 18px 20px; background-size: cover; background-position: center; margin: 0 0 14px; border-radius: 0; }
.location-preview::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,14,11,.08) 0%, rgba(20,14,11,.42) 55%, rgba(20,14,11,.86) 100%); pointer-events: none; }
.location-preview > * { position: relative; z-index: 1; }
.location-preview-kicker { display: inline-block; font-family: 'Cinzel', 'Georgia', serif; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--workshop-gold, #ffcf6b); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.location-preview h1 { margin: 6px 0 0; font-family: 'Cinzel', 'Georgia', serif; font-size: clamp(21px,5.6vw,28px); letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.location-preview p { margin: 8px 0 0; max-width: 640px; font-family: 'Manrope', 'Inter', sans-serif; font-size: 13px; line-height: 1.45; color: rgba(255,255,255,.86); text-shadow: 0 1px 6px rgba(0,0,0,.55); }
/* Каждый .location-preview-<nodeId> переиспользует те же background-image декларации (фото +
   тёплый градиентный тинт), что уже существуют для .banner-<nodeId> -- см. строки ~356-364. Список
   ограничен узлами, которым фактически назначен locationPreview() в шаге 3 задачи 2 (у hub нет
   preview по логике Фазы 23, у market/town_hall/arena_district/league/friends уже есть готовый
   Фаза28-hero внутри самой view-функции). */
.location-preview-armory { background-image: linear-gradient(135deg,rgba(96,103,114,.3),rgba(40,45,54,.55)),url('../img/locations/armory.jpg'); }
.location-preview-gate { background-image: linear-gradient(135deg,rgba(95,122,82,.3),rgba(33,44,28,.55)),url('../img/locations/gate.jpg'); }
.location-preview-forge { background-image: linear-gradient(135deg,rgba(192,86,47,.3),rgba(67,32,26,.55)),url('../img/locations/forge.jpg'); }
.location-preview-workshop { background-image: linear-gradient(135deg,rgba(214,150,90,.3),rgba(58,38,20,.55)),url('../img/locations/workshop.jpg'); }
.location-preview-outskirts { background-image: linear-gradient(135deg,rgba(47,92,63,.3),rgba(18,36,26,.55)),url('../img/locations/outskirts.jpg'); }
.location-preview-tournaments { background-image: linear-gradient(135deg,rgba(200,84,72,.3),rgba(58,20,20,.55)),url('../img/locations/arena_district.jpg'); }
/* friends -- тот же фото-фоллбэк, что уже использует hubView()/HUB_TILE_IMAGE_FALLBACK.friends = 'guild' (аналогичный
   принцип выбора атмосферного фото для узлов, у которых нет своего снятого). */
.location-preview-friends { background-image: linear-gradient(135deg,rgba(126,229,173,.3),rgba(32,87,58,.55)),url('../img/locations/guild.jpg'); }
.location-preview-guild { background-image: linear-gradient(135deg,rgba(126,229,173,.3),rgba(32,87,58,.55)),url('../img/locations/guild.jpg'); }
.location-preview-wallet { background-image: linear-gradient(135deg,rgba(140,168,255,.3),rgba(55,64,107,.55)),url('../img/locations/market.jpg'); }
.location-preview-market_npc { background-image: linear-gradient(135deg,rgba(140,168,255,.3),rgba(55,64,107,.55)),url('../img/locations/market.jpg'); }
.location-preview-forge_npc { background-image: linear-gradient(135deg,rgba(192,86,47,.3),rgba(67,32,26,.55)),url('../img/locations/forge.jpg'); }
.location-preview-arena_npc { background-image: linear-gradient(135deg,rgba(200,84,72,.3),rgba(58,20,20,.55)),url('../img/locations/arena_district.jpg'); }
@media (min-width: 560px) { .location-preview h1 { font-size: 27px; } .location-preview { padding: 28px 26px 24px; } }

/* ================================================================================================
   Фаза 29.2: 4 точечных фикса — оверфлоу карточек экипировки, раскраска питомца (тема
   «Мастерская»), rarity-акцент карточек Рюкзака, очистка экрана «Мой питомец». Append-only:
   старые правила выше НЕ редактируются, всё ниже — override поверх них по каскаду/специфичности.
   ================================================================================================ */

/* ---- Задача 1 (пункт 3 отчёта): .inv-card на экране «Экипировка» обрезал статы/кнопку --
   старое правило (~строка 4507) задавало max-height:118px при реальной высоте контента ~141px
   (иконка 42px + до 2 строк названия + статы-пилюли с переносом + кнопка + gaps/padding).
   Фикс: убираем ограничение max-height и даём карточке расти по контенту через min-height —
   ширина/сетка ленты (.inv-ribbon flex nowrap) не меняются, карточки просто становятся выше
   ровно настолько, чтобы вместить контент без обрезки/наложения на соседей. Высота 168px подобрана
   через Playwright-замер фактической высоты контента на 375px. */
.arena-equipment.equip-content .inv-card {
  max-height: none;
  min-height: 168px;
}
@media (max-width: 360px) {
  .arena-equipment.equip-content .inv-card {
    max-height: none;
    min-height: 158px;
  }
}

/* ---- Задача 2 (пункт 5 отчёта): «Раскраска питомца» (petVariantRerollPanel(), classes
   .pet-variant-panel/#pet-variant-reroll) рендерится ВНУТРИ equipmentView() (.arena-equipment
   .equip-content), но старое правило .pet-arena .pet-variant-panel (см. ~строка 2421, Фаза 20.1)
   до сих пор красит её в сине-неоновую палитру арены (циан/фиолетовый градиент кнопки, тёмно-синий
   фон) — она была написана для характерView(), а не для equipmentView(), хотя .equip-content
   тоже имеет класс .pet-arena. Здесь переопределяем ту же панель строго в скоупе
   .arena-equipment.equip-content под тёплую палитру «Мастерской» (те же --workshop-* переменные,
   что и остальные секции экрана «Экипировка», см. ~строка 4399) — выше по специфичности/порядку
   каскада, чем старое .pet-arena правило, старое правило не удаляется (продолжает работать для
   характерView(), где .pet-variant-panel сейчас не рендерится, но остаётся безопасным на будущее). */
.arena-equipment.equip-content .pet-variant-panel {
  padding: 14px 14px 15px;
  margin: 0 0 14px;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(70,42,20,.55), var(--workshop-card) 60%);
  border: 1px solid var(--workshop-line);
  box-shadow: 0 12px 26px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.03);
}
.arena-equipment.equip-content .pet-variant-panel .panel-title {
  margin-bottom: 4px;
}
.arena-equipment.equip-content .pet-variant-panel .panel-title h2 {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--workshop-parchment);
  letter-spacing: .01em;
}
.arena-equipment.equip-content .pet-variant-panel .phase-note {
  margin: 4px 0 12px;
  padding: 0;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: var(--workshop-muted);
}
.arena-equipment.equip-content .pet-variant-panel #pet-variant-reroll {
  width: 100%;
  min-height: 46px;
  padding: 12px 15px;
  border-radius: 999px;
  border: 1px solid var(--workshop-gold-2);
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
  color: #2a140a;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: .01em;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.arena-equipment.equip-content .pet-variant-panel #pet-variant-reroll:disabled {
  opacity: .55;
  cursor: wait;
}

/* ---- Задача 3 (пункт 6 отчёта): карточки предметов в Рюкзаке (inventoryView(), .item-card
   внутри оверлея «Рюкзак» — скоуп .overlay-panel .items .item-card, см. ~строка 4572) уже несли
   --rarity-tint/--rarity-line через :has(.badge.rarity-*), но чисто фоновым тонированием без
   выраженного цветного акцента; сейчас добавляем цветной left-border акцент по образцу
   /prototypes/screens_showcase/shop/index.html (.item-card, --rarity-color/--rarity-soft) —
   те же CSS-переменные, что item-разметка теперь передаёт инлайново (см. app.js inventoryView()
   RARITY_COLORS). Скоуп СТРОГО .overlay-panel .items .item-card (Рюкзак), не .shop-screen/
   .arena-equipment — чтобы не задеть карточки магазина/экипировки, у которых уже свой рескин. */
.overlay-panel .items .item-card2 {
  border-left: 3px solid var(--rarity-color, var(--rarity-line, var(--line)));
}
.overlay-panel .items .item-card .icon-frame-wrap {
  box-shadow: 0 0 0 1px var(--rarity-soft, transparent) inset, 0 4px 10px rgba(0,0,0,.35), 0 0 14px var(--rarity-soft, transparent);
}
/* Компактный текстовый rarity-лейбл вместо крупного pill-бейджа над названием (см. концепт
   image-9.jpg) — сам .badge не удаляется из разметки (не меняем HTML), просто перестилизуем его
   на мелкую надпись цвета редкости без фоновой пилюли/рамки. */

.overlay-panel .items .item-card .badge {
    display: inline-flex;
    align-items: center;
    font-family: 'Manrope', 'Inter', sans-serif;
    gap: 5px;
    margin-bottom: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: 1px solid var(--workshop-line);
}
.overlay-panel .items .item-card .badge::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  flex-shrink: 0;
  align-self: center;
}

/* ---- Задача 4 (пункт 8 отчёта): экран «Мой питомец» (characterView(), .pet-arena.pet-screen) --
   удалены `<div class="arena-resources">` (валюта, дублировала HUD-хедер) и `<aside class=
   "pet-panel pet-side">` (блок опыта/баффа) из разметки (см. app.js). .pet-vitals (блок
   «Состояние») теперь единственный ребёнок .pet-split — растягиваем его на всю ширину вместо
   бывшей 1.15fr/1fr двухколоночной сетки, чтобы не осталось пустой колонки/визуальной дыры. */
.pet-arena.pet-screen .pet-split {
  grid-template-columns: 1fr;
}

/* ---------------------------------------------------------------------------------------------
   Фаза 29.3, задача 1 (пункт 7 отчёта): горизонтальная карточка лиги на мобильном.
   Диагноз: базовое правило .league-hero (строка ~1956) уже display:flex в ряд на десктопе, но
   общий мобильный медиа-запрос @media (max-width:559.98px) (строка ~2010) переключает ЛЮБОЙ
   .league-hero на flex-direction:column -- это ломает разметку конкретно на экране «Лига»
   (см. баг-скриншот image-10.jpg, столбик), тогда как концепт (image-11.jpg) держит бейдж лиги
   слева и инфо справа даже на узких мобильных ширинах, лишь уменьшая сам бейдж на очень узких
   экранах вместо переключения в колонку. grep подтвердил, что .league-hero/.league-badge/
   .league-hero-info используются ТОЛЬКО в leagueView() (.league-screen) -- других экранов это
   правило не затрагивает, но скопируем фикс под .league-screen .league-hero, чтобы не трогать
   общий .league-hero на случай будущего переиспользования в другом месте. */
@media (max-width: 559.98px) {
  .league-screen .league-hero {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
  .league-screen .league-hero-info {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }
}
/* Концепт (image-11.jpg) уменьшает только сам бейдж на очень узких экранах, не меняя раскладку. */
@media (max-width: 400px) {
  .league-screen .league-badge {
    width: 64px;
    height: 64px;
  }
}

/* ---------------------------------------------------------------------------------------------
   Фаза 29.3, задача 2 (пункт 4 отчёта): единая янтарная тема «Мастерская» для всей карточки
   найденного соперника в асинхронном рейде (pvpMatchView(), вызывается внутри
   arenaView() на секции .arena-intro-wrap.pvp-arena.workshop-arena).
   Диагноз: скоуп .pvp-arena.workshop-arena (Строка ~4871, Фаза 28) уже переоформляет
   .intro-card.pvp-match-intro, .hex-badge, .arena-companion-art, .arena-companion-badge (только
   цвет текста/фон, но не tier-варианты -- те уже покрыты ниже, строка ~4924-4927),
   .pvp-match-countdown и кнопки атаки/скаута. Но ГРЕППИРУЕТ часть внутренних элементов
   карточки соперника, которые pvpMatchView() реально генерирует (см. app.js, функция
   pvpMatchView() ~строка 1926): .arena-companion-card.pvp-match-card сам по себе (базовое
   правило .arena-companion-card, style.css ~строка 2351, тёмно-нави-градиент + var(--arena-line)),
   .arena-companion-stats/.arena-companion-mini-stat (цвет через var(--arena-ink)/var(--arena-muted) --
   старые бело-голубые значения из темы «Неонит», не переопределены внутри .workshop-arena),
   .pvp-match-status (наследует цвет var(--muted) из .phase-note) и .pvp-match-actions .secondary-action
   (уже покрыт выше, строка 4907 -- оставлен без изменений). Результат: внешняя обёртка
   (.targets-head.pvp-match-head + .arena-companion-card.pvp-match-card как целое) в янтарной теме,
   но внутренние текст/статы/статус остаются тёмно-синими (баг-скриншот image-6.jpg).
   Фикс: добавляем append-правила для непокрытых элементов на тех же --pa-* переменных,
   определённых в скопе .pvp-arena.workshop-arena (строка 4871-4878), по тому же паттерну, что
   уже применён для .pet-arena.pet-screen ~ .arena-companions выше (строка ~4603). */
.workshop-arena .arena-companion-card.pvp-match-card {
  background: linear-gradient(150deg, var(--pa-panel), var(--pa-panel-deep));
  border: 1px solid var(--pa-line);
  box-shadow: 0 10px 24px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
}
.workshop-arena .arena-companion-body h3 {
  font-family: 'Cinzel', 'Georgia', serif; font-weight: 700; color: var(--pa-ink);
  letter-spacing: .01em;
}
.workshop-arena .arena-companion-stats { color: var(--pa-ink); }
.workshop-arena .arena-companion-mini-stat span {
  color: var(--pa-muted); font-family: 'Manrope', 'Inter', sans-serif;
}
.workshop-arena .arena-companion-mini-stat b {
  color: var(--pa-ink); font-family: 'Cinzel', 'Georgia', serif;
}
.workshop-arena .pvp-match-status { color: var(--pa-muted); }
.workshop-arena .pvp-match-status .item-icon.small-icon { filter: drop-shadow(0 0 4px rgba(255,207,107,.4)); }

/* Фаза 30: полноэкранный фон текущей локации ПОД HUD/сайдбаром/контентом (референс
   пользователя -- фонтанная площадь видна во весь экран, включая зону под шапкой/HUD, а
   не в узкой ограниченной карточке-баннере). .location-backdrop -- новый fixed-слой,
   вставлен первым ребёнком .app-shell (app.js render()), но благодаря z-index:-1 попадает
   в категорию отрисовки ПОЗАДИ обычных непозиционированных потомков #app (.sidebar/
   .main-pane на десктопе -- position:static/auto, красятся в родном DOM-порядке НАД любым
   позиционированным потомком с отрицательным z-index) -- никаких правок .app-shell/#app не
   требуется. На мобильном .sidebar становится position:absolute с z-index:6 (Фаза 7.2) --
   тоже остаётся выше backdrop. .location-content/.main-pane не имеют собственного фона
   (см. базовые правила выше), поэтому картинка просвечивает в любых "пустых" зонах
   (как HUD-капсулы/чипы, которые сами полупрозрачны -- .game-hud без фона, см. выше).
   Картинка на узел резолвится backdropImageKey() в app.js (расширяет HUB_TILE_IMAGES/
   HUB_TILE_IMAGE_FALLBACK рекурсивным подъёмом по parent для NPC-подузлов). Брейкпоинт
   моб/десктоп -- 559.98/560px, тот же порог, что у дравера сайдбара (Фаза 7.2), чтобы оба
   переключения совпадали в одной точке. */
.location-backdrop { position: fixed; inset: 0; z-index: 0; background-size: cover; background-position: center; background-repeat: no-repeat; pointer-events: none; }
.location-backdrop::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,8,13,.55) 0%, rgba(6,8,13,.1) 22%, rgba(6,8,13,.12) 68%, rgba(6,8,13,.58) 100%); }
.location-backdrop-hub { background-image: url('../img/locations/backdrop/hub_mobile.jpg'); }
.location-backdrop-market { background-image: url('../img/locations/backdrop/market_mobile.jpg'); }
.location-backdrop-forge { background-image: url('../img/locations/backdrop/forge_mobile.jpg'); }
.location-backdrop-workshop { background-image: url('../img/locations/backdrop/workshop_mobile.jpg'); }
.location-backdrop-arena_district { background-image: url('../img/locations/backdrop/arena_district_mobile.jpg'); }
.location-backdrop-armory { background-image: url('../img/locations/backdrop/armory_mobile.jpg'); }
.location-backdrop-gate { background-image: url('../img/locations/backdrop/gate_mobile.jpg'); }
.location-backdrop-outskirts { background-image: url('../img/locations/backdrop/outskirts_mobile.jpg'); }
.location-backdrop-town_hall { background-image: url('../img/locations/backdrop/town_hall_mobile.jpg'); }
.location-backdrop-guild { background-image: url('../img/locations/backdrop/guild_mobile.jpg'); }
.location-backdrop-tournaments { background-image: url('../img/locations/backdrop/tournaments_mobile.jpg'); }
.location-backdrop-league { background-image: url('../img/locations/backdrop/league_mobile.jpg'); }
@media (min-width:560px) {
  .location-backdrop-hub { background-image: url('../img/locations/backdrop/hub_desktop.jpg'); }
  .location-backdrop-market { background-image: url('../img/locations/backdrop/market_desktop.jpg'); }
  .location-backdrop-forge { background-image: url('../img/locations/backdrop/forge_desktop.jpg'); }
  .location-backdrop-workshop { background-image: url('../img/locations/backdrop/workshop_desktop.jpg'); }
  .location-backdrop-arena_district { background-image: url('../img/locations/backdrop/arena_district_desktop.jpg'); }
  .location-backdrop-armory { background-image: url('../img/locations/backdrop/armory_desktop.jpg'); }
  .location-backdrop-gate { background-image: url('../img/locations/backdrop/gate_desktop.jpg'); }
  .location-backdrop-outskirts { background-image: url('../img/locations/backdrop/outskirts_desktop.jpg'); }
  .location-backdrop-town_hall { background-image: url('../img/locations/backdrop/town_hall_desktop.jpg'); }
  .location-backdrop-guild { background-image: url('../img/locations/backdrop/guild_desktop.jpg'); }
  .location-backdrop-tournaments { background-image: url('../img/locations/backdrop/tournaments_desktop.jpg'); }
  .location-backdrop-league { background-image: url('../img/locations/backdrop/league_desktop.jpg'); }
}

/* Фаза 30.1 (точечный override, база .sidebar/#city-sidebar.sidebar не трогается): после
   появления .location-backdrop (position:fixed, z-index:0, первый ребёнок .app-shell)
   обнаружилось, что на десктопе `.sidebar` не имеет своего `position` (position:static по
   умолчанию) -- по спецификации CSS2.1 (Appendix E, порядок отрисовки в рамках одного
   stacking context) непозиционированные in-flow блочные потомки красятся РАНЬШЕ позиционированных
   потомков со stack level 0, поэтому .location-backdrop (позиционирован, z-index:0) частично
   всплывал НАД непозиционированным сайдбаром, а не под ним -- то же семейство багов, что и
   уже пофикшенный z-index:-1 -> z-index:0 у самого backdrop. Отсюда просвечивание ярких пикселей
   фона рынка (окна/фонари) через верх сайдбара, портящее читаемость СЫТОСТЬ/НАСТРОЕНИЕ.
   Фикс: делаем сайдбар позиционированным (position:relative, без смещения -- на layout не
   влияет), тогда он тоже попадает в группу "позиционированные потомки stack level 0" и,
   будучи ПОЗЖЕ backdrop в DOM-порядке, красится над ним. background-color:#050b16 (уже
   заявлен в базовом правиле Фазы 23.1) становится полноценной непрозрачной подложкой. */
#city-sidebar.sidebar { position: relative; background-color: #050b16; }

/* Фаза 30.2 (точечный override поверх Фазы 23.1 "Живая карта города" -- ничего из блока
   Фазы 23.1 выше не удаляется/не правится, здесь только более поздние по каскаду правила той же
   специфичности). По запросу пользователя сине-неоновая палитра сайдбара заменена на тёплую
   коричнево-янтарную "Мастерская", единый язык с .workshop-arena (--pa-bg:#1a1210,
   --pa-ink:#f3e6d8, --pa-muted:#b9a08d, --pa-cyan:#ffcf6b, --pa-cyan-2:#e0a53a,
   --pa-violet:#ff7a33, --pa-line:rgba(214,150,90,.24)), чтобы сайдбар визуально сочетался с
   тёплыми фонами локаций/Мастерской/Кузницы, а не контрастировал с ними синим неоном. */
#city-sidebar.sidebar {
  background-image: linear-gradient(165deg, rgba(42,29,20,.95), rgba(20,14,10,.98));
  background-color: #140d09; border-right: 1px solid rgba(214,150,90,.22);
  box-shadow: 6px 0 24px rgba(0,0,0,.4);
}
#city-sidebar .sidebar-topbar { border-bottom: 1px solid rgba(214,150,90,.18); }

/* Фаза 31 (точечный override поверх Фазы 30.1, база #city-sidebar.sidebar не трогается):
   Фаза 30.1 добавила #city-sidebar.sidebar { position:relative } БЕЗ привязки к брейкпоинту.
   Специфичность id+class (1,1,0) выше специфичности `.sidebar { position:absolute }` из
   мобильного @media (max-width:559.98px) (Фаза 7.2, специфичность 0,1,0) -- поэтому на
   мобильном (<560px) drawer больше не становился position:absolute: сайдбар остался в потоке
   flex-раскладки .app-shell на всю свою ширину (270px), выталкивая .main-pane в узкую колонку
   ~105px. Баг #1 (контент открытой локации сжат в узкую полосу у правого края экрана) и баг #2
   (карточки локаций на площади схлопываются в крошечные иконки) -- один и тот же корень.
   Фикс: возвращаем position:absolute на мобильном той же id+class специфичностью (1,1,0), что
   и у Фазы 30.1, но внутри мобильного брейкпойнта -- десктопный фикс Фазы 30.1 не трогается. */
@media (max-width:559.98px) {
  #city-sidebar.sidebar { position: absolute; }
}

/* Фаза 31 — тот же корень, что и баг просветания сайдбара из Фазы 30.1, но для второй ветви дерева .app-shell: любые
   position:static потомки #app красятся в группе «non-positioned in-flow block-level» (CSS2.1
   Appendix E, пункт 4), которая всегда красится до (под низ) любых позиционированных
   потомков со stack level 0 (пункт 6) -- независимо от их порядка в DOM. .location-backdrop
   (position:fixed, z-index:0, читайтся как stack level 0) попадает именно в пункт 6, поэтому
   все статичные потомки .main-pane/.location-content (карточки инвентаря в Мастерской
   .ws-equip-card/.ws-equip-inventory и любые аналогичные блоки) оказались под фоновым
   изображением локации на десктопе (баг #3, проверено живым инспектором: карточки были
   position:static в rect без видимых себя, потому что бэкдроп поверх них). Фикс по той же
   схеме, что и у Фазы 30.1 для .sidebar: делаем .main-pane позиционированным
   (position:relative, без смещения -- на layout не влияет), тогда весь его поддерево как единая
   подподдерево-единица переходит в группу 6 и, будучи в DOM позже backdrop, красится
   над ним -- точно так же, как это уже сработало для .sidebar. */
.main-pane { position: relative; }

/* Фаза 31 (баг #4) -- .inv-card (лента «Инвентарь экипировки» на экране «Экипировка») рендерится
   внутри той же DOM-структуры, что и карточки оверлея Магазина/Рюкзака (.overlay-panel .items
   .item-card ...), поэтому на .inv-card-body (класс item-with-icon) попадает чужое правило
   `.overlay-panel .items .item-card .item-with-icon { flex: 1 1 220px; }` (фаза 8.x, рассчитано на
   широкую строчную карточку магазина). Это правило не перекрывается более специфичным
   `.arena-equipment.equip-content .inv-card .item-with-icon.inv-card-body { display:block; ... }`,
   потому что тот селектор не трогает свойство flex -- а .inv-card это display:flex;
   flex-direction:column, так что flex-basis:220px растягивает тело карточки по высоте (проверено
   Playwright: .inv-card-body высотой 220px при реальном контенте ~69px, итоговая карточка ~310px
   вместо расчётных ~168px). Фикс: сбрасываем flex обратно в дефолт именно для этого сочетания
   классов, ничего в .item-with-icon/магазине не трогаем. */
.arena-equipment.equip-content .inv-card .item-with-icon.inv-card-body { flex: 0 1 auto; }
#city-sidebar .pet-name-row b { color: #f3e6d8; }
#city-sidebar .compact-meters label { color: #b9a08d; }
#city-sidebar .compact-meters progress::-webkit-progress-bar { background: #140d09; }
#city-sidebar .compact-meters progress::-webkit-progress-value { background: linear-gradient(90deg, #c65a2e, #f0a24e); }
#city-sidebar .compact-meters progress.mood::-webkit-progress-value { background: linear-gradient(90deg, #e0a53a, #ffe9b0); }
#city-sidebar .sidebar-mode-toggle button {
  background: rgba(37,26,19,.7); border: 1px solid rgba(214,150,90,.25); color: #b9a08d;
}
#city-sidebar .sidebar-mode-toggle button.active {
  background: linear-gradient(135deg, #e0a53a, #d9862f); border-color: transparent; color: #2a1608;
  box-shadow: 0 0 10px rgba(255,207,107,.4);
}
#city-sidebar .location-item {
  background: linear-gradient(160deg, rgba(58,40,26,.85), rgba(24,16,10,.92));
  border: 1px solid rgba(214,150,90,.2); color: #f3e6d8;
}
#city-sidebar .loc-thumb { background: #1a120c; }
#city-sidebar .loc-thumb--glyph { background: rgba(255,207,107,.1); }
#city-sidebar .loc-thumb--glyph .node-icon { color: #ffcf6b; }
#city-sidebar .loc-name { color: #f3e6d8; }
#city-sidebar .location-item .location-more { color: #ffcf6b; }
#city-sidebar .location-item.active {
  border-color: #ffcf6b; box-shadow: 0 0 0 1px #ffcf6b, 0 0 14px rgba(255,207,107,.35);
  color: #fff8ec;
}
#city-sidebar .location-back { background: rgba(37,26,19,.75); color: #b9a08d; }
#city-sidebar .location-back .loc-name { color: #b9a08d; }
#city-sidebar .stat { background: rgba(20,14,10,.55); border: 1px solid rgba(214,150,90,.22); color: #b9a08d; }
#city-sidebar .stat strong { color: #ffcf6b; text-shadow: 0 0 6px rgba(255,207,107,.3); }
#city-sidebar .currency-bar { background: rgba(37,26,19,.7); border: 1px solid rgba(214,150,90,.22); }
#city-sidebar .currency-bar span:last-child { color: #ff9a4d; }
#city-sidebar .phase-note, #city-sidebar .empty { color: #b9a08d; }
/* .location-item.has-children использует глобальную анимацию location-pulse (мятный
   rgba(126,229,173) -- var(--accent) базовой темы), которая конфликтует с новой
   коричнево-янтарной палитрой. Сам кейфрейм location-pulse не трогаем (используется как
   общий паттерн pulse), добавляем локальный override только для карточек внутри сайдбара. */
@keyframes location-pulse-amber { 0% { box-shadow:0 0 0 0 rgba(255,207,107,.55); } 70% { box-shadow:0 0 0 7px rgba(255,207,107,0); } 100% { box-shadow:0 0 0 0 rgba(255,207,107,0); } }
#city-sidebar .location-item.has-children { animation: location-pulse-amber 2.2s ease-out infinite; }

/* Фаза 32: интерактивная карта центральной площади (перенос из прототипа concept-c)
   Append-only блок -- ничего из существующих правил выше не удалено/изменено. Фиксированный
   пиксельный масштаб карты (master_map.png 2048x2048 при --hub-map-scale 0.62 = 1270.56px),
   панорамирование через transform: translate() на .hub-map-world внутри окна-порта
   .hub-map-viewport (overflow:hidden), хотспоты/тултипы/свечение переняты 1:1 из концепта,
   секретные зоны -- только hover-подсказка, не кликабельны. JS-логика -- см. mountHubMap() в
   app.js. Цветовая палитра (янтарь/пергамент) сохранена из прототипа, т.к. это уже согласованный
   арт-концепт карты -- шрифт и остальная палитра приложения (тёмная сине-серая) не затронуты. */
.hub-pixel-map {
  --hub-map-native: 2048px;
  --hub-map-scale: 0.62;
  --hub-map-size: calc(var(--hub-map-native) * var(--hub-map-scale));
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}
/* Точечный override: .location-content обычно имеет padding:16px (см. правило выше, не
   трогается) -- карте нужен полноразмерный порт без внутренних отступов, поэтому убираем padding
   только когда внутри рендерится карта, через более специфичный селектор (:has), не редактируя
   исходное правило .location-content. */
.location-content:has(.hub-pixel-map) { padding: 0; display: flex; flex-direction: column; min-height: 0; }
.hub-map-viewport {
  position: relative;
  overflow: hidden;
  background: #05100c;
  touch-action: none;
  cursor: grab;
  flex: 1 1 auto;
  width: 100%;
  height: 560px;
  min-height: 0;
}
.hub-map-viewport.is-dragging { cursor: grabbing; }
.hub-map-world {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--hub-map-size);
  height: var(--hub-map-size);
  will-change: transform;
}
.hub-map-img {
  display: block;
  width: var(--hub-map-size);
  height: var(--hub-map-size);
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  image-rendering: pixelated;
}
.hub-map-hotspot {
  position: absolute;
  left: var(--x0);
  top: var(--y0);
  width: calc(var(--x1) - var(--x0));
  height: calc(var(--y1) - var(--y0));
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 8;
  -webkit-tap-highlight-color: transparent;
}
.hub-map-hotspot::before {
  content: "";
  position: absolute;
  inset: -6%;
  background-image: var(--glow-img);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(240,162,78,.9)) drop-shadow(0 0 16px rgba(240,162,78,.7)) drop-shadow(0 0 28px rgba(240,162,78,.45));
  transition: opacity .16s ease;
  pointer-events: none;
}
.hub-map-hotspot.is-hover::before, .hub-map-hotspot.is-active::before { opacity: .95; }
.hub-map-hotspot.is-active::before {
  filter: drop-shadow(0 0 8px rgba(255,207,143,1)) drop-shadow(0 0 20px rgba(240,162,78,.9)) drop-shadow(0 0 36px rgba(240,162,78,.6));
  animation: hub-map-hotspot-pulse 1.6s ease-in-out infinite;
}
@keyframes hub-map-hotspot-pulse { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
.hub-map-secret {
  position: absolute;
  left: var(--x0);
  top: var(--y0);
  width: calc(var(--x1) - var(--x0));
  height: calc(var(--y1) - var(--y0));
  z-index: 6;
  cursor: help;
  outline: none;
}
.hub-map-secret::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18%;
  background: rgba(180,210,255,0);
  box-shadow: inset 0 0 0 0 rgba(180,210,255,0);
  transition: background .18s ease, box-shadow .18s ease;
}
.hub-map-secret.is-hover::after, .hub-map-secret:focus-visible::after {
  background: rgba(180,210,255,.08);
  box-shadow: inset 0 0 24px 4px rgba(180,210,255,.25), 0 0 18px 2px rgba(180,210,255,.2);
}
.hub-map-tooltip {
  position: absolute;
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 2px;
  max-width: 240px;
  background: linear-gradient(180deg, rgba(38,26,16,.97), rgba(20,14,9,.98));
  border: 1px solid rgba(240,162,78,.55);
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
  pointer-events: none;
  transform: translate(-50%, -100%);
}
.hub-map-tooltip.is-visible { display: flex; }
.hub-map-tooltip.hub-map-tooltip--flip { transform: translate(-50%, 0); }
.hub-map-tooltip-title { font-size: 13px; font-weight: 750; color: #f0a24e; white-space: nowrap; }
.hub-map-tooltip-desc { font-size: 11px; line-height: 1.35; color: #cbb08a; white-space: normal; }
.hub-map-tooltip--hint .hub-map-tooltip-title { color: #b4d2ff; }
.hub-map-arrow {
  position: absolute;
  z-index: 45;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(42,28,18,.92), rgba(20,14,9,.94));
  border: 1px solid rgba(240,162,78,.5);
  color: #f0a24e;
  box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease, box-shadow .15s ease;
}
.hub-map-arrow svg { width: 18px; height: 18px; }
.hub-map-arrow:hover:not(:disabled) { box-shadow: 0 4px 14px rgba(0,0,0,.55), 0 0 12px 2px rgba(240,162,78,.4), inset 0 1px 0 rgba(255,255,255,.08); }
.hub-map-arrow:active:not(:disabled) { transform: scale(.92); }
.hub-map-arrow:disabled { opacity: .28; cursor: default; }
.hub-map-arrow--up { top: 8px; left: 50%; transform: translateX(-50%); }
.hub-map-arrow--down { bottom: 8px; left: 50%; transform: translateX(-50%); }
.hub-map-arrow--left { left: 8px; top: 50%; transform: translateY(-50%); }
.hub-map-arrow--right { right: 8px; top: 50%; transform: translateY(-50%); }
.hub-map-guild-popup {
  position: absolute;
  z-index: 55;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 190px;
  background: linear-gradient(180deg, rgba(38,26,16,.98), rgba(20,14,9,.99));
  border: 1px solid rgba(240,162,78,.55);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  transform: translate(-50%, -100%);
}
.hub-map-guild-popup.is-open { display: flex; }
.hub-map-guild-popup-title {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #cbb08a;
  padding: 2px 6px 4px;
}
.hub-map-guild-popup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(240,162,78,.08);
  border: 1px solid rgba(240,162,78,.22);
  color: #f3dfba;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.hub-map-guild-popup-item:hover { background: rgba(240,162,78,.18); border-color: rgba(240,162,78,.5); }
.hub-map-guild-popup-item .node-icon { width: 16px; height: 16px; flex: none; color: #f0a24e; }
/* баг (найден/исправлен при QA фазы 32): когда якорь (guild_yard) близок к верхнему краю viewport, попап
   раскрытый строго вверх (translate(-50%,-100%)) уходит за край и прятался за game-hud, при этом
   продолжая перехватывать pointer events своих пунктов вне видимой области (клик по пункту висел -- найдено
   в Playwright QA). --flip ставится JS'ом (positionGuildPopup()) когда сверху нет места, и раскрывает попап
   вниз от якоря вместо вверх -- тот же принцип, что и у .hub-map-tooltip--flip выше. */
.hub-map-guild-popup--flip { transform: translate(-50%, 0); }
@media (min-width: 900px) {
  .hub-map-viewport { height: 680px; border-radius: 8px; }
  .hub-map-arrow { width: 46px; height: 46px; }
  .hub-map-arrow svg { width: 20px; height: 20px; }
}

/* Фаза 32 (доп. фикс, найден при повторном Playwright QA): баг #5 -- элементы карты площади
   (.hub-map-arrow z-index:45, .hub-map-tooltip z-index:50, .hub-map-guild-popup z-index:55) были
   подобраны только относительно друг друга внутри самой карты, без учёта существующей шкалы
   z-index мобильной шторки сайдбара (.sidebar z-index:6, .sidebar-backdrop z-index:5). Родитель
   .main-pane имеет position:relative, но НЕ задаёт собственный z-index -- то есть не создаёт
   изолированный стековый контекст, и высокие z-index карты сравниваются в общем контексте документа
   с .sidebar/.sidebar-backdrop, перебивая их. В результате на мобильном экране стрелки
   панорамирования и тултип/попап карты оставались видимыми и кликабельными НАД открытой шторкой
   сайдбара (подтверждено через elementFromPoint() в Playwright -- клик по видимой затемнённой
   области бэкдропа попадал на стрелку карты, а не на сам бэкдроп). Сохраняем исходные высокие
   z-index карты (нужны для внутренней слоистости самой карты: hotspot ниже tooltip ниже popup) и
   добавляем scoped override, который гарантированно прячет controls карты под шторкой, когда она
   открыта -- технически чище, чем менять базовые значения, т.к. не влияет на обычное поведение
   карты без открытого сайдбара. */
.app-shell.sidebar-open .hub-map-arrow,
.app-shell.sidebar-open .hub-map-tooltip,
.app-shell.sidebar-open .hub-map-guild-popup {
  z-index: 1;
  pointer-events: none;
}

/* Фаза 79.1 (багфикс): тот же принцип, что и выше для sidebar-open, но для любой открытой
   полноэкранной модалки (.overlay-panel, включая Настройки) -- стрелки/тултипы/попапы
   карты хаба (z-index 45/50/55) рендерились выше .overlay-panel (z-index:8)/.overlay-backdrop
   (z-index:7) в общем стековом контексте документа, потому что .main-pane не создаёт собственный
   изолированный stacking context. Класс overlay-open ставится на .app-shell в app.js, когда
   state.overlayPanel не пуст. */
.app-shell.overlay-open .hub-map-arrow,
.app-shell.overlay-open .hub-map-tooltip,
.app-shell.overlay-open .hub-map-guild-popup {
  z-index: 1;
  pointer-events: none;
}

/* =========================================================================================
   Фаза 33: багфиксы карты хаба (регрессии/находки после Фазы 32).
   Append-only блок -- ничего из существующих правил Фазы 32 (или более ранних) не удалено/
   изменено. Все правила ниже -- точечные override'ы, применяемые сверху уже существующей
   каскадной цепочки за счёт порядка (последнее правило в файле выигрывает при равной
   специфичности) либо явно более узкой области (media query/дополнительный селектор).
   ========================================================================================= */

/* Баг 1 (найден/исправлен): elementFromPoint()-скан в Playwright подтвердил, что на самой
   границе видимого rect'а стрелки (.hub-map-arrow) hit-test иногда резолвится в хотспот
   локации, лежащий под ней (стрелка и хотспот -- в разных родителях/stacking context, см.
   подробный комментарий в mountHubMap() в app.js). JS-фикс (stopPropagation на самой стрелке +
   защитный guard в делегате [data-city-node]) уже гарантирует, что клик по стрелке никогда не
   навигирует, независимо от того, какой элемент геометрически оказался под курсором
   (попытка добавить чисто визуальный CSS clip-path на .hub-map-hotspot была отката --
   подтверждено в Playwright, что clip-path на родителе также обрезает его ::before-glow
   псевдоэлемент, ломая визуальный эффект свечения -- оставлено только JS-решение, оно уже
   даёт полную гарантию без риска визуальных регрессий).
   Также подтверждено: на мобильном (замерено на нескольких высотах экрана, напр. 667px/700px,
   iPhone SE и похожие) нижняя стрелка .hub-map-arrow--down визуально перекрывает верхний край
   .app-bottom-nav (fixed, ~65px высоты, см. комментарий у .app-bottom-nav выше) -- фиксированная
   высота .hub-map-viewport (560px) не оставляет достаточного отступа на невысоких экранах.
   Увеличиваем bottom-отступ стрелки вниз ровно на высоту нижней панели + её собственный
   safe-area паттерн (тот же принцип, что и .app:has(> .app-shell) { padding-bottom: 112px }). */
@media (max-width: 899.98px) {
  /* нижняя стрелка на мобильном должна быть выше .app-bottom-nav с запасом: высота панели
     ~65px + её собственный safe-area-inset-bottom + 12px визуального зазора. */
  .hub-map-arrow--down { bottom: calc(65px + env(safe-area-inset-bottom) + 12px); }
}
/* верхняя стрелка не должна заходить под .game-hud/шапку локации -- на мобильном and десктопе
   .hub-map-viewport уже начинается ниже HUD (родитель .main-pane имеет padding-top:
   var(--hud-height)), поэтому 8px исходного отступа стрелки достаточно и без изменений; правило
   ниже -- явная страховка на случай уменьшения --hud-height в будущих фазах, не влияет на текущую
   раскладку (8px остаётся минимальным отступом, не меньше исходного). */
.hub-map-arrow--up { top: max(8px, 8px); }

/* Баг 4 (найден/исправлен): нативный browser drag-and-drop картинки карты (dragstart -> ghost
   image) иногда всё же инициируется, несмотря на draggable="false" + pointer-events:none на
   #hubMapImg -- подтверждено в Playwright: синтетический dragstart на #hubMapImg не был
   preventDefault'нут (событие "проходило"). -webkit-user-drag:none уже стоит на .hub-map-img;
   добавляем то же свойство на родителей (.hub-map-world/.hub-map-viewport) как
   defense-in-depth на случай, если dragstart инициируется через bubbling с родителя, а не с
   самого <img> (Firefox/Chrome edge-case, см. бриф). JS-guard (preventDefault на dragstart,
   см. mountHubMap()) -- основная линия защиты, это CSS-дублирование для браузеров, которые уважают
   -webkit-user-drag на родительских элементах, а не только на самом img. */
.hub-map-viewport,
.hub-map-world {
  -webkit-user-drag: none;
  user-select: none;
}

/* Баг 5 (найден/исправлен): .app-shell использовал min-height (не ограничение по высоте) и не
   имел overflow:hidden на десктопе (только внутри мобильного @media (max-width:559.98px), см.
   правило выше) -- .sidebar не имел min-height:0, поэтому классическая flexbox-ловушка
   (flex-элемент по умолчанию min-height:auto) позволяла содержимому .sidebar-body (у которого
   уже стоит overflow-y:auto) раздувать сам .sidebar, а вместе с ним -- по min-height-логике --
   и .app-shell выше высоты вьюпорта. В результате вся страница целиком становилась выше
   вьюпорта и скроллилась (подтверждено в Playwright: document.documentElement.scrollHeight >
   clientHeight при длинном списке локаций в сайдбаре). Скоуп строго десктопный
   (>=560px) -- на мобильном .sidebar -- абсолютно позиционированный drawer (position:absolute),
   для которого эта проблема не актуальна и который не должен затрагиваться. */
@media (min-width: 560px) {
  .app-shell {
    height: calc(100vh - 92px);
    overflow: hidden;
  }
  .sidebar,
  .main-pane {
    min-height: 0;
  }
}

/* Баг 5 (дополнительная находка, связанная, но отдельная от flexbox-ловушки выше): даже после
   фикса выше (который убрал основной раздув -406px, вызванный бесконечным ростом
   .sidebar), остаётся мелкий остаточный раздув ~20px (подтверждено Playwright:
   scrollHeight 920 при clientHeight 900) -- его источник иной: глобальное правило
   `.app:has(> .app-shell) { padding-bottom: 112px; }` (строка ~2793 выше, Фаза 22) резервирует
   потоковое место под .app-bottom-nav, но панель -- position:fixed и визуально уже помещается
   в последние ~65px вьюпорта, поэтому резервированные 112px в flow на десктопе приводят
   к лишним +20px высоты #app поверх .app-shell (который уже корректно ограничен по
   высоте выше). Не трогаем саму общую `.app` padding-bottom декларацию (она могла быть нужна
   в других режимах экрана -- настоящее авторство не известно, менять ее рискованно), а
   точечно компенсируем её только внутри .app-shell на этом же десктопном breakpoint. При первой
   попытке (только `height`) заметили, что она не срабатывала -- базовое правило `.app-shell` (стр.
   304) задаёт `min-height: calc(100vh - 92px)` (808px при 900px вьюпорте), а в CSS `min-height`
   всегда выигрывает у более маленького `height` (696px), независимо от порядка каскада.
   Пришлось также точечно перекрыть `min-height` на этом же breakpoint. */
@media (min-width: 560px) {
  .app-shell {
    height: calc(100vh - 92px - 112px);
    min-height: calc(100vh - 92px - 112px);
  }
}

/* Баг 6 (найден/исправлен): .boot-splash__hero-img был спроектирован только под портретные исходники
   (780x1398) с object-fit:cover -- на широком десктопном (landscape) вьюпорте cover вынужден
   масштабировать по ширине контейнера, что обрезает большую часть высоты композиции.
   Основной фикс (см. boot-splash.js) -- каждый вариант теперь имеет отдельное готовое
   широкоформатное 16:9 изображение (imgDesktop, 1920x1080, скомпоновано с нуля, а не просто
   растянуто/обрезано из портретного), которая выбирается JS'ом на этом же breakpoint (900px).
   Поскольку desktop-картинка уже корректно скомпонована под 16:9 и центрирована, агрессивный
   crop больше не нужен -- оставляем лишь небольшой запас (лёгкий scale и мягкая анимация дрифта,
   важны для того же ощущения живой картинки, что и на мобильной bsHeroDrift, не трогаем её),
   чем у мобильного варианта (там кроп с краёв object-position остаётся безопасным, т.к. источник
   по-прежнему портретный). object-position чуть выше центра (50% 18% вместо центральных
   50%), т.к. в композициях всех 8 вариантов главные персонажи/боссы тяготеют к верхней/центральной
   трети кадра. Существующий десктопный breakpoint @media (min-width:900px) уже используется в
   проекте (см. блок Фазы 23.1 выше). */
@media (min-width: 900px) {
  .boot-splash__hero-img {
    object-position: 50% 18%;
    transform: scale(1.02);
    animation-name: bsHeroDriftDesktop;
  }
  @keyframes bsHeroDriftDesktop {
    0%   { transform: scale(1.02) translate(0, 0); }
    100% { transform: scale(1.045) translate(-0.3%, -0.5%); }
  }
}


/* Баг 6 (доп. письмо от пользователя): 4 новых варианта прелоадера (эпичные боевые сцены:
   battle-swamp -- битва с болотным боссом, тёмно-бирюзовая палитра; battle-shadow -- битва с
   теневым волком, тёмно-фиолетовая; battle-pvp -- массовая PvP-битва питомцев, грозовая
   серо-синяя; battle-pve-horde -- отряд против орды монстров в пещере с кристаллами,
   холодная сине-фиолетовая с кристальными акцентами). Собственные vignette-модификаторы
   подобраны под палитру каждой картинки (тот же принцип, что и у gate/dawn/arena/campfire
   выше), без rays/spotlight -- у них и без того достаточно визуально насыщенные сцены,
   добавлять их -- лишнее визуальное усложнение без необходимости. */
.boot-splash--battle-swamp .boot-splash__vignette {
  background:
    linear-gradient(to bottom,
      rgba(6, 22, 18, 0.6) 0%,
      rgba(6, 22, 18, 0.04) 22%,
      rgba(6, 22, 18, 0.02) 50%,
      rgba(5, 18, 15, 0.55) 76%,
      rgba(3, 12, 10, 0.95) 100%),
    radial-gradient(120% 70% at 50% 8%, rgba(0, 40, 30, 0.3), transparent 60%);
}
.boot-splash--battle-shadow .boot-splash__vignette {
  background:
    linear-gradient(to bottom,
      rgba(16, 8, 28, 0.62) 0%,
      rgba(16, 8, 28, 0.05) 22%,
      rgba(16, 8, 28, 0.02) 50%,
      rgba(13, 6, 22, 0.58) 76%,
      rgba(8, 4, 14, 0.96) 100%),
    radial-gradient(120% 70% at 50% 8%, rgba(40, 0, 60, 0.3), transparent 60%);
}
.boot-splash--battle-pvp .boot-splash__vignette {
  background:
    linear-gradient(to bottom,
      rgba(10, 13, 20, 0.6) 0%,
      rgba(10, 13, 20, 0.04) 22%,
      rgba(10, 13, 20, 0.02) 50%,
      rgba(8, 10, 16, 0.55) 76%,
      rgba(5, 6, 10, 0.95) 100%),
    radial-gradient(120% 70% at 50% 8%, rgba(40, 60, 90, 0.28), transparent 60%);
}
.boot-splash--battle-pve-horde .boot-splash__vignette {
  background:
    linear-gradient(to bottom,
      rgba(8, 14, 26, 0.6) 0%,
      rgba(8, 14, 26, 0.04) 22%,
      rgba(8, 14, 26, 0.02) 50%,
      rgba(6, 11, 22, 0.55) 76%,
      rgba(4, 7, 14, 0.95) 100%),
    radial-gradient(120% 70% at 50% 8%, rgba(60, 90, 180, 0.26), transparent 60%);
}

/* Фаза 33, баг 3 (производительность карты хаба): CSS-only skeleton-заглушка на
   .hub-map-viewport, видна пока #hubMapImg не выстрелил событием load -- скрывается через
   app.js добавлением класса .is-loaded на viewport (см. mountHubMap()). Чистое дополнение,
   не трогает существующее правило .hub-map-viewport выше (только новый модификатор-класс
   и новый псевдоэлемент). */
.hub-map-viewport.is-map-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0.02) 30%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.02) 60%);
  background-size: 200% 100%;
  animation: hub-map-skeleton-shimmer 1.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hub-map-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Фаза 33.1 (найдено при продакшн-тестировании пользователем, после коммита Фазы 33): пустое
   пространство внизу между картой/сайдбаром и нижней навигацией, на мобильном И десктопе,
   через которое видно .location-backdrop. Две независимые причины:

   1) .hub-map-viewport имел ЖЁСТКУЮ фиксированную высоту (height:560px, 680px на >=900px --
      см. правило выше), не привязанную к реально доступной высоте .location-content (flex:1
      внутри .main-pane). Поэтому карта не дотягивалась до низа контейнера, оставляя пустоту
      ВНУТРИ .location-content -- независимо от размера вьюпорта. Родитель .hub-pixel-map уже
      имеет height:100% (см. правило выше), поэтому height:100% на самом .hub-map-viewport
      корректно резолвится по цепочке (.main-pane имеет явную высоту, .location-content --
      flex-item с вычисляемой высотой, .hub-pixel-map -- height:100% от него) и заставляет
      карту заполнять весь доступный контейнер без изменения логики панорамирования/зума
      (масштаб самой карты внутри управляется через --hub-map-scale/--hub-map-size, не через
      высоту viewport). Затрагивает и мобильный, и десктопный брейкпоинты -- override на оба.

   2) Десктопный фикс "Баг 5" (см. блоки выше, @media min-width:560px) считал высоту .app-shell
      как calc(100vh - 92px - 112px) -- ДВОЙНОЕ вычитание. 92px изначально был предположением о
      высоте .game-hud (использовался как фолбэк в var(--hud-height, 92px) на .main-pane), но
      место под HUD резервируется ВНУТРИ .main-pane/.sidebar через их собственный padding-top
      (var(--hud-height)) -- .app-shell как контейнер стартует с y:0 и НЕ должен сам сокращаться
      на величину высоты HUD, эта высота не отнимается от него снаружи. Подтверждено Playwright:
      .app-shell.getBoundingClientRect().top === 0 на всех протестированных вьюпортах (1280x800,
      1440x900, 1920x1080), при этом .game-hud реально занимает 112px -- то есть 92px в формуле
      был не только задвоением, но и просто устаревшим значением. Единственная величина, которую
      законно нужно вычесть из высоты .app-shell -- это верхнеуровневый резерв под нижнюю
      навигацию (`.app:has(> .app-shell){padding-bottom:112px}`, Фаза 22), поскольку это
      единственный элемент ВНЕ .app-shell, отъедающий место снизу. Итоговая корректная формула:
      calc(100vh - 112px) (не -92 повторно). Проверено Playwright на 1280x800/1440x900/1920x1080 --
      .app-shell теперь доходит ровно до начала зарезервированной зоны навигации, без разрыва и
      без возврата исходного оверфлоу страницы (scrollHeight === clientHeight на всех трёх). */
.hub-map-viewport {
  height: 100%;
}
@media (min-width: 900px) {
  .hub-map-viewport {
    height: 100%;
  }
}
.app-shell {
  height: calc(100vh - 112px);
  min-height: calc(100vh - 112px);
}
/* Примечание: формула выше снята с десктопного скоупа (min-width:560px) и применена
   универсально. .sidebar-специфичная flexbox-ловушка уже отдельно и корректно закрыта
   десктоп-скоуп-правилом min-height:0 на .sidebar/.main-pane выше (актуальным только там,
   где .sidebar в потоке) -- сама формула высоты .app-shell от этого скоупа не зависит. На
   мобильном (.sidebar -- position:absolute, вне потока) базовое правило (стр. 304)
   .app-shell{min-height:calc(100vh - 92px)} давало тот же баг задвоения -- Playwright
   подтвердил отдельный, ранее не замеченный оверфлоу страницы +20px на мобильном (390x844:
   scrollHeight 864 при clientHeight 844) ещё ДО настоящего фикса (проверено через git stash --
   баг воспроизводится и на чистой Фазе 33, это не регрессия от правки выше). Универсальная
   формула устраняет его тоже, без отдельного мобильного override. */

/* Фаза 33.2: остаточный разрыв ~47px между низом карты/сайдбара и .app-bottom-nav (найден
   пользователем после Фазы 33.1 -- см. скрин продакшн-теста). Причина: формула выше
   (`calc(100vh - 112px)`) резервирует под навигацию РОВНО 112px flow-места, но сама панель
   .app-bottom-nav визуально занимает только ~65px (padding 10px+10px + высота контента) --
   разница (~47px) оставалась видимым разрывом, через который просвечивал .location-backdrop.
   По прямому решению пользователя (вариант 2 из двух предложенных): карта и сайдбар растягиваются
   на ПОЛНУЮ высоту вьюпорта, а .app-bottom-nav (уже полупрозрачная, backdrop-filter:blur(18px))
   просто оверлеится поверх них сверху, без резерва места в потоке. Скоуп через :has(.hub-pixel-map)
   -- затрагивает только экран карты хаба (единственный репортнутый пользователем экран); другие
   экраны (рюкзак/экипировка/магазин и т.п.), где padding-bottom:112px на .app мог быть НУЖЕН
   для корректного скролла длинных списков поверх фиксированной навигации, не трогаются. */
.app-shell:has(.hub-pixel-map) {
  height: 100vh;
  min-height: 100vh;
}
.app:has(.hub-pixel-map) {
  padding-bottom: 0;
}
/* Примечание: изначально пробовал `.app:has(> .app-shell:has(.hub-pixel-map))`, чтобы явно
   привязаться к структуре (.app > .app-shell), но браузер (Chromium/Playwright, тот же движок,
   что в Telegram WebView) считает ВЛОЖЕННЫЙ :has() внутри :has() невалидным селектором --
   спецификация CSS Selectors Level 4 явно запрещает :has() внутри аргумента другого :has()
   (во избежание неограниченной рекурсии). Невалидный селектор -- вся CSS-декларация полностью
   отбрасывается браузером (проверено через document.querySelector -- бросает исключение
   "is not a valid selector"), из-за чего первая попытка фикса тихо не сработала. Рабочая
   версия -- одноуровневый :has(.hub-pixel-map) прямо на .app (валиден, так как .hub-pixel-map
   всё равно потомок .app независимо от глубины вложенности через .app-shell). Специфичность
   идентична исходному правилу `.app:has(> .app-shell)` (строка ~2793) -- выигрывает по порядку
   каскада, так как объявлено позже в файле (append-only). */
/* .hub-map-arrow--down была откалибрована (Фаза 33, Баг 1) на bottom:calc(65px + safe-area + 12px)
   ТОЛЬКО на mobile (<900px) -- рассчитана именно на сценарий "карта доходит до самого низа экрана,
   нижняя навигация -- оверлей поверх неё", т.е. на сценарий, который теперь актуален и на десктопе
   (после фикса выше). Снимаем ограничение по ширине, чтобы стрелка везде корректно оставалась
   над панелью навигации, а не под ней/перекрытой ей. */
.hub-map-arrow--down {
  bottom: calc(65px + env(safe-area-inset-bottom) + 12px);
}

/* ===================== Фаза 33.3 — багфиксы после Фазы 33.2 ===================== */
/* Append-only: ничего выше не редактируется/не удаляется. Три новых регрессии, найденные
   пользователем после Фазы 33.2 (полноэкранная карта + оверлей-навигация): */

/* Баг 1: на мобильном сайдбар карты хаба (.sidebar-body, overflow-y:auto) теперь растянут на
   полные 100vh (Фаза 33.2, .app-shell:has(.hub-pixel-map){height:100vh}), а .app-bottom-nav
   больше не резервирует место в потоке (padding-bottom:0) -- нижние пункты списка локаций
   (напр. "Список друзей") оказываются под плавающей навигацией и не имеют запаса на скролл,
   чтобы полностью выйти из-под неё. Резервируем тот же отступ, что уже откалиброван для
   .hub-map-arrow--down (65px высота панели + safe-area + 12px запас), но только для сайдбара
   именно на экране карты хаба (другие экраны сайдбар не затрагивает -- там .app сохраняет
   padding-bottom:112px в потоке, см. правило Фазы 22, и проблема не воспроизводится). */
.app-shell:has(.hub-pixel-map) .sidebar-body {
  padding-bottom: calc(65px + env(safe-area-inset-bottom) + 12px);
}

/* Баг 2: регрессия сильнее, чем казалось при точечном скоупе Фазы 33.2 -- реальная причина не
   в правилах :has(.hub-pixel-map) (они не затрагивают экраны без карты), а в СУЩЕСТВУЮЩЕЙ
   (более старой) паре правил: 1) `.app-shell{overflow:hidden}` (десктоп -- "Баг 5", строка
   ~5935; мобильный drawer-скоуп -- строка ~420) и 2) универсальная фиксированная высота
   `.app-shell{height:calc(100vh - 112px)}` (Фаза 33.1, строка ~6104, до этого была
   desktop-only). Раньше это тоже обрезало контент локаций выше высоты .app-shell, НО не было
   заметно, т.к. .main-pane/.location-content не имели overflow -- содержимое просто визуально
   вылезало за пределы обрезанного .app-shell (клип был не полным на некоторых движках/версиях
   верстки). Playwright подтвердил на чистой проверке (экран "Мастерская", сайдбар-локация без
   .hub-pixel-map): document.scrollHeight === clientHeight (никакого скролла страницы нет), при
   этом .location-content содержимое реально требует больше места (scrollHeight контента 900px
   против доступных 688px) -- контент недостижим НИКАК (ни внутренний скролл, ни скролл
   страницы). Экраны-исключения из репорта пользователя (Мой питомец/Экипировка/Рюкзак/История
   боёв) на самом деле рендерятся как `position:fixed`-оверлеи (.overlay-body с собственным
   overflow-y:auto) НАД .app-shell, а не как содержимое .location-content -- position:fixed не
   обрезается overflow:hidden предка без transform/filter, поэтому они не задеты и всегда
   работали корректно.
   Фикс: делаем .main-pane собственным внутренним скролл-контейнером ВСЕГДА, когда внутри НЕТ
   карты хаба (карта -- особый случай, у неё свой pan/zoom механизм, скроллить сам контейнер не
   нужно и не должно, там уже есть min-height:0/flex через правило Фазы 33 для
   .location-content:has(.hub-pixel-map)). min-height:0 обязателен, иначе классическая
   flexbox-ловушка (Баг 5 выше) снова раздувает .main-pane по контенту вместо ограничения по
   высоте родителя. */
.main-pane:not(:has(.hub-pixel-map)) {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}
/* Нижний запас, чтобы последний элемент длинного контента (напр. карточки в Мастерской/Магазине)
   не прижимался вплотную к нижнему краю .main-pane, который на экранах без карты всё ещё
   заканчивается ВЫШЕ зарезервированной зоны навигации (.app padding-bottom:112px, Фаза 22, не
   тронуто) -- сам .app-bottom-nav не перекрывает эту зону, но небольшой воздух снизу нужен для
   аккуратного финала скролла (совпадает с обычным .location-content padding:16px по бокам). */
.main-pane:not(:has(.hub-pixel-map)) .location-content {
  padding-bottom: 20px;
}

/* Баг 3 (десктоп): .hub-map-viewport растягивается на всю ширину .main-pane (width:100%), но
   реальный контент карты (.hub-map-world/.hub-map-img) имеет ФИКСИРОВАННЫЙ пиксельный размер
   (--hub-map-size = 2048px*0.62 = 1270.56px, не зависит от вьюпорта) -- на широких десктопных
   экранах (проверено Playwright на 1920x1080: .hub-map-viewport 1730px, .hub-map-world только
   1269.75px) виден чёрный незанятый остаток справа внутри самого вьюпорта. Стрелки
   (.hub-map-arrow, position:absolute) координируются относительно .hub-map-viewport (его
   ближайший position:relative предок), а не относительно видимого края карты -- поэтому
   правая/нижняя стрелки и всё остальное, что зависит от полной ширины .main-pane (хедер,
   .chat-fab -- position:fixed относительно вьюпорта окна), визуально "уезжают" в этот пустой
   отступ, оторванно от реального края карты.
   Фикс по прямому пожеланию пользователя ("ширина должна заканчиваться по краям карты города"):
   ограничиваем максимальную ширину .app-shell размером сайдбар+карта и центрируем -- это
   автоматически сужает ВСЕ вложенные block/flex-элементы полной ширины (.main-pane, хедер,
   .hub-map-viewport и с ним стрелки), устраняя лишний отступ одним правилом вместо трёх
   отдельных. Формула: max-width сайдбара (150px, см. строку ~305) + border-right (1px) +
   var(--hub-map-size) (1270.56px) с небольшим запасом на округление = 1424px. Скоуп --
   исключительно экран карты хаба (:has(.hub-pixel-map)); другие экраны, где .main-pane
   действительно должен занимать всю ширину десктопа (Мастерская/Магазин и т.п., см. фикс Бага 2
   выше и комментарий Фазы 23.1), не затрагиваются. На вьюпортах УЖЕ уже max-width правило не
   имеет эффекта (браузер берёт меньшее из доступного/max-width) -- медиа-запрос не нужен. */
.app-shell:has(.hub-pixel-map) {
  max-width: 1424px;
  margin-inline: auto;
  position: relative;
}
/* .chat-fab -- фиксированная (относительно окна) кнопка чата. ВАЖНО: в разметке (см. render() в
   app.js) `.chat-fab` -- НЕ потомок `.app-shell`, а его СОСЕДНИЙ элемент (оба вложены в общий
   `#app`/`.app`): `<div class="app-shell">...</div><button class="chat-fab">...</button>`.
   Поэтому селектор `.app-shell:has(.hub-pixel-map) .chat-fab` никогда не совпадает -- нужно
   опираться на общего предка `.app`. На широких экранах после сужения/центрирования .app-shell
   выше кнопка чата осталась бы привязанной к правому краю ОКНА (за пределами более узкого
   .app-shell) -- в точности баг из репорта пользователя. Экран карты хаба гарантированно НЕ
   скроллится (Фаза 33.2: .app-shell{height:100vh; overflow:hidden}), поэтому position:fixed
   относительно окна и position:absolute относительно `.app` (растянут на 100vh/100vw как
   родитель .app-shell) дают идентичный результат везде, КРОМЕ случая, когда .app-shell сузился --
   то есть ровно там, где нужно другое поведение. Нужен свой positioned-контекст на `.app`, иначе
   position:absolute уйдёт к следующему предку выше (html/body). На узких/мобильных вьюпортах
   .app-shell не достигает max-width, остаётся равным ширине окна -- правило ничего не меняет. */
.app:has(.hub-pixel-map) {
  position: relative;
}
/* `.app` -- полноширинный контейнер (width:100%, без собственного max-width), `.app-shell`
   центрируется ВНУТРИ него через margin-inline:auto при достижении max-width:1424px. Значит
   при position:absolute относительно `.app` смещение `right:16px` совпадает с правым краем
   ОКНА, а не с правым краем сузившегося `.app-shell` -- ровно тот же баг, просто на уровень
   выше. Считаем реальный отступ от края `.app-shell` явной формулой: половина пустого
   пространства ((100% - 1424px) / 2), которое margin-inline:auto отдал справа, плюс исходный
   зазор 16px. `max()` со вторым аргументом 16px гарантирует, что на узких вьюпортах (где
   100% < 1424px и разность отрицательна) кнопка не улетает за пределы `.app` влево -- в этом
   случае margin-inline:auto ничего не сдвигал, значит правильное значение -- обычные 16px. */
.app:has(.hub-pixel-map) .chat-fab {
  position: absolute;
  right: max(16px, calc((100% - 1424px) / 2 + 16px));
}

/* Пожелание пользователя (после Фазы 33.3): на экране карты хаба карта должна начинаться от самого
   верха контейнера (y:0), а .game-hud (position:fixed, полупрозрачный градиентный фон, см. строку
   ~4109) -- плавать ПОВЕРХ карты, а не над ней в потоке. До этого правила .main-pane имел
   padding-top: var(--hud-height) (строка ~4707), резервируя место под HUD в потоке -- на экране
   карты это означало, что реальный контент карты начинался НИЖЕ HUD, а верхнюю часть, которую видно
   сквозь угасающий градиент HUD, занимал не сам .hub-pixel-map, а фон позади него (см. пример
   пользователя: тёмный силуэт крыш вместо продолжения самой карты). Убираем этот отступ только для
   экрана карты (:has(.hub-pixel-map)) -- остальные экраны (Мастерская/Магазин/Рюкзак и т.п.), где
   такого сквозного полупрозрачного фона нет и контент должен начинаться под HUD, не затрагиваются.
   .hub-map-viewport (height:100%) и центрирование карты в JS (centerOn(), читает
   viewport.clientHeight в момент загрузки картинки) автоматически подстроятся под увеличенную
   высоту -- дополнительных правок JS не требуется. */
.main-pane:has(.hub-pixel-map) {
  padding-top: 0;
}
/* Верхняя стрелка (.hub-map-arrow--up) позиционируется абсолютно относительно .hub-map-viewport
   (его ближайший position:relative предок) -- раньше top:8px было безопасно, потому что сам
   viewport уже начинался НИЖЕ HUD (родительский padding-top). Теперь, когда .main-pane лишился
   этого отступа для экрана карты, viewport начинается от самого верха (y:0) -- без компенсации
   стрелка (z-index:45, выше .game-hud z-index:5) оказалась бы визуально ПОВЕРХ капсул
   ресурсов/уровня HUD, перекрывая их. Сдвигаем стрелку вниз ровно на высоту HUD + исходный
   отступ 8px, чтобы она осталась под HUD -- визуально на том же месте, что и раньше, при этом сама
   карта под HUD теперь продолжает прокручиваться дальше вверх. */
.hub-map-arrow--up {
  top: calc(var(--hud-height, 92px) + 8px);
}

/* Пожелание пользователя: блок описания «Бойцовский квартал» (эйбров + заголовок + флейвор-текст)
   на экране арены (arenaView(), см. app.js -- переменная arenaDistrictHead), 1:1 по разметке с
   концептом prototypes/screens_showcase/arena_district/index.html (.screen-head/.hero-kicker).
   Отдельный класс .arena-district-head, а не переиспользование общего .screen-head -- у того
   другая раскладка (display:flex в ряд под заголовок+кнопку-действие, style.css строка 7),
   здесь же нужен простой вертикальный стек эйброва/h1/параграфа без соседней кнопки, как в
   концепте. Палитра захардкожена значениями концепта (--workshop-amber/--workshop-parchment/
   --workshop-muted) вместо var(...) -- сами переменные объявлены только внутри .ws-root
   (style.css ~3187) и .game-hud (~4110), в разметке arenaView() (.pvp-arena.workshop-arena) они
   не наследуются. .arena-district-head .hero-kicker переопределяет более раннее правило
   .workshop-arena .hero-kicker (color: var(--pa-cyan), строка ~4896) той же специфичности --
   выигрывает по порядку объявления (append-only, этот блок ниже по каскаду). */
.arena-district-head { padding: 2px 2px 0; margin: 0 0 4px; }
.arena-district-head .hero-kicker { color: #f0a24e; text-shadow: none; }
.arena-district-head h1 {
  margin: 6px 0 4px;
  font-family: 'Cinzel', 'Georgia', serif;
  font-weight: 700;
  font-size: clamp(22px, 6.4vw, 28px);
  letter-spacing: -.01em;
  color: #e8d9b8;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}
.arena-district-head p { margin: 0; font-size: 12.5px; line-height: 1.5; color: #b9a08d; max-width: 320px; }

/* Пожелание пользователя: карточки-экраны (.shop-screen/.pvp-arena.workshop-arena/
   .quests-screen/.league-screen, Фазы 24/28/29) держали СОБСТВЕННОЕ фоновое фото локации
   (url('../img/locations/<name>.jpg') ... fixed) поверх уже существующего полноэкранного
   .location-backdrop-<key> (Фаза 30) той же (или соседней) локации -- визуально два разных
   кадра одной сцены наслаивались друг на друга. Убираем url(...) из background каждой карточки,
   оставляя только исходный тёмный градиент-виньетку (он и раньше был полупрозрачным за счёт
   rgba-альфы) -- теперь сквозь него просвечивает location-backdrop, а не вторая фотография.
   Каждое правило ниже -- точечный override того же селектора (equal specificity, later in
   source order => wins), без удаления/правки исходных деклараций выше по файлу. */
.shop-screen {
  background: transparent;
  border: 0;
}
.pvp-arena.workshop-arena {
  background: transparent;
  border: 0;
  padding: 0;
}
.quests-screen {
  background: transparent;
  border: 0;
}
.league-screen {
  background: transparent;
  border: 0;
}

/* Пожелание пользователя: небольшое дополнительное затемнение .location-backdrop целиком --
   актуально после снятия дублирующих фото с карточек выше (теперь именно этот слой отвечает
   за фон под HUD/контентом на всех локациях), точечный override того же селектора/градиента,
   что и в исходном правиле .location-backdrop::before (Фаза 30, см. выше по файлу): альфа
   каждой стоп-точки чуть увеличена (+.06..+.08), сама структура градиента не изменена. */
.location-backdrop::before {
    background: linear-gradient(180deg, rgba(10, 7, 6, .78) 0%, rgba(16, 10, 8, .42) 20%, rgba(19, 12, 9, .62) 46%, rgba(13, 9, 7, .88) 78%, rgba(10, 7, 6, .97) 100%);
}
/* Фаза 34: обобщение фикса «пустого пространства» с карты хаба (Фаза 33.2/33.3) на ВСЕ
   остальные экраны локаций (Бойцовский квартал, Магазин, Мастерская, Ратуша, Лига и т.д.).
   Баг: универсальное правило .app-shell{height:calc(100vh - 112px)} (Фаза 33.1) резервирует
   под .app-bottom-nav все 112px (высота нижней навигации + padding-bottom Фазы 22), хотя сама
   .app-bottom-nav визуально занимает только ~65px (padding:10px + иконки+подписи + safe-area) --
   на экранах БЕЗ .hub-pixel-map эта разница (~47px) оставалась видимым пустым провалом под
   контентом и над навигацией (см. фото пользователя, Бойцовский квартал). Для карты хаба это
   уже было устранено (.app-shell:has(.hub-pixel-map){height:100vh} + .app:has(.hub-pixel-map)
   {padding-bottom:0}, Фаза 33.2) -- применяем тот же приём универсально: .app-shell растягивается
   на всю высоту вьюпорта, .app-bottom-nav (position:fixed, полупрозрачный, backdrop-filter:blur)
   просто накладывается поверх без резервирования места в потоке. Специфичность равна
   перекрываемым правилам (single-class .app-shell / .app:has(> .app-shell)) -- побеждает по
   порядку объявления (append-only), ничего выше не удаляется/не правится. Хаб-специфичные
   правила (:has(.hub-pixel-map)) имеют более высокую специфичность и по-прежнему выигрывают
   там, где совпадают -- но задают те же значения, поэтому конфликта нет. */
.app-shell { height: 100vh; min-height: 100vh; }
.app:has(> .app-shell) { padding-bottom: 0; }

/* Компенсация: раз .app-shell/.sidebar/.main-pane больше не защищены резервом в 112px, их
   прокручиваемое содержимое может уйти под .app-bottom-nav (~65px + safe-area-inset-bottom).
   Для хаба такая компенсация уже была точечной (.app-shell:has(.hub-pixel-map) .sidebar-body,
   Фаза 33.3, Баг 1) -- переносим то же значение в обычное (менее специфичное) правило
   .sidebar-body; оно применяется только там, где более специфичный хаб-селектор не совпадает,
   поэтому конфликтов по специфичности нет. Для .location-content (не-хаб экраны) -- override
   того же самого селектора .main-pane:not(:has(.hub-pixel-map)) .location-content (Фаза 33.3,
   Баг 3): нижний отступ увеличен с 20px до места под навигацию + прежние 20px воздуха. */
.sidebar-body { padding-bottom: calc(65px + env(safe-area-inset-bottom) + 12px); }
.main-pane:not(:has(.hub-pixel-map)) .location-content { padding-bottom: calc(65px + env(safe-area-inset-bottom) + 20px); }

/* Второй баг из того же сообщения пользователя: при наивной замене calc(100vh - 112px) на
   голый 100vh на мобильных экранах появлялась тонкая пустая полоска СПРАВА (второе фото),
   предположительно из-за "скрытого скроллбара". Диагноз: у body/html нет верхнего ограничения
   по высоте/overflow (только точечный .summon-scroll-lock для одной модалки) -- при малейшем
   расхождении между реальной высотой #app и вьюпортом (sub-pixel округление динамической 100vh
   на мобильных браузерах при сворачивании адресной строки, safe-area-inset и т.п.) документ
   становился на 1-2px выше вьюпорта и получал собственный вертикальный скроллбар. Fixed-элементы
   (.location-backdrop, .app-bottom-nav, .chat-fab) в некоторых WebView (в т.ч. встроенный в
   Telegram) позиционируются от layout-вьюпорта, который включает полосу прокрутки -- отсюда
   видимый узкий гэп справа шириной со скроллбар. Раз .app-shell теперь всегда ровно 100vh (см.
   правило выше), а весь скролл живёт ВНУТРИ .main-pane/.sidebar-body/.overlay-body (у них уже
   есть собственный overflow-y:auto), самому document/body скроллиться незачем -- запрещаем
   скролл на уровне body, но только когда смонтирован игровой .app-shell (сплэш-экран загрузки
   до его монтирования не трогаем). ВАЖНО: это фикс по анализу кода, без визуальной проверки
   (по явной просьбе пользователя в этой задаче) -- если тонкая полоска справа всё ещё будет
   видна на реальном устройстве, вероятная причина не только в скроллбаре, и потребуется
   отдельная диагностика с фактическими скриншотами после этого правила. */
body:has(.app-shell) { overflow: hidden; height: 100vh; }

/* ---------------------------------------------------------------------------------------------
   Фаза 35 (баг Ратуша): карточка квеста (.quest-card) должна оставаться горизонтальной -- иконка
   СЛЕВА от текстовых данных -- на ЛЮБОЙ ширине экрана, включая мобильную, по концепту. Ранее
   правило @media(max-width:480px) переводило .quest-card во flex-wrap:wrap и растягивало
   .quest-body на всю ширину, из-за чего иконка «падала» НАД текстом. Отменяем перенос, не трогая
   остальные правки того же блока (padding на мобильных и т.п.) -- append-only override, идёт
   позже в файле и с той же специфичностью выигрывает по порядку каскада.
   --------------------------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .quest-card { flex-wrap: nowrap; }
  .quest-card .quest-body { flex: 1 1 auto; }
}

/* Фаза 35: бейдж квестодателя (имя NPC · локация) наследовал text-transform:uppercase от общего
   .badge (см. начало файла) -- отсюда «КУЗНЕЦ БРАН · FORGE» капсом вместо читаемого написания по
   концепту («Староста Гримберт · Ратуша»). Отключаем капс именно для бейджа карточки квеста,
   остальные .badge в игре не трогаем. */
.quest-card .badge { text-transform: none; }

/* Фаза 35: до этой правки статус «в процессе»/«принято» выводился как обычный <span> без
   оформления кнопки -- по концепту это должна быть тёмная приглушённая pill-кнопка (как
   «В процессе» на макете), в одном визуальном семействе с .quest-card button[data-quest-claim]
   (награда) и button[data-quest-accept] (принять). */
.quest-card .quest-status-pill {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 11.5px; letter-spacing: .02em;
  padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06); color: var(--workshop-muted, #b9a08d);
}

/* Фаза 36.1 (баг сайдбара): .sidebar-backdrop{top:var(--hud-height)} (строка ~4785) не давал
   затемнению дотянуться до низа .game-hud -- сам HUD (z-index:9, ВЫШЕ бэкдропа z-index:5)
   гаснет собственным градиентом до полной прозрачности у своего нижнего края
   (background:linear-gradient(...,rgba(26,18,16,0)) 100%). Именно в этой прозрачной кайме под
   HUD, где бэкдроп ещё не начинался (top:hud-height), просвечивал недзатемнённый фон карты --
   ровно то, что видно на скриншоте пользователя (светлая полоса под хедером при открытом
   сайдбаре). Бэкдроп с меньшим z-index ничего не портит на самом HUD -- иконки/тексты HUD и
   так рисуются поверх него независимо от top; а вернув top:0, бэкдроп перекрывает всю
   .app-shell целиком (включая зону под HUD), и в прозрачной кайме HUD теперь просвечивает
   тёмный бэкдроп, а не карта. Append-only override того же селектора внутри той же
   медиа-секции (<560px), ничего из существующих правил не удалено/не изменено. */
@media (max-width: 559.98px) {
  .sidebar-backdrop { top: 0; }
}
/* ================================================================================================
   Фаза 38: вкладки «Рюкзака» — замена линейных SVG-глифов на изображения круглых бейджей
   категорий (Ресурсы/Еда и эликсиры/Особое), по концепту пользователя. Append-only override
   .tab-glyph/.tab-glyph-icon — .tab-glyph теперь без фонового радиального градиента (бейдж уже
   несёт собственную визуальную рамку), .tab-glyph-icon растягивается на всю площадь контейнера.
   ================================================================================================ */
.overlay-panel .inv-tabs.tabs .inv-tab .tab-glyph {
  background: none;
}
.overlay-panel .inv-tabs.tabs .inv-tab .tab-glyph-icon {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
/* ================================================================================================
   Фаза 39: «Мой питомец» / «Экипировка» / «Рюкзак» -- из полноэкранных fixed-оверлеев поверх
   .app-shell в самостоятельные локации внутри .location-content (как «Магазин»/«Кузница»).
   Раньше эти три панели рендерились как сиблинг .app-shell с position:fixed -- визуально
   перекрывали и сайдбар (частично компенсировано хаком left:190px выше по файлу), и floating-
   стрелки карты хаба (которые лежали в DOM ниже, но с меньшим z-index, чем .overlay-panel).
   Теперь app.js (render(), см. primaryOverlayKey) подставляет petPanelView()/equipmentPanelView()/
   inventoryOverlayView() ВНУТРЬ .location-content вместо hubMapView()/shopView()/... -- карта хаба
   в этом случае вообще не рендерится (нечему перекрывать), а сайдбар -- сосед .main-pane, а не
   потомок, и не заслоняется по определению.
   Внутренняя разметка/классы (.overlay-panel, .overlay-header, .overlay-body,
   .overlay-panel--primary) и вся их стилизация (табы инвентаря, item-card, rarity-цвета,
   safe-area отступы) оставлены БЕЗ ИЗМЕНЕНИЙ -- переопределяем здесь только позиционирование
   самой внешней обёртки для случая, когда она вложена в .location-content, а не рендерится как
   сиблинг .app-shell (старое поведение, на которое рассчитаны более ранние правила выше). */
.location-content > .overlay-panel.overlay-panel--primary {
  position: static;
  top: auto; bottom: auto; left: auto; right: auto;
  transform: none;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  z-index: auto;
  background: transparent;
}
@media (min-width: 560px) {
  .location-content > .overlay-panel.overlay-panel--primary {
    left: auto;
    right: auto;
    width: 100%;
  }
}
.location-content > .overlay-panel.overlay-panel--primary > .overlay-header {
  position: static;
  backdrop-filter: none;
  background: transparent;
  padding: 0 0 14px;
}
.location-content > .overlay-panel.overlay-panel--primary > .overlay-body {
  padding: 0;
  overflow: visible;
}
/* Фаза 40 (пункт 3): полноширинная кнопка "Отправиться в путешествие" + компактная кнопка чата
   с питомцем на экране Городских ворот (gateView()). Заменяет мелкую кнопку-ёлку "Загород" из
   .hub-compass/.hub-street -- те классы не удаляются (append-only конвенция), просто больше не
   используются здесь. Не затрагивает .expedition-panel/.expedition-choice ниже (отдельная фича
   "Отправить в путешествие" -- офлайн-экспедиция питомца). */
.gate-journey-row { display: flex; gap: 10px; margin-top: 18px; }
.gate-journey-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 14px 18px; border-radius: 16px; border: 1px solid rgba(126,229,173,.4);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0f1f16;
  font-size: 15px; font-weight: 800; letter-spacing: -.01em;
  box-shadow: 0 12px 26px rgba(126,229,173,.24), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .15s ease;
}
.gate-journey-btn .misc-icon { width: 22px; height: 22px; margin: 0; opacity: 1; }
.gate-journey-btn:active { transform: scale(.98); }
.gate-chat-btn {
  flex: 0 0 auto; width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--accent);
  transition: transform .15s ease, border-color .15s ease;
}
.gate-chat-btn .misc-icon { width: 22px; height: 22px; margin: 0; opacity: 1; }
.gate-chat-btn:active { transform: scale(.94); border-color: var(--accent); }
@media (min-width: 560px) {
  .gate-journey-btn { font-size: 16px; min-height: 58px; }
  .gate-chat-btn { width: 58px; height: 58px; }
}

/* Фаза 41 (Концепт C): .swap-cell -- третья ячейка .ribbon показывает трофеи лиги везде, кроме
   локации Мастерская, где вместо них показывается запас угля (см. gameHud() в app.js). Обе капсулы
   всегда в DOM (не дёргаем сеть при переключении локации), но только одна -- с классом .is-active --
   видима и участвует в layout. .swap-cell сам по себе -- display:contents (не создаёт свой бокс),
   чтобы видимая капсула стала прямым flex-ребёнком .ribbon и корректно участвовала в flex-расчёте
   ширин (ранний вариант с position:absolute ломал flex-расчёт, т.к. абсолютные дети не дают
   .swap-cell собственного content-размера -- ячейка сжималась до ~30px и обрезалась краем экрана,
   поймано Playwright QA и исправлено). Цвет варианта .coal -- аналогично .trophy/.gold/.crystal. */
.game-hud .swap-cell { display: contents; }
.game-hud .swap-cell .capsule { display: none; }
.game-hud .swap-cell .capsule.is-active { display: flex; }
.game-hud .capsule.coal .value { color: var(--workshop-ember-2); }
.game-hud .capsule.coal .icon { color: var(--workshop-ember-2); }

/* Фаза 41: .capsule.crystal стал <button> (покупка Янтаря за Telegram Stars) -- сбрасываем
   браузерные стили кнопки, чтобы визуально капсула не изменилась (существующие правила
   .game-hud .capsule/.capsule.crystal .value/.icon выше применяются как есть, класс тот же). */
.game-hud .capsule.crystal {
  appearance: none; -webkit-appearance: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer;
}

/* ================================================================================================
   Фаза 41 (финальный дизайн, внедрён в доработке): модалка покупки Янтаря за Telegram Stars
   (.amber-shop-overlay), порт утверждённого концепта «Кузница Эмбера» (concept-e из прототипа
   amber_shop_showcase). Глобальный оверлей, не привязан к .game-hud/.ws-root, поэтому использует
   :root --workshop-* переменные напрямую. z-index выше всех существующих слоёв интерфейса.
   Медальон с самоцветом выступает над панелью как герб, тайлы пакетов -- двухблочные карты
   (иконка+сумма сверху / цена на золотом градиенте снизу), выгодный пакет выделен только
   светящимся ободком (без текстового беджа и без заклёпок-точек по углам — убрано по итогам
   предпродакшн QA). Строка быстрого повтора (.amber-repeat-plaque) показывает последнюю
   успешную покупку (см. AmberShopLogic::lastCompletedPurchase, GET amber_packages.php -> last_purchase). ==== */
.amber-shop-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(circle at 50% 46%, rgba(255,122,51,.22), transparent 55%),
    rgba(8,6,5,.82);
  backdrop-filter: blur(3px);
}
.amber-ember-particle {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,154,61,.9), transparent 70%); filter: blur(1px);
}
.amber-shop-frame {
  /* Фикс: медальон -- дитя .amber-shop-card с overflow-y:auto -- обрезался наполовину
     скролл-контейнером карточки (клип по оси Y применяется и к содержимому за верхней
     границей паддинг-бокса). Медальон вынесен в этот необрезаемый обёрточный слой,
     сама карточка (со скроллом) теперь отдельный дочерний элемент ниже. */
  position: relative; width: min(100%, 380px); margin-top: 26px;
}
.amber-shop-card {
  position: relative; width: 100%; max-height: min(88vh, 640px); overflow-y: auto;
  background: linear-gradient(165deg, #241611, #140b08 60%);
  border-radius: 20px; border: 3px solid #4a3018;
  box-shadow:
    0 0 0 1px rgba(255,207,107,.25),
    0 0 40px rgba(255,122,51,.35),
    0 25px 55px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.05);
  padding: 30px 16px 20px;
}
.amber-medallion {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 38% 32%, #3a2210, #1a0f08 75%);
  border: 3px solid var(--workshop-gold);
  box-shadow: 0 0 0 3px #140b08, 0 6px 16px rgba(0,0,0,.6), 0 0 24px rgba(255,176,32,.55);
}
.amber-medallion img { width: 38px; height: 32px; object-fit: contain; }
.amber-close-forge {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(165deg, #4a3018, #241611); border: 1px solid var(--workshop-gold);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 2px 5px rgba(0,0,0,.5);
  display: grid; place-items: center; color: var(--workshop-gold);
}
.amber-close-forge svg { display: block; width: 13px; height: 13px; }
.amber-title-row { text-align: center; margin: 12px 0 14px; }
.amber-title-row h2 {
  margin: 0; font-family: 'Cinzel','Georgia',serif; font-size: 18px; letter-spacing: .06em; font-weight: 700;
  color: var(--workshop-parchment); text-shadow: 0 0 12px rgba(255,122,51,.6), 0 2px 4px rgba(0,0,0,.7);
}
.amber-title-row span { display: block; margin-top: 3px; font-size: 10.5px; letter-spacing: .03em; color: var(--workshop-muted); }
.amber-repeat-plaque {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 11px; margin-bottom: 12px;
  border-radius: 11px; background: linear-gradient(180deg, rgba(255,122,51,.1), rgba(0,0,0,.35));
  border: 1px solid rgba(255,122,51,.35); cursor: pointer; transition: transform .12s ease;
}
.amber-repeat-plaque:active { transform: scale(.97); }
.amber-repeat-plaque[aria-disabled="true"] { opacity: .55; cursor: wait; pointer-events: none; }
.amber-p-gem { width: 22px; height: 18px; flex-shrink: 0; object-fit: contain; }
.amber-p-text { flex: 1; font-size: 11.5px; color: var(--workshop-parchment); }
.amber-p-text b { color: var(--workshop-ember-2); font-size: 13px; }
.amber-p-price {
  display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 12px;
  background: rgba(0,0,0,.4); color: var(--workshop-gold); padding: 5px 10px; border-radius: 8px;
  border: 1px solid rgba(255,207,107,.3);
}
.amber-p-price svg { width: 11px; height: 11px; }
.amber-shop-status { padding: 30px 12px; text-align: center; color: var(--workshop-muted); font-size: 13px; }
.amber-tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amber-tile-row2 { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.amber-tile {
  position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: 12px;
  background: linear-gradient(160deg, #2c1c12, #150c07); border: 1px solid rgba(255,207,107,.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05); color: var(--workshop-text); transition: transform .12s ease;
}
.amber-tile:active { transform: scale(.96); }
.amber-tile:disabled { opacity: .55; cursor: wait; transform: none; }
.amber-t-top {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 12px 5px 10px;
}
.amber-t-gem { width: 32px; height: 27px; object-fit: contain; }
.amber-t-amount { font-family: 'Cinzel','Georgia',serif; font-weight: 800; font-size: 15.5px; color: var(--workshop-parchment); line-height: 1; }
.amber-t-divider { height: 1px; margin: 0 10px; background: linear-gradient(90deg, transparent, rgba(255,207,107,.4), transparent); }
.amber-t-bottom { display: block; padding: 6px 4px 7px; text-align: center; background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); }
.amber-t-price { display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 800; color: #2a1608; }
.amber-t-price svg { width: 10px; height: 10px; }
.amber-tile--best {
  border: 1px solid var(--workshop-ember-2);
  box-shadow: 0 0 0 1px rgba(255,122,51,.4), 0 0 22px rgba(255,122,51,.55), inset 0 1px 0 rgba(255,255,255,.08);
}
.amber-tile--best .amber-t-top { background: linear-gradient(160deg, #3a2410, #1c1108); }
.amber-tile--best .amber-t-amount { color: #ffd9a8; }
.amber-tile--best .amber-t-divider { background: linear-gradient(90deg, transparent, rgba(255,122,51,.65), transparent); }
.amber-tile--best .amber-t-bottom { background: linear-gradient(180deg, #ffb03a, #e8791e); }
.amber-tile--best .amber-t-price { color: #3a1608; }
.amber-shop-hint { margin: 14px 2px 0; font-size: 10.5px; line-height: 1.4; color: var(--workshop-muted); text-align: center; }
@media (min-width: 480px) {
  .amber-shop-card { padding: 34px 20px 24px; }
  .amber-t-amount { font-size: 16px; }
}

/* Фаза 46: «Стычка отрядов» (Lane Clash) -- продакшн-интеграция карточной мини-игры реального
   времени (перенос движков concept-b/c-pro-v2 «Открытый фронт»/«Прилив Территории» как есть,
   без изменений визуала/логики самих движков -- их собственный CSS остаётся инлайн в их
   index.html и здесь НЕ переопределяется). Этот append-блок стилизует только SPA-обёртку:
   выбор режима, сборку колоды и рамку iframe-контейнера боя/результат. Append-only: ничего
   выше не редактируется. */
:root {
  --lc-bg: #120b1a; --lc-panel: rgba(28, 16, 40, .82); --lc-panel-deep: rgba(15, 8, 24, .9);
  --lc-line: rgba(199, 148, 255, .22); --lc-ink: #f3e9ff; --lc-muted: #b9a6cf;
  --lc-violet: #a770ff; --lc-violet-2: #6d49d8; --lc-gold: #ffcf6b;
  --lc-rarity-common: #9aa0ab; --lc-rarity-rare: #6fb6ff; --lc-rarity-epic: #c37bff; --lc-rarity-legendary: #ffcf6b;
}
.lane-clash-screen { padding: 20px 16px 26px; }
.lane-clash-head.arena-district-head .hero-kicker { color: var(--lc-violet); }
.lane-clash-mode-grid { display: grid; gap: 14px; margin-top: 18px; }
.lane-clash-mode-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  padding: 18px 18px 16px; border-radius: 16px; background: linear-gradient(150deg, var(--lc-panel), var(--lc-panel-deep));
  border: 1px solid var(--lc-line); color: var(--lc-ink); transition: transform .14s ease, border-color .14s ease;
}
.lane-clash-mode-card:active { transform: scale(.98); border-color: var(--lc-violet); }
.lane-clash-mode-card-title { font-family: 'Cinzel', serif; font-weight: 700; font-size: 17px; }
.lane-clash-mode-card-tagline { font-size: 12.5px; line-height: 1.5; color: var(--lc-muted); }
.lane-clash-mode-card-cta { margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--lc-violet); }

.lane-clash-deck-builder-head { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.lane-clash-deck-builder-title { font-weight: 800; font-size: 14px; color: var(--lc-ink); }

.lane-clash-deck-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.lane-clash-deck-slot {
  position: relative; aspect-ratio: 3/4; border-radius: 12px; border: 1.5px dashed var(--lc-line);
  background: var(--lc-panel-deep); display: flex; align-items: center; justify-content: center;
  color: var(--lc-muted); font-size: 12px; padding: 0;
}
.lane-clash-deck-slot-empty span { opacity: .55; }
.lane-clash-deck-slot-filled {
  flex-direction: column; justify-content: flex-end; border-style: solid; border-color: var(--rarity-color, var(--lc-line));
  overflow: hidden; box-shadow: 0 0 0 1px var(--rarity-soft, transparent) inset;
}
.lane-clash-deck-slot-filled img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.lane-clash-deck-slot-filled .lane-clash-card-mana {
  position: absolute; top: 4px; left: 4px; z-index: 1; min-width: 18px; height: 18px; border-radius: 6px;
  background: var(--lc-violet-2); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 3px;
}
.lane-clash-deck-slot-filled .lane-clash-card-name {
  position: relative; z-index: 1; width: 100%; padding: 3px 4px 5px; font-size: 9.5px; line-height: 1.2; font-weight: 700;
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); background: linear-gradient(180deg, transparent, rgba(0,0,0,.75));
}
.lane-clash-deck-slot.rarity-common { --rarity-color: var(--lc-rarity-common); --rarity-soft: rgba(154,160,171,.28); }
.lane-clash-deck-slot.rarity-rare { --rarity-color: var(--lc-rarity-rare); --rarity-soft: rgba(111,182,255,.28); }
.lane-clash-deck-slot.rarity-legendary { --rarity-color: var(--lc-rarity-legendary); --rarity-soft: rgba(255,207,107,.28); }
.lane-clash-deck-slot.rarity-epic { --rarity-color: var(--lc-rarity-epic); --rarity-soft: rgba(195,123,255,.32); }

.lane-clash-deck-hint { margin: 12px 2px 0; font-size: 11.5px; line-height: 1.5; color: var(--lc-muted); }

.lane-clash-collection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.lane-clash-collection-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px 9px;
  border-radius: 13px; background: var(--lc-panel); border: 1.5px solid var(--rarity-color, var(--lc-line));
  box-shadow: 0 0 0 1px var(--rarity-soft, transparent) inset; color: var(--lc-ink); text-align: center;
  transition: transform .12s ease, opacity .12s ease;
}
.lane-clash-collection-card:disabled { opacity: .4; }
.lane-clash-collection-card:active:not(:disabled) { transform: scale(.96); }
.lane-clash-collection-card.rarity-common { --rarity-color: var(--lc-rarity-common); --rarity-soft: rgba(154,160,171,.22); }
.lane-clash-collection-card.rarity-rare { --rarity-color: var(--lc-rarity-rare); --rarity-soft: rgba(111,182,255,.22); }
.lane-clash-collection-card.rarity-epic { --rarity-color: var(--lc-rarity-epic); --rarity-soft: rgba(195,123,255,.26); }
.lane-clash-collection-card.rarity-legendary { --rarity-color: var(--lc-rarity-legendary); --rarity-soft: rgba(255,207,107,.26); }
.lane-clash-collection-card img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
.lane-clash-collection-card .lane-clash-card-mana {
  position: absolute; top: 5px; left: 5px; min-width: 18px; height: 18px; border-radius: 6px;
  background: var(--lc-violet-2); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 3px;
}
.lane-clash-collection-card .lane-clash-card-name { font-size: 11px; font-weight: 700; line-height: 1.25; }
.lane-clash-collection-card .lane-clash-card-rarity { font-size: 9px; color: var(--rarity-color, var(--lc-muted)); text-transform: uppercase; letter-spacing: .04em; }
.lane-clash-collection-card .lane-clash-card-type { font-size: 9.5px; color: var(--lc-muted); }
.lane-clash-collection-card.in-deck { border-color: var(--lc-gold); }
.lane-clash-collection-card .lane-clash-card-check {
  position: absolute; top: 5px; right: 5px; font-size: 8.5px; font-weight: 800; color: #1a1408;
  background: var(--lc-gold); border-radius: 5px; padding: 2px 5px;
}

.lane-clash-deck-actions { margin-top: 18px; display: flex; }
.lane-clash-deck-actions .primary-action,
.lane-clash-result-actions .primary-action,
#lane-clash-start-battle {
  flex: 1; min-height: 50px; border-radius: 14px; font-weight: 800; font-size: 15px; color: #1a0f2b;
  background: linear-gradient(180deg, var(--lc-violet), var(--lc-violet-2)); box-shadow: 0 6px 0 #4a2f9e, 0 10px 20px rgba(109,73,216,.3);
}
.lane-clash-deck-actions .primary-action:active,
.lane-clash-result-actions .primary-action:active,
#lane-clash-start-battle:active { transform: translateY(4px); box-shadow: 0 2px 0 #4a2f9e, 0 4px 10px rgba(109,73,216,.25); }
#lane-clash-start-battle:disabled { opacity: .45; box-shadow: none; }

/* Фаза 48 (баг A1, часть 2 -- отдельная находка при живом QA перетаскивания карт): было
   `height: calc(100vh - 92px)`, что задваивало вычитание отступа HUD. `.lane-clash-battle-frame-wrap`
   рендерится внутри `.main-pane`, у которой уже есть `padding-top: var(--hud-height, 92px)`
   (см. строку ~4862) -- т.е. обёртка и так стартует НИЖЕ HUD в потоке. Старая формула вычитала
   92px ЕЩЁ РАЗ поверх этого, а при этом полностью игнорировала место, реально занимаемое
   `.app-bottom-nav` (position:fixed, ~65px, но с запасом ~112px по паттерну `.app{padding-bottom:112px}`
   в этом же файле). Итог -- обёртка была на ~56-150px выше своей реальной высоты (в зависимости от
   фактического --hud-height), и её нижняя часть (рука карт !) физически заезжала ПОД фиксированную
   нижнюю навигацию, которая перехватывала pointer-события раньше, чем они доходили до iframe боя.
   Подтверждено Playwright: card.hover() зависал на "intercepts pointer events" от .app-bottom-nav.
   Верная формула -- вычесть ТОЛЬКО актуальный --hud-height (а не второй раз добавлять его как
   константу) и явно зарезервировать место под нижнюю навигацию (112px, тот же запас что и общий
   `.app` padding-bottom, чтобы не завести новый магический подгон). */
.lane-clash-battle-frame-wrap { display: flex; flex-direction: column; height: calc(100vh - var(--hud-height, 92px) - 112px); background: var(--lc-bg); }
.lane-clash-battle-topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 10px 16px;
  background: var(--lc-panel-deep); border-bottom: 1px solid var(--lc-line); font-size: 12px; color: var(--lc-muted);
}
.lane-clash-battle-mode-name { font-weight: 800; color: var(--lc-ink); }
.lane-clash-battle-iframe { flex: 1; width: 100%; border: 0; background: #000; }
.lane-clash-battle-loading, .lane-clash-result-loading { display: grid; place-content: center; min-height: 40vh; color: var(--lc-muted); }

.lane-clash-result-card {
  margin-top: 18px; padding: 26px 20px; border-radius: 18px; text-align: center;
  background: linear-gradient(160deg, var(--lc-panel), var(--lc-panel-deep)); border: 1px solid var(--lc-line);
}
.lane-clash-result-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--lc-violet); }
.lane-clash-result-win .lane-clash-result-kicker { color: #7ee5ad; }
.lane-clash-result-loss .lane-clash-result-kicker { color: var(--danger, #ff8d91); }
.lane-clash-result-card h2 { margin: 6px 0 0; font-family: 'Cinzel', serif; font-size: 20px; color: var(--lc-ink); }
.lane-clash-result-rewards { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.lane-clash-reward-pill { padding: 7px 14px; border-radius: 999px; background: var(--lc-panel-deep); border: 1px solid var(--lc-line); font-weight: 800; font-size: 13px; color: var(--lc-ink); }
.lane-clash-reward-pill.lane-clash-reward-amber { color: var(--lc-gold); border-color: rgba(255,207,107,.4); }
.lane-clash-result-actions { display: grid; gap: 10px; margin-top: 20px; }
.lane-clash-result-actions .secondary-action { min-height: 46px; border-radius: 13px; }

@media (min-width: 640px) {
  .lane-clash-mode-grid { grid-template-columns: repeat(2, 1fr); }
  .lane-clash-collection-grid { grid-template-columns: repeat(4, 1fr); }
  .lane-clash-deck-slots { grid-template-columns: repeat(8, 1fr); }
}

/* Фаза 48 (B1): инлайн-экран, когда у игрока нет полной колоды -- взамен убранного дек-билдера перед боем. */
.lane-clash-no-deck-card {
  margin-top: 24px; padding: 26px 20px; border-radius: 18px; text-align: center;
  background: linear-gradient(160deg, var(--lc-panel), var(--lc-panel-deep)); border: 1px solid var(--lc-line);
}
.lane-clash-no-deck-card h2 { margin: 0 0 8px; font-family: 'Cinzel', serif; font-size: 17px; color: var(--lc-ink); }
.lane-clash-no-deck-card p { margin: 0 0 18px; font-size: 13px; color: var(--lc-muted); line-height: 1.5; }
.lane-clash-no-deck-card .primary-action { min-height: 48px; border-radius: 13px; background: linear-gradient(180deg, var(--lc-violet), var(--lc-violet-2)); color: #1a0f2b; font-weight: 800; }

/* Фаза 90 (Task B6, subphase 3): экран сборки СОСТАВА отряда режима «Формирование отряда» --
   4 слота (клик по занятому убирает юнита обратно в ростер) + сетка ростера (переиспользует
   .lane-clash-card-tile/.grimoire-card-tile разметку из laneClashCardTile(), обёрнутую в
   кнопку-тоггл). Без drag-drop и без ограничения по времени (бриф п.1/4).
   Фаза 93 (фикс по фидбеку): вернули ПЛОСКИЙ ряд из 4 слотов -- этот экран отвечает только за
   СОСТАВ отряда. Реальная расстановка ПО ПОЗИЦИИ на поле теперь отдельный экран ПОСЛЕ нахождения
   соперника, см. .lane-clash-formation-placement-screen ниже. */
.lane-clash-formation-setup { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.lane-clash-formation-header h2 { margin: 0 0 6px; font-family: 'Cinzel', serif; font-size: 18px; color: var(--lc-ink); }
.lane-clash-formation-header p { margin: 0; font-size: 13px; color: var(--lc-muted); line-height: 1.5; }
.lane-clash-formation-row-slots-flat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lane-clash-formation-hint { margin: 0; font-size: 12px; color: var(--lc-muted); line-height: 1.4; }
/* Фаза 95.1 (багфикс, п.4 брифа): старый отдельный стиль слотов отряда (.lane-clash-formation-slot*)
   удалён -- теперь эти слоты рендерятся с классами .grimoire-deck-slot/.grimoire-deck-slot-filled --
   точно такими же, как у карточек "МОЯ КОЛОДА" (см. laneClashFormationSlotHtml() и
   laneClashGrimoireCardsView() в app.js) -- общий CSS для этих классов уже определён ниже в файле
   (см. .grimoire-deck-slot-filled и соседние правила). */
/* Фаза 91 (фикс по фидбеку): ростер расстановки был вертикальной 3-колоночной сеткой без
   фильтра -- переделан в горизонтальную прокручиваемую ленту, тем же паттерном, что и
   горизонтальные ряды Мастерской (.ws-equip-grid: flex nowrap + overflow-x:auto +
   scrollbar-width:none), плюс табы фильтра по редкости над лентой (переиспользуют уже
   существующие .grimoire-filter-tabs/.grimoire-filter-btn из Гримуара, см. ниже). */
.lane-clash-formation-filter-tabs { margin-bottom: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.lane-clash-formation-filter-tabs::-webkit-scrollbar { display: none; }
.lane-clash-formation-filter-tabs .grimoire-filter-btn { flex: 0 0 auto; white-space: nowrap; }
.lane-clash-formation-roster {
  display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 10px; padding: 2px 2px 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.lane-clash-formation-roster::-webkit-scrollbar { display: none; }
.lane-clash-formation-roster-card {
  flex: 0 0 92px; width: 92px; padding: 0; border: none; background: none; font: inherit; cursor: pointer; text-align: left;
}
.lane-clash-formation-roster-card .lane-clash-card-tile { width: 100%; }
.lane-clash-formation-roster-card.assigned { opacity: .35; cursor: default; }
.lane-clash-formation-empty-roster { font-size: 13px; color: var(--lc-muted); text-align: center; padding: 20px 10px; width: 100%; }
.lane-clash-formation-actions { display: flex; gap: 10px; }
.lane-clash-formation-actions .secondary-action, .lane-clash-formation-actions .primary-action { flex: 1; min-height: 48px; border-radius: 13px; font-weight: 800; }
.lane-clash-formation-actions .primary-action { background: linear-gradient(180deg, var(--lc-violet), var(--lc-violet-2)); color: #1a0f2b; }
.lane-clash-formation-actions .primary-action:disabled { opacity: .45; cursor: default; }
.lane-clash-formation-actions .secondary-action { background: var(--lc-panel-deep); border: 1px solid var(--lc-line); color: var(--lc-ink); }

/* Фаза 93: экран РАССТАНОВКИ отряда по позициям на поле -- отдельный экран, открывается ПОСЛЕ
   нахождения соперника (laneClashEnterFormationPlacement()), см. laneClashFormationPlacementView().
   Карта показывает фон биома (случайный, детерминированный от matchSeed, синхронизирован с самим
   боем) с 6 точками игрока (абсолютное позиционирование в процентах от LANE_CLASH_FORMATION_FIELD_SLOTS)
   и фиксированными точками соперника (только превью, не интерактивны). */
.lane-clash-formation-placement-screen { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.lane-clash-placement-topbar { display: flex; align-items: center; gap: 10px; }
.lane-clash-placement-back {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--lc-line);
  background: var(--lc-panel-deep); color: var(--lc-ink); font-size: 18px; font-weight: 900; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
}
.lane-clash-placement-title h2 { margin: 0 0 2px; font-family: 'Cinzel', serif; font-size: 17px; color: var(--lc-ink); }
.lane-clash-placement-title p { margin: 0; font-size: 12px; color: var(--lc-muted); }
.lane-clash-placement-map {
  position: relative; width: 100%; aspect-ratio: 720 / 1280; max-height: 62vh; border-radius: 18px;
  overflow: hidden; background-color: var(--lc-panel-deep); background-size: cover; background-position: center;
  border: 1px solid var(--lc-line); box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.lane-clash-placement-slot {
  position: absolute; transform: translate(-50%, -50%); width: 19%; aspect-ratio: 1 / 1; border-radius: 50%;
  border: 2px dashed rgba(243,233,255,.55); background: rgba(15,8,24,.55); color: var(--lc-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 2px; cursor: pointer; font: inherit; backdrop-filter: blur(1px);
}
.lane-clash-placement-slot.tier-1 { width: 21%; }
.lane-clash-placement-slot.tier-3 { width: 17%; }
.lane-clash-placement-slot-tier { font-size: 11px; font-weight: 800; color: rgba(243,233,255,.75); }
.lane-clash-placement-slot.empty:active { border-color: var(--lc-violet-2); }
.lane-clash-placement-slot.selected {
  border-style: solid; border-color: var(--lc-gold); box-shadow: 0 0 0 4px rgba(255,207,107,.25);
}
.lane-clash-placement-slot.filled {
  border-style: solid; border-color: var(--lc-violet); background: linear-gradient(160deg, rgba(167,112,255,.35), rgba(15,8,24,.75));
}
.lane-clash-placement-slot.filled.enemy { border-color: #ff7a7a; background: linear-gradient(160deg, rgba(255,90,90,.3), rgba(15,8,24,.75)); cursor: default; }
.lane-clash-placement-slot img { width: 62%; height: 62%; object-fit: contain; pointer-events: none; }
.lane-clash-placement-slot-name {
  font-size: 9.5px; font-weight: 700; line-height: 1.1; text-align: center; color: var(--lc-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%;
}
.lane-clash-placement-hint { margin: 0; font-size: 12px; color: var(--lc-muted); line-height: 1.4; text-align: center; }
.lane-clash-placement-roster {
  display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 10px; padding: 2px 2px 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.lane-clash-placement-roster::-webkit-scrollbar { display: none; }
/* Фаза 94 (фикс по фидбеку): плитки ростера были маленькими квадратами (иконка сверху +
   подпись снизу) -- переделаны в прямоугольные карточки с артом на весь блок (как .card в
   open_front/index.php — см. .card-art/.card-scrim/.card-name/.card-rarity-tag там), чтобы совпадать
   с визуальным языком остальных режимов Стычки отрядов. Без бейджа стоимости маны (.card-cost там)
   и без превью следующей карты (#nextCardPreview там) -- у отряда расстановки нет ни маны, ни
   очереди карт. Ширина увеличена 84px -> 108px и высота задана явно (132px, ≈ тот же
   пропорциональный вид карты, что и в других режимах), чтобы полноценный арт оставался
   читаемым на узкой горизонтальной ленте. */
.lane-clash-placement-roster-card {
  flex: 0 0 108px; width: 108px; height: 132px; padding: 0; border-radius: 12px;
  border: 2px solid var(--rarity-color, var(--lc-line)); overflow: hidden; position: relative;
  background: linear-gradient(160deg, var(--lc-panel), var(--lc-panel-deep)); font: inherit; cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,.5);
}
.lane-clash-placement-roster-card.rarity-common { --rarity-color: var(--lc-rarity-common); }
.lane-clash-placement-roster-card.rarity-rare { --rarity-color: var(--lc-rarity-rare); box-shadow: 0 6px 14px rgba(0,0,0,.5), 0 0 10px rgba(111,182,255,.25); }
.lane-clash-placement-roster-card.rarity-epic { --rarity-color: var(--lc-rarity-epic); box-shadow: 0 6px 14px rgba(0,0,0,.5), 0 0 14px rgba(195,123,255,.35); }
.lane-clash-placement-roster-card.rarity-legendary { --rarity-color: var(--lc-rarity-legendary); box-shadow: 0 6px 14px rgba(0,0,0,.5), 0 0 14px rgba(255,207,107,.45); }
.lane-clash-placement-roster-card-art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; pointer-events: none;
}
.lane-clash-placement-roster-card-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 58%; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(4,8,14,.92) 0%, rgba(4,8,14,.5) 55%, transparent 100%);
}
.lane-clash-placement-roster-name {
  position: absolute; left: 4px; right: 4px; bottom: 8px; z-index: 3; font-size: 10.5px; font-weight: 800;
  text-align: center; line-height: 1.15; color: var(--lc-ink); text-shadow: 0 1px 2px rgba(0,0,0,.9);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lane-clash-placement-roster-rarity-tag {
  position: absolute; bottom: 3px; left: 6px; right: 6px; height: 3px; border-radius: 2px; z-index: 3;
  background: rgba(0,0,0,.5); overflow: hidden; display: block;
}
.lane-clash-placement-roster-rarity-fill { display: block; height: 100%; width: 100%; border-radius: 2px; }
.lane-clash-placement-roster-card.rarity-common .lane-clash-placement-roster-rarity-fill { background: var(--lc-rarity-common); }
.lane-clash-placement-roster-card.rarity-rare .lane-clash-placement-roster-rarity-fill { background: linear-gradient(90deg, #3d7fa8, var(--lc-rarity-rare)); }
.lane-clash-placement-roster-card.rarity-epic .lane-clash-placement-roster-rarity-fill { background: linear-gradient(90deg, #8a4fc9, var(--lc-rarity-epic)); }
.lane-clash-placement-roster-card.rarity-legendary .lane-clash-placement-roster-rarity-fill { background: linear-gradient(90deg, #d9a13a, var(--lc-rarity-legendary)); }
.lane-clash-placement-roster-card.placed { opacity: .5; }
.lane-clash-placement-roster-badge {
  position: absolute; top: 4px; right: 4px; z-index: 4; font-size: 8.5px; font-weight: 800; letter-spacing: .02em;
  color: #1a0f2b; background: var(--lc-gold); border-radius: 6px; padding: 1px 5px; text-transform: uppercase;
}
.lane-clash-placement-actions { display: flex; gap: 10px; }
.lane-clash-placement-actions .secondary-action, .lane-clash-placement-actions .primary-action { flex: 1; min-height: 48px; border-radius: 13px; font-weight: 800; }
.lane-clash-placement-actions .primary-action { background: linear-gradient(180deg, var(--lc-violet), var(--lc-violet-2)); color: #1a0f2b; }
.lane-clash-placement-actions .primary-action:disabled { opacity: .45; cursor: default; }
.lane-clash-placement-actions .secondary-action { background: var(--lc-panel-deep); border: 1px solid var(--lc-line); color: var(--lc-ink); }

/* ==========================================================================================
   Фаза 48: «Гримуар Стычки отрядов» -- коллекция/редактор колоды (B2), Автомат Предсказаний (B3),
   Сокровищница Гримуара (B4). Переиспользует те же --lc-* токены (тёмно-синяя/золотая
   палитра Концепта A) и --rarity-*-soft токены редкости, что и выше в этом же append-блоке, --
   никаких новых цветовых систем. Структурно повторяет grimoire-grid/level-diamond паттерн Фазы 47, но
   свой класс корня -- .lane-clash-grimoire-screen -- чтобы не пересекаться с .arena-equipment.equip-content
   (питомцевый гримуар остаётся полностью нетронуутым).
   ========================================================================================== */
.collection-subtabs { display: flex; gap: 8px; padding: 4px; margin-bottom: 14px; border-radius: 14px; background: rgba(0,0,0,.28); }
.collection-subtab-btn {
  flex: 1; padding: 10px 12px; border-radius: 11px; font-size: 12.5px; font-weight: 800; letter-spacing: .01em;
  color: var(--lc-muted, #b9a6cf); background: transparent; text-align: center;
}
.collection-subtab-btn.active { background: linear-gradient(180deg, var(--lc-violet), var(--lc-violet-2)); color: #fff; box-shadow: 0 6px 14px rgba(109,73,216,.35); }

.lane-clash-grimoire-screen { padding: 4px 2px 26px; }
/* Фаза 57.2 (фикс по фидбеку): теперь в этой строке только пилюля жетонов, кнопки переехали на отдельную строку ниже. */
.lane-clash-tokens-row { display: flex; align-items: center; margin-bottom: 8px; }
/* Фаза 57.2 (фикс по фидбеку): по концепту (image-7.jpg) обе кнопки всегда в одной строке
пополам, без переноса даже на узких экранах. */
.lane-clash-action-btns-row { display: flex; gap: 8px; margin-bottom: 16px; }
.lane-clash-tokens-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 13px;
  color: var(--lc-gold, #ffcf6b); background: var(--lc-panel-deep, rgba(15,8,24,.9)); border: 1px solid rgba(255,207,107,.35);
}
.lane-clash-tokens-pill .misc-icon { width: 15px; height: 15px; }
/* Фаза 57.2 (фикс по фидбеку): 2 кнопки собственных классов с градиентом по концепту
(фиолетовый «Автомат» / золотой «Сокровищница»), вместо нейтральной .secondary-action.
flex: 1 1 0 + min-width: 0 -- всегда делят строку ровно пополам, без переноса даже на узких экранах
(как на макете image-7.jpg). */
.lane-clash-action-btns-row .lane-clash-predict-btn,
.lane-clash-action-btns-row .lane-clash-chest-open-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1 1 0; min-width: 0; min-height: 46px; padding: 0 10px; border-radius: 14px;
  font-size: 12px; font-weight: 800; color: #fff; border: 0; letter-spacing: .01em; white-space: nowrap;
}
.lane-clash-predict-btn {
  background: linear-gradient(180deg, var(--lc-violet), var(--lc-violet-2));
  box-shadow: 0 6px 14px rgba(109,73,216,.35);
}
.lane-clash-chest-open-btn {
  background: linear-gradient(180deg, var(--lc-gold), #d9862f);
  color: #1a0f2b;
  box-shadow: 0 6px 14px rgba(217,134,47,.35);
}
.lane-clash-predict-btn .misc-icon-badge, .lane-clash-chest-open-btn .misc-icon-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 8px; background: rgba(255,255,255,.2);
}
.lane-clash-chest-open-btn .misc-icon-badge { background: rgba(26,15,43,.18); }
.lane-clash-predict-btn .misc-icon-badge .misc-icon, .lane-clash-chest-open-btn .misc-icon-badge .misc-icon { width: 14px; height: 14px; }

/* Фаза 57.2 (фикс по фидбеку): фон панели -- сплошной тёмный (не градиент-панель), тонкая
полупрозрачная золотая обводка вместо --lc-line -- сильнее контраст с цветными слотами карт,
чтобы не читалось как «рамка в рамке» одинакового веса (см. концепт: тёмный «бархат» + тонкий
золотой контур, карты внутри -- главный акцент). */
.grimoire-deck-panel {
  padding: 16px; border-radius: 16px; margin-bottom: 16px;
  background: var(--lc-panel-deep); border: 1px solid rgba(255,207,107,.2);
}
.grimoire-deck-panel .panel-title { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--lc-gold); margin-bottom: 10px; }
/* Фаза 57.2 (фикс по фидбеку): по концепту и явному запросу -- сетка 4 колонки вместо горизонтального
скролла, чтобы реальная колода 8/8 укладывалась в 2 компактных ряда по 4 на мобильном (было: flex
строка фиксированной ширины 56px со скроллом -- слишком мелко и не совпадало с макетом). */
.grimoire-deck-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
/* min-width: 0 -- без этого grid-колонки растягиваются по min-content неразрывного текста названия
(white-space: nowrap ниже) и вылезают за правый край экрана на узких вьюпортах. */
.grimoire-deck-slot, .grimoire-deck-slot-filled { aspect-ratio: 3/4; border-radius: 12px; min-width: 0; }
.grimoire-deck-slot {
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--lc-line); color: var(--lc-muted); font-weight: 800; font-size: 16px;
  /* Фаза 95.1 (багфикс, п.4): этот класс теперь переиспользуется и на <button>
     (пустые слоты отряда в laneClashFormationSlotHtml(), в отличие от оригинального
     <div> в Гримуаре) -- без сброса UA-стилей кнопки пустой слот показывался
     белым/серым прямоугольником вместо точка в точку совпадения с референсом. */
  background: none; padding: 0; margin: 0; -webkit-appearance: none; appearance: none; font-family: inherit; cursor: default;
}
/* Фаза 57.3 (фикс по фидбеку): плюсик в пустом слоте колоды, как на макете (image-2.jpg). */
.grimoire-deck-slot .misc-icon { width: 22px; height: 22px; stroke-width: 2.2; }
/* Фаза 80: слот колоды теперь визуально зеркалит боевую карточку -- арт заполняет весь слот
   (position: absolute + object-fit: cover), overflow:hidden обрезает арт по скруглённым углам
   рамки редкости. Прежний flex-центрированный layout (арт 58% высоты + название под ним)
   заменён на абсолютный стек (см. .grimoire-deck-slot-art/-scrim/-bottom ниже). */
.grimoire-deck-slot-filled {
  position: relative; border-style: solid; border-width: 1.5px; border-color: var(--rarity-color, var(--lc-line));
  background: linear-gradient(165deg, var(--rarity-soft, rgba(157,180,201,.14)), rgba(0,0,0,.3)); padding: 0;
  overflow: hidden; display: block;
}
.grimoire-deck-slot-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
/* Скрим-градиент снизу для читаемости названия/звёзд, наложенных поверх арта -- тот же приём,
   что и в боевой руке карт (.card-scrim в open_front/index.php). */
.grimoire-deck-slot-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 58%; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(4,8,14,.92) 0%, rgba(4,8,14,.48) 55%, transparent 100%);
}
/* Мана/уровень -- те же ромбы-бейджи, что и в сетке карт (.lane-clash-card-tile .card-mana-badge/
   .card-tile-level-diamond), но со своим смещением -- у слота колоды нет внутреннего padding. */
.grimoire-deck-slot-filled .card-mana-badge {
  position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 6px; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ff8fd6, #9a4fe0); border: 2px solid rgba(255,255,255,.5);
  transform: rotate(45deg); box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.grimoire-deck-slot-filled .card-mana-badge span { display: block; transform: rotate(-45deg); font-size: 9px; font-weight: 900; color: #fff; }
.grimoire-deck-slot-filled .card-tile-level-diamond {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 6px; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ffe29a, #d9862f); border: 2px solid rgba(255,255,255,.5);
  transform: rotate(45deg); box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.grimoire-deck-slot-filled .card-tile-level-diamond span { display: block; transform: rotate(-45deg); font-size: 9px; font-weight: 900; color: #3a2205; }
/* Название + звёзды -- нижний оверлей поверх арта (звёзды под названием, как в списке карт). */
.grimoire-deck-slot-bottom { position: absolute; left: 4px; right: 4px; bottom: 5px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.grimoire-deck-slot-filled .card-tile-stars { display: flex; align-items: center; justify-content: center; gap: 1.5px; }
.grimoire-deck-slot-filled .card-tile-star { width: 8px; height: 8px; color: var(--lc-gold); }
.grimoire-deck-slot-filled .card-tile-star:not(.filled) { color: rgba(255, 207, 107, .3); }
/* Фаза 57.1 (багфикс): экран Стычки отрядов рендерится внутри overlayWrapper() -- ВНЕ скоупа
   .arena-equipment.equip-content/.shop-screen, где определены --rarity-common/rare/epic/legendary.
   Эти токены поэтому были неразрешимы здесь, и --rarity-color всегда падал на нейтральный
   фолбэк -- рамки карточек и слотов колоды не различались по редкости (все выглядели одинаково),
   в отличие от концепта. Правильный, уже глобально определённый (:root, строка ~6860) токен для
   этого экрана -- --lc-rarity-* (см. .lane-clash-deck-slot/.lane-clash-collection-card выше). */
.grimoire-deck-slot-filled.rarity-common { --rarity-color: var(--lc-rarity-common); --rarity-soft: rgba(154,160,171,.22); }
.grimoire-deck-slot-filled.rarity-rare { --rarity-color: var(--lc-rarity-rare); --rarity-soft: rgba(111,182,255,.22); }
.grimoire-deck-slot-filled.rarity-epic { --rarity-color: var(--lc-rarity-epic); --rarity-soft: rgba(195,123,255,.26); }
.grimoire-deck-slot-filled.rarity-legendary { --rarity-color: var(--lc-rarity-legendary); --rarity-soft: rgba(255,207,107,.26); }
/* Фаза 57 (ревизия): бейдж маны на слоте колоды убран по концепту -- вместо него компактное
   название карты, зажатое в 1 строку. Фаза 57.2: слот стал шире (сетка 4 колонки вместо flex
   56px) -- шрифт увеличен пропорционально. */
/* Фаза 57.4 (фикс по фидбеку): было white-space: nowrap + ellipsis -- длинные названия обрезались
("прилив ма...", "кот - пот..."), хотя место под 2-ю строку в слоте есть. Перенос на 2 строки вместо
обрезки в 1. */
.grimoire-deck-slot-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; padding: 0;
  font-size: 8.5px; font-weight: 800; line-height: 1.15; max-height: 2.3em;
  color: #f2f8ff; text-align: center; overflow: hidden; word-break: break-word;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}

/* Фаза 57: равноширокий сегментированный контроль (вместо прокручиваемых пилл-кнопок фиксированной
ширины) по концепту -- все три вкладки занимают полную ширину панели поровну. */
.grimoire-filter-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.grimoire-filter-btn {
  flex: 1; padding: 8px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; text-align: center;
  background: var(--lc-panel-deep); border: 1px solid var(--lc-line); color: var(--lc-muted);
}
.grimoire-filter-btn.active { background: linear-gradient(180deg, var(--lc-violet), var(--lc-violet-2)); border-color: var(--lc-violet); color: #fff; }

/* Фаза 57: плотная сетка 4-в-ряд на мобильном (было 2), desktop-переопределение ниже делает её
ещё плотнее (так чтобы desktop никогда не был реже mobile). */
.lane-clash-grimoire-grid.grimoire-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
/* min-width: 0 -- та же причина, что и у .grimoire-deck-slot выше: без этого grid-колонки
растягиваются неравномерно по min-content содержимого карточки (короткое название, не переносящееся
на 2 строки, требует больше места, чем длинное, которое переносится) -- на мобильных вьюпортах это
выталкивало 4-ю (последнюю) карточку в ряду за правый край экрана. */
.lane-clash-card-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 5px 8px; border-radius: 14px;
  border: 1.5px solid var(--rarity-color, var(--lc-line)); cursor: pointer; min-width: 0;
  background: linear-gradient(165deg, var(--rarity-soft, rgba(157,180,201,.14)) 0%, var(--lc-panel-deep) 78%);
  box-shadow: 0 0 0 1px var(--rarity-soft, transparent) inset, 0 10px 22px rgba(0,0,0,.3);
}
/* Фаза 57.1 (тот же багфикс, см. .grimoire-deck-slot-filled.rarity-* выше): --lc-rarity-*
   вместо неразрешимого в этом скоупе --rarity-*. */
.lane-clash-card-tile.rarity-common { --rarity-color: var(--lc-rarity-common); --rarity-soft: rgba(154,160,171,.22); }
.lane-clash-card-tile.rarity-rare { --rarity-color: var(--lc-rarity-rare); --rarity-soft: rgba(111,182,255,.22); }
.lane-clash-card-tile.rarity-epic { --rarity-color: var(--lc-rarity-epic); --rarity-soft: rgba(195,123,255,.26); }
.lane-clash-card-tile.rarity-legendary { --rarity-color: var(--lc-rarity-legendary); --rarity-soft: rgba(255,207,107,.26); }
/* Фаза 57 (ревизия по концепту): кольцо в колоде отмечается зелёным контуром-рамкой вокруг
   карточки (как у обеих карт в макете), вторым сигналом служит галочка справа. */
.lane-clash-card-tile.in-deck { box-shadow: 0 0 0 2px var(--workshop-green, #7ee5ad), 0 10px 22px rgba(0,0,0,.3); }
/* Фаза 57 (ревизия): бейдж маны -- ромб (повёрнутый квадрат) по концепту -- внутренний
   <span> контрвращает текст обратно, чтобы цифра оставалась горизонтальной.
   Фаза 73.1 (фикс по фидбеку): розово-фиолетовый градиент вместо чисто фиолетового --
   чтобы визуально отличаться от янтарного ромба уровня справа (.card-tile-level-diamond ниже). */
.lane-clash-card-tile .card-mana-badge {
  position: absolute; top: -2px; left: -2px; width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ff8fd6, #9a4fe0); border: 2px solid rgba(255,255,255,.5);
  transform: rotate(45deg); box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.lane-clash-card-tile .card-mana-badge span { display: block; transform: rotate(-45deg); font-size: 10px; font-weight: 900; color: #fff; }
/* Фаза 73.1 (фикс по фидбеку): настоящий уровень карты (card.level, прокачивается
   резонансом) в правом верхнем углу -- тот же ромб, что и у маны слева (Fixed вместо круглого
   бейджа Фазы 73, который ошибочно показывал star_level -- дублирование с баннером звёзд
   ниже), янтарно-золотой градиент. Заменяет прежнюю галочку «в колоде» -- индикатор
   нахождения в колоде остался зелёным кольцом рамки тайла (.lane-clash-card-tile.in-deck ниже),
   поэтому здесь конфликта нет. */
.lane-clash-card-tile .card-tile-level-diamond {
  position: absolute; top: -2px; right: -2px; width: 22px; height: 22px; border-radius: 6px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ffe29a, #d9862f); border: 2px solid rgba(255,255,255,.5);
  transform: rotate(45deg); box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.lane-clash-card-tile .card-tile-level-diamond span { display: block; transform: rotate(-45deg); font-size: 10px; font-weight: 900; color: #3a2205; }
.lane-clash-card-tile .card-icon-wrap { width: 52px; height: 52px; margin-top: 3px; border-radius: 10px; overflow: hidden; }
.lane-clash-card-tile .card-icon-wrap img { width: 100%; height: 100%; object-fit: cover; }
.lane-clash-card-tile .card-tile-name {
  font-size: 10px; font-weight: 800; color: var(--lc-ink); text-align: center; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; -webkit-box-pack: center; overflow: hidden; width: 100%; min-height: 24px;
}
.lane-clash-card-tile .card-tile-type { font-size: 9px; font-weight: 700; color: var(--lc-muted); text-transform: uppercase; letter-spacing: .03em; }
.lane-clash-card-tile .card-tile-level { font-size: 10px; font-weight: 700; color: var(--lc-gold); }
/* Фаза 73.1 (фикс по фидбеку): восстановлен ряд звёзд (был убран в Фазе 73 вместе с баннером/
   прогресс-баром выше) -- компактный размер для тайла (крупный 20px-вариант остаётся
   только в модалке через .card-detail-stars-block ниже). */
.lane-clash-card-tile .card-tile-stars { display: flex; align-items: center; justify-content: center; gap: 1.5px; margin: 1px 0; }
.lane-clash-card-tile .card-tile-star { width: 8.5px; height: 8.5px; color: var(--lc-gold); }
.lane-clash-card-tile .card-tile-star:not(.filled) { color: rgba(255, 207, 107, .3); }
/* Фаза 57.2 (фикс по фидбеку): по макету кнопка -- не отдельная пилюля с отступом от краёв карты, а
сплошная нижняя полоса впритык к краям карты. Отрицательные отступы (-5px боковые, -8px
низу) точно гасят внутренний padding .lane-clash-card-tile (9px 5px 8px), радиус снизу 12.5px
повторяет радиус карты (14px) за вычетом толщины рамки 1.5px, чтобы шов смотрелся бесшовным. */
.lane-clash-card-tile .card-tile-upgrade-btn {
  display: block; width: calc(100% + 10px); margin: 5px -5px -8px; padding: 5px 8px; border-radius: 0 0 12.5px 12.5px; font-size: 8px; font-weight: 800;
  letter-spacing: .03em; color: #1a0f2b; background: linear-gradient(180deg, #ffcf6b, #ff9f43);
  animation: grimoire-pulse 1.4s ease-in-out infinite; border: 0;
}
/* Фаза 57 (ревизия): галочка «в колоде» -- зелёный кружок по концепту (вместо золотого), чтобы
   визуально отличаться от разноцветного бейджа маны. */
.lane-clash-card-tile .card-tile-in-deck-badge {
  position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #0e2417; background: var(--workshop-green, #7ee5ad); border: 2px solid rgba(255,255,255,.55);
  box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.lane-clash-card-tile .card-tile-in-deck-badge .misc-icon { width: 10px; height: 10px; stroke-width: 3; }

/* Модальные окна слот-машины/сундука -- фиксированный overlay поверх всего overlay-panel Коллекции. */
.lane-clash-modal-overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(6, 3, 12, .72); backdrop-filter: blur(3px);
}
.lane-clash-modal {
  width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto; padding: 18px 18px 22px; border-radius: 22px 22px 0 0;
  background: linear-gradient(165deg, var(--lc-panel), var(--lc-panel-deep)); border: 1px solid var(--lc-line); border-bottom: none;
  box-shadow: 0 -10px 30px rgba(0,0,0,.5);
}
@media (min-width: 640px) {
  .lane-clash-modal-overlay { align-items: center; }
  .lane-clash-modal { border-radius: 22px; border-bottom: 1px solid var(--lc-line); }
}
.lane-clash-modal-head { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.modal-close-btn { font-size: 12px; font-weight: 700; color: var(--lc-muted); background: transparent; padding: 6px 8px; }
/* Фаза 71.5: шапка модалки карты -- заголовок «Характеристики» по центру + круглый красный
   крестик справа, зафиксированные над прокручиваемой .card-detail-modal-body (сама «шапка»
   не скроллится вместе с контентом -- требование пользователя, чтобы крестик всегда оставался на
   месте при скролле). .lane-clash-modal уже имеет padding и max-height/overflow-y -- переносим скролл
   только на .card-detail-modal (модалка деталей карты), другие использования .lane-clash-modal (слот-машина/сундук)
   не затронуты. */
.lane-clash-modal.card-detail-modal { display: flex; flex-direction: column; padding: 0; overflow: hidden; max-height: 88vh; }
.card-detail-modal-head {
  position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  padding: 14px 44px 10px; border-bottom: 1px solid var(--lc-line);
}
.card-detail-modal-heading { margin: 0; font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700; color: var(--lc-ink); }
.card-detail-close-btn {
  position: absolute; top: 10px; right: 14px; width: 26px; height: 26px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(180deg, #ff6b6b, #d43f3f); border: 2px solid rgba(255,255,255,.45);
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.card-detail-close-btn svg { width: 13px; height: 13px; }
.card-detail-modal-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 18px 22px; }

.slot-machine-token-row { display: flex; justify-content: center; margin-bottom: 8px; }
.slot-machine-title { margin: 0 0 14px; text-align: center; font-family: 'Cinzel', serif; font-size: 18px; color: var(--lc-ink); }
.slot-machine-reels {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px; border-radius: 16px;
  background: var(--lc-panel-deep); border: 1px solid rgba(255,207,107,.3); margin-bottom: 14px;
}
.slot-reel-cell {
  aspect-ratio: 1; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 10px;
  background: rgba(0,0,0,.35); border: 1px solid var(--lc-line);
}
.slot-reel-cell img { width: 100%; height: 100%; object-fit: contain; }
.slot-machine-reels.spinning .slot-reel-cell { animation: slot-reel-spin .5s linear infinite; }
@keyframes slot-reel-spin { 0% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-6px); opacity: .5; } 100% { transform: translateY(0); opacity: 1; } }
.slot-machine-result {
  text-align: center; padding: 10px; border-radius: 12px; margin-bottom: 12px; font-size: 13px; color: var(--lc-ink);
  background: rgba(255,207,107,.12); border: 1px solid rgba(255,207,107,.3);
}
.slot-machine-result.rarity-common { border-color: var(--rarity-common); }
.slot-machine-result.rarity-rare { border-color: var(--rarity-rare); }
.slot-machine-result.rarity-epic { border-color: var(--rarity-epic); }
.slot-machine-result.rarity-legendary { border-color: var(--rarity-legendary); }
.slot-machine-spin-btn {
  width: 100%; min-height: 52px; border-radius: 14px; font-weight: 800; font-size: 15px; color: #1a0f2b;
  background: linear-gradient(180deg, var(--lc-gold), #d9862f); box-shadow: 0 6px 0 #b5701f, 0 10px 20px rgba(217,134,47,.3);
}
.slot-machine-spin-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b5701f, 0 4px 10px rgba(217,134,47,.25); }
.slot-machine-spin-btn:disabled { opacity: .45; box-shadow: none; }

.chest-modal-title { margin: 0 0 10px; text-align: center; font-family: 'Cinzel', serif; font-size: 18px; color: var(--lc-gold); }
.chest-art { display: flex; justify-content: center; margin-bottom: 12px; }
.chest-art .misc-icon { width: 84px; height: 84px; color: var(--lc-gold); }
.chest-countdown { text-align: center; font-size: 13px; font-weight: 700; color: var(--lc-muted); margin-bottom: 14px; }
.chest-rewards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.chest-reward-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; text-align: center;
  background: var(--lc-panel-deep); border: 1.5px solid var(--rarity-color, var(--lc-line)); font-size: 9px; font-weight: 700; color: var(--lc-ink);
}
.chest-reward-tile.rarity-common { --rarity-color: var(--rarity-common); }
.chest-reward-tile.rarity-rare { --rarity-color: var(--rarity-rare); }
.chest-reward-tile.rarity-epic { --rarity-color: var(--rarity-epic); }
.chest-reward-tile.rarity-legendary { --rarity-color: var(--rarity-legendary); }
.chest-reward-tile img { width: 32px; height: 32px; object-fit: contain; }
.chest-reward-tile.chest-reward-tokens { border-color: rgba(255,207,107,.4); }
.chest-reward-tokens-amount { font-size: 13px; font-weight: 900; color: var(--lc-gold); }
.chest-claim-btn {
  width: 100%; min-height: 52px; border-radius: 14px; font-weight: 800; font-size: 15px; color: #12331f;
  background: linear-gradient(180deg, #7ee5ad, #3fae6f); box-shadow: 0 6px 0 #2c7d51, 0 10px 20px rgba(63,174,111,.3);
}
.chest-claim-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #2c7d51, 0 4px 10px rgba(63,174,111,.25); }

/* Фаза 71.3: модалка деталей карты в сетке Коллекции (характеристики/механика/бафы + кнопка «в колоду»). */
.card-detail-modal { text-align: center; }
.card-detail-art-wrap {
  width: 128px; height: 128px; margin: 0 auto 10px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: var(--lc-panel-deep); border: 2px solid var(--rarity-color, var(--lc-line));
}
.card-detail-art-wrap.rarity-common { --rarity-color: var(--rarity-common); }
.card-detail-art-wrap.rarity-rare { --rarity-color: var(--rarity-rare); }
.card-detail-art-wrap.rarity-epic { --rarity-color: var(--rarity-epic); }
.card-detail-art-wrap.rarity-legendary { --rarity-color: var(--rarity-legendary); }
.card-detail-art-wrap img { width: 100%; height: 100%; object-fit: contain; }
.card-detail-title { margin: 0 0 8px; font-family: 'Cinzel', serif; font-size: 18px; color: var(--lc-ink); }
.card-detail-meta-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.card-detail-rarity-pill {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 999px;
  color: var(--lc-ink); background: rgba(255,255,255,.08); border: 1.5px solid var(--rarity-color, var(--lc-line));
}
.card-detail-rarity-pill.rarity-common { --rarity-color: var(--rarity-common); }
.card-detail-rarity-pill.rarity-rare { --rarity-color: var(--rarity-rare); }
.card-detail-rarity-pill.rarity-epic { --rarity-color: var(--rarity-epic); }
.card-detail-rarity-pill.rarity-legendary { --rarity-color: var(--rarity-legendary); }
/* Фаза 71.5: бейдж стоимости маны с явной подписью «Мана: N» вместо голой цифры (была непонятна
   игроку вне контекста ромба-бейджа плитки). */
.card-detail-mana-pill {
  font-size: 10px; font-weight: 800; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px;
  color: var(--lc-ink); background: rgba(167,112,255,.16); border: 1.5px solid var(--lc-violet);
}
/* Фаза 71.5: блок звёзд/дублей в модалке -- раньше звёзды тут рендерились без скопированного
   родителя .lane-clash-card-tile, поэтому огромные чёрно-белые SVG -- даём такой же размер/цвет, как
   в компактной плитке, лишь чуть крупнее. */
.card-detail-stars-block { margin: 8px 0 10px; }
.card-detail-stars-block .card-tile-stars { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0 0 4px; }
.card-detail-stars-block .card-tile-star { width: 20px; height: 20px; color: var(--lc-gold); }
.card-detail-stars-block .card-tile-star:not(.filled) { color: rgba(255, 207, 107, .3); }
.card-detail-stars-block .card-tile-dupes-frac { font-size: 12px; font-weight: 800; color: var(--lc-ink); margin: 0 0 4px; }
.card-detail-stars-block .card-tile-maxed { font-size: 10px; font-weight: 700; color: var(--lc-gold); margin: 0 0 4px; }
.card-detail-stars-block .card-rarity-fill-wrap { max-width: 160px; margin: 0 auto; }
/* Фаза 71.5: кнопка «УЛУЧШИТЬ» вне .lane-clash-card-tile не получает базовый визуал (он скопирован
   селектором .lane-clash-card-tile .card-tile-upgrade-btn) -- даём собственный полноценный вариант
   (как у .card-detail-deck-btn) вместо узкой полоски-обрезки плитки. */
.card-detail-stars-block .card-tile-upgrade-btn {
  display: block; width: 100%; margin: 6px 0 0; padding: 10px 8px; border-radius: 12px; font-size: 12px; font-weight: 800;
  letter-spacing: .03em; color: #1a0f2b; background: linear-gradient(180deg, #ffcf6b, #ff9f43);
  animation: grimoire-pulse 1.4s ease-in-out infinite; border: 0;
}
.card-detail-role-line { margin: 10px 0 0; font-size: 12px; color: var(--lc-ink); text-align: left; }
.card-detail-role-line b { color: var(--lc-gold); font-weight: 700; }
.card-detail-role-desc b { color: var(--lc-ink); font-weight: 700; }
.card-detail-mechanic-heading { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--lc-muted); margin-bottom: 4px; }
.card-detail-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.card-detail-stat {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border-radius: 10px; text-align: center;
  background: var(--lc-panel-deep); border: 1px solid var(--lc-line);
}
.card-detail-stat-label { font-size: 10px; font-weight: 700; color: var(--lc-muted); text-transform: uppercase; letter-spacing: .03em; }
.card-detail-stat-value { font-size: 15px; font-weight: 800; color: var(--lc-ink); }
.card-detail-role-desc { margin: 4px 0 0; font-size: 12px; color: var(--lc-muted); text-align: left; }
.card-detail-mechanic {
  margin: 12px 0; padding: 10px 12px; border-radius: 12px; text-align: left;
  background: rgba(255,207,107,.1); border: 1.5px solid var(--rarity-color, var(--lc-gold));
}
.card-detail-mechanic.rarity-common { --rarity-color: var(--rarity-common); }
.card-detail-mechanic.rarity-rare { --rarity-color: var(--rarity-rare); }
.card-detail-mechanic.rarity-epic { --rarity-color: var(--rarity-epic); }
.card-detail-mechanic.rarity-legendary { --rarity-color: var(--rarity-legendary); }
.card-detail-mechanic-label { font-family: 'Cinzel', serif; font-size: 13px; font-weight: 700; color: var(--lc-gold); margin-bottom: 4px; }
.card-detail-mechanic-desc { margin: 0; font-size: 12.5px; color: var(--lc-ink); line-height: 1.4; }
.card-detail-deck-btn {
  width: 100%; min-height: 52px; margin-top: 6px; border-radius: 14px; font-weight: 800; font-size: 15px; color: #1a0f2b;
  background: linear-gradient(180deg, var(--lc-gold), #d9862f); box-shadow: 0 6px 0 #b5701f, 0 10px 20px rgba(217,134,47,.3);
}
.card-detail-deck-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b5701f, 0 4px 10px rgba(217,134,47,.25); }
.card-detail-deck-btn.in-deck {
  color: #12331f; background: linear-gradient(180deg, #7ee5ad, #3fae6f); box-shadow: 0 6px 0 #2c7d51, 0 10px 20px rgba(63,174,111,.3);
}
.card-detail-deck-btn.in-deck:active { box-shadow: 0 2px 0 #2c7d51, 0 4px 10px rgba(63,174,111,.25); }

/* Фаза 57: desktop денст мобильного (6 вместо 4-в-ряд) -- раньше тут было repeat(3),
что было реже нового мобильного базового значения 4 -- исправлено. Строка слотов колоды
теперь flex (см. .grimoire-deck-slots выше) и уже показывает все 8 слотов на любой ширине, отдельное
переопределение больше не нужно. */
@media (min-width: 640px) {
  .lane-clash-grimoire-grid.grimoire-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ==========================================================================================
   Фаза 47: «Кристальный гримуар» -- карточная система питомцев (замена ручной экипировки по
   слотам). Переиспользует существующие токены .arena-equipment.equip-content (--workshop-*,
   --rarity-*[-soft], --eq-cut) для визуальной консистентности с остальным экраном/городом --
   никаких новых цветовых систем не вводится, только структурные классы для грид-а карт,
   прогресс-баров дублей, диамонда уровня и панелей прокачки/реформации поверх того же
   fantasy-forge оформления (Cinzel заголовки, parchment/gold текст, brass рамки).
   ========================================================================================== */
.arena-equipment.equip-content.grimoire-screen .grimoire-active-summary {
  margin-top: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.arena-equipment.equip-content .grimoire-active-summary h2 { margin: 0; font-family: 'Cinzel', 'Georgia', serif; font-size: 15px; color: var(--workshop-parchment); }
.arena-equipment.equip-content .grimoire-active-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.arena-equipment.equip-content .grimoire-active-stats span { font-size: 10.5px; font-weight: 700; color: var(--workshop-muted); background: rgba(0,0,0,.24); border-radius: 999px; padding: 3px 9px; }
.arena-equipment.equip-content .grimoire-active-stats span b { color: var(--workshop-gold); margin-left: 3px; }

.arena-equipment.equip-content .card-rarity-tag {
  display: inline-flex; align-items: center; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--rarity-color, var(--workshop-line));
  color: var(--rarity-color, var(--workshop-muted)); background: var(--rarity-soft, rgba(0,0,0,.24));
}
.arena-equipment.equip-content .card-rarity-tag.rarity-common { --rarity-color: var(--rarity-common); --rarity-soft: var(--rarity-common-soft); }
.arena-equipment.equip-content .card-rarity-tag.rarity-rare { --rarity-color: var(--rarity-rare); --rarity-soft: var(--rarity-rare-soft); }
.arena-equipment.equip-content .card-rarity-tag.rarity-epic { --rarity-color: var(--rarity-epic); --rarity-soft: var(--rarity-epic-soft); }
.arena-equipment.equip-content .card-rarity-tag.rarity-legendary { --rarity-color: var(--rarity-legendary); --rarity-soft: var(--rarity-legendary-soft); }

/* Фаза 47 (доп. правка 2): тег раскраски (variant_key) рядом с тегом редкости -- нейтральный (не
   зависит от --rarity-color), так как раскраска и редкость -- ортогональные атрибуты карты. */
.arena-equipment.equip-content .card-variant-tag {
  display: inline-flex; align-items: center; font-size: 9px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--workshop-line); color: var(--workshop-muted);
  background: rgba(0,0,0,.22);
}
.arena-equipment.equip-content .grimoire-card > .card-variant-tag { align-self: center; margin-bottom: 6px; margin-top: -2px; }

.arena-equipment.equip-content .life-spark-panel,
.arena-equipment.equip-content .grimoire-reform-panel {
  border-radius: 18px; padding: 12px 14px; margin-bottom: 12px; background: var(--workshop-card); border: 1px solid var(--workshop-line);
}
.arena-equipment.equip-content .life-spark-panel .panel-title h2,
.arena-equipment.equip-content .grimoire-reform-panel .panel-title h2 {
  display: flex; align-items: center; gap: 6px; margin: 0; font-family: 'Cinzel', 'Georgia', serif; font-size: 13px; color: var(--workshop-gold);
}
.arena-equipment.equip-content .life-spark-panel .panel-title h2 svg { width: 14px; height: 14px; }
.arena-equipment.equip-content .life-spark-panel .panel-title { display: flex; align-items: center; justify-content: space-between; }
.arena-equipment.equip-content .life-spark-panel .count { font-size: 12px; font-weight: 800; color: var(--workshop-parchment); }
.arena-equipment.equip-content .life-spark-panel .arena-note,
.arena-equipment.equip-content .grimoire-reform-panel .arena-note { margin: 6px 0 0; font-size: 11px; color: var(--workshop-muted); line-height: 1.4; }

.arena-equipment.equip-content .grimoire-reform-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.arena-equipment.equip-content .grimoire-reform-btn,
.arena-equipment.equip-content .grimoire-btn {
  font-family: 'Manrope', 'Inter', sans-serif; font-weight: 800; font-size: 12px; color: #2a140a; cursor: pointer; min-height: 0;
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
  border: 1px solid var(--workshop-gold-2); border-radius: 999px; padding: 10px 14px; box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.arena-equipment.equip-content .grimoire-btn.small { padding: 7px 11px; font-size: 10.5px; }
.arena-equipment.equip-content .grimoire-btn.ghost { background: var(--workshop-card-2); color: var(--workshop-parchment); border-color: var(--workshop-line); box-shadow: none; }
.arena-equipment.equip-content .grimoire-btn:disabled,
.arena-equipment.equip-content .grimoire-reform-btn:disabled { opacity: .4; cursor: not-allowed; }
.arena-equipment.equip-content .grimoire-btn.primary { background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); }

/* Грид карт -- 2 колонки на мобиле (совпадает с прежней slots-grid раскладкой), 3+ на десктопе
   через тот же брейкпоинт, что и остальные сетки экрана (см. media query ниже). */
.arena-equipment.equip-content .grimoire-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.arena-equipment.equip-content .grimoire-card {
  position: relative; display: flex; flex-direction: column; padding: 12px 10px 12px; border-radius: 18px;
  border: 1.5px solid var(--rarity-color, var(--workshop-line));
  background: linear-gradient(165deg, var(--rarity-soft, rgba(157,180,201,.14)) 0%, var(--workshop-card) 78%);
  box-shadow: 0 0 0 1px var(--rarity-soft, transparent) inset, 0 10px 22px rgba(0,0,0,.3);
}
.arena-equipment.equip-content .grimoire-card.rarity-common { --rarity-color: var(--rarity-common); --rarity-soft: var(--rarity-common-soft); }
.arena-equipment.equip-content .grimoire-card.rarity-rare { --rarity-color: var(--rarity-rare); --rarity-soft: var(--rarity-rare-soft); }
.arena-equipment.equip-content .grimoire-card.rarity-epic { --rarity-color: var(--rarity-epic); --rarity-soft: var(--rarity-epic-soft); }
.arena-equipment.equip-content .grimoire-card.rarity-legendary { --rarity-color: var(--rarity-legendary); --rarity-soft: var(--rarity-legendary-soft); }
.arena-equipment.equip-content .grimoire-card.equipped { border-color: #7ee5ad; box-shadow: 0 0 0 2px rgba(126,229,173,.35), 0 0 18px rgba(126,229,173,.4), 0 10px 22px rgba(0,0,0,.3); }
.arena-equipment.equip-content .grimoire-card-art { width: 74px; height: 74px; margin: 0 auto 6px; position: relative; }
.arena-equipment.equip-content .grimoire-card-art .pet-layers { position: relative; width: 100%; height: 100%; }
.arena-equipment.equip-content .grimoire-card-art .pet-layer { filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.arena-equipment.equip-content .grimoire-card > .card-rarity-tag { align-self: center; margin-bottom: 6px; }
.arena-equipment.equip-content .grimoire-card-active-pill {
  position: absolute; top: 8px; right: 8px; font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: #163422; background: #7ee5ad; border-radius: 999px; padding: 2px 7px;
}
.arena-equipment.equip-content .grimoire-card-body { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.arena-equipment.equip-content .grimoire-card-name { margin: 0; font-size: 11.5px; font-weight: 800; color: var(--workshop-text); line-height: 1.25; }
.arena-equipment.equip-content .level-diamond {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 2px 0;
  transform: rotate(45deg); border-radius: 7px; font-size: 11px; font-weight: 800; color: #2a140a;
  background: linear-gradient(135deg, var(--rarity-color, var(--workshop-gold)), var(--workshop-gold-2));
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
}
.arena-equipment.equip-content .level-diamond > * { transform: rotate(-45deg); }
.arena-equipment.equip-content .card-rarity-fill-wrap { width: 100%; height: 5px; border-radius: 999px; background: rgba(0,0,0,.32); overflow: hidden; margin-top: 2px; }
.arena-equipment.equip-content .card-rarity-fill { height: 100%; border-radius: 999px; transition: width .3s ease; }
.arena-equipment.equip-content .card-rarity-fill.rarity-common { background: #8a99a8; }
.arena-equipment.equip-content .card-rarity-fill.rarity-rare { background: linear-gradient(90deg, #3d7fa8, #8ef7ff); }
.arena-equipment.equip-content .card-rarity-fill.rarity-epic { background: linear-gradient(90deg, #8a4fc9, #ff9bf0); }
.arena-equipment.equip-content .card-rarity-fill.rarity-legendary { background: linear-gradient(90deg, #d9a13a, #ffe29a); }
.arena-equipment.equip-content .grimoire-card-dupes { font-size: 9px; color: var(--workshop-muted); }
.arena-equipment.equip-content .grimoire-card-maxed { margin: 2px 0 0; font-size: 9.5px; font-weight: 800; color: var(--workshop-gold); text-transform: uppercase; letter-spacing: .03em; }
.arena-equipment.equip-content .upgrade-hint { margin: 2px 0 0; font-size: 9.5px; font-weight: 800; color: #7ee5ad; animation: grimoire-pulse 1.4s ease-in-out infinite; }
.arena-equipment.equip-content .grimoire-card-reform-ready { margin: 2px 0 0; font-size: 9px; font-weight: 700; color: var(--workshop-amber); }
.arena-equipment.equip-content .grimoire-card.ready-upgrade { animation: grimoire-card-pulse 1.6s ease-in-out infinite; }
@keyframes grimoire-card-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--rarity-soft, transparent) inset, 0 10px 22px rgba(0,0,0,.3); }
  50% { box-shadow: 0 0 0 2px var(--rarity-color, transparent), 0 0 16px var(--rarity-soft, transparent), 0 10px 22px rgba(0,0,0,.3); }
}
@keyframes grimoire-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.arena-equipment.equip-content .grimoire-card.shake-deny { animation: grimoire-shake .4s ease; }
@keyframes grimoire-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.arena-equipment.equip-content .grimoire-card-actions { display: flex; flex-direction: column; gap: 5px; width: 100%; margin-top: 4px; }
.arena-equipment.equip-content .grimoire-card-actions .grimoire-btn { width: 100%; }

.arena-equipment.equip-content .upgrade-card-panel,
.arena-equipment.equip-content .reform-picker-panel {
  border-radius: 18px; padding: 13px 14px; margin-bottom: 14px; background: var(--workshop-card); border: 1px solid var(--workshop-gold-2);
  box-shadow: 0 14px 28px rgba(0,0,0,.35);
}
.arena-equipment.equip-content .upgrade-card-panel .panel-title,
.arena-equipment.equip-content .reform-picker-panel .panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.arena-equipment.equip-content .upgrade-card-panel h2,
.arena-equipment.equip-content .reform-picker-panel h2 { margin: 0; font-family: 'Cinzel', 'Georgia', serif; font-size: 13px; color: var(--workshop-parchment); }
.arena-equipment.equip-content .upgrade-card-actions { display: flex; gap: 8px; margin-top: 10px; }
.arena-equipment.equip-content .upgrade-card-actions .grimoire-btn { flex: 1; }
.arena-equipment.equip-content .reform-pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.arena-equipment.equip-content .reform-pick-tile {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; border-radius: 14px; cursor: pointer;
  background: var(--workshop-card-2); border: 1.5px solid var(--workshop-line); color: var(--workshop-text); font-size: 9.5px; font-weight: 700; min-height: 0;
}
.arena-equipment.equip-content .reform-pick-tile.picked { border-color: var(--workshop-gold); background: linear-gradient(165deg, rgba(255,207,107,.22), var(--workshop-card-2)); box-shadow: 0 0 0 1px var(--workshop-gold) inset; }
.arena-equipment.equip-content .reform-pick-tile .level-diamond { width: 24px; height: 24px; font-size: 9px; }

@media (min-width: 720px) {
  .arena-equipment.equip-content .grimoire-grid { grid-template-columns: repeat(4, 1fr); }
  .arena-equipment.equip-content .reform-pick-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Фаза 51: полноэкранный режим боя «Стычки отрядов» -- render() подставляет отдельный упрощённый
   .app-shell.lane-clash-fullscreen (без сайдбара/HUD/нижнего меню/чата/оверлеев) на всё время
   активного боя (state.laneClash.screen === 'battle'). Здесь просто убираем стандартные отступы
   .location-content (16px, рассчитан под обычный шелл с HUD) и растягиваем frame-wrap на весь
   вьюпорт без вычитания высоты HUD (92px) и нижнего меню (112px) -- их в этом шелле физически нет. */
.app-shell.lane-clash-fullscreen { height: 100vh; min-height: 100vh; }
.location-content.lane-clash-fullscreen-content { padding: 0; height: 100vh; display: flex; flex-direction: column; }
.location-content.lane-clash-fullscreen-content .lane-clash-battle-frame-wrap { height: 100vh; flex: 1; }
/* Фаза 51: .lane-clash-screen задаёт padding:20px 16px 26px для всех экранов Стычки отрядов
   (выбор режима/результат) -- в полноэкранном шелле боя этот паддинг оставлял видимый серый
   зазор сверху/по бокам вокруг frame-wrap. Обнуляем его строго внутри fullscreen-контейнера и
   растягиваем .lane-clash-screen/.lane-clash-battle на всю высоту, чтобы frame-wrap занимал
   весь экран без полей. */
.location-content.lane-clash-fullscreen-content .lane-clash-screen { padding: 0; height: 100vh; display: flex; flex-direction: column; }
.location-content.lane-clash-fullscreen-content .lane-clash-battle { height: 100vh; display: flex; flex-direction: column; flex: 1; }
/* Фаза 51 (баг с зумом): touch-action:manipulation на самой обёртке -- убирает встроенный
   задержанный-тап-жест браузера в зоне топбара боя (сам iframe ниже уже имеет touch-action:none
   внутри собственного документа) -- дополнительная страховка к динамическому <meta viewport>
   из render(). */
.lane-clash-battle-frame-wrap { touch-action: manipulation; }

/* Фаза 52 (часть A): Резонанс + найм Хранителя -- append-only блок, добавлен строго в конец файла,
   ни один существующий блок style.css не тронут. Панель резонанса (.resonance-panel) переиспользует
   тот же контейнер-скин, что .upgrade-card-panel/.reform-picker-panel (см. блок выше в файле), плюс
   новые правила для сетки хранителей (.keeper-roster-grid/.keeper-roster-tile) и заглушки макс.
   уровня (.resonance-action-maxed). См. docs/reports/ отчёт Фазы 52 (часть A) для контекста. */
.arena-equipment.equip-content .resonance-panel {
  border-radius: 18px; padding: 13px 14px; margin-bottom: 14px; background: var(--workshop-card); border: 1px solid var(--workshop-gold-2);
  box-shadow: 0 14px 28px rgba(0,0,0,.35);
}
.arena-equipment.equip-content .resonance-panel .panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.arena-equipment.equip-content .resonance-panel h2 { margin: 0; font-family: 'Cinzel', 'Georgia', serif; font-size: 13px; color: var(--workshop-parchment); }
.arena-equipment.equip-content .resonance-panel .card-rarity-fill-wrap { margin: 8px 0 10px; height: 7px; }
.arena-equipment.equip-content .resonance-panel > .grimoire-btn { width: 100%; margin-top: 4px; }
.arena-equipment.equip-content .keeper-roster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 2px; }
.arena-equipment.equip-content .keeper-roster-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; cursor: pointer;
  background: var(--workshop-card-2); border: 1.5px solid var(--workshop-line); color: var(--workshop-text); font-size: 9.5px; font-weight: 700; text-align: center; min-height: 0;
}
.arena-equipment.equip-content .keeper-roster-tile:hover { border-color: var(--workshop-gold); }
.arena-equipment.equip-content .keeper-roster-tile:disabled { opacity: .45; cursor: not-allowed; }
.arena-equipment.equip-content .keeper-roster-tile .keeper-name { font-family: 'Cinzel', 'Georgia', serif; font-size: 10px; color: var(--workshop-parchment); }
.arena-equipment.equip-content .keeper-roster-tile .keeper-reduction { color: var(--workshop-gold); font-size: 9px; }
.arena-equipment.equip-content .keeper-roster-tile .keeper-cost { display: flex; align-items: center; gap: 3px; font-size: 9px; opacity: .85; }
.arena-equipment.equip-content .resonance-action-maxed { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.arena-equipment.equip-content .resonance-maxed-note { margin: 0; color: var(--workshop-gold); font-size: 10.5px; }
@media (min-width: 720px) {
  .arena-equipment.equip-content .keeper-roster-grid { grid-template-columns: repeat(3, 1fr); }
}
.arena-equipment.equip-content .keeper-roster-tile .keeper-portrait { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top center; border: 2px solid var(--workshop-line); }

/* Фаза 52 (часть C): «Зал Реликвария» -- сетка 5x5 слотов под осколки/капсулы резонанса, очередь
   переполнения, кнопка расчистки следующей ячейки, модалка предраскрытия капсулы. Append-only блок --
   не редактирует существующие правила выше. Цвета грейдов (grade-1..grade-7) -- собственная шкала,
   отдельная от --rarity-color/--rarity-soft, так как модель Зала принципиально не хранит rarity
   (структурный фикс v3-бага №4 из брифа reliquary_v3_real_integration_brief.md).
   Тайлы «Кристального гримуара» */
.equip-sub-tabs { display: flex; gap: 8px; margin: 10px 0 4px; }
.equip-sub-tabs .arena-tab-btn { flex: 1; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--workshop-line, rgba(255,255,255,.12)); background: var(--surface-2, #242b38); color: var(--muted, #9da7b8); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.equip-sub-tabs .arena-tab-btn.active { background: var(--workshop-gold, #ffcf6b); color: #201405; border-color: transparent; }
.reliquary-hall-screen .reliquary-hall-grid { display: grid; gap: 8px; margin: 12px 0; }
.reliquary-slot { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; border: 1.5px solid var(--workshop-line, rgba(255,255,255,.12)); background: var(--surface-2, #242b38); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; touch-action: none; transition: transform .12s, box-shadow .12s, border-color .12s; }
.reliquary-slot.locked { cursor: not-allowed; opacity: .5; color: var(--muted, #9da7b8); }
.reliquary-slot.empty { border-style: dashed; }
.reliquary-slot.dragging { transform: scale(0.92); box-shadow: 0 0 0 2px var(--workshop-gold, #ffcf6b) inset; }
.reliquary-slot.drop-hint { border-color: var(--accent, #7ee5ad); box-shadow: 0 0 12px rgba(126,229,173,.45); }
.reliquary-grade-badge { font-family: 'Russo One', 'Exo 2', sans-serif; font-size: 15px; letter-spacing: .02em; }
.reliquary-slot.shard { color: #fff; }
.reliquary-slot.shard.grade-1 { background: linear-gradient(155deg, #4b5568, #2c3340); }
.reliquary-slot.shard.grade-2 { background: linear-gradient(155deg, #4a7a63, #24422f); }
.reliquary-slot.shard.grade-3 { background: linear-gradient(155deg, #3f7fa0, #1f4152); }
.reliquary-slot.shard.grade-4 { background: linear-gradient(155deg, #6a5bc4, #352b73); }
.reliquary-slot.shard.grade-5 { background: linear-gradient(155deg, #b9679a, #5c2f52); }
.reliquary-slot.shard.grade-6 { background: linear-gradient(155deg, #d8974a, #7a4c1c); }
.reliquary-slot.shard.grade-7 { background: linear-gradient(155deg, #e0c355, #8a6c15); color: #241a04; }
.reliquary-slot.capsule { flex-direction: column; gap: 3px; color: #fff; background: linear-gradient(160deg, #2c2438, #17131f); border-color: rgba(255,255,255,.16); }
.reliquary-slot.capsule.ready { box-shadow: 0 0 14px rgba(255,207,107,.55); border-color: var(--workshop-gold, #ffcf6b); }
.reliquary-capsule-status { font-size: 9.5px; letter-spacing: .03em; color: var(--muted, #9da7b8); }
.reliquary-capsule-status.ready { color: var(--workshop-gold, #ffcf6b); font-weight: 700; }
.reliquary-queue-row { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, #242b38); border: 1px solid var(--workshop-line, rgba(255,255,255,.1)); }
.reliquary-queue-label { display: block; font-size: 11px; color: var(--muted, #9da7b8); margin-bottom: 6px; }
.reliquary-queue-items { display: flex; flex-wrap: wrap; gap: 6px; }
/* Фикс 53.10 (баг 2, append-only): ограничиваем очередь капсул/осколков ровно 7 в одну строку (JS-лимит
   RELIQUARY_QUEUE_VISIBLE_LIMIT уже равен 7, остальные уходят в надпись-счётчик), раньше капсулы
   переносились на flex-wrap в 2 строки при узкой ширине контейнера (баг 2 из багрепорта, image-2.jpg) --
   жёсткая сетка ровно из 7 колонок всегда даёт 1 строку независимо от ширины элемента. */
.reliquary-queue-items { display: grid; grid-template-columns: repeat(7, 1fr); flex-wrap: unset; gap: 4px; }
.reliquary-queue-item { display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(255,255,255,.08); }
.reliquary-queue-item .misc-icon { width: 12px; height: 12px; }
.reliquary-unlock-btn { width: 100%; margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.reliquary-capsule-modal-overlay { position: fixed; inset: 0; background: rgba(6,8,12,.72); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.reliquary-capsule-modal { max-width: 340px; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.reliquary-capsule-chances { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.reliquary-chance-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 8px; background: var(--surface-2, #242b38); font-size: 12.5px; }
.reliquary-chance-row b { color: var(--workshop-gold, #ffcf6b); }
@media (min-width: 720px) {
  .reliquary-hall-screen .reliquary-hall-grid { max-width: 460px; margin-inline: auto; }
}

/* Фаза 52 (часть D): вкладка «Экспедиции» карт питомца (append-only, отдельный блок в конце
   файла — не трогает предыдущие блоки Зала Реликвария (часть C) выше). */
.reliquary-expedition-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.reliquary-expedition-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2, #242b38); border: 1px solid var(--workshop-line, rgba(255,255,255,.1)); }
.reliquary-expedition-icon { flex: 0 0 auto; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--muted, #9da7b8); }
.reliquary-expedition-icon img { width: 30px; height: 30px; object-fit: contain; }
.reliquary-expedition-info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.reliquary-expedition-name { font-weight: 700; font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reliquary-expedition-meta { font-size: 11.5px; color: var(--muted, #9da7b8); }
.reliquary-expedition-action { flex: 0 0 auto; min-width: 84px; padding: 9px 14px; border-radius: 10px; border: none; font-weight: 700; font-size: 12.5px; letter-spacing: .01em; cursor: pointer; background: var(--accent, #7ee5ad); color: #10241a; text-align: center; }
.reliquary-expedition-action.is-running { background: rgba(255,255,255,.08); color: var(--muted, #9da7b8); cursor: default; font-family: 'Russo One', 'Exo 2', sans-serif; letter-spacing: .03em; }
.reliquary-expedition-action.is-ready { background: var(--workshop-gold, #ffcf6b); color: #241a04; box-shadow: 0 0 12px rgba(255,207,107,.45); }
/* Фикс 53.10 (баг 3, append-only): кнопка «Отправить» остальных маршрутов теперь получает реальный
   disabled, когда в том же блоке (питомец/заклинания) уже есть активная экспедиция
   (см. masterCraftExpeditionsView() -> hasRunningInBlock, app.js) -- раньше визуально оставалась
   активной/кликабельной на вид, ничего не подсказывая, что заблокирована (баг 3 из
   багрепорта, image-3.jpg). :not(.is-running) исключает уже выполняемую экспедицию
   (у неё свой стиль выше). */
.reliquary-expedition-action:disabled:not(.is-running) {
  background: rgba(255,255,255,.08); color: var(--muted, #9da7b8); opacity: .55; box-shadow: none; cursor: not-allowed;
}
.master-craft-expedition-block .reliquary-expedition-action:disabled:not(.is-running) {
  background: var(--workshop-card-2); color: var(--workshop-muted); border-color: var(--workshop-line); box-shadow: none; opacity: .6; cursor: not-allowed;
}
.reliquary-expedition-action:disabled { opacity: .85; }
@media (min-width: 720px) {
  .reliquary-expedition-screen .reliquary-expedition-list { max-width: 460px; margin-inline: auto; }
}

/* Фикс 53.10 (баг 4, append-only): кольцо-индикатор вскрытия капсулы в едином зале реликвария
   (data-relic-hall-capsule-ring, см. relicHallSlotTile() в app.js) -- зеркалит прототип 'Реликварий
   осколков v3' (image-5.jpg из багрепорта): оранжевое кольцо вокруг капсулы, заполняется
   по часовой по мере вскрытия (--capsule-ring-pct от 0 до 100, тикается в JS каждую секунду
   без релоада, см. startRelicHallCapsuleTicking()). Кольцо -- круг с вырезанным через mask
   центром (донат), поэтому не перекрывает иконку/бейдж в центре тайла. .reliquary-slot
   уже position: relative в исходном блоке выше, поэтому здесь только позиционирование самого кольца. */
.reliquary-capsule-ring {
  --capsule-ring-pct: 0;
  position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 50%;
  background: conic-gradient(var(--workshop-amber, #f0a24e) calc(var(--capsule-ring-pct) * 1%), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3.5px));
  transition: background .2s linear;
}
/* Бейдж грейда на обрабатываемой капсуле получает зелёную обводку -- точно как на кадре image-5.jpg
   (отличает вскрывающуюся капсулу от закрытых/готовых соседей в сетке). */
.reliquary-grade-badge.processing {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 3px;
  border-radius: 50%; border: 1.5px solid var(--accent, #7ee5ad); background: rgba(16,20,28,.55);
}
.master-craft-hall-block .reliquary-capsule-ring { -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); }

/* Фаза 52 (часть C, фикс): иконка предмета в ячейке Зала Реликвария (append-only, отдельный
   блок в конце файла — не трогает исходный блок Зала Реликвария выше). Осколок/капсула теперь
   показывают фоновую иконку предмета, поверх которой лежит бейдж грейда (см. .reliquary-grade-badge
   в исходном блоке) — сам бейдж не меняется, просто добавляется иконка под ним. */
.reliquary-slot-icon { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; pointer-events: none; z-index: 0; }
.reliquary-slot.shard, .reliquary-slot.capsule { overflow: hidden; }
.reliquary-slot .reliquary-grade-badge { position: relative; z-index: 1; }
.reliquary-slot.capsule .reliquary-capsule-status { position: relative; z-index: 1; }

/* Фаза 52 (часть C, addendum «Пункт 3»): интро-панель Хранителя Реликвария + «Дар Хранителя» +
   тулбар массовых действий (append-only, отдельный блок в конце файла — не трогает исходные
   блоки Зала Реликвария выше). */
.reliquary-keeper-hero { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 10px 0; border-radius: 14px; background: var(--surface-2, #242b38); border: 1px solid var(--workshop-line, rgba(255,255,255,.1)); }
.reliquary-keeper-portrait { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 2px solid var(--workshop-gold, #ffcf6b); }
.reliquary-keeper-portrait img { width: 100%; height: 100%; object-fit: cover; }
.reliquary-keeper-info { flex: 1 1 auto; min-width: 0; }
.reliquary-keeper-name { display: block; font-weight: 700; font-size: 12.5px; color: var(--workshop-gold, #ffcf6b); letter-spacing: .01em; margin-bottom: 3px; }
.reliquary-keeper-quote { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--muted, #9da7b8); font-style: italic; }
.reliquary-daily-gift { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 10px 0; border-radius: 14px; background: var(--surface-2, #242b38); border: 1px solid rgba(255,207,107,.35); }
.reliquary-daily-gift.is-claimed { border-color: var(--workshop-line, rgba(255,255,255,.1)); opacity: .82; }
.reliquary-daily-gift-icon { flex: 0 0 auto; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.reliquary-daily-gift-icon img { width: 30px; height: 30px; object-fit: contain; }
.reliquary-daily-gift-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reliquary-daily-gift-title { font-weight: 700; font-size: 12.5px; color: #fff; }
.reliquary-daily-gift-sub { font-size: 11px; color: var(--muted, #9da7b8); }
.reliquary-daily-gift-btn { flex: 0 0 auto; min-width: 74px; padding: 8px 12px; font-size: 12px; }
.reliquary-daily-gift-btn:disabled { opacity: .7; }
.reliquary-hall-toolbar { display: flex; gap: 8px; margin: 8px 0 12px; }
.reliquary-toolbar-btn { flex: 1 1 0; padding: 9px 10px; font-size: 12px; }
.reliquary-toolbar-btn:disabled { opacity: .55; }
@media (min-width: 720px) {
  .reliquary-hall-screen .reliquary-keeper-hero, .reliquary-hall-screen .reliquary-daily-gift, .reliquary-hall-screen .reliquary-hall-toolbar { max-width: 460px; margin-inline: auto; }
}

/* Фаза 52 (часть E): резонанс/найм Хранителя для карт-заклинаний Гримуара Стычки отрядов --
   append-only, ни один существующий блок style.css не тронут. Панель резонанса переиспользует
   класс .resonance-panel/.keeper-roster-grid/.keeper-roster-tile, но без обёртки .arena-equipment.equip-content
   (лэйаут Гримуара Стычки отрядов -- отдельный, не через equipmentView()), поэтому здесь -- свой,
   более узкий набор правил под .lane-clash-grimoire-screen. */
.lane-clash-card-tile .card-tile-hint { font-size: 8.5px; color: var(--lc-muted); text-align: center; line-height: 1.15; margin-top: 2px; }
.lane-clash-card-tile .card-tile-maxed { margin: 2px 0 0; font-size: 9px; font-weight: 800; color: var(--lc-gold); text-transform: uppercase; letter-spacing: .03em; }
/* Фаза 73.1 (фикс по фидбеку): дробь X/Y дублей и стрелка-готовность -- восстановлены для
   компактной плитки (были только в модалке через .card-detail-stars-block). */
.lane-clash-card-tile .card-tile-dupes-frac { font-size: 9.5px; font-weight: 800; color: var(--lc-ink); margin: 0; line-height: 1.1; }
.lane-clash-card-tile .card-tile-ready-arrow { color: #ffb545; font-size: 7.5px; vertical-align: 1px; animation: grimoire-pulse 1.4s ease-in-out infinite; }
.lane-clash-card-tile .card-rarity-fill-wrap { width: 100%; height: 5px; border-radius: 999px; background: rgba(0,0,0,.32); overflow: hidden; margin-top: 2px; }
.lane-clash-card-tile .card-rarity-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--rarity-color, var(--lc-gold)), var(--lc-gold)); }
.lane-clash-card-tile.ready-upgrade { animation: grimoire-card-pulse 1.6s ease-in-out infinite; }
.lane-clash-grimoire-screen .resonance-panel {
  margin-top: 14px; padding: 14px; border-radius: 16px; border: 1px solid var(--lc-line); background: var(--lc-panel-deep);
}
.lane-clash-grimoire-screen .resonance-panel .panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.lane-clash-grimoire-screen .resonance-panel h2 { margin: 0; font-size: 13px; color: var(--lc-ink); }
.lane-clash-grimoire-screen .resonance-panel .card-rarity-fill-wrap { margin: 8px 0 10px; height: 7px; }
.lane-clash-grimoire-screen .resonance-panel > .grimoire-btn { width: 100%; margin-top: 4px; }
.lane-clash-grimoire-screen .keeper-roster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 2px; }
.lane-clash-grimoire-screen .keeper-roster-tile {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px;
  border: 1px solid var(--lc-line); background: var(--lc-panel); color: inherit;
}
.lane-clash-grimoire-screen .keeper-roster-tile:hover { border-color: var(--lc-gold); }
.lane-clash-grimoire-screen .keeper-roster-tile:disabled { opacity: .45; cursor: not-allowed; }
.lane-clash-grimoire-screen .keeper-roster-tile .keeper-name { font-size: 10px; color: var(--lc-ink); }
.lane-clash-grimoire-screen .keeper-roster-tile .keeper-reduction { color: var(--lc-gold); font-size: 9px; }
.lane-clash-grimoire-screen .keeper-roster-tile .keeper-cost { display: flex; align-items: center; gap: 3px; font-size: 9px; opacity: .85; }
.lane-clash-grimoire-screen .keeper-roster-tile .keeper-portrait { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top center; border: 2px solid var(--lc-line); }

/* Фаза 52 (правка темы «Стычки отрядов»): пользователь сообщил, что весь SPA-слой Стычки
   отрядов (не только новый Зал Гримуара/Экспедиции Части E-F, а вообще все экраны -- выбор
   режима, сборка колоды, коллекция карт, результат боя) визуально выбивается фиолетово-синей
   палитрой `--lc-*` на фоне тёплой коричнево-янтарной темы остальной игры (Реликварий/
   Мастерская/т.д.). Правка №1 (только Гримуар/Экспедиции) была отменена и расширена этим
   append-only блоком по прямому уточнению пользователя в этой сессии: перекрашиваем ВЕСЬ
   `.lane-clash-screen`/`.lane-clash-grimoire-screen` целиком, переопределяя сами переменные
   `--lc-*` на тёплые эквиваленты (см. `--workshop-*` в шапке файла) вместо переписывания
   каждого правила по отдельности -- ничего выше не редактируется, значения переменных внутри
   исходного `:root` (строки ~6856-6860) остаются как есть для любого другого потребителя.
   Редкости карт (`--lc-rarity-*`) НЕ трогаем -- это функциональная маркировка, не тема экрана.
   Собственный инлайн-CSS движков боя (concept-b/c-pro-v2 внутри iframe) не переопределяется --
   вне зоны действия этого блока (iframe -- отдельный документ). */
.lane-clash-screen,
.lane-clash-grimoire-screen {
  --lc-bg: #1b130c;
  --lc-panel: var(--workshop-card, rgba(37, 26, 21, .86));
  --lc-panel-deep: var(--workshop-card-2, rgba(20, 14, 11, .7));
  --lc-line: var(--workshop-line, rgba(214, 150, 90, .22));
  --lc-ink: var(--workshop-text, #f3e6d8);
  --lc-muted: var(--workshop-muted, #b9a08d);
  --lc-violet: var(--workshop-gold, #ffcf6b);
  --lc-violet-2: var(--workshop-amber-2, #d9862f);
  --lc-gold: var(--workshop-gold, #ffcf6b);
}
/* Тумблер «Питомец / Стычка отрядов» (`.collection-subtabs`, общий компонент) уже читает
   `--lc-violet`/`--lc-violet-2` -- но лежит СНАРУЖИ `.lane-clash-grimoire-screen` (сосед в общей
   панели overlayWrapper()), поэтому переопределение выше до него не доходит по каскаду. Скоупим
   через `:has()` строго на состояние "открыта вкладка Стычка отрядов" (кнопка с этим
   data-атрибутом получает .active только в этом состоянии) -- панель питомца не затрагивается. */
.collection-subtabs:has(.collection-subtab-btn.active[data-collection-subtab="lane_clash"]) {
  --lc-violet: var(--workshop-gold, #ffcf6b);
  --lc-violet-2: var(--workshop-amber-2, #d9862f);
}
.collection-subtabs:has(.collection-subtab-btn.active[data-collection-subtab="lane_clash"]) .collection-subtab-btn.active {
  color: #201405;
  box-shadow: 0 6px 14px rgba(217, 134, 47, .35);
}
/* Активная под-вкладка "Карты"/"Зал Гримуара"/"Экспедиции" рендерится тем же общим классом
   `.arena-tab-btn`, что и питомец -- но у общей арена-темы (`.arena-equipment-tabs.tabs
   .arena-tab-btn.active`, циан) на одну вложенную группу классов больше и она перебивает тёплое
   правило `.equip-sub-tabs .arena-tab-btn.active` по специфичности CSS, даже в контексте Стычки
   отрядов. Скоупим по data-lane-clash-subtab (используется только в разметке Стычки отрядов,
   never на вкладках питомца, см. laneClashSubTabsHtml() в app.js) с специфичностью выше исходной
   циановой арена-темы, чтобы гарантированно победить её именно здесь, не трогая вкладки питомца. */
.equip-sub-tabs:has([data-lane-clash-subtab]) .arena-tab-btn.active {
  background: var(--workshop-gold, #ffcf6b);
  color: #201405;
  border-color: transparent;
}
.equip-sub-tabs:has([data-lane-clash-subtab]) .arena-tab-btn:not(.active) {
  background: var(--surface-2, #242b38);
  color: var(--muted, #9da7b8);
  border-color: var(--workshop-line, rgba(255,255,255,.12));
}

/* Фаза 52 (доп. фикс темы): модалка капсулы Реликвария/Гримуара (append-only). Класс
   .reliquary-capsule-modal уникален для этой модалки и используется ОБА раза -- и для
   капсул питомца (Часть C), и для капсул карт-заклинаний (Часть F/Гримуар) -- поэтому один
   этот блок правит обе версии сразу. Раньше модалка наследовала общий .panel.arena-panel
   (серо-синий градиент + голубая рамка arena-line), никак не связанный с тёплой темой
   Реликвария/Гримуара -- теперь у неё тёплый тёмно-коричневый фон с янтарной рамкой, как в
   прототипе qa/13_desktop_capsule_preopen_modal.png. */
.reliquary-capsule-modal {
  background: radial-gradient(120% 140% at 50% -10%, rgba(255, 154, 61, .16), transparent 55%),
    linear-gradient(165deg, var(--workshop-surface-2, #2e1f18), var(--workshop-bg-2, #241713));
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
  clip-path: none;
  box-shadow: inset 0 1px rgba(255, 207, 107, .1), 0 12px 28px rgba(0, 0, 0, .45);
}
.reliquary-capsule-modal .panel-title h2 {
  color: var(--workshop-gold, #ffcf6b);
}
.reliquary-capsule-modal .panel-title .icon-button {
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  color: var(--workshop-parchment, #e8d9b8);
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
}
.reliquary-capsule-modal .arena-note {
  color: var(--workshop-muted, #b9a08d);
}
.reliquary-capsule-modal .reliquary-chance-row {
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
  color: var(--workshop-parchment, #e8d9b8);
}
.reliquary-capsule-modal .reliquary-chance-row b {
  color: var(--workshop-gold, #ffcf6b);
}
.reliquary-capsule-modal .grimoire-btn.ghost {
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  color: var(--workshop-parchment, #e8d9b8);
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
  box-shadow: none;
}
.reliquary-capsule-modal .grimoire-btn.ghost:not(:disabled):hover {
  border-color: var(--workshop-gold, #ffcf6b);
  color: var(--workshop-gold, #ffcf6b);
}

/* Фаза 53 (append-only): экран «Мастерская» переиспользует .grimoire-grid/.reliquary-hall-grid
   вне их старых обёрток (.arena-equipment.equip-content / .lane-clash-grimoire-grid /
   .reliquary-hall-screen / .reliquary-expedition-screen), поэтому их правила display:grid не
   попадают под старые селекторы. Скоупим те же значения на новые классы-обёртки Мастерской,
   ничего в исходных правилах не меняя. */
/* Фаза 85 (п.1, фикс по фидбеку): по требованию пользователя вернули компактную ГОРИЗОНТАЛЬНО-
   СКРОЛЛИРУЕМУЮ ленту (как старый .ws-equip-grid) ВМЕСТО CSS-грида Фазы 84 (2 моб./4 десктоп) --
   тот грид делал плитки слишком большими. Визуальное наполнение самой плитки (арт на всю плитку,
   скрим, бейджи, нижний оверлей -- см. .master-craft-tile ниже) остаётся без изменений, меняется
   только контейнер и фиксированная ширина плитки. */
.master-craft-cards-grid.grimoire-grid {
  display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 10px; margin-bottom: 16px;
  padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.master-craft-cards-grid.grimoire-grid::-webkit-scrollbar { display: none; }
/* Фаза 84 (п.2): полностью новая плитка карты Мастерской -- арт на всю плитку (как боевая карта
   в Коллекции/Стычке отрядов), а не иконка+текст старого .ws-equip-card. Копирует композицию
   .grimoire-deck-slot-filled (слот колоды): изображение object-fit:cover абсолютно на всю плитку,
   тёмный скрим снизу для читаемости, мана/уровень -- ромбы в верхних углах, название + статус/
   прогрессбар -- нижний оверлей поверх скрима. .master-craft-source-badge (кот/искра, левый верхний
   угол) поверх арта -- т.к. плитка теперь сама position:relative, отдельная обёртка не нужна.
   Фаза 85 (п.1): ширина стала фиксированной (компактная плитка ленты) вместо width:100% (ячейка
   грида) -- см. комментарий выше про возврат к горизонтальному скроллу. */
.master-craft-tile {
  position: relative; display: block; flex: 0 0 112px; width: 112px; aspect-ratio: 3/4; border-radius: 14px; padding: 0;
  overflow: hidden; cursor: pointer; text-align: left; min-width: 0;
  border: 1.5px solid var(--rarity-color, var(--lc-line, rgba(214,150,90,.3)));
  background: linear-gradient(165deg, var(--rarity-soft, rgba(157,180,201,.14)) 0%, rgba(10,7,5,.55) 78%);
  box-shadow: 0 0 0 1px var(--rarity-soft, transparent) inset, 0 10px 22px rgba(0,0,0,.3);
}
@media (max-width: 479px) {
  .master-craft-tile { flex-basis: 98px; width: 98px; }
}
.master-craft-tile.master-craft-tile--active { box-shadow: 0 0 0 2px var(--workshop-gold, #ffcf6b), 0 10px 22px rgba(0,0,0,.3); }
.master-craft-tile-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.master-craft-tile-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 62%; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(4,8,14,.94) 0%, rgba(4,8,14,.55) 55%, transparent 100%);
}
.master-craft-tile .master-craft-source-badge { top: 4px; left: 4px; width: 20px; height: 20px; z-index: 3; }
/* Ромбы маны/уровня -- та же геометрия, что и .lane-clash-card-tile/.grimoire-deck-slot-filled
   (см. style.css выше), но правый верхний угол зарезервирован под уровень, левый -- под источник
   (кот/искра), поэтому мана (только у заклинаний) смещена чуть правее источника, а не в самый угол. */
.master-craft-tile .card-mana-badge {
  position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 6px; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ff8fd6, #9a4fe0); border: 2px solid rgba(255,255,255,.5);
  transform: rotate(45deg); box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.master-craft-tile .card-mana-badge span { display: block; transform: rotate(-45deg); font-size: 9px; font-weight: 900; color: #fff; }
.master-craft-tile .card-tile-level-diamond {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 6px; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ffe29a, #d9862f); border: 2px solid rgba(255,255,255,.5);
  transform: rotate(45deg); box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.master-craft-tile .card-tile-level-diamond span { display: block; transform: rotate(-45deg); font-size: 9px; font-weight: 900; color: #3a2205; }
.master-craft-tile-bottom { position: absolute; left: 5px; right: 5px; bottom: 5px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.master-craft-tile-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%;
  font-size: 10px; font-weight: 800; line-height: 1.15; max-height: 2.3em;
  color: #f2f8ff; text-align: center; overflow: hidden; word-break: break-word;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}
.master-craft-tile-status {
  display: flex; align-items: center; justify-content: center; gap: 3px; width: 100%;
  font-size: 8.5px; font-weight: 700; color: var(--workshop-muted, #b8a9a0); text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}
.master-craft-tile-status .ws-equip-mini-icon { width: 10px; height: 10px; flex-shrink: 0; }
.master-craft-tile-status .ws-icon.is-ready, .master-craft-tile-status svg.is-ready { color: var(--workshop-green, #7ee5ad); }
.master-craft-tile.ws-equip-card--ready .master-craft-tile-status { color: var(--workshop-green, #7ee5ad); }
.master-craft-tile.ws-equip-card--max .master-craft-tile-status { color: var(--workshop-gold, #ffcf6b); }
.master-craft-tile .ws-equip-heatbar { display: block; width: 100%; height: 4px; border-radius: 999px; background: rgba(0,0,0,.45); overflow: hidden; margin-top: 1px; }
.master-craft-tile .ws-equip-heatbar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--workshop-gold, #ffcf6b), var(--workshop-amber, #ff9f43)); }
.master-craft-tile .ws-equip-heatbar-fill--keeper { background: linear-gradient(90deg, #7ee5ad, #3fb87a); }
/* --rarity-color/--rarity-soft задаются инлайн-стилем из workshopRarityColor()/workshopRaritySoft() (тот
   же источник, что и у старого .ws-equip-card) -- отдельные .rarity-* классы не нужны, т.к.
   инлайн всегда их перекрывает; класс rarity-${rarity} на кнопке оставлен только для
   семантики/отладки (как у .lane-clash-card-tile.rarity-*). */
.master-craft-hall-block .reliquary-hall-grid { display: grid; gap: 8px; margin: 12px 0; }
.master-craft-hall-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 720px) {
  .master-craft-hall-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.master-craft-hall-block { min-width: 0; }
/* Фаза 53.4 (Задача 3): объединённый Зал -- один блок вместо двух колонок, поэтому на десктопе
   отключаем 2-колоночную сетку выше (оставляла бы пустой второй трек) и расширяем внутреннюю
   сетку осколков до большего числа колонок на широких экранах, чтобы объединённая сетка не
   выглядела узкой колонкой посреди пустого места. */
.master-craft-hall-columns.single-column { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin-inline: auto; }
@media (min-width: 720px) {
  .master-craft-hall-columns.single-column { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
}
.master-craft-hall-unlock-row { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
@media (min-width: 480px) {
  .master-craft-hall-unlock-row { flex-direction: row; }
  .master-craft-hall-unlock-row .reliquary-unlock-btn, .master-craft-hall-unlock-row .arena-note { flex: 1 1 0; }
}
.reliquary-hall-toolbar { flex-wrap: wrap; }
.master-craft-expedition-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 720px) {
  .master-craft-expedition-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.master-craft-expedition-block { min-width: 0; }
.master-craft-expedition-block .reliquary-expedition-card { min-width: 0; }
.master-craft-expedition-block .reliquary-expedition-info { min-width: 0; }
.master-craft-card-wrap { position: relative; }
.master-craft-source-badge { position: absolute; top: 6px; left: 6px; z-index: 2; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--workshop-card-2, rgba(20, 14, 11, .7)); border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22)); color: var(--workshop-gold, #ffcf6b); pointer-events: none; }
.master-craft-source-badge .misc-icon { width: 13px; height: 13px; }
/* Компактные карточки резонанса в новой Мастерской переиспользуют .ws-equip-icon (см. .ws-root .ws-equip-icon
   в блоке старой закалки выше), но карты питомца рендерятся через petArtHtml() -- составной .pet-layers
   (position:relative без явного размера), а не одиночный <img> -- без этого правила слои были невидимы
   (0x0), т.к. ни одно существующее правило .pet-layers не скоуплено на .ws-equip-icon. */
.ws-root .ws-equip-icon .pet-layers { position: relative; width: 100%; height: 100%; }
.ws-root .ws-equip-icon .pet-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* Заголовок выбранной карты в верхней панели резонанса (эталон -- .ws-active-summary из workshopHeroScreen()) --
   .master-craft-selected-icon переиспользует тот же .icon-frame-wrap, что и старый эквип-тайминг, но карты
   питомца рендерятся через составной .pet-layers, которому, как и выше, нужен явный размер. */
.ws-root .master-craft-selected-icon { width: 64px; height: 64px; }
.ws-root .master-craft-selected-icon .pet-layers { position: relative; width: 100%; height: 100%; }
.ws-root .master-craft-selected-icon .pet-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* Активные под-вкладки «Мастерской» (Карты/Зал/Экспедиции) используют тот же .arena-tab-btn, что
   и общая арена-тема (циан) -- по той же причине специфичности, что описано выше для
   Стычки отрядов, скоупим тёплую тему по data-workshop-subtab. */
.equip-sub-tabs:has([data-workshop-subtab]) .arena-tab-btn.active {
  background: var(--workshop-gold, #ffcf6b);
  color: #201405;
  border-color: transparent;
}
.equip-sub-tabs:has([data-workshop-subtab]) .arena-tab-btn:not(.active) {
  background: var(--surface-2, #242b38);
  color: var(--muted, #9da7b8);
  border-color: var(--workshop-line, rgba(255,255,255,.12));
}
/* Переключатель Основной питомец/Компаньон в Мастерской (petTabs в masterCraftCardsView()) использует
   те же .pet-tabs-wrap/.pet-tabs/.pet-tab, что и equipmentView(), но вне .arena-equipment.equip-content --
   дублируем те же значения на .master-craft-screen. */
.master-craft-screen .pet-tabs-wrap { position: relative; margin: 0 -2px 12px; }
.master-craft-screen .pet-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 0 2px 4px; scrollbar-width: none; }
.master-craft-screen .pet-tabs::-webkit-scrollbar { display: none; }
.master-craft-screen .pet-tab {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px; border: 1px solid var(--workshop-line);
  color: var(--workshop-muted); background: var(--workshop-card-2); padding: 8px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; font-family: 'Manrope', 'Inter', sans-serif; cursor: pointer; white-space: nowrap; min-height: 0;
}
.master-craft-screen .pet-tab svg { width: 14px; height: 14px; flex: 0 0 auto; }
.master-craft-screen .pet-tab.active { color: #2a140a; background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); border-color: var(--workshop-gold-2); font-weight: 800; }

/* Фаза 53.1 (Фикс A, баг из прод-теста): кнопка «Резонировать»/«Автослияние»/«Открыть всё»/«Забрать»
   и панель резонанса теряли все стили в новой «Мастерской», т.к. .grimoire-btn/.resonance-panel/
   .keeper-roster-* были заскоуплены только под .arena-equipment.equip-content (питомец) и
   .lane-clash-grimoire-screen (заклинания) -- ни один из этих классов не встречается в разметке
   .ws-root.master-craft-screen. Дублируем те же правила (append-only, исходные блоки не трогаем)
   под .master-craft-screen, тёплая (workshop) палитра общая для обеих колонок Мастерской. */
.master-craft-screen .grimoire-reform-btn,
.master-craft-screen .grimoire-btn {
  font-family: 'Manrope', 'Inter', sans-serif; font-weight: 800; font-size: 12px; color: #2a140a; cursor: pointer; min-height: 0;
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
  border: 1px solid var(--workshop-gold-2); border-radius: 999px; padding: 10px 14px; box-shadow: 0 4px 10px rgba(0,0,0,.3);
  display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; line-height: 1.3;
}
.master-craft-screen .grimoire-btn.small { padding: 7px 11px; font-size: 10.5px; }
.master-craft-screen .grimoire-btn.ghost { background: var(--workshop-card-2); color: var(--workshop-parchment); border-color: var(--workshop-line); box-shadow: none; }
.master-craft-screen .grimoire-btn:disabled,
.master-craft-screen .grimoire-reform-btn:disabled { opacity: .4; cursor: not-allowed; }
.master-craft-screen .grimoire-btn.primary { background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); }
.master-craft-screen .resonance-panel {
  border-radius: 18px; padding: 13px 14px; margin-bottom: 14px; background: var(--workshop-card); border: 1px solid var(--workshop-gold-2);
  box-shadow: 0 14px 28px rgba(0,0,0,.35);
}
.heat-session {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}
.heat-session .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff9a3d;
    box-shadow: 0 0 6px #ff9a3d;
}
.master-craft-screen .resonance-panel .panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.master-craft-screen .resonance-panel h2 { margin: 0; font-family: 'Cinzel', 'Georgia', serif; font-size: 13px; color: var(--workshop-parchment); }
.master-craft-screen .resonance-panel .card-rarity-fill-wrap { margin: 4px 0 4px; height: 14px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 170, 90, .22);}
.master-craft-screen .resonance-panel > .grimoire-btn { width: 100%; margin-top: 14px; }
.master-craft-screen .keeper-roster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 2px; }
.master-craft-screen .keeper-roster-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; cursor: pointer;
  background: var(--workshop-card-2); border: 1.5px solid var(--workshop-line); color: var(--workshop-text); font-size: 9.5px; font-weight: 700; text-align: center; min-height: 0;
}
.master-craft-screen .keeper-roster-tile:hover { border-color: var(--workshop-gold); }
.master-craft-screen .keeper-roster-tile:disabled { opacity: .45; cursor: not-allowed; }
/* Панель заголовка выбранной карты (master-craft-selected-head/.ws-active-summary) -- в отличие от
   старого workshopHeroScreen(), где .ws-hero-card рисовал фон-картинку предмета за спиной, здесь
   отдельная непрозрачная карточка нужна явно (эталон -- панель "Железный меч" со скриншота
   старой закалки), иначе иконка+название висят прямо на городском фоне экрана без рамки. */
.master-craft-screen .master-craft-selected-head.ws-hero-card {
  min-height: 0; background: var(--workshop-card); border: 1px solid var(--workshop-line); border-radius: 18px;
  box-shadow: 0 14px 28px rgba(0,0,0,.3); margin-bottom: 12px;
}
.master-craft-screen .master-craft-selected-head .ws-active-summary { padding: 13px; margin: 0; }
.master-craft-screen .master-craft-selected-head .badge {
  display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--workshop-gold); background: var(--workshop-card-2); border: 1px solid var(--workshop-line);
  border-radius: 999px; padding: 3px 9px; margin-bottom: 4px;
}
.master-craft-screen .master-craft-selected-head h2 { color: var(--workshop-text); }
.master-craft-screen .resonance-panel--empty { background: var(--workshop-card-2); border: 1px dashed var(--workshop-line); box-shadow: none; }

/* Фаза 53.4 (Задача 2а, фикс регрессии): объединённая карточка резонанса выглядела
   нестилизованной (image-2.jpg). Причина: в Фазе 53.1 выше CSS писался под СТАРУЮ
   разметку, где заголовок выбранной карты рисовался отдельным блоком .master-craft-selected-head >
   .ws-active-summary СНАРУЖИ панели резонанса. В Фазе 53.3 разметка была переписана --
   заголовок теперь рисуется masterCraftResonanceHeadHtml() ПРЯМО ВНУТРИ .resonance-panel через НОВЫЕ
   классы (.master-craft-resonance-head/-badges/-row/-label/-percent/-divider, см. app.js), но
   соответствующий CSS так и не был добавлен -- старый блок выше ссылается на классы,
   которых больше нет в DOM, поэтому ни одно правило из него не применяется. Ниже -- новый
   append-only блок под ФАКТИЧЕСКИ используемые классы (старый блок выше не удаляется/не
   меняется, он просто больше никогда не совпадает с разметкой). Эталон -- image-3.jpg: портрет
   слева, название/редкость/уровень/статы справа от портрета, строка «РЕЗОНАНС» слева +
   процент справа на одной строке. */
.master-craft-resonance-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 4px;
}
.master-craft-resonance-head h2 {
  margin: 0 0 4px; font-family: 'Cinzel', 'Georgia', serif; font-size: 15px; color: var(--workshop-parchment, #f1e4c8); line-height: 1.25;
}
.master-craft-resonance-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.master-craft-resonance-badges .badge {
  display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--workshop-gold, #ffcf6b); background: var(--workshop-card-2, #241a10); border: 1px solid var(--workshop-line, rgba(214,150,90,.22));
  border-radius: 999px; padding: 3px 9px;
}
.master-craft-resonance-divider { height: 1px; margin: 10px 0; background: var(--workshop-line, rgba(214,150,90,.18)); border: none; }
.master-craft-resonance-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0px; }
.master-craft-resonance-label {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--workshop-parchment, #f1e4c8);
}
.master-craft-resonance-percent { font-size: 14px; font-weight: 800; color: var(--workshop-gold, #ffcf6b); }
.master-craft-hire-btn { width: 100%; }
/* masterCraftStatsRowHtml() -- строка статов под заголовком объединённой карточки -- фактические классы
   из app.js: .master-craft-stat-row/.master-craft-stat-pill (единственное число "stat", не "stats") -- тоже
   без собственного CSS до этой правки. */
.master-craft-stat-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.master-craft-stat-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; color: var(--workshop-muted, #b8a684);
  background: var(--workshop-card-2, #241a10); border: 1px solid var(--workshop-line, rgba(214,150,90,.18));
}
.master-craft-stat-pill b { font-size: 11px; color: var(--workshop-parchment, #f1e4c8); text-transform: none; letter-spacing: 0; }

/* Фаза 53.4 (Задача 2б, фикс регрессии): тумблер «Питомцы / Заклинания» (фильтр сетки
   карт в masterCraftCardsView(), классы .master-craft-pill-toggle.master-craft-cards-type-toggle,
   data-master-craft-cards-type) рендерился обычным текстом без pill-оформления (image-2.jpg).
   Причина: существующий pill-CSS скоуплен только под два других конкретных класса -- верхний
   .master-pill-tabs (табы Карты/Зал/Экспедиции) и .master-craft-cards-subtabs (Карты/Реформация) --
   ни один из них не совпадает с классами тумблера Питомцы/Заклинания, поэтому он оставался
   совершенно без стилей. Тот же pill-паттерн, что и у .master-craft-cards-subtabs выше. */
.master-craft-cards-type-toggle {
  background: var(--workshop-card-2); border: 1px solid var(--workshop-line); border-radius: 999px;
  padding: 4px; margin: 4px 0 12px; display: flex; gap: 2px;
}
.master-craft-cards-type-toggle button {
  flex: 1; padding: 9px 10px; border-radius: 999px; border: none; background: transparent;
  color: var(--workshop-muted); font-family: 'Manrope', 'Inter', sans-serif; font-size: 12px;
  font-weight: 700; cursor: pointer; transition: background .15s, color .15s;
}
.master-craft-cards-type-toggle button.active {
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
  color: #2a140a; font-weight: 800; box-shadow: 0 4px 10px rgba(0,0,0,.3);
}

/* Фаза 53.4 (Задача 2в, фикс регрессии): модалка «Нанять Хранителя» (keeperHireModalHtml(),
   классы .modal-overlay.keeper-hire-modal-overlay > .panel.arena-panel.keeper-hire-modal) встраивалась в
   конец страницы под карточками вместо оверлея (image-6.jpg), с огромным изображением,
   вылезающим за экран. Причина: общий класс .modal-overlay, используемый в разметке, НИГДЕ не
   определён в CSS -- стилизованы только конкретные варианты (.lane-clash-modal-overlay,
   .reliquary-capsule-modal-overlay), а .keeper-hire-modal-overlay своего правила тоже не имел -- без
   position:fixed оверлей рендерился как обычный блоковый элемент в потоке документа. Тот же
   паттерн, что и у рабочей модалки капсул (.reliquary-capsule-modal-overlay/.reliquary-capsule-modal). */
.keeper-hire-modal-overlay { position: fixed; inset: 0; background: rgba(6,8,12,.72); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.keeper-hire-modal { max-width: 360px; width: 100%; max-height: 82vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.keeper-hire-subtitle { margin: 0; }
.keeper-hire-list { display: flex; flex-direction: column; gap: 8px; }
.keeper-hire-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px;
  background: var(--workshop-card-2, #241a10); border: 1px solid var(--workshop-line, rgba(214,150,90,.18));
}
.keeper-hire-avatar {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: var(--workshop-card, #1c130c);
  border: 1.5px solid var(--workshop-gold-2, #c98a3d);
}
.keeper-hire-avatar img { width: 100%; height: 100%; object-fit: cover; }
.keeper-hire-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.keeper-hire-info b { font-size: 12.5px; color: var(--workshop-parchment, #f1e4c8); }
.keeper-hire-info small { font-size: 10.5px; color: var(--workshop-muted, #b8a684); }
.keeper-hire-price-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--workshop-gold-2, #c98a3d);
  background: linear-gradient(180deg, var(--workshop-gold, #ffcf6b), var(--workshop-amber-2, #e08a2e)); color: #241a04; font-weight: 800; font-size: 11.5px; cursor: pointer;
}
@media (max-width: 420px) {
  .keeper-hire-avatar { width: 36px; height: 36px; }
}

/* Фаза 87: модалка распределения резонанса (statAllocModalHtml()) -- тот же паттерн
   modal-overlay/panel arena-panel, что и у .keeper-hire-modal выше (position:fixed обязателен,
   иначе оверлей рендерится в потоке документа, см. комментарий к Fixed выше). z-index чуть
   выше keeper-hire-modal-overlay, т.к. открывается поверх неё (оба одновременно не открыты по state,
   но порядок в DOM держим строгим). */
.stat-alloc-modal-overlay { position: fixed; inset: 0; background: rgba(6,8,12,.72); display: flex; align-items: center; justify-content: center; z-index: 61; padding: 16px; }
.stat-alloc-modal { max-width: 380px; width: 100%; max-height: 86vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.stat-alloc-subtitle { margin: 0; }
.stat-alloc-list { display: flex; flex-direction: column; gap: 8px; }
.stat-alloc-row {
  display: grid; grid-template-columns: 84px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 6px;
  padding: 9px 10px; border-radius: 12px; background: var(--workshop-card-2, #241a10);
  border: 1px solid var(--workshop-line, rgba(214,150,90,.18));
}
.stat-alloc-label { grid-column: 1; grid-row: 1; align-self: center; font-size: 12.5px; color: var(--workshop-parchment, #f1e4c8); font-weight: 700; }
.stat-alloc-controls { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.stat-alloc-btn {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--workshop-gold-2, #c98a3d);
  background: var(--workshop-card, #1c130c); color: var(--workshop-gold, #ffcf6b); font-size: 15px; font-weight: 800;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.stat-alloc-btn:disabled { opacity: .35; cursor: not-allowed; }
.stat-alloc-value { min-width: 40px; text-align: center; font-size: 13px; font-weight: 800; color: var(--workshop-parchment, #f1e4c8); }
/* Фаза 96 (баг 6): кнопка MAX -- один клик отдаёт всю ось этому стату, остальные обнуляются. */
.stat-alloc-max-btn {
  flex: 0 0 auto; height: 26px; padding: 0 8px; border-radius: 13px; border: 1px solid var(--workshop-gold-2, #c98a3d);
  background: var(--workshop-card, #1c130c); color: var(--workshop-gold, #ffcf6b); font-size: 10.5px; font-weight: 800;
  letter-spacing: .03em; cursor: pointer; line-height: 1;
}
.stat-alloc-max-btn:disabled { opacity: .35; cursor: not-allowed; }
/* Фаза 97 (багфикс, п.3 брифа): зеркальная кнопка MIN слева от Р-кнопки -- обнуляет ось одним кликом. */
.stat-alloc-min-btn {
  flex: 0 0 auto; height: 26px; padding: 0 8px; border-radius: 13px; border: 1px solid var(--workshop-gold-2, #c98a3d);
  background: var(--workshop-card, #1c130c); color: var(--workshop-gold, #ffcf6b); font-size: 10.5px; font-weight: 800;
  letter-spacing: .03em; cursor: pointer; line-height: 1;
}
.stat-alloc-min-btn:disabled { opacity: .35; cursor: not-allowed; }
/* Фаза 96 (баг 6): реальный перетаскиваемый слайдер вместо статичного прогресс-бара -- заменяет
   .stat-alloc-bar-wrap/.stat-alloc-bar. Нативный range со стилизованным треком/ползунком, чтобы
   визуально не отличаться от прежнего золотого прогресс-бара. */
.stat-alloc-slider {
  grid-column: 1 / span 2; grid-row: 2; width: 100%; height: 18px; margin: 0; padding: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
  /* Фаза 97 (багфикс, п.3 брифа): --stat-fill пробрасывается инлайно на самом input (см. app.js
     statAllocModalHtml()) и обновляется на лету при драге ('input'-событие) -- как CSS custom
     property она наследуется псевдоэлементами трека ниже без перестройки DOM. */
  --stat-fill: 0%;
}
/* Раньше трек был однотонным -- видна была только точка-ползунок, без заливки слева
   от него. Теперь двухцветный linear-gradient с жёсткими стопами на --stat-fill рисует "залитую"
   часть трека золотым, как у прежнего статичного прогресс-бара. */
.stat-alloc-slider::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(to right,
    var(--workshop-gold, #ffcf6b) 0%, var(--workshop-gold, #ffcf6b) var(--stat-fill, 0%),
    rgba(255,255,255,.08) var(--stat-fill, 0%), rgba(255,255,255,.08) 100%);
}
.stat-alloc-slider::-moz-range-track {
  height: 6px; border-radius: 999px; background: rgba(255,255,255,.08);
}
.stat-alloc-slider::-moz-range-progress {
  height: 6px; border-radius: 999px 0 0 999px; background: var(--workshop-gold, #ffcf6b);
}
.stat-alloc-slider::-webkit-slider-thumb {
  -webkit-appearance: none; margin-top: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(90deg, var(--workshop-amber-2, #e08a2e), var(--workshop-gold, #ffcf6b));
  border: 2px solid var(--workshop-card, #1c130c); box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.stat-alloc-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--workshop-card, #1c130c);
  background: linear-gradient(90deg, var(--workshop-amber-2, #e08a2e), var(--workshop-gold, #ffcf6b));
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.stat-alloc-sum-row { display: flex; align-items: center; gap: 8px; }
.stat-alloc-sum {
  flex: 1 1 auto; text-align: center; font-size: 12px; font-weight: 700; padding: 8px; border-radius: 10px;
  background: var(--workshop-card-2, #241a10); border: 1px solid var(--workshop-line, rgba(214,150,90,.18));
}
.stat-alloc-sum.ok { color: #7be08a; border-color: rgba(123,224,138,.4); }
.stat-alloc-sum.warn { color: #ffb85c; border-color: rgba(255,184,92,.4); }
/* Фаза 96 (баг 6): кнопка полного сброса всех осей в 0 рядом со счётчиком суммы. */
.stat-alloc-reset-btn {
  flex: 0 0 auto; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--workshop-line, rgba(214,150,90,.18));
  background: var(--workshop-card-2, #241a10); color: var(--workshop-muted, #b9a08d); font-size: 12px; font-weight: 700; cursor: pointer;
}
.stat-alloc-reset-btn:disabled { opacity: .4; cursor: not-allowed; }
.stat-alloc-confirm-btn { width: 100%; }
.stat-alloc-confirm-btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 420px) {
  .stat-alloc-row { grid-template-columns: 72px 1fr; }
  .stat-alloc-label { font-size: 11.5px; }
  /* Фаза 97 (багфикс, п.3 брифа): с пятью кнопками (MIN/−/значение/+/MAX) ряд перестает
     на узких экранах -- сужаем зазоры и gap, чтобы всё поместилось в одну строку. */
  .stat-alloc-controls { gap: 4px; }
  .stat-alloc-btn { width: 22px; height: 22px; font-size: 13px; }
  .stat-alloc-min-btn, .stat-alloc-max-btn { padding: 0 5px; font-size: 9.5px; height: 22px; }
  .stat-alloc-value { min-width: 30px; font-size: 12px; }
}

/* Фаза 87.1: .stat-alloc-modal наследовал общий .panel.arena-panel (серо-синий градиент + голубая
   рамка arena-line из арены боя), никак не связанный с тёплой темой Мастерской/Реликвария, где живёт
   найм Хранителя -- тот же паттерн переопределения, что и .reliquary-capsule-modal/.keeper-collect-modal
   выше по файлу. Плюс стили превью-строки "было -> станет" (statAllocPreviewRowHtml()). */
.stat-alloc-modal {
  background: radial-gradient(120% 140% at 50% -10%, rgba(255, 154, 61, .16), transparent 55%),
    linear-gradient(165deg, var(--workshop-surface-2, #2e1f18), var(--workshop-bg-2, #241713));
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
  clip-path: none;
  box-shadow: inset 0 1px rgba(255, 207, 107, .1), 0 12px 28px rgba(0, 0, 0, .45);
}
.stat-alloc-modal .panel-title h2 {
  color: var(--workshop-gold, #ffcf6b);
}
.stat-alloc-modal .panel-title .icon-button {
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  color: var(--workshop-parchment, #e8d9b8);
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
}
.stat-alloc-modal .arena-note {
  color: var(--workshop-muted, #b9a08d);
}
.stat-alloc-modal .stat-alloc-row { background: transparent; }
.stat-alloc-modal .stat-alloc-label { color: var(--workshop-parchment, #e8d9b8); }
.stat-alloc-modal .stat-alloc-value { color: var(--workshop-gold, #ffcf6b); }
.stat-alloc-modal .stat-alloc-btn {
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  color: var(--workshop-parchment, #e8d9b8);
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
}
.stat-alloc-modal .stat-alloc-max-btn {
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  color: var(--workshop-gold, #ffcf6b);
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
}
.stat-alloc-modal .stat-alloc-min-btn {
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  color: var(--workshop-gold, #ffcf6b);
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
}
/* Фаза 97 (багфикс, п.3 брифа): раньше этот переопределялил трек однотонным цветом, затирая градиент
   заливки из базового правила выше -- теперь тот же двухцветный градиент на --stat-fill,
   только с цветом незаполненной части под тёмную тему модалки Мастерской. */
.stat-alloc-modal .stat-alloc-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right,
    var(--workshop-gold, #ffcf6b) 0%, var(--workshop-gold, #ffcf6b) var(--stat-fill, 0%),
    var(--workshop-card, rgba(20, 14, 11, .5)) var(--stat-fill, 0%), var(--workshop-card, rgba(20, 14, 11, .5)) 100%);
}
.stat-alloc-modal .stat-alloc-slider::-moz-range-track { background: var(--workshop-card, rgba(20, 14, 11, .5)); }
.stat-alloc-modal .stat-alloc-slider::-moz-range-progress { background: var(--workshop-gold, #ffcf6b); }
.stat-alloc-modal .stat-alloc-sum {
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
}
.stat-alloc-modal .stat-alloc-reset-btn {
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  color: var(--workshop-muted, #b9a08d);
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
}
.stat-alloc-preview-row {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 10px; border-radius: 10px; margin-bottom: 2px;
  background: var(--workshop-card-2, rgba(20, 14, 11, .7)); border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
}
.stat-alloc-preview-pill { color: var(--workshop-muted, #b9a08d); }
.stat-alloc-preview-pill b { color: var(--workshop-parchment, #e8d9b8); font-weight: 700; }
.stat-alloc-preview-pill.changed b { color: var(--workshop-gold, #ffcf6b); }
.stat-alloc-preview-arrow { color: var(--workshop-amber-2, #e08a2e); font-weight: 700; }

/* Фаза 53.1 (Фикс B, баг из прод-теста): вкладка «Экспедиции» расходилась с концептом (image-4):
   .master-craft-expedition-block рендерился без фона/границы (только min-width:0), из-за чего
   городской фон экрана просвечивал сквозь промежутки между карточками; кнопка «Отправить»
   была зелёной (.reliquary-expedition-action использует var(--accent) глобально -- оставляем как
   есть для любых других вхождений этого компонента, перекрашиваем только в скоупе Мастерской).
   Инфо-блок внизу списка -- новый элемент .master-craft-expedition-info (добавлен в app.js). */
.master-craft-expedition-block {
  background: var(--workshop-card); border: 1px solid var(--workshop-line); border-radius: 18px;
  padding: 14px; box-shadow: 0 14px 28px rgba(0,0,0,.3);
}
.master-craft-expedition-block .panel-title.section-label { margin-bottom: 4px; }
.master-craft-expedition-block .panel-title.section-label h2 { color: var(--workshop-parchment); font-family: 'Cinzel', 'Georgia', serif; font-size: 14px; margin: 0; display: flex; align-items: center; gap: 6px; }
.master-craft-expedition-block .reliquary-expedition-card { background: var(--workshop-card-2); border-color: var(--workshop-line); }
.master-craft-expedition-block .reliquary-expedition-icon { background: rgba(255,255,255,.05); color: var(--workshop-gold); }
.master-craft-expedition-block .reliquary-expedition-name {
  color: var(--workshop-text); white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; display: block;
}
.master-craft-expedition-block .reliquary-expedition-card { align-items: flex-start; }
.master-craft-expedition-block .reliquary-expedition-action { margin-top: 2px; }
.master-craft-expedition-block .reliquary-expedition-meta { color: var(--workshop-muted); }
.master-craft-expedition-block .reliquary-expedition-action {
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
  color: #2a140a; border: 1px solid var(--workshop-gold-2); font-weight: 800; box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.master-craft-expedition-block .reliquary-expedition-action.is-running { background: var(--workshop-card-2); color: var(--workshop-muted); border-color: var(--workshop-line); box-shadow: none; }
.master-craft-expedition-block .reliquary-expedition-action.is-ready { background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); color: #241a04; box-shadow: 0 0 12px rgba(255,207,107,.45); }
.master-craft-expedition-info {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--workshop-card-2);
  border: 1px solid var(--workshop-line); color: var(--workshop-muted); font-size: 11.5px; line-height: 1.5;
}

/* Фаза 53.1 (Фикс C): в концепте Зала (image-6) «Автослияние» -- золотая пилюля, «Открыть всё» --
   фиолетовая; базовый .grimoire-btn.ghost из Фикса A даёт общий нейтральный вид --
   здесь только enabled-состояние получает цвет, disabled остаётся серым (opacity .4 из Фикса A). */
.master-craft-screen [data-reliquary-auto-merge]:not(:disabled),
.master-craft-screen [data-grimoire-hall-auto-merge]:not(:disabled) {
  background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-amber-2)); color: #241a04;
  border-color: var(--workshop-gold-2); box-shadow: 0 4px 12px rgba(255, 200, 90, .25);
}
.master-craft-screen [data-reliquary-open-all]:not(:disabled),
.master-craft-screen [data-grimoire-hall-open-all]:not(:disabled) {
  background: linear-gradient(180deg, #8a7bdc, #6a58c4); color: #fff;
  border-color: #a396e8; box-shadow: 0 4px 12px rgba(120, 100, 220, .3);
}

/* Фаза 53.2 (Задача 2): pill-концепт главных вкладок Мастерской (Карты/Зал/Экспедиции), эталон --
   image-3 (концепт). Раньше .equip-sub-tabs:has([data-workshop-subtab]) красил КАЖДУЮ кнопку как
   отдельный прямоугольник (активная -- плоская жёлтая заливка на всю высоту, неактивные -- тёмные
   прямоугольники с рамкой) -- эталон требует единый закруглённый тёмный трек-контейнер, внутри
   которого только активная вкладка выделена отдельной скруглённой капсулой с оранжево-золотым
   градиентом (тот же, что у .grimoire-btn/.reliquary-expedition-action из Фазы 53.1), а неактивные
   -- просто текст без фона/рамки. Обёртка .master-pill-tabs выше по специфичности, чем старые
   правила (три уровня вложенности вместо :has()), поэтому append-only без переписывания. */
.master-pill-tabs {
  background: var(--workshop-card-2); border: 1px solid var(--workshop-line); border-radius: 999px;
  padding: 4px; margin: 10px 0 4px;
}
.master-pill-tabs .equip-sub-tabs { display: flex; gap: 2px; margin: 0; padding: 0; }
.master-pill-tabs .equip-sub-tabs .arena-tab-btn {
  flex: 1; padding: 9px 8px; border-radius: 999px; border: none; background: transparent;
  color: var(--workshop-muted); font-family: 'Manrope', 'Inter', sans-serif; font-size: 12.5px;
  font-weight: 700; cursor: pointer; transition: background .15s, color .15s; clip-path: none;
}
.master-pill-tabs .equip-sub-tabs .arena-tab-btn.active {
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
  color: #2a140a; font-weight: 800; box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
/* Тот же pill-паттерн для переключателя «Карты / Реформация» (нижняя пилюля на image-3),
   Задача 2 (Фаза 53.2) -- новый локальный под-таб внутри вкладки Карт (см.
   .master-craft-cards-subtabs в masterCraftCardsView()), переключает видимость сетки карт vs.
   панели Реформации без запроса новых данных (обе секции уже строятся из имеющегося petData). */
.master-craft-cards-subtabs {
  background: var(--workshop-card-2); border: 1px solid var(--workshop-line); border-radius: 999px;
  padding: 4px; margin: 4px 0 14px; display: flex; gap: 2px;
}
.master-craft-cards-subtabs button {
  flex: 1; padding: 10px 10px; border-radius: 999px; border: none; background: transparent;
  color: var(--workshop-muted); font-family: 'Manrope', 'Inter', sans-serif; font-size: 12.5px;
  font-weight: 700; cursor: pointer; transition: background .15s, color .15s;
}
.master-craft-cards-subtabs button.active {
  background: linear-gradient(120deg, var(--workshop-ember), #ffb85c 45%, var(--workshop-gold));
  color: #2a140a; font-weight: 800; box-shadow: 0 4px 10px rgba(0,0,0,.3);
}

/* Фаза 53.3: усиление визуального фидбека драга осколков Реликвария/Гримуара (Задача 5, эталон
   image-6.jpg) -- источник перетаскивания приподнимается (scale up) и получает синее свечение рамки,
   вместо прежнего малозаметного scale-down. Валидные цели уже подсвечивались зелёным (.drop-hint) --
   усиливаем и их для чёткого контраста. Append-only, не переписывает правила выше. */
.reliquary-slot.dragging {
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 0 0 2px var(--accent-blue, #6cb6ff) inset, 0 0 16px 4px rgba(108,182,255,.65), 0 10px 18px rgba(0,0,0,.45);
  border-color: var(--accent-blue, #6cb6ff);
  z-index: 5;
}
.reliquary-slot.drop-hint {
  box-shadow: 0 0 0 2px var(--accent, #7ee5ad) inset, 0 0 16px 4px rgba(126,229,173,.55);
  transform: scale(1.04);
}
.reliquary-shard-hint-label {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2, #242b38);
  border: 1px solid var(--workshop-gold, #ffcf6b);
  color: var(--workshop-gold, #ffcf6b);
  pointer-events: none;
  z-index: 6;
}
.reliquary-slot.dragging .reliquary-shard-hint-label {
  background: rgba(108,182,255,.18);
  border-color: var(--accent-blue, #6cb6ff);
  color: var(--accent-blue, #6cb6ff);
}
.reliquary-slot.drop-hint .reliquary-shard-hint-label {
  background: rgba(126,229,173,.18);
  border-color: var(--accent, #7ee5ad);
  color: var(--accent, #7ee5ad);
}

/* Фаза 53.3: фикс -- полоса заполнения резонанса в объединённой карточке Мастерской
   (.master-craft-screen .resonance-panel) была невидима, т.к. цвет .card-rarity-fill.rarity-*
   был определён только для контекста .arena-equipment.equip-content (Экипировка), а трек
   .card-rarity-fill-wrap в Мастерской получал пустой прозрачный фон заливки. Добавляем те же
   цвета для универсального базового класса, чтобы полоса резонанса (эталон image-4.jpg/image-8.jpg)
   отображалась во всех местах использования компонента. Append-only. */
.card-rarity-fill-wrap { width: 100%; height: 5px; border-radius: 999px; background: rgba(0,0,0,.32); overflow: hidden; }
.card-rarity-fill { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; background: #8a99a8; }
.card-rarity-fill.rarity-common { background: #8a99a8; }
.card-rarity-fill.rarity-rare { background: linear-gradient(90deg, #3d7fa8, #8ef7ff); }
.card-rarity-fill.rarity-epic { background: linear-gradient(90deg, #8a4fc9, #ff9bf0); }
.card-rarity-fill.rarity-legendary { background: linear-gradient(90deg, #d9a13a, #ffe29a); }
.card-rarity-fill.rarity-legendary { background: linear-gradient(90deg, #d8974a, #ffe6a1); }

/* Фаза 53.3 (доп.): стили плавающего клона осколка + «призрака» в исходной ячейке (эталон
   image.jpg из инкубатора -- элемент увеличивается и следует за указателем поверх сетки, исходная
   ячейка остаётся полупрозрачной). Append-only. */
.reliquary-slot.shard-ghost {
  opacity: .38;
  filter: grayscale(.15);
}
/* Фаза 53.3 (доп., фикс): исходная ячейка во время перетаскивания уже получает класс .dragging
   от существующего render()-цикла (isDragSource) -- добавляем ей низкую непрозрачность
   как у «призрака» (эталон image.jpg), пока настоящий плавающий клон находится поверх
   в document.body. Сочетается с ранее добавленным свечением/подъёмом выше в этом файле --
   просто добавляем opacity через append-only правило с тем же селектором. */
.reliquary-slot.dragging {
  opacity: .4;
}
.shard-floating-clone {
  pointer-events: none;
  z-index: 999;
  will-change: transform;
  box-shadow: 0 0 0 2px var(--accent-blue, #6cb6ff) inset, 0 0 22px 8px rgba(108,182,255,.7), 0 14px 26px rgba(0,0,0,.5);
  border-color: var(--accent-blue, #6cb6ff);
}
/* Фаза 53.4 (Задача 1, фикс регрессии): клон теперь создаётся из <img class="reliquary-slot-icon">
   (см. attachShardFloatingDrag()), а не из всей кнопки-ячейки -- переопределяем правило выше
   (без border/фоновой плашки) более специфичным селектором .reliquary-slot-icon.shard-floating-clone,
   чтобы плавающий клон был ЧИСТЫМ изображением осколка/капсулы без рамки и свечения ячейки, тот же
   размер что и в исходной ячейке (inline left/top/width/height ставит сам JS). Append-only --
   исходное правило .shard-floating-clone выше не удаляется/не меняется. */
.reliquary-slot-icon.shard-floating-clone {
  position: fixed;
  box-shadow: 0 6px 16px rgba(0,0,0,.45);
  border: none;
  border-radius: 0;
  background: none;
  filter: drop-shadow(0 0 10px rgba(108,182,255,.55));
}
/* Фаза 53.6 (Задача 3): описание эффекта спелл-карты внутри объединённой карточки резонанса
   (masterCraftResonanceHeadHtml()/spellEffectDescriptionHtml()) -- заменяет ряд боевых
   pill-статов (.master-craft-stat-row) для card_type='spell'. Append-only, новый блок. */
.master-craft-spell-effect {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(124, 92, 255, .12);
  border: 1px solid rgba(124, 92, 255, .32);
}
.master-craft-spell-effect-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #c9a6ff;
  margin-bottom: 4px;
}
.master-craft-spell-effect-text {
  margin: 0;
  font-size: .86rem;
  line-height: 1.4;
  color: var(--text-secondary, #cfd3e0);
}
.master-craft-spell-effect-text b {
  color: #fff;
  font-weight: 700;
}
/* Фаза 53.6 (задача 4): голубая живая полоса прогресса обработки карты Хранителем в
   горизонтальном списке карт Мастерской -- заменяет статичную оранжевую полосу резонанса
   (эталон image-5.jpg: голубой цвет + тикающий процент вместо застывшего "23:46"). */
.ws-root .ws-equip-heatbar--keeper { background: rgba(88, 179, 255, .16) !important; }
.ws-root .ws-equip-heatbar-fill--keeper { background: linear-gradient(90deg, #4fb3ff, #7fd4ff) !important; }
/* Фаза 53.6 (задача 5): полноэкранная панель резонанса карты, пока над ней работает Хранитель --
   аватар хранителя + живой обратный отсчёт + кнопка "Забрать" задизейблена до готовности
   (эталон image-7.jpg), взамен прежнего варианта без аватара/живого таймера/disabled-состояния. */
.master-craft-resonance-panel .master-craft-keeper-working {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
}
.master-craft-keeper-working-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.master-craft-keeper-working-avatar img { width: 100%; height: 100%; object-fit: cover; }
.master-craft-keeper-working-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.master-craft-keeper-working-title { font-size: .88rem; color: var(--text-secondary, #cfd3e0); }
.master-craft-keeper-working-title b { color: #fff; }
.master-craft-keeper-working-countdown { font-size: 1.05rem; font-weight: 700; color: #7fd4ff; font-variant-numeric: tabular-nums; }
.master-craft-keeper-working-countdown.is-ready { color: #7bffa0; }

/* Фаза 53.6 (п.9): заголовок блока «Очередь капсул» в стиле «ОЧЕРЕДЬ · +N ЕЩЁ» с разделительной
   линией справа (см. image-8.jpg/image-9.jpg из брифа) -- append-only, .reliquary-queue-label и
   .reliquary-queue-row из предыдущих фаз выше не трогаются, только новые правила для нового
   .reliquary-queue-head wrapper. */
.reliquary-queue-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.reliquary-queue-head .reliquary-queue-label { display: inline-block; margin-bottom: 0; letter-spacing: .06em; font-weight: 700; white-space: nowrap; }
.reliquary-queue-rule { flex: 1 1 auto; height: 1px; background: var(--workshop-line, rgba(255,255,255,.14)); }


/* Фаза 53.7 (доп.): сетка объединённого Зала расширена с 5x5 до 7x7 (49 слотов) -- append-only,
   скоуп только на .master-craft-hall-block .reliquary-hall-grid, не трогает старый 5x5 вид
   мёртвых reliquaryHallView()/grimoireHallView() (те используют .reliquary-hall-screen). При 7
   колонках тайлы становятся заметно мельче, чем при 5 -- уменьшаем внутренний gap и размер
   бейджа грейда/статуса капсулы, чтобы цифры и подписи не обрезались на узких экранах. */
.master-craft-hall-block .reliquary-hall-grid { gap: 5px; }
.master-craft-hall-block .reliquary-grade-badge { font-size: 12px; }
.master-craft-hall-block .reliquary-capsule-status { font-size: 9px; }
.master-craft-hall-block .reliquary-shard-hint-label { font-size: 9px; }
@media (max-width: 479px) {
  .master-craft-hall-block .reliquary-hall-grid { gap: 4px; }
  .master-craft-hall-block .reliquary-grade-badge { font-size: 10.5px; }
  .master-craft-hall-block .reliquary-capsule-status { font-size: 8px; }
  .master-craft-hall-block .reliquary-slot { border-radius: 8px; }
}

/* Фаза 53.9 (баг 3, append-only): модалка результата сбора карты у Хранителя-послушника --
   показывается поверх экрана «Карты» после collectCardKeeper()/collectLaneClashKeeper() вместо
   старого простого showToast (эталон image-5.jpg из багрепорта). Та же тёплая тема Мастерской,
   что и у .reliquary-capsule-modal/.keeper-hire-modal выше по файлу -- переиспользуем те же
   переменные --workshop-*, но с собственным набором классов (append-only, не трогает старые). */
.keeper-collect-modal-overlay { position: fixed; inset: 0; background: rgba(6,8,12,.72); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.keeper-collect-modal {
  max-width: 320px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  text-align: center;
  padding: 28px 20px 20px;
  background: radial-gradient(120% 140% at 50% -10%, rgba(255, 154, 61, .16), transparent 55%),
    linear-gradient(165deg, var(--workshop-surface-2, #2e1f18), var(--workshop-bg-2, #241713));
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
  border-radius: 16px;
  box-shadow: inset 0 1px rgba(255, 207, 107, .1), 0 12px 28px rgba(0, 0, 0, .45);
}
.keeper-collect-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  color: var(--workshop-parchment, #e8d9b8);
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
}
.keeper-collect-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: var(--workshop-card-2, rgba(20, 14, 11, .7));
  border: 1px solid var(--workshop-line, rgba(214, 150, 90, .22));
  padding: 8px;
}
.keeper-collect-modal-icon img, .keeper-collect-modal-icon .item-icon { width: 100%; height: 100%; object-fit: contain; }
.keeper-collect-modal-title { margin: 4px 0 0; font-size: 18px; color: var(--workshop-gold, #ffcf6b); }
.keeper-collect-modal-levels { display: flex; align-items: center; gap: 10px; font-family: 'Russo One', 'Exo 2', sans-serif; font-size: 20px; color: var(--workshop-parchment, #e8d9b8); }
.keeper-collect-modal-arrow { color: var(--workshop-gold, #ffcf6b); font-size: 16px; }
.keeper-collect-modal-subtitle { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--workshop-muted, #b9a08d); }
.keeper-collect-modal-btn { width: 100%; margin-top: 4px; }
/* Фаза 87: блок прироста резонансных очков в модалке результата найма (keeperCollectResultModalHtml()). */
.keeper-collect-gain-list {
  display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 8px 10px; border-radius: 10px;
  background: var(--workshop-card-2, #241a10); border: 1px solid var(--workshop-line, rgba(214,150,90,.18));
}
.keeper-collect-gain-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--workshop-parchment, #e8d9b8); }
.keeper-collect-gain-value { color: #7be08a; font-weight: 800; }

/* Фаза 53.9 (баг 5, append-only): квадратные тайлы очереди Реликвария с настоящим спрайтом
   осколка/капсулы (image-8.jpg из багрепорта) -- переиспользуют .reliquary-grade-badge, но со
   своим меньшим тайлом (не полноразмерный .reliquary-slot, т.к. очередь не кликабельна/не
   drag-таргет). Старые .reliquary-queue-item/.reliquary-queue-items выше по файлу не трогаются --
   .reliquary-queue-items остаётся общим flex-контейнером для новых .reliquary-queue-tile. */
.reliquary-queue-tile {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1.5px solid var(--workshop-line, rgba(255,255,255,.12));
  background: var(--surface-2, #242b38);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.reliquary-queue-tile.shard.grade-1 { background: linear-gradient(155deg, #4b5568, #2c3340); }
.reliquary-queue-tile.shard.grade-2 { background: linear-gradient(155deg, #4a7a63, #24422f); }
.reliquary-queue-tile.shard.grade-3 { background: linear-gradient(155deg, #3f7fa0, #1f4152); }
.reliquary-queue-tile.shard.grade-4 { background: linear-gradient(155deg, #6a5bc4, #352b73); }
.reliquary-queue-tile.shard.grade-5 { background: linear-gradient(155deg, #b9679a, #5c2f52); }
.reliquary-queue-tile.shard.grade-6 { background: linear-gradient(155deg, #d8974a, #7a4c1c); }
.reliquary-queue-tile.shard.grade-7 { background: linear-gradient(155deg, #e0c355, #8a6c15); }
.reliquary-queue-tile.capsule { background: linear-gradient(160deg, #2c2438, #17131f); border-color: rgba(255,255,255,.16); }
.reliquary-queue-tile-icon { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; pointer-events: none; z-index: 0; }
.reliquary-queue-tile-badge { position: relative; z-index: 1; font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
/* Фикс 53.10 (баг 2, append-only): .reliquary-queue-tile выше был фиксирован 52З52px под flex --
   в новой сетке из 7 колонок (.reliquary-queue-items выше) тайл должен тянуться под свою
   ячейку сетки, оставаясь квадратным (aspect-ratio), а не переполнять её. */
.reliquary-queue-tile { width: auto; height: auto; min-width: 0; aspect-ratio: 1 / 1; }
.reliquary-queue-tile-badge { font-size: 10px; }

/* Фаза 54 (append-only): экран ожидания соперника «Ищем соперника» для живой очереди Lane Clash
   (лейн-баттлер PvP) -- разметка/анимация 1:1 повторяют прототип «Арена — концепт А (неонит)»
   (экран s-queue, .queue-card/.radar/.radar-sweep/.radar-core/.dots), но на игровых токенах
   --lc-* (Lane Clash append-блок выше, строка ~6850) вместо стандалонных --cyan/--violet
   прототипа -- --lc-violet как акцент вместо --cyan, чтобы вписаться в существующую палитру
   Стычки отрядов. Используется в laneClashQueueView(). Проверено: имена keyframes spin/blink
   свободны (не конфликтуют с другими анимациями файла). */
.lane-clash-queue-card {
  position: relative; margin-top: 10px; padding: 34px 18px 30px; text-align: center;
  background: linear-gradient(150deg, var(--lc-panel), var(--lc-panel-deep));
  border: 1px solid var(--lc-line); border-radius: 16px; color: var(--lc-ink);
}
.lane-clash-radar {
  position: relative; width: 150px; height: 150px; margin: 6px auto 20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 112, 255, .12), transparent 70%);
  border: 1px solid var(--lc-line);
}
.lane-clash-radar::before, .lane-clash-radar::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid var(--lc-line); }
.lane-clash-radar::before { inset: 20px; }
.lane-clash-radar::after { inset: 45px; }
.lane-clash-radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(167, 112, 255, .55), transparent 35%);
  animation: lane-clash-radar-spin 2.2s linear infinite;
}
.lane-clash-radar-core {
  position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; translate: -50% -50%;
  border-radius: 50%; background: var(--lc-violet); box-shadow: 0 0 16px var(--lc-violet);
}
@keyframes lane-clash-radar-spin { to { transform: rotate(360deg); } }
.lane-clash-queue-card h1 { font-size: 22px; margin: 0 0 8px; color: var(--lc-ink); }
.lane-clash-queue-card p { color: var(--lc-muted); font-size: 13px; margin: 0 0 18px; }
.lane-clash-queue-dots span {
  display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%;
  background: var(--lc-violet); animation: lane-clash-queue-blink 1.2s infinite ease-in-out;
}
.lane-clash-queue-dots span:nth-child(2) { animation-delay: .2s; }
.lane-clash-queue-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes lane-clash-queue-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
/* Фаза 54: XP и кубки лиги -- замена убранного янтаря в наградах результата боя Lane Clash. */
.lane-clash-reward-pill.lane-clash-reward-xp { color: var(--lc-ink); }
.lane-clash-reward-pill.lane-clash-reward-trophy { display: inline-flex; align-items: center; gap: 5px; color: var(--lc-gold); border-color: rgba(255, 207, 107, .4); }
.lane-clash-reward-trophy-icon { width: 15px; height: 15px; object-fit: contain; }

/* ===== Фаза 78/78.1/78.3: модалка "Настройки" (звук + визуальные эффекты) =====
   Фаза 78.3 (правки по фидбеку пользователя после продакшн-теста):
   1) .settings-sheet больше НЕ центрируется через top:50% (общее поведение .overlay-panel--sheet,
      см. правило чуть выше) -- на части устройств вертикальное центрирование поднимало верх модалки
      (заголовок "Настройки" + крестик) выше границы HUD, а .game-hud (z-index:9) рисуется НАД
      оверлеями (.overlay-panel z-index:8) и перекрывал заголовок. Теперь .settings-sheet якорится
      ПОД HUD через var(--hud-height) -- та же техника, что у обычных .overlay-panel:not(.overlay-panel--sheet)
      (см. правило выше), поэтому заголовок физически не может оказаться под HUD ни на одном устройстве.
   2) Уменьшены паддинги/гэпы/шрифты -- модалка компактнее.
   3) Явный font-family: 'Manrope', 'Inter', sans-serif (тот же стек, что у .game-hud/арены/мастерской).
   4) Палитра сменена с тёмно-синей темы турнирного лидерборда на янтарно-коричневую "Кузницы Эмбера"
      (--workshop-* переменные, см. :root) -- по образцу .amber-shop-card/.amber-shop-frame
      (модалка покупки Янтаря), как и просил пользователь.
   Фаза 79.2 (багфикс по фидбеку): якорение "top: hud-height + 8px" (Фаза 78.3) прижимало
   модалку прямо под HUD -- визуально верно (не заходит под шапку), но некрасиво на высоких
   экранах, где под модалкой остаётся много пустого места. Вместо фиксированного отступа сверху
   центрируем модалку по СЕРЕДИНЕ свободного пространства под HUD: top ставится на середину
   отрезка [низ HUD .. низ экрана], transform возвращает обычное центрирование по обеим осям.
   Верхний край модалки при этом гарантированно не уходит выше HUD ни при какой высоте модалки,
   т.к. max-height модалки (ниже) всегда меньше высоты свободного пространства -- при максимальной
   допустимой высоте модалки её верх останавливается на +14px ниже HUD, а не выше. */
.overlay-panel--sheet.settings-sheet {
  top: calc(var(--hud-height, 92px) + (100dvh - var(--hud-height, 92px)) / 2); bottom: auto; left: 50%;
  transform: translate(-50%, -50%);
  width: min(88vw, 380px);
  max-height: calc(100dvh - var(--hud-height, 92px) - 28px);
  border-radius: 18px;
  border: 2px solid #4a3018;
  background: linear-gradient(165deg, #241611, #140b08 60%);
  box-shadow: 0 0 0 1px rgba(255,207,107,.22), 0 0 32px rgba(255,122,51,.22), 0 20px 44px rgba(0,0,0,.6);
  font-family: 'Manrope', 'Inter', sans-serif;
}
.settings-sheet .overlay-header {
  border-radius: 18px 18px 0 0; padding: 12px 14px 9px;
  background: transparent; border-bottom: 1px solid rgba(214,150,90,.28);
}
.settings-sheet .overlay-header h2 {
  font-size: 15px; letter-spacing: .04em; color: var(--workshop-parchment, #e8d9b8);
  text-shadow: 0 0 10px rgba(255,122,51,.4);
}
.settings-sheet .overlay-header .icon-button {
  color: var(--workshop-gold, #ffcf6b); background: linear-gradient(165deg,#4a3018,#241611);
  border: 1px solid var(--workshop-gold, #ffcf6b);
}
.settings-sheet .overlay-body { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
@media (max-width:559.98px) {
  .overlay-panel--sheet.settings-sheet {
    width: 90vw; max-height: calc(100dvh - var(--hud-height, 92px) - 20px);
    top: calc(var(--hud-height, 92px) + (100dvh - var(--hud-height, 92px)) / 2);
  }
}

.settings-sections { display: flex; flex-direction: column; gap: 9px; }
.settings-section {
  padding: 10px 10px 3px; border-radius: 13px; border: 1px solid rgba(214,150,90,.22);
  background: linear-gradient(160deg, #2c1c12, #150c07);
}
.settings-section-title {
  margin: 0 0 3px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--workshop-ember-2, #ff9a3d);
}
.settings-list { display: flex; flex-direction: column; gap: 1px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 1px; border-bottom: 1px solid rgba(214,150,90,.14);
}
.settings-row:last-child { border-bottom: none; }
.settings-row > span { font-size: 13px; font-weight: 600; color: var(--workshop-text, #f3e6d8); min-width: 0; }
.settings-hint { margin: 8px 3px 0; font-size: 11px; color: var(--workshop-muted, #b9a08d); line-height: 1.35; }

.toggle-switch {
  position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px;
  background: #1c120c; border: 1px solid rgba(214,150,90,.3); cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease; padding: 0;
}
.toggle-switch.is-on { background: linear-gradient(180deg, var(--workshop-gold, #ffcf6b), var(--workshop-amber-2, #d9862f)); border-color: var(--workshop-gold, #ffcf6b); }
.toggle-switch-knob {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--workshop-muted, #b9a08d); transition: transform .18s ease, background-color .18s ease;
}
.toggle-switch.is-on .toggle-switch-knob { transform: translateX(18px); background: #2a1608; }

/* Фаза 81: экран "Достижения" питомца (переключатель в Питомце). Палитра — глобальные
   workshop-переменные из :root (см. верх файла). Локальные rarity-переменные объявлены
   на .ach-list, поскольку глобальные --rarity-* определены только внутри
   .arena-equipment.equip-content и не видны здесь. */
.ach-summary { background: var(--workshop-card); border: 1px solid var(--workshop-line); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.ach-summary-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--workshop-parchment); margin-bottom: 8px; }
.ach-summary-stars { display: inline-flex; align-items: center; gap: 5px; color: var(--workshop-gold); }
.ach-summary-stars svg { width: 15px; height: 15px; }
.ach-summary-bar { position: relative; height: 10px; border-radius: 999px; background: rgba(0,0,0,.45); overflow: hidden; }
.ach-summary-bar i { position: absolute; inset: 0 auto 0 0; display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--workshop-ember), var(--workshop-gold)); transition: width .3s ease; }
.ach-list { --rarity-rare: #49aaf1; --rarity-epic: #b26bff; --rarity-legendary: #ffcf6b; display: flex; flex-direction: column; gap: 10px; }
/* Фаза 82 (баг 3): весь экран достижений явно на Manrope/Inter -- наследуется потомками (заголовки,
   описания, кнопка), без трогания глобального :root шрифта или других экранов (Cinzel/Nunito/PSP2P). */
.ach-screen { font-family: 'Manrope', 'Inter', sans-serif; }
/* Фаза 82 (баг 4): базовый .ach-card без layout-свойств -- конкретный режим (grid для активных,
   flex для --maxed) задаётся ниже отдельными правилами. */
.ach-card { background: var(--workshop-card); border: 1px solid var(--workshop-line); border-radius: 16px; padding: 12px 13px; }
.ach-card.is-ready { border-color: var(--workshop-gold); box-shadow: 0 0 0 1px rgba(255,207,107,.25), 0 10px 20px rgba(0,0,0,.3); }
.ach-card--maxed { display: flex; align-items: center; gap: 12px; padding: 10px 13px; opacity: .85; }
/* Фаза 82 (баг 4): активная (незабранная) карточка -- CSS Grid, чтобы прогресс-бар тянулся на всю
   ширину карточки (под иконкой и кнопкой включительно), а кнопка занимает отдельную колонку,
   растянутуюся только на высоту строк заголовка+описания (без строки бара) -- это и центрирует
   её вертикально между названием и описанием без дополнительной JS-логики. */
.ach-card:not(.ach-card--maxed) {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  grid-template-areas: "icon head btn" "icon desc btn" "bar bar bar";
  column-gap: 12px;
  row-gap: 4px;
}
.ach-card:not(.ach-card--maxed) .ach-icon { grid-area: icon; align-self: start; }
.ach-card:not(.ach-card--maxed) .ach-card-head { grid-area: head; margin-bottom: 0; }
.ach-card:not(.ach-card--maxed) .ach-card-desc { grid-area: desc; margin-bottom: 0; }
.ach-card:not(.ach-card--maxed) .ach-progress { grid-area: bar; margin-top: 4px; }
.ach-card:not(.ach-card--maxed) .ach-claim-btn { grid-area: btn; }
.ach-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--workshop-card-2); border: 1px solid var(--workshop-line); color: var(--workshop-gold); overflow: hidden; }
.ach-icon svg { width: 22px; height: 22px; }
.ach-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ach-icon--rare { color: var(--rarity-rare); border-color: var(--rarity-rare); }
.ach-icon--epic { color: var(--rarity-epic); border-color: var(--rarity-epic); }
.ach-icon--legendary { color: var(--rarity-legendary); border-color: var(--rarity-legendary); }
.ach-card-body { flex: 1; min-width: 0; }
/* Фаза 82 (баг 2): звёзды теперь выравниваются по верху с заголовком (а не по центру всего блока заголовка,
   что раньше смещало звёзды вниз при 2-строчном заголовке). */
.ach-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.ach-card-head strong { font-size: 14px; color: var(--workshop-text); }
.ach-tier-stars { display: inline-flex; gap: 2px; flex-shrink: 0; margin-top: 1px; }
.ach-tier-star { width: 13px; height: 13px; color: rgba(233,217,184,.28); }
.ach-tier-star svg { width: 100%; height: 100%; }
.ach-tier-star.filled { color: var(--workshop-gold); }
.ach-card-desc { margin: 0 0 8px; font-size: 12.5px; color: var(--workshop-muted); line-height: 1.4; }
.ach-maxed-label { margin: 0; font-size: 12.5px; color: var(--workshop-green); font-weight: 700; }
.ach-progress { position: relative; height: 20px; border-radius: 999px; background: rgba(0,0,0,.45); overflow: hidden; display: flex; align-items: center; }
.ach-progress i { position: absolute; inset: 0 auto 0 0; display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--workshop-ember), var(--workshop-gold)); transition: width .3s ease; }
.ach-progress-label { position: relative; z-index: 1; margin: 0 auto; font-size: 11px; font-weight: 700; color: var(--workshop-text); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ach-progress-reward { position: relative; z-index: 1; margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--workshop-parchment); background: rgba(0,0,0,.5); border-radius: 999px; padding: 2px 7px 2px 5px; margin-right: 2px; white-space: nowrap; }
.ach-reward-badge { display: inline-flex; align-items: center; gap: 3px; }
.ach-reward-badge svg, .ach-reward-badge img { width: 12px; height: 12px; }
/* Фаза 82 (баг 4): align-self:center теперь центрирует кнопку внутри её grid-области "btn",
   которая охватывает только строки заголовка+описания (без строки прогресс-бара). */
.ach-claim-btn { flex-shrink: 0; align-self: center; background: linear-gradient(180deg, var(--workshop-gold), var(--workshop-gold-2)); color: #2a1608; font-size: 12.5px; font-weight: 800; border-radius: 10px; padding: 9px 13px; min-height: 38px; }
.ach-claim-btn:disabled { opacity: .6; }

/* ======================================================================================
   Фаза 99: город с улучшаемыми зданиями (карта city_map_base.webp + слой спрайтов).
   Append-only: ничего из прежних .hub-map-* правил не переопределяется, кроме явных
   .city-* классов, которые добавляются рядом с ними в разметке (см. cityMapView()).
   Тень здания — отдельный клон спрайта ПОД зданием, смещённый вверх-влево ("за" домом),
   поэтому здание никогда не выглядит парящим; смещение и плотность крутятся тремя
   переменными ниже без перегенерации арта.
   ====================================================================================== */
.city-map { position: relative; }
.city-map-viewport { position: relative; overflow: hidden; touch-action: none; cursor: grab; }
.city-map-viewport:active { cursor: grabbing; }
.city-map-world { position: absolute; top: 0; left: 0; height: auto; will-change: transform; }
.city-map-img { display: block; width: 100%; height: auto; image-rendering: auto; user-select: none; -webkit-user-drag: none; }
.city-buildings-layer { position: absolute; inset: 0; }

.city-building {
  --city-shadow-dx: -9%;
  --city-shadow-dy: -7%;
  --city-shadow-alpha: 0.45;
  --city-shadow-blur: 6px;
  position: absolute;
  left: var(--cb-left);
  top: var(--cb-top);
  width: var(--cb-width);
  transform: translate(-50%, -100%);
}
.city-building-shadow {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  filter: brightness(0) blur(var(--city-shadow-blur));
  opacity: var(--city-shadow-alpha);
  transform: translate(var(--city-shadow-dx), var(--city-shadow-dy)) scaleY(0.42) skewX(26deg);
  transform-origin: bottom center;
  pointer-events: none;
  user-select: none;
}
.city-building-hit {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.city-building-img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; transition: transform 160ms ease, filter 160ms ease; }
.city-building-hit:hover .city-building-img,
.city-building.is-active .city-building-img { transform: translateY(-2%) scale(1.02); filter: drop-shadow(0 0 10px rgba(255, 214, 138, 0.55)); }
.city-building.is-ruined .city-building-img { filter: saturate(0.7) brightness(0.92); }
.city-building.is-ruined .city-building-shadow { opacity: calc(var(--city-shadow-alpha) * 0.6); }
.city-building-caption {
  position: absolute;
  left: 50%;
  bottom: 100%;
  margin-bottom: 0.35em;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}
.city-cap-lvl {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: clamp(8px, 0.95vw, 11px);
  font-weight: 800;
  color: #2b1a06;
  background: linear-gradient(180deg, #ffdf8f, #eda93a);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.city-cap-name {
  font-size: clamp(9px, 1.15vw, 13px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fdf1d8;
  text-shadow: 0 1px 2px rgba(28, 16, 6, 0.95), 0 0 6px rgba(20, 12, 4, 0.75);
}
.city-building.is-active .city-building-caption,
.city-building-hit:hover ~ .city-building-caption { opacity: 1; }

.city-timer, .city-yield {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: clamp(9px, 1.1vw, 13px);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.city-timer {
  top: -1.9em;
  color: #ffe9bd;
  background: linear-gradient(180deg, rgba(58, 34, 14, 0.96), rgba(34, 19, 7, 0.96));
  border: 1px solid rgba(232, 182, 108, 0.65);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 226, 170, 0.28);
}
.city-yield {
  top: -2em;
  border: 0;
  cursor: pointer;
  color: #2a1a06;
  background: linear-gradient(180deg, #ffdf8f, #f2b23f);
  border: 1px solid rgba(120, 74, 16, 0.85);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  animation: cityYieldPulse 2.4s ease-in-out infinite;
}
@keyframes cityYieldPulse { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .city-yield { animation: none; } }

/* --- HUD ресурсов и строителей --- */
.city-hud {
  position: absolute;
  z-index: 6;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  align-items: stretch;
  flex-wrap: wrap;
}
.city-hud-cell, .city-hud-builders {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #ffeecb;
  background: linear-gradient(180deg, rgba(52, 32, 14, 0.92), rgba(30, 18, 7, 0.94));
  border: 1px solid rgba(214, 165, 96, 0.55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 226, 170, 0.22);
  backdrop-filter: blur(3px);
}
.city-hud-builders { cursor: pointer; margin-left: auto; }
.city-hud-value small { font-weight: 600; opacity: 0.7; }

/* --- мини-меню здания --- */
.city-menu {
  position: absolute;
  z-index: 8;
  min-width: 168px;
  padding: 10px 12px 12px;
  border-radius: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.98);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms;
  color: #fff2d8;
  background: linear-gradient(180deg, rgba(64, 40, 18, 0.97), rgba(34, 20, 8, 0.98));
  border: 1px solid rgba(226, 176, 104, 0.7);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 228, 176, 0.25);
}
.city-menu.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.city-menu-level {
  display: inline-block;
  padding: 2px 10px;
  margin-bottom: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #2b1a06;
  background: linear-gradient(180deg, #ffdf8f, #eda93a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.city-menu-title { font-size: 13px; font-weight: 800; margin-bottom: 9px; }
.city-menu-actions { display: flex; gap: 8px; }
.city-menu-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px 6px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  color: #f6fbff;
  background: linear-gradient(180deg, #4d8fd8, #2c5fa6);
  border: 1px solid rgba(163, 208, 255, 0.55);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.city-menu-btn small { font-size: 9.5px; font-weight: 700; letter-spacing: 0.01em; }
.city-menu-btn--primary { background: linear-gradient(180deg, #6fc45c, #3d8a34); border-color: rgba(186, 240, 168, 0.6); }
.city-menu-btn.is-disabled, .city-menu-btn:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.5); }
.city-menu-note { margin-top: 8px; font-size: 10.5px; line-height: 1.35; opacity: 0.85; }

/* --- модалка требований / подробностей / строителей --- */
.city-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 6, 2, 0.62);
  backdrop-filter: blur(4px);
  animation: cityModalIn 160ms ease;
}
@keyframes cityModalIn { from { opacity: 0; } to { opacity: 1; } }
.city-modal-card {
  width: min(360px, 100%);
  padding: 16px 16px 14px;
  border-radius: 20px;
  color: #fff3da;
  background:
    linear-gradient(180deg, rgba(84, 53, 24, 0.98), rgba(44, 26, 10, 0.99));
  border: 2px solid rgba(226, 176, 104, 0.8);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 231, 182, 0.3);
}
.city-modal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.city-modal-head h3 { margin: 0; font-size: 17px; font-weight: 900; letter-spacing: 0.01em; }
.city-modal-head span { font-size: 12px; font-weight: 800; color: #ffd88f; }
.city-modal-subtitle { font-size: 11px; font-weight: 900; letter-spacing: 0.14em; opacity: 0.72; margin-bottom: 7px; }
.city-req-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.city-req {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(24, 14, 5, 0.55);
  border: 1px solid rgba(214, 165, 96, 0.3);
}
.city-req-name { flex: 1 1 auto; }
.city-req-value { font-variant-numeric: tabular-nums; opacity: 0.92; }
.city-req-mark { font-size: 14px; font-weight: 900; }
.city-req.is-ok .city-req-mark { color: #7ddc63; }
.city-req.is-bad .city-req-mark { color: #ff8b7a; }
.city-req.is-bad { border-color: rgba(255, 139, 122, 0.35); }
.city-req-goto {
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  color: #f6fbff;
  background: linear-gradient(180deg, #4d8fd8, #2c5fa6);
  border: 1px solid rgba(163, 208, 255, 0.55);
}
.city-modal-time { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 10px; font-size: 12px; font-weight: 800; color: #ffd88f; }
.city-modal-cta {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #10240c;
  background: linear-gradient(180deg, #8ce06f, #47993a);
  border: 1px solid rgba(196, 245, 176, 0.7);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.city-modal-cta.is-disabled, .city-modal-cta:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.55); }
.city-modal-close {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: #ffe6bd;
  background: rgba(24, 14, 5, 0.6);
  border: 1px solid rgba(214, 165, 96, 0.45);
}
.city-modal-note { margin: 0 0 10px; font-size: 12px; line-height: 1.45; opacity: 0.88; }
.city-detail-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 700; }
.city-detail-list li { padding: 6px 10px; border-radius: 10px; background: rgba(24, 14, 5, 0.5); border: 1px solid rgba(214, 165, 96, 0.28); }

/* --- круглые кнопки действий под зданием --- */
.city-building.is-active { z-index: 9; }
.city-actions {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, -18%);
  display: flex;
  align-items: flex-start;
  gap: clamp(6px, 0.9vw, 12px);
  z-index: 10;
  animation: cityActionsIn 150ms ease-out;
}
@keyframes cityActionsIn { from { opacity: 0; transform: translate(-50%, -4%) scale(0.92); } to { opacity: 1; transform: translate(-50%, -18%) scale(1); } }
.city-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.city-act-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(30px, 3.2vw, 46px);
  height: clamp(30px, 3.2vw, 46px);
  border-radius: 50%;
  font-size: clamp(14px, 1.6vw, 21px);
  line-height: 1;
  color: #f4fbff;
  background: radial-gradient(120% 120% at 30% 22%, #79c0f5 0%, #3d84d6 45%, #23528f 100%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 14px rgba(6, 22, 44, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.45);
  transition: transform 120ms ease, filter 120ms ease;
}
.city-act--primary .city-act-ico {
  background: radial-gradient(120% 120% at 30% 22%, #9ff0a8 0%, #47b45e 45%, #23763c 100%);
}
.city-act:hover .city-act-ico { transform: translateY(-2px) scale(1.05); }
.city-act:active .city-act-ico { transform: translateY(1px) scale(0.97); }
.city-act.is-disabled .city-act-ico { filter: grayscale(0.85) brightness(0.8); }
.city-act.is-disabled { cursor: default; }
.city-act-label {
  font-size: clamp(8px, 0.95vw, 11px);
  font-weight: 800;
  color: #fff6e2;
  text-shadow: 0 1px 2px rgba(24, 14, 4, 0.95), 0 0 5px rgba(18, 10, 2, 0.8);
  white-space: nowrap;
}
.city-act-note {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 190%);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: clamp(8px, 0.95vw, 11px);
  font-weight: 700;
  color: #ffe0b8;
  background: rgba(38, 22, 8, 0.92);
  border: 1px solid rgba(226, 176, 104, 0.55);
  white-space: nowrap;
  pointer-events: none;
}

/* =============================================================================================
   Фаза 99 (интеграция): ускорение стройки за янтарь, «Собрать всё» в HUD и подменю
   гильдейского двора. Стили дописаны отдельным блоком, чтобы не трогать базовую вёрстку карты.
   ============================================================================================= */
.city-act.city-act--amber > .city-act-ico {
  background: radial-gradient(circle at 32% 28%, #ffd98a 0%, #f2a93b 46%, #b96a12 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.city-hud-collect {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  font: 600 12px/1 var(--font-ui, inherit);
  color: #0f2415;
  background: linear-gradient(180deg, #9ff08a 0%, #4fbf58 58%, #2c8b3d 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
.city-hud-collect:disabled { opacity: 0.55; cursor: default; }
.city-guild-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 12px;
}
.city-guild-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1px solid rgba(255, 226, 160, 0.22);
  border-radius: 14px;
  font: 600 11px/1.2 var(--font-ui, inherit);
  color: #f6ecd3;
  text-align: center;
  background: linear-gradient(180deg, rgba(58, 44, 30, 0.92) 0%, rgba(34, 25, 17, 0.94) 100%);
  cursor: pointer;
}
.city-guild-item svg { width: 22px; height: 22px; }
.city-guild-item:active { transform: translateY(1px); }


/* =============================================================================================
   Город: нарисованный UI-кит (9-slice). Модалки на деревянной раме с пергаментом, название
   здания — утопленным блоком внутри пергамента, кнопки — на прямоугольных плашках.
   Блок дописан в конец файла и переопределяет прежние «плоские» стили.
   ============================================================================================= */
:root { --city-ui: url("../img/ui"); }

/* --- кнопки действий под зданием: плашки с текстом, без кружков --- */
.city-actions { flex-wrap: wrap; justify-content: center; width: min(78vw, 320px); gap: 7px; }
.city-act {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  border-image: url("../img/ui/r_wood.png") 34 fill / 11px stretch;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  transition: transform 110ms ease, filter 110ms ease;
}
.city-act .city-act-ico { display: none; }
.city-act .city-act-label {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #ffeecd;
  text-shadow: 0 2px 0 rgba(24, 12, 2, 0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.city-act:hover { transform: translateY(-1px); }
.city-act:active { transform: translateY(1px); }
.city-act--primary {
  flex: 0 0 100%;
  width: 100%;
  order: -1;
  height: 50px;
  border-image: url("../img/ui/r_green.png") 34 fill / 11px stretch;
}
.city-act--primary .city-act-label { font-size: 14.5px; color: #f2fff0; }
.city-act--wide { flex: 0 0 100%; width: 100%; }
.city-actions--single .city-act--primary {
  border-image: url("../img/ui/r_gold.png") 34 fill / 11px stretch;
}
.city-actions--single .city-act--primary .city-act-label { color: #3a2404; text-shadow: 0 1px 0 rgba(255, 246, 214, 0.6); }
.city-act.is-disabled { border-image: url("../img/ui/r_stone.png") 34 fill / 11px stretch; }
.city-act.is-disabled .city-act-label { color: #efe6d6; }

/* --- модалка на деревянной раме с пергаментом --- */
.city-modal-card {
  position: relative;
  width: min(360px, 100%);
  padding: 14px 42px 42px;
  border-radius: 0;
  border: 0;
  border-image: url("../img/ui/modal.png") 168 fill / 48px stretch;
  background: none;
  box-shadow: none;
  color: #3f2708;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.6));
}
.city-modal-head {
  display: inline-block;
  width: auto;
  max-width: calc(100% - 52px);
  margin: 8px 0 10px;
  padding: 8px 14px 9px;
  border-radius: 10px;
  text-align: left;
  background: linear-gradient(180deg, rgba(120, 86, 40, 0.16), rgba(120, 86, 40, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px rgba(146, 106, 48, 0.4), 0 1px 0 rgba(255, 255, 255, 0.5);
}
.city-modal-head h3 {
  margin: 0;
  font-family: 'PT Serif', Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: #3f2708;
  text-shadow: 0 1px 0 rgba(255, 250, 232, 0.7);
}
.city-modal-head span {
  --display: block;
  margin-top: 6px;
  gap:5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a33;
}
.city-modal-subtitle {
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9a7635;
  opacity: 1;
  margin: 10px 0 6px;
}
.city-modal-note { color: #4a3418; opacity: 1; font-size: 12.5px; }
.city-modal-time { color: #7a5a2a; }

/* строки требований — на пергаменте, с пунктирным разделителем */
.city-req-list { gap: 0; }
.city-req {
  padding: 7px 2px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px dashed rgba(150, 110, 55, 0.45);
  background: none;
  color: #3f2708;
  font-size: 13px;
}
.city-req:last-child { border-bottom: 0; }
.city-req.is-bad { border-color: rgba(150, 110, 55, 0.45); }
.city-req-value { color: #55391a; }
.city-req.is-ok .city-req-mark { color: #2f8a3a; }
.city-req.is-bad .city-req-mark { color: #b8412c; }
.city-detail-list li {
  padding: 7px 2px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px dashed rgba(150, 110, 55, 0.45);
  background: none;
  color: #3f2708;
}
.city-detail-list li:last-child { border-bottom: 0; }

/* кнопки внутри модалки */
.city-req-goto, .city-modal-cta, .city-modal-close {
  border: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
.city-req-goto {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  color: #ffeecd;
  font-size: 11.5px;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(24, 12, 2, 0.7);
  border-image: url("../img/ui/r_blue.png") 34 fill / 11px stretch;
}
.city-modal-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  padding: 0 14px;
  margin-top: 8px;
  color: #f2fff0;
  font-size: 15px;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(6, 32, 10, 0.6);
  border-image: url("../img/ui/r_green.png") 34 fill / 11px stretch;
}
.city-modal-cta.is-disabled, .city-modal-cta:disabled {
  opacity: 1;
  filter: none;
  color: #efe6d6;
  text-shadow: 0 2px 0 rgba(30, 30, 30, 0.5);
  border-image: url("../img/ui/r_stone.png") 34 fill / 11px stretch;
}
/* круглый крестик в правом верхнем углу, на пергаменте под угловым узором */
.city-modal-close {
  position: absolute;
  right: -1px;
  top: -1px;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  font-size: 0;
  cursor: pointer;
  background: url("../img/ui/close.png") center / 100% 100% no-repeat;
  transition: transform 110ms ease;
}
.city-modal-close:hover { transform: scale(1.06); }
.city-modal-close:active { transform: scale(0.96); }

/* --- иконки кита в модалках и HUD + ограничение высоты модалки со скроллом --- */
.city-ico { width: 20px; height: 20px; display: block; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(40, 24, 4, 0.35)); }
.city-req-icon { display: flex; align-items: center; justify-content: center; width: 22px; flex: 0 0 22px; }
.city-hud-icon .city-ico, .city-hud-cell .city-ico { width: 18px; height: 18px; }
.city-yield .city-ico { width: 17px; height: 17px; }
.city-modal-time .city-ico { width: 18px; height: 18px; }
.city-modal-cta .city-ico { display: inline-block; width: 19px; height: 19px; margin-left: 7px; vertical-align: -3px; }

.city-modal-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
}
.city-modal-card > * { flex: 0 0 auto; }
.city-modal-card > .city-req-list,
.city-modal-card > .city-detail-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 110, 55, 0.55) transparent;
  /* мягкое затухание у краёв — подсказка, что список прокручивается */
  mask-image: linear-gradient(180deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.city-modal-card > .city-req-list::-webkit-scrollbar,
.city-modal-card > .city-detail-list::-webkit-scrollbar { width: 5px; }
.city-modal-card > .city-req-list::-webkit-scrollbar-thumb,
.city-modal-card > .city-detail-list::-webkit-scrollbar-thumb { border-radius: 4px; background: rgba(150, 110, 55, 0.55); }
.city-modal { padding: 12px; align-items: center; }

/* --- верхняя кромка карты: горы, лес и туман под хедером --- */
.city-map-viewport { --city-top-band: 128px; }
.city-map-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--city-top-band);
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 12, 10, 0.5) 0%, rgba(8, 12, 10, 0.16) 44%, rgba(8, 12, 10, 0) 78%);
}
@media (max-width: 430px) { .city-map-viewport { --city-top-band: 112px; } }

/* подложка вокруг карты, когда она без апскейла уже/ниже экрана */
.city-map-viewport { background: #10180f; }

/* --- подписи зданий: имя снизу всегда, уровень+имя сверху только при выборе --- */
/* убираем «подпрыгивание» спрайта при наведении и выборе — остаётся только мягкое свечение */
.city-building-hit:hover .city-building-img,
.city-building.is-active .city-building-img {
  transform: none;
  filter: drop-shadow(0 0 10px rgba(255, 214, 138, 0.55));
}
.city-building-label {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 2px);
  max-width: 160%;
  padding: 1px 8px 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(28, 18, 8, 0.62), rgba(14, 9, 4, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 226, 168, 0.18), 0 2px 5px rgba(0, 0, 0, 0.35);
  font-size: clamp(9px, 1.1vw, 12.5px);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f7e7c6;
  text-shadow: 0 1px 2px rgba(20, 12, 4, 0.95);
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity 140ms ease;
}
.city-building.is-active .city-building-label,
.city-building-hit:hover ~ .city-building-label { opacity: 0; }
.city-building.is-building .city-building-label { opacity: 0; }

/* --- компактные кнопки действий на карте (были слишком крупные на телефоне) --- */
.city-actions { width: min(48vw, 236px); gap: 5px; }
.city-act { height: 34px; padding: 0 9px; filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.42)); }
.city-act .city-act-label { font-size: 11.5px; }
.city-act--primary { height: 38px; }
.city-act--primary .city-act-label { font-size: 12.5px; }
.city-act-note { font-size: 10px; }

/* ============================================================================
   Фаза 82: хедер города, вариант 9 (портрет + сетка капсул + ряд навигации).
   Append-only: базовые правила .game-hud выше не меняются, всё новое живёт в
   скоупе .game-hud.hud9 и перекрывает только то, что нужно.
   ========================================================================== */
.game-hud.hud9 { gap: 7px; }
.game-hud.hud9 .hud9-top { display: flex; align-items: center; gap: 8px; }
.game-hud.hud9 .hud9-ava {
  position: relative; flex: 0 0 auto; width: 50px; height: 50px; padding: 0; border: 0;
  background: none; cursor: pointer;
}
.game-hud.hud9 .hud9-ava > .hud9-ico { width: 50px; height: 50px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.55)); }
.game-hud.hud9 .hud9-ava > b {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  min-width: 26px; padding: 1px 6px; border-radius: 999px;
  background: linear-gradient(180deg, #f7e2ae, #d9ab55); border: 1.5px solid #6b4718;
  font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 900; font-size: 11px; color: #3a2205;
  box-shadow: 0 2px 5px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.6);
}
.game-hud.hud9 .hud9-grid {
  flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 8px;
}
.game-hud.hud9 .hud9-slot {
  position: relative; height: 22px; width: 100%; padding: 0 6px 0 20px; border: 0;
  display: flex; align-items: center; justify-content: flex-end; gap: 3px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(38,24,10,.95), rgba(20,12,5,.97));
  box-shadow: inset 0 1px 0 rgba(255,224,168,.22), inset 0 0 0 1px rgba(116,80,36,.9), 0 2px 6px rgba(0,0,0,.5);
  cursor: default;
}
.game-hud.hud9 button.hud9-slot { cursor: pointer; }
.game-hud.hud9 button.hud9-slot:active { transform: translateY(1px); }
.game-hud.hud9 .hud9-slot > .hud9-ico {
  position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 25px; height: 25px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6));
}
.game-hud.hud9 .hud9-val {
  font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 800; font-size: 11.5px; line-height: 1;
  color: #fff4d8; text-shadow: 0 1px 2px rgba(20,10,2,.9); white-space: nowrap;
}
.game-hud.hud9 .hud9-ch { font-size: 10px; font-weight: 900; color: #c8ab7c; }
.game-hud.hud9 .hud9-chev { transition: transform .2s ease; }
.game-hud.hud9.trophies-open .hud9-chev { transform: rotate(180deg); }
/* раскрывающийся список трофеев по режимам */
.game-hud.hud9 .hud9-troph { position: relative; min-width: 0; }
.game-hud.hud9 .hud9-troph-pop {
  position: absolute; top: calc(100% + 7px); right: 0; z-index: 12; width: max-content; min-width: 100%;
  display: flex; flex-direction: column; gap: 5px; padding: 7px 8px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(46,30,12,.98), rgba(22,14,5,.99));
  box-shadow: inset 0 1px 0 rgba(255,224,168,.22), inset 0 0 0 1px rgba(116,80,36,.95), 0 8px 18px rgba(0,0,0,.55);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .16s ease, transform .18s ease, visibility .18s;
}
.game-hud.hud9.trophies-open .hud9-troph-pop { opacity: 1; visibility: visible; transform: translateY(0); }
.game-hud.hud9 .hud9-troph-row { display: flex; align-items: center; gap: 7px; }
.game-hud.hud9 .hud9-troph-row > .hud9-ico { width: 22px; height: 22px; flex: 0 0 auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
.game-hud.hud9 .hud9-troph-name { flex: 1 1 auto; font-size: 11px; font-weight: 700; color: #e6d3b2; white-space: nowrap; }
/* ряд навигации: бургер, плашка локации, три квадратные кнопки */
.game-hud.hud9 .navrow { height: 34px; gap: 6px; }
.game-hud.hud9 .left-nav { gap: 6px; }
.game-hud.hud9 .burger-btn {
  width: 34px; height: 34px; border-radius: 11px; border: 0;
  background: linear-gradient(180deg, #6b4a23, #2f1e0b);
  box-shadow: inset 0 1px 0 rgba(255,224,168,.3), inset 0 0 0 1px rgba(120,84,38,.95), 0 3px 7px rgba(0,0,0,.5);
}
.game-hud.hud9 .burger-btn span, .game-hud.hud9 .burger-btn::before, .game-hud.hud9 .burger-btn::after {
  width: 16px; height: 2.5px; background: #ffe1a8;
}
.game-hud.hud9 .burger-btn::before { transform: translateY(-5.5px); }
.game-hud.hud9 .burger-btn::after { transform: translateY(5.5px); }
.game-hud.hud9 .location-chip {
  height: 34px; border-radius: 11px; border: 0; padding: 0 10px 0 4px; gap: 7px;
  background: linear-gradient(180deg, rgba(52,34,14,.95), rgba(26,16,6,.97));
  box-shadow: inset 0 1px 0 rgba(255,224,168,.24), inset 0 0 0 1px rgba(116,80,36,.9), 0 3px 7px rgba(0,0,0,.5);
}
.game-hud.hud9 .location-chip .dot {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(180deg, #f3c268, #c8862a); color: #3d2406;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 3px rgba(0,0,0,.5);
  font-family: 'PT Serif', Georgia, serif; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.game-hud.hud9 .location-chip .name { font-family: 'PT Serif', Georgia, serif; font-size: 12.5px; color: #fff1d2; }
.game-hud.hud9 .location-chip .sub { font-size: 9.5px; color: #c7b18b; }
.game-hud.hud9 .medallions { display: flex; gap: 5px; flex: 0 0 auto; }
.game-hud.hud9 .medallion {
  width: 34px; height: 34px; border-radius: 11px; border: 0; padding: 0;
  background: linear-gradient(180deg, #6b4a23, #2f1e0b);
  box-shadow: inset 0 1px 0 rgba(255,224,168,.3), inset 0 0 0 1px rgba(120,84,38,.95), 0 3px 7px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
}
.game-hud.hud9 .medallion:active { transform: translateY(1px); }
.game-hud.hud9 .medallion .hud9-ico { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
@media (max-width: 380px) {
  .game-hud.hud9 .hud9-grid { gap: 7px 6px; }
  .game-hud.hud9 .hud9-val { font-size: 10.5px; }
  .game-hud.hud9 .location-chip .sub { display: none; }
}

/* ============================================================================
   Фаза 100: экономика города — бейдж «склад здания заполнен» (добыча встала).
   ============================================================================ */
.city-yield.is-full {
  border-color: rgba(255, 214, 132, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 176, 66, 0.55), 0 6px 14px rgba(0, 0, 0, 0.35);
  background-image: linear-gradient(180deg, rgba(255, 199, 108, 0.28), rgba(255, 140, 46, 0.22));
}
.city-yield.is-full span { color: #ffe9bd; }

/* ============================================================================================
   Фаза 101 — рабочие, ускорители, премиальные уведомления, читаемые модалки.
   Блок только добавляет правила (файл правится строго append-only).
   ============================================================================================ */

/* --- всплывающие уведомления: карточка в стиле хедера, СВЕРХУ под хедером --- */
.toast.toast--card {
  top: calc(var(--city-top-band, 128px) + 10px);
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translate(-50%, -14px);
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(340px, calc(100vw - 28px));
  padding: 11px 16px 12px;
  border: 0;
  border-radius: 0;
  border-image: url("../img/ui/r_wood.png") 34 fill / 12px stretch;
  background: none;
  color: #fff3d8;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-align: left;
  text-shadow: 0 2px 0 rgba(28, 14, 2, 0.72);
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
  z-index: 60;
}
.toast.toast--card.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.toast--card .toast-ico {
  flex: 0 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 232, 176, 0.34), rgba(60, 34, 8, 0.5));
  box-shadow: inset 0 0 0 1px rgba(255, 226, 160, 0.4);
}
.toast.toast--card .toast-ico img { width: 22px; height: 22px; object-fit: contain; display: block; }
.toast.toast--card .toast-text { display: block; }
.toast.toast--card.is-warn, .toast.toast--card.is-error {
  border-image: url("../img/ui/r_red.png") 34 fill / 12px stretch;
  color: #fff0e8;
}

/* --- строки «подробнее»: иконка + название слева, значение справа, крупный шрифт --- */
.city-info-list { gap: 0; font-size: 15px; }
.city-info-list .city-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  font-weight: 700;
}
.city-info-ico { flex: 0 0 24px; display: flex; align-items: center; justify-content: center; }
.city-info-ico .city-ico { width: 24px; height: 24px; }
.city-info-label { flex: 1 1 auto; font-size: 15px; color: #4a3418; }
.city-info-value {
  flex: 0 0 auto;
  font-size: 16.5px;
  font-weight: 900;
  color: #35200a;
  text-shadow: 0 1px 0 rgba(255, 250, 232, 0.65);
}

/* --- блок рабочих --- */
.city-workers { margin-top: 4px; }
.city-workers-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.city-workers-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9a7635;
}
.city-workers-slots { display: flex; gap: 8px; }
.city-worker-slot {
  position: relative;
  flex: 1 1 0;
  aspect-ratio: 1 / 1;
  max-width: 74px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(120, 86, 40, 0.2), rgba(120, 86, 40, 0.08));
  box-shadow: inset 0 0 0 1px rgba(146, 106, 48, 0.45), inset 0 2px 5px rgba(60, 36, 8, 0.18);
}
.city-worker-slot.is-filled {
  background: radial-gradient(circle at 50% 30%, rgba(255, 236, 186, 0.5), rgba(150, 108, 48, 0.2));
}
.city-worker-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.city-workers-ctl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.city-worker-btn {
  flex: 0 0 auto;
  width: 46px;
  height: 40px;
  border: 0;
  padding: 0;
  color: #fff3d8;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  background: none;
  border-image: url("../img/ui/r_green.png") 34 fill / 11px stretch;
  text-shadow: 0 2px 0 rgba(6, 32, 10, 0.6);
}
.city-worker-btn.is-disabled, .city-worker-btn:disabled {
  color: #efe6d6;
  border-image: url("../img/ui/r_stone.png") 34 fill / 11px stretch;
}
.city-workers-free { flex: 1 1 auto; text-align: center; font-size: 13px; font-weight: 800; color: #5a3f1c; }
.city-workers-note { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: #6b4d22; }

/* --- ускорители стройки --- */
.city-boosts { display: flex; gap: 8px; }
.city-boost {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 4px 8px;
  border: 0;
  cursor: pointer;
  background: none;
  border-image: url("../img/ui/r_blue.png") 34 fill / 11px stretch;
  color: #ffeecd;
  text-shadow: 0 2px 0 rgba(12, 24, 46, 0.6);
}
.city-boost.is-buy { border-image: url("../img/ui/r_gold.png") 34 fill / 11px stretch; color: #3a2404; text-shadow: 0 1px 0 rgba(255, 246, 214, 0.6); }
.city-boost-ico { position: relative; display: flex; align-items: center; justify-content: center; }
.city-boost-ico .city-ico { width: 28px; height: 28px; }
.city-boost-qty {
  position: absolute;
  right: -8px;
  bottom: -5px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #2c1a06;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 160, 0.55);
  color: #ffe9b8;
  font-size: 11px;
  font-weight: 900;
  font-style: normal;
  line-height: 18px;
  text-align: center;
  text-shadow: none;
}
.city-boost-label { display: flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 900; }
.city-boost-label .city-ico { width: 15px; height: 15px; }

/* --- модалка улучшения: крупнее текст (пункт 6) --- */
.city-req { font-size: 15px; padding: 9px 2px; }
.city-req-name { font-size: 15px; }
.city-req-value { font-size: 15.5px; font-weight: 900; }
.city-req-icon { width: 24px; flex: 0 0 24px; }
.city-req-icon .city-ico { width: 24px; height: 24px; }
.city-modal-note { font-size: 13.5px; }
.city-modal-time { font-size: 15px; font-weight: 900; }

/* --- таймер стройки на карте: растровая иконка вместо эмодзи, читаемо на мобильных --- */
.city-building .city-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 5px;
  line-height: 1;
  white-space: nowrap;
}
.city-building .city-timer .city-ico { width: 19px; height: 19px; flex: 0 0 19px; }
.city-building .city-timer b { font-size: 12.5px; font-weight: 900; letter-spacing: 0.01em; }
@media (max-width: 430px) {
  .city-building .city-timer .city-ico { width: 17px; height: 17px; flex: 0 0 17px; }
  .city-building .city-timer b { font-size: 11.5px; }
  .city-info-label { font-size: 14px; }
  .city-info-value { font-size: 15.5px; }
}

/* =============================================================================================
   Фаза 101.1 — выбранные варианты из прототипа-концепта 2 (p101b):
   1) уведомления «концепт 2» (тёмная капсула, медальон, капс-заголовок + крупное значение,
      полоска обратного отсчёта); 2) индикатор уровня «руны-пипсы» вместо «Ур. N»;
   3) ускорители стройки — вариант Б: одна строка-вставка «Ускорить» + три капсулы-чипа.
   Блок дописан в конец файла и переопределяет прежние правила Фазы 101.
   ============================================================================================= */

/* --- 1. уведомления: концепт 2 --- */
.toast.toast--card.toast--c2 {
  gap: 11px;
  align-items: center;
  max-width: min(348px, calc(100vw - 24px));
  padding: 10px 15px 11px 10px;
  overflow: hidden;
  border-image: none;
  border-radius: 15px;
  background: linear-gradient(180deg, #6b4a1f 0%, #4a3013 46%, #38230d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 160, 0.42),
    inset 0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(216, 169, 73, 0.55),
    0 14px 26px rgba(0, 0, 0, 0.5);
}
.toast.toast--card.toast--c2 .toast-med {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at 50% 32%, #6a4a1c, #2b1a07 78%);
  box-shadow: inset 0 0 0 2px rgba(216, 169, 73, 0.85), inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4);
}
.toast.toast--card.toast--c2 .toast-med img { width: 25px; height: 25px; }
.toast.toast--card.toast--c2 .toast-body { flex: 1 1 auto; min-width: 0; }
.toast.toast--card.toast--c2 .toast-kicker {
  display: block;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d9b779;
}
.toast.toast--card.toast--c2 .toast-value {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  color: #ffdc8a;
  text-shadow: 0 2px 0 rgba(24, 12, 2, 0.85);
}
.toast.toast--card.toast--c2 .toast-note {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #f0dcb4;
  text-shadow: 0 1px 0 rgba(24, 12, 2, 0.7);
}
.toast.toast--card.toast--c2 .toast-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.4);
}
.toast.toast--card.toast--c2 .toast-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffe0a0, #d8a949);
  box-shadow: 0 0 8px rgba(255, 214, 128, 0.7);
  animation: toastCountdown 2800ms linear forwards;
}
@keyframes toastCountdown { from { width: 100%; } to { width: 0%; } }
.toast.toast--card.toast--c2.is-warn, .toast.toast--card.toast--c2.is-error {
  border-image: none;
  background: linear-gradient(180deg, #7d2b1c 0%, #57190f 48%, #3d0f08 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 190, 160, 0.35),
    inset 0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(214, 96, 64, 0.6),
    0 14px 26px rgba(0, 0, 0, 0.5);
}
.toast.toast--card.toast--c2.is-warn .toast-kicker,
.toast.toast--card.toast--c2.is-error .toast-kicker { color: #f2b39c; }
.toast.toast--card.toast--c2.is-warn .toast-value,
.toast.toast--card.toast--c2.is-error .toast-value { color: #ffd0b4; }
.toast.toast--card.toast--c2.is-warn .toast-med,
.toast.toast--card.toast--c2.is-error .toast-med {
  background: radial-gradient(circle at 50% 32%, #7a3020, #2a0d05 78%);
  box-shadow: inset 0 0 0 2px rgba(226, 124, 92, 0.9), inset 0 2px 6px rgba(0, 0, 0, 0.6);
}
.toast.toast--card.toast--c2.is-warn .toast-bar i,
.toast.toast--card.toast--c2.is-error .toast-bar i {
  background: linear-gradient(90deg, #ffb59a, #d1543a);
  box-shadow: 0 0 8px rgba(224, 110, 80, 0.6);
}
@media (max-width: 430px) {
  .toast.toast--card.toast--c2 { padding: 9px 13px 10px 9px; }
  .toast.toast--card.toast--c2 .toast-med { flex-basis: 36px; width: 36px; height: 36px; }
  .toast.toast--card.toast--c2 .toast-med img { width: 22px; height: 22px; }
  .toast.toast--card.toast--c2 .toast-value { font-size: 15px; }
}

/* --- 2. индикатор уровня: руны-пипсы --- */
.city-modal-head.city-modal-head--pips {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px 10px;
}
.city-modal-head--pips h3 { flex: 1 1 auto; min-width: 0; }
.city-modal-head--pips > span:not(.city-lvl-pips) { margin-top: 0; }
.city-lvl-pips {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  margin-top: 0;
}
.city-lvl-pips em {
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #3b2409;
  text-shadow: 0 1px 0 rgba(255, 250, 232, 0.65);
  white-space: nowrap;
}
.city-lvl-pips u { display: flex; gap: 3px; text-decoration: none; }
.city-lvl-pips i {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: rgba(90, 62, 24, 0.22);
  box-shadow: inset 0 0 0 1px rgba(120, 86, 40, 0.4);
}
.city-lvl-pips i.on {
  background: linear-gradient(160deg, #ffe9ad, #d8a949 55%, #8a621f);
  box-shadow: 0 0 5px rgba(230, 180, 90, 0.6), inset 0 0 0 1px rgba(120, 86, 40, 0.4);
}

/* --- 3. ускорители: вариант Б (строка «Ускорить» + три капсулы-чипа) --- */
.city-boosts2 {
  margin: 10px 0 2px;
  padding: 9px 10px 10px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(92, 64, 26, 0.2), rgba(92, 64, 26, 0.07));
  box-shadow: inset 0 0 0 1px rgba(146, 106, 48, 0.35), inset 0 3px 6px rgba(70, 44, 14, 0.16);
}
.city-boosts2-cap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a33;
}
.city-boosts2-cap .city-ico, .city-boosts2-cap img { width: 18px; height: 18px; }
.city-boosts2-chips { display: flex; gap: 7px; }
.city-chip {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border: 0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 900;
  color: #fff6de;
  text-shadow: 0 1px 0 rgba(12, 34, 52, 0.55);
  background: linear-gradient(180deg, #4f83c4, #2c5891 65%, #1e3f6c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 236, 180, 0.28), 0 2px 0 rgba(16, 32, 54, 0.5);
}
.city-chip .city-ico, .city-chip img { width: 17px; height: 17px; flex: 0 0 auto; }
.city-chip span { white-space: nowrap; }
.city-chip i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 900;
  opacity: 0.92;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.city-chip i .city-ico, .city-chip i img { width: 13px; height: 13px; }
.city-chip:active { transform: translateY(1px); }
.city-chip.is-buy {
  color: #3a2404;
  text-shadow: 0 1px 0 rgba(255, 246, 214, 0.6);
  background: linear-gradient(180deg, #ffdf95, #e2ab45 65%, #b6801f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px rgba(120, 86, 40, 0.35), 0 2px 0 rgba(110, 74, 16, 0.5);
}
@media (max-width: 430px) {
  .city-chip { font-size: 11.5px; padding: 8px 4px; gap: 4px; }
  .city-chip .city-ico, .city-chip img { width: 15px; height: 15px; }
}

/* =============================================================================================
   Фаза 101.2 — остальные детали варианта 5 концепта 2: шапка без плашки (название + капс-кикер
   слева, руны-пипсы справа), описание-«записка» с золотой линейкой, декоративный разделитель
   с ромбами («Характеристики» / «Требования»). Дописано в конец, переопределяет Фазу 101.1.
   ============================================================================================= */

.city-modal-head.city-modal-head--pips {
  display: flex;
  width: auto;
  max-width: none;
  align-items: center;
  gap: 11px;
  margin: 0 0px 13px 0;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.city-modal-head--pips .city-modal-head-t { flex: 1 1 auto; min-width: 0; }
.city-modal-head--pips .city-modal-head-t h3 {
  margin: 0;
  font-family: 'PT Serif', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.01em;
  color: #3b2409;
  text-shadow: 0 1px 0 rgba(255, 250, 232, 0.75);
}
.city-modal-head--pips .city-modal-head-sub {
  display: block;
  margin-top: 5px;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a6a33;
}
.city-modal-head--pips > span:not(.city-lvl-pips):not(.city-modal-head-t) {
  flex: 0 0 auto;
  margin-top: 0;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a6a33;
}

/* описание — вклеенная «записка» с золотой линейкой слева */
.city-modal-card .city-note {
  position: relative;
  margin: 0 0 14px;
  padding: 10px 13px 10px 17px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(120, 86, 40, 0.13), rgba(120, 86, 40, 0.05));
  box-shadow: inset 0 0 0 1px rgba(146, 106, 48, 0.28), inset 0 2px 4px rgba(90, 60, 20, 0.08);
}
.city-modal-card .city-note::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffe9ad, #d8a949 55%, #8a621f);
}
.city-modal-card .city-note p {
  margin: 0;
  font-family: 'PT Serif', Georgia, serif;
  font-size: 13.5px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: #5c4118;
}

/* декоративный разделитель с ромбами */
.city-modal-card .city-div { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }
.city-modal-card .city-div i {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(150, 110, 55, 0.55), transparent);
}
.city-modal-card .city-div b {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a6a33;
}
.city-modal-card .city-div s {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  text-decoration: none;
  background: linear-gradient(160deg, #ffe9ad, #8a621f);
  box-shadow: 0 0 0 1px rgba(120, 86, 40, 0.5);
}
@media (max-width: 430px) {
  .city-modal-head--pips .city-modal-head-t h3 { font-size: 18.5px; }
  .city-modal-card .city-note p { font-size: 13px; }
}

/* Фаза 101.2 — фикс: старое правило «.city-modal-head span» (капс, трекинг, цвет) ловило новый
   контейнер названия .city-modal-head-t и переносилось на h3. Сбрасываем наследование. */
.city-modal-head--pips .city-modal-head-t {
  display: block;
  margin-top: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}
.city-modal-head--pips .city-modal-head-t h3 { text-transform: none; }
.city-modal-head.city-modal-head--pips { margin-top: 2px; }

/* Фаза 101.2 — фикс отступа: без плашки шапка уезжала под верхнюю кромку рамки модалки. */
.city-modal-card .city-modal-head.city-modal-head--pips { margin-top: 20px; }
@media (max-width: 430px) {
  .city-modal-card .city-modal-head.city-modal-head--pips { margin-top: 20px; }
}
/* =============================================================================================
   Фаза 101.3 — шрифт Rubik (подключён в index.php), крупное значение + приглушённый «/ предел»
   в характеристиках и требованиях, разделители «ТРЕБУЕТСЯ» и «УСКОРИТЕЛИ» вместо подписей.
   Append-only, переопределяет Фазы 101.1–101.2.
   ============================================================================================= */

/* Rubik для интерфейсного текста городских модалок и уведомлений (заголовки и «записка»
   остаются на PT Serif). */
.city-modal-card,
.city-modal-card .city-info-row,
.city-modal-card .city-req,
.city-lvl-pips,
.city-boosts2,
.city-chip,
.city-modal-card .city-div b,
.city-modal-head--pips .city-modal-head-sub,
.toast.toast--card.toast--c2 {
  font-family: 'Rubik', system-ui, -apple-system, sans-serif;
}
.city-modal-head--pips .city-modal-head-t h3,
.city-modal-card .city-note p {
  font-family: 'PT Serif', Georgia, serif;
}

/* значения: число крупно, «/ предел» мельче и приглушённым цветом */
.city-modal-card .city-info-value,
.city-modal-card .city-req-value {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.005em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #3b2409;
}
.city-modal-card .city-info-value em,
.city-modal-card .city-req-value em {
  margin-left: 1px;
  font-size: 13.5px;
  font-style: normal;
  font-weight: 800;
  color: #9a7538;
}
.city-modal-card .city-req.is-bad .city-req-value { color: #8c3521; }
.city-modal-card .city-req.is-bad .city-req-value em { color: #b4795d; }
@media (max-width: 430px) {
  .city-modal-card .city-info-value,
  .city-modal-card .city-req-value { font-size: 16.5px; }
  .city-modal-card .city-info-value em,
  .city-modal-card .city-req-value em { font-size: 12.5px; }
}

/* блок ускорителей теперь под разделителем — прежняя подпись внутри не нужна */
.city-boosts2 { margin-top: 2px; padding-top: 10px; }
.city-boosts2-cap { display: none; }

/* =====================================================================================
   Фаза 102: «Лапа Фортуны» (рулетка сокровищ), сцена вскрытия сундука и новая модалка
   пополнения янтаря (вариант D утверждённого прототипа p103).
   Все новые классы под префиксом tsr- (treasure) -- в прототипе они назывались .card/.reel/
   .drops/.rows/.srow/.hero-*, что пересекается с существующими правилами этого файла,
   поэтому при переносе имена изменены. Блок только дополняет файл (append-only).
   ===================================================================================== */
.tsr-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px 12px;
  background: radial-gradient(circle at 50% 44%, rgba(255, 170, 60, .18), transparent 58%), rgba(8, 6, 5, .84);
  backdrop-filter: blur(3px);
}
.tsr-modal, .tsr-shop {
  position: relative; width: min(380px, 100%); max-height: min(90vh, 720px); overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tsr-bal {
  display: flex; align-items: center; gap: 5px; padding: 4px 10px 4px 6px; border-radius: 999px; flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(38, 24, 10, .95), rgba(20, 12, 5, .97));
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .24), inset 0 0 0 1px rgba(116, 80, 36, .9);
}
.tsr-bal img { width: 19px; height: 19px; }
.tsr-bal b { font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 900; font-size: 13px; color: #fff4d8; }
.tsr-empty { margin: 18px 4px; text-align: center; font-size: 12.5px; color: #c0a689; }

/* ---------- разделитель ---------- */
.tsr-div { display: flex; align-items: center; gap: 8px; margin: 13px 0 9px; }
.tsr-div i {
  width: 6px; height: 6px; flex: 0 0 auto; transform: rotate(45deg);
  background: linear-gradient(180deg, #ffe2a4, #c8862a); box-shadow: 0 0 6px rgba(255, 190, 80, .55);
}
.tsr-div s {
  flex: 1 1 auto; height: 1px; text-decoration: none;
  background: linear-gradient(90deg, rgba(146, 104, 50, 0), rgba(196, 146, 66, .75), rgba(146, 104, 50, 0));
}
.tsr-div b {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase;
  color: #e2c495; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

/* ---------- кнопки ---------- */
.tsr-cta {
  position: relative; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-radius: 15px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden;
  background: linear-gradient(180deg, #ffe7b0 0%, #f0bd55 42%, #cf8f26 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 0 0 1.5px rgba(122, 78, 20, .95),
    0 6px 0 #6d4512, 0 12px 22px rgba(0, 0, 0, .45);
  transition: transform .1s, box-shadow .1s;
}
.tsr-cta::after {
  content: ''; position: absolute; top: -70%; left: -40%; width: 45%; height: 240%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
  transform: rotate(18deg); animation: tsrCtaShine 3.4s ease-in-out infinite;
}
@keyframes tsrCtaShine { 0%, 70% { left: -45%; } 100% { left: 115%; } }
.tsr-cta:active { transform: translateY(4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 0 0 1.5px rgba(122, 78, 20, .95), 0 2px 0 #6d4512, 0 6px 14px rgba(0, 0, 0, .45); }
.tsr-cta[disabled] { filter: saturate(.55) brightness(.8); pointer-events: none; }
.tsr-cta-t { font-family: 'PT Serif', Georgia, serif; font-weight: 700; font-size: 16px; color: #3a2204; text-shadow: 0 1px 0 rgba(255, 252, 238, .6); }
.tsr-cta-price { display: flex; align-items: center; gap: 4px; font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 900; font-size: 12px; color: #4a2c06; }
.tsr-cta-price img { width: 15px; height: 15px; }
.tsr-btn { min-height: 44px; padding: 0 14px; border: 0; border-radius: 13px; cursor: pointer; font-weight: 800; font-size: 14px; transition: transform .1s; }
.tsr-btn:active { transform: translateY(2px); }
.tsr-btn--wood {
  color: #ffe8bd; background: linear-gradient(180deg, #6b4a23, #2f1e0b);
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .3), inset 0 0 0 1px rgba(120, 84, 38, .95), 0 4px 0 #1c1105, 0 8px 16px rgba(0, 0, 0, .4);
}
.tsr-btn--gold {
  color: #3a2204; text-shadow: 0 1px 0 rgba(255, 252, 238, .55);
  background: linear-gradient(180deg, #ffe7b0, #d99f34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 0 0 1px rgba(122, 78, 20, .9), 0 4px 0 #6d4512, 0 8px 16px rgba(0, 0, 0, .4);
}
.tsr-btn--sm { min-height: 34px; font-size: 12.5px; border-radius: 11px; }
.tsr-btn.is-spent { opacity: .4; pointer-events: none; }

/* переключатель «Быстро» */
.tsr-switch { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; font-size: 12px; color: #c0a689; font-weight: 700; cursor: pointer; }
.tsr-switch input { display: none; }
.tsr-switch i {
  width: 40px; height: 22px; border-radius: 999px; position: relative; display: block;
  background: linear-gradient(180deg, rgba(24, 15, 6, .95), rgba(40, 26, 11, .95));
  box-shadow: inset 0 0 0 1px rgba(116, 80, 36, .9), inset 0 2px 5px rgba(0, 0, 0, .6);
  transition: background .2s;
}
.tsr-switch i::after {
  content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(180deg, #f6dda8, #bb8a34);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .2s cubic-bezier(.3, 1.4, .4, 1);
}
.tsr-switch input:checked + i { background: linear-gradient(180deg, #7a5a1f, #4a3411); }
.tsr-switch input:checked + i::after { transform: translateX(18px); }

/* ---------- лента рулетки ---------- */
.tsr-case-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.tsr-case-title { font-family: 'PT Serif', Georgia, serif; font-weight: 700; font-size: 18px; color: #ffeec9; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.tsr-case-timer {
  display: flex; align-items: center; gap: 5px; padding: 4px 9px 4px 5px; border-radius: 999px;
  font-family: 'Exo 2', 'Manrope', sans-serif; font-size: 11.5px; font-weight: 800; color: #ffe3ac;
  background: linear-gradient(180deg, rgba(38, 24, 10, .95), rgba(20, 12, 5, .97));
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .24), inset 0 0 0 1px rgba(116, 80, 36, .9);
}
.tsr-case-timer img { width: 16px; height: 16px; }
.tsr-case-timer.is-free { padding: 4px 10px; color: #3a2204; background: linear-gradient(180deg, #ffe2a4, #d39c33); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
.tsr-reel {
  position: relative; height: 250px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #120c06, #1d1409 50%, #120c06);
  box-shadow: inset 0 0 0 1.5px rgba(146, 104, 50, .85), inset 0 6px 18px rgba(0, 0, 0, .8);
}
.tsr-reel-mask {
  position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
}
.tsr-strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.tsr-reel.is-spin .tsr-strip { filter: blur(1.6px); }
.tsr-item {
  position: relative; height: 82px; display: flex; align-items: center; gap: 11px; padding: 0 13px 0 11px; overflow: hidden;
  border-bottom: 1px solid rgba(146, 104, 50, .18);
}
.tsr-item::before {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 62%; opacity: .75; pointer-events: none;
  background: linear-gradient(270deg, rgba(255, 255, 255, .06), transparent 82%);
}
.tsr-ico {
  position: relative; z-index: 1; flex: 0 0 auto; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px;
  background: radial-gradient(circle at 50% 42%, rgba(0, 0, 0, .12), rgba(0, 0, 0, .3) 74%);
  box-shadow: inset 0 0 0 1px var(--rc, #9aa6b8), inset 0 1px 0 rgba(255, 232, 186, .16);
}
.tsr-item img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6)); }
.tsr-body { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tsr-name { font-family: 'PT Serif', Georgia, serif; font-size: 14px; color: #f6e5c6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsr-rar { font-size: 9.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--rc, #9aa6b8); }
.tsr-note { font-size: 10px; color: #a3865c; }
.tsr-side { position: relative; z-index: 1; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tsr-qty { font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 800; font-size: 17px; color: #fff4dd; text-shadow: 0 1px 0 rgba(0, 0, 0, .55); }
.tsr-pips { display: flex; gap: 3px; }
.tsr-pips i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4); }
.tsr-pips i.on { background: var(--rc, #9aa6b8); box-shadow: 0 0 7px var(--rc, #9aa6b8); }
.tsr-edge {
  position: absolute; right: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px 0 0 3px; opacity: .85;
  background: linear-gradient(180deg, transparent, var(--rc, #9aa6b8), transparent);
}
.tsr-slot {
  position: absolute; left: 8px; right: 8px; top: 50%; height: 82px; margin-top: -41px; border-radius: 12px; pointer-events: none;
  box-shadow: inset 0 0 0 1.5px rgba(255, 214, 138, .5), 0 0 0 1px rgba(0, 0, 0, .5);
  background: linear-gradient(90deg, rgba(255, 200, 110, .1), rgba(255, 200, 110, .02) 45%, rgba(255, 200, 110, .1));
}
.tsr-tick { position: absolute; left: 50%; margin-left: -9px; width: 18px; height: 11px; pointer-events: none; }
.tsr-tick::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #ffe2a4, #cf9530);
  clip-path: polygon(50% 100%, 0 0, 100% 0); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}
.tsr-tick--t { top: calc(50% - 52px); }
.tsr-tick--b { top: calc(50% + 41px); transform: rotate(180deg); }
.tsr-glow {
  position: absolute; left: 8px; right: 8px; top: 50%; height: 82px; margin-top: -41px; border-radius: 12px;
  pointer-events: none; opacity: 0; background: radial-gradient(closest-side, var(--rc, #ffb23d), transparent 76%);
}
.tsr-glow.is-win { animation: tsrReelWin 1.5s ease-out both; }
@keyframes tsrReelWin { 0% { opacity: 0; transform: scale(.9); } 22% { opacity: .75; transform: scale(1.04); } 100% { opacity: .22; transform: scale(1); } }
.tsr-case-row { display: flex; align-items: center; gap: 11px; margin: 13px 0 4px; }
.tsr-case-row .tsr-cta { flex: 1 1 auto; }

/* ---------- таблица дропа ---------- */
.tsr-drops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tsr-drop {
  position: relative; padding: 8px 5px 9px; border-radius: 12px; text-align: center;
  background: linear-gradient(180deg, rgba(58, 38, 16, .8), rgba(26, 16, 7, .92));
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .16), inset 0 0 0 1px rgba(116, 80, 36, .65);
}
.tsr-drop img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .55)); }
.tsr-drop-n { display: block; margin-top: 3px; font-family: 'PT Serif', Georgia, serif; font-size: 11px; color: #f0dfc0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsr-drop-r { display: block; font-family: 'Exo 2', 'Manrope', sans-serif; font-size: 10px; font-weight: 800; color: var(--rc, #9aa6b8); }
.tsr-drop-p { position: absolute; right: 4px; top: 4px; font-size: 9px; font-weight: 800; color: #a98d63; }
.tsr-drop::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px; background: var(--rc, #9aa6b8); opacity: .85; }

/* ---------- инвентарь сундуков ---------- */
.tsr-chests { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.tsr-chest-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 8px 9px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, rgba(58, 38, 16, .78), rgba(26, 16, 7, .92));
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .14), inset 0 0 0 1px rgba(116, 80, 36, .65);
}
.tsr-chest-tile.is-have { box-shadow: inset 0 1px 0 rgba(255, 224, 168, .2), 0 0 0 1px var(--rc, #9aa6b8), 0 0 16px rgba(255, 186, 80, .18); }
.tsr-chest-tile img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .55)); }
.tsr-ct-qty {
  position: absolute; right: 7px; top: 7px; min-width: 22px; padding: 1px 6px; border-radius: 999px;
  font-family: 'Exo 2', 'Manrope', sans-serif; font-size: 11px; font-weight: 900; color: #3a2204;
  background: linear-gradient(180deg, #ffe9b6, #d9a13a); box-shadow: 0 2px 5px rgba(0, 0, 0, .45);
}
.tsr-ct-name { font-family: 'PT Serif', Georgia, serif; font-size: 12.5px; font-weight: 700; color: #ffeec9; }
.tsr-ct-sub { font-size: 9.5px; line-height: 1.25; color: #b79a6d; min-height: 24px; }
.tsr-ct-btn {
  margin-top: 5px; width: 100%; min-height: 32px; border: 0; border-radius: 10px; cursor: pointer;
  font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 800; font-size: 12.5px; color: #43290a;
  background: linear-gradient(180deg, #ffe7b0, #cf8f26); box-shadow: 0 3px 0 #6d4512, inset 0 1px 0 rgba(255, 255, 255, .5);
}
.tsr-ct-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #6d4512, inset 0 1px 0 rgba(255, 255, 255, .5); }
.tsr-ct-btn[disabled] { filter: saturate(.25) brightness(.72); pointer-events: none; }

/* ---------- сцена вскрытия сундука ---------- */
.tsr-stage {
  position: relative; height: 330px; border-radius: 22px; overflow: hidden; touch-action: manipulation;
  background:
    radial-gradient(70% 50% at 50% 38%, rgba(255, 186, 74, .16), rgba(255, 186, 74, 0) 70%),
    linear-gradient(180deg, #2a1c0d 0%, #170f07 58%, #100a05 100%);
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .16), inset 0 0 0 1px rgba(116, 80, 36, .75), 0 14px 34px rgba(0, 0, 0, .5);
}
.tsr-sky {
  position: absolute; inset: -20%; opacity: .5;
  background:
    radial-gradient(1.5px 1.5px at 20% 22%, #ffe9bd, transparent 100%),
    radial-gradient(1.5px 1.5px at 72% 15%, #ffe0a5, transparent 100%),
    radial-gradient(1.2px 1.2px at 38% 8%, #fff2d6, transparent 100%),
    radial-gradient(1.4px 1.4px at 86% 32%, #ffd992, transparent 100%),
    radial-gradient(1.2px 1.2px at 12% 48%, #ffeec6, transparent 100%);
  animation: tsrTwinkle 4.5s ease-in-out infinite;
}
@keyframes tsrTwinkle { 0%, 100% { opacity: .35; } 50% { opacity: .75; } }
.tsr-rays {
  position: absolute; left: 50%; top: 52%; width: 460px; height: 460px; margin: -230px 0 0 -230px; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255, 205, 120, .17) 0deg 5deg, rgba(255, 205, 120, 0) 5deg 16deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 18%, rgba(0, 0, 0, .35) 52%, transparent 74%);
  mask-image: radial-gradient(closest-side, #000 18%, rgba(0, 0, 0, .35) 52%, transparent 74%);
  transition: opacity .5s ease; animation: tsrSpin 26s linear infinite;
}
@keyframes tsrSpin { to { transform: rotate(360deg); } }
.tsr-stage.is-charging .tsr-rays { opacity: .55; }
.tsr-stage.is-open .tsr-rays { opacity: .9; }
.tsr-halo {
  position: absolute; left: 50%; top: 56%; width: 250px; height: 250px; margin: -125px 0 0 -125px; border-radius: 50%; opacity: .35;
  background: radial-gradient(circle, rgba(255, 196, 92, .5) 0%, rgba(255, 170, 60, .18) 42%, rgba(255, 170, 60, 0) 70%);
  animation: tsrBreath 3.2s ease-in-out infinite;
}
@keyframes tsrBreath { 0%, 100% { transform: scale(.94); opacity: .3; } 50% { transform: scale(1.06); opacity: .5; } }
.tsr-stage.is-charging .tsr-halo { animation-duration: .5s; opacity: .85; }
.tsr-runering { position: absolute; left: 50%; top: 68%; width: 216px; height: 76px; margin-left: -108px; animation: tsrRing 18s linear infinite; }
.tsr-runering i {
  position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 2px;
  background: linear-gradient(180deg, #ffe6b0, #d79734); box-shadow: 0 0 9px rgba(255, 196, 92, .85);
}
.tsr-runering i:nth-child(1) { transform: rotate(0deg) translateX(104px) scaleY(.36); }
.tsr-runering i:nth-child(2) { transform: rotate(60deg) translateX(104px) scaleY(.36); }
.tsr-runering i:nth-child(3) { transform: rotate(120deg) translateX(104px) scaleY(.36); }
.tsr-runering i:nth-child(4) { transform: rotate(180deg) translateX(104px) scaleY(.36); }
.tsr-runering i:nth-child(5) { transform: rotate(240deg) translateX(104px) scaleY(.36); }
.tsr-runering i:nth-child(6) { transform: rotate(300deg) translateX(104px) scaleY(.36); }
@keyframes tsrRing { to { transform: rotate(360deg); } }
.tsr-stage.is-charging .tsr-runering { animation-duration: 1.6s; }
.tsr-stage.is-cards .tsr-runering { opacity: .25; }
.tsr-plate {
  position: absolute; left: 50%; bottom: 40px; width: 190px; height: 34px; margin-left: -95px; border-radius: 50%; filter: blur(1px);
  background: radial-gradient(closest-side, rgba(255, 190, 90, .42), rgba(255, 170, 60, 0) 72%);
}
.tsr-fx { position: absolute; inset: 0; pointer-events: none; }
.tsr-chest {
  position: absolute; left: 50%; top: 50%; width: 200px; height: 200px; margin: -108px 0 0 -100px;
  transform-origin: 50% 90%; animation: tsrFloat 3.4s ease-in-out infinite;
}
@keyframes tsrFloat { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-9px) rotate(.6deg); } }
.tsr-cimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .55)); }
.tsr-cimg--open { opacity: 0; transform: scale(.94); transition: opacity .14s ease, transform .5s cubic-bezier(.16, 1.5, .4, 1); }
.tsr-cshadow {
  position: absolute; left: 50%; bottom: -14px; width: 150px; height: 22px; margin-left: -75px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent 72%);
}
.tsr-stage.is-charging .tsr-chest { animation: tsrShake .12s linear infinite; }
@keyframes tsrShake {
  0% { transform: translate(-2px, 0) rotate(-1.4deg); }
  25% { transform: translate(2px, -1px) rotate(1.4deg); }
  50% { transform: translate(-2px, 1px) rotate(-1deg); }
  75% { transform: translate(2px, 0) rotate(1deg); }
  100% { transform: translate(-2px, 0) rotate(-1.4deg); }
}
.tsr-stage.is-open .tsr-chest { animation: tsrPop .6s cubic-bezier(.2, 1.6, .35, 1) both; }
@keyframes tsrPop { 0% { transform: scale(.9) translateY(6px); } 55% { transform: scale(1.1) translateY(-10px); } 100% { transform: scale(1) translateY(0); } }
.tsr-stage.is-open .tsr-cimg--closed { opacity: 0; }
.tsr-stage.is-open .tsr-cimg--open { opacity: 1; transform: scale(1); }
.tsr-stage.is-cards .tsr-chest {
  transform: scale(.52) translateY(96px); opacity: .22; animation: none;
  transition: transform .6s cubic-bezier(.3, .9, .2, 1), opacity .6s;
}
.tsr-beam {
  position: absolute; left: 50%; bottom: 96px; width: 120px; margin-left: -60px; height: 0; opacity: 0; filter: blur(3px);
  background: linear-gradient(180deg, rgba(255, 235, 180, 0) 0%, rgba(255, 216, 130, .55) 45%, rgba(255, 196, 92, .85) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%);
  mask-image: linear-gradient(180deg, transparent, #000 40%);
}
.tsr-stage.is-open .tsr-beam { animation: tsrBeam .9s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes tsrBeam { 0% { height: 0; opacity: 0; } 35% { height: 230px; opacity: 1; } 100% { height: 210px; opacity: .55; } }
.tsr-stage.is-cards .tsr-beam { opacity: .35; }
.tsr-flash {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 56%, #fff 0%, rgba(255, 236, 190, .85) 26%, rgba(255, 210, 130, 0) 64%);
}
.tsr-flash.is-fire { animation: tsrFlash .58s ease-out both; }
@keyframes tsrFlash { 0% { opacity: 0; transform: scale(.4); } 18% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
.tsr-spark {
  position: absolute; left: 50%; top: 56%; width: var(--s, 7px); height: var(--s, 7px); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6df, var(--c, #ffc55e) 55%, rgba(255, 150, 40, 0) 100%);
  box-shadow: 0 0 10px var(--c, #ffc55e);
  animation: tsrSparkFly var(--d, 1s) cubic-bezier(.12, .8, .3, 1) var(--dl, 0s) both;
}
@keyframes tsrSparkFly {
  0% { transform: translate(0, 0) scale(.4); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(var(--x, 0), var(--y, -120px)) scale(var(--sc, 1.1)); opacity: 0; }
}
.tsr-shard {
  position: absolute; left: 50%; top: 56%; width: 4px; height: 12px; border-radius: 2px;
  background: linear-gradient(180deg, #fff3d4, var(--c, #ffb93f));
  animation: tsrShardFly var(--d, 1.1s) cubic-bezier(.1, .75, .3, 1) var(--dl, 0s) both;
}
@keyframes tsrShardFly {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(var(--x, 0), var(--y, -150px)) rotate(var(--r, 320deg)); opacity: 0; }
}

/* ---------- карты из сундука ---------- */
.tsr-cards {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 7px;
  padding-bottom: 34px; pointer-events: none;
}
.tsr-stage.is-cards .tsr-cards { pointer-events: auto; }
.tsr-card { position: relative; width: 96px; height: 138px; flex: 0 0 auto; perspective: 900px; opacity: 0; transform-origin: 50% 100%; }
.tsr-card.is-out { animation: tsrCardOut .66s cubic-bezier(.16, 1.3, .3, 1) both; animation-delay: var(--dl, 0s); }
@keyframes tsrCardOut {
  0% { opacity: 0; transform: translateY(74px) scale(.35) rotate(var(--rot0, 0deg)); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(var(--rot, 0deg)); }
}
.tsr-card-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .58s cubic-bezier(.3, 1.05, .3, 1); }
.tsr-card.is-flip .tsr-card-in { transform: rotateY(180deg); }
.tsr-cards .tsr-card:not(.is-flip) { cursor: pointer; }
.tsr-cards .tsr-card:not(.is-flip) .tsr-card-in { animation: tsrCardWait 2.4s ease-in-out infinite; }
@keyframes tsrCardWait { 0%, 100% { transform: translateY(0) rotateY(0deg); } 50% { transform: translateY(-5px) rotateY(-6deg); } }
.tsr-cards .tsr-card:not(.is-flip)::after {
  content: ''; position: absolute; left: 50%; bottom: -16px; width: 26px; height: 5px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 208, 106, .5), transparent 70%);
  animation: tsrTapPulse 1.5s ease-in-out infinite;
}
@keyframes tsrTapPulse { 0%, 100% { opacity: .6; transform: translateX(-50%) translateY(0); } 50% { opacity: 1; transform: translateX(-50%) translateY(-3px); } }
.tsr-card.is-flip { opacity: 1; animation: tsrCardLand .34s cubic-bezier(.2, 1.5, .3, 1) forwards; }
@keyframes tsrCardLand { 0% { opacity: 1; transform: translateY(-6px) scale(1.06); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.tsr-card-face, .tsr-card-back {
  position: absolute; inset: 0; border-radius: 12px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.tsr-card-back {
  display: grid; place-items: center;
  border-image: url("../img/ui/r_wood.png") 34 fill / 11px stretch;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .5);
}
.tsr-card-back::before { content: ''; position: absolute; inset: 7px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(220, 168, 84, .55); }
.tsr-card-back img { width: 40px; height: 40px; opacity: .92; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }
.tsr-card-back::after {
  content: ''; position: absolute; top: -60%; left: -40%; width: 60%; height: 220%; transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255, 245, 220, 0), rgba(255, 245, 220, .35), rgba(255, 245, 220, 0));
  animation: tsrCardShine 2.6s ease-in-out infinite;
}
@keyframes tsrCardShine { 0%, 65% { left: -50%; } 100% { left: 110%; } }
.tsr-card-face {
  transform: rotateY(180deg); display: flex; flex-direction: column;
  background: linear-gradient(180deg, #f3e4c4, #d9c29a);
  box-shadow: inset 0 0 0 1.5px rgba(120, 82, 34, .9), 0 10px 22px rgba(0, 0, 0, .5);
}
.tsr-card-art { position: relative; flex: 1 1 auto; overflow: hidden; }
.tsr-card-art::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 50% 38%, var(--aura, rgba(255, 190, 90, .55)), rgba(0, 0, 0, 0) 72%), linear-gradient(180deg, #2a1d0e, #120c06);
}
.tsr-card-art img {
  position: absolute; left: 50%; top: 50%; width: 94%; height: 94%; transform: translate(-50%, -50%);
  object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .55));
}
.tsr-card-tier { position: absolute; left: 5px; top: 5px; display: flex; gap: 2px; }
.tsr-card-tier i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.tsr-card-tier i.on { background: var(--rc, #ffb23d); box-shadow: 0 0 6px var(--rc, #ffb23d); }
.tsr-card-kind {
  position: absolute; right: 4px; top: 4px; padding: 2px 5px; border-radius: 5px;
  font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #1a1008;
  background: rgba(255, 224, 168, .88);
}
.tsr-card-plate {
  flex: 0 0 auto; padding: 5px 6px 6px; text-align: center;
  background: linear-gradient(180deg, rgba(60, 40, 18, .95), rgba(32, 21, 9, .98));
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .3);
}
.tsr-card-name { display: block; font-family: 'PT Serif', Georgia, serif; font-weight: 700; font-size: 11.5px; line-height: 1.1; color: #ffeec9; }
.tsr-card-rar { display: block; margin-top: 2px; font-size: 8.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--rc, #ffb23d); }
.tsr-card-glow {
  position: absolute; inset: -14px; border-radius: 18px; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(closest-side, var(--rc, #ffb23d), rgba(0, 0, 0, 0) 70%);
}
.tsr-card.is-flip .tsr-card-glow { opacity: .42; }
.tsr-card.is-legend.is-flip .tsr-card-glow { opacity: .65; animation: tsrLegendPulse 1.6s ease-in-out infinite; }
@keyframes tsrLegendPulse { 0%, 100% { opacity: .5; } 50% { opacity: .85; } }
.tsr-card-new {
  position: absolute; left: 50%; top: -9px; transform: translateX(-50%) scale(0); z-index: 3;
  padding: 2px 8px; border-radius: 999px; font-size: 8.5px; font-weight: 900; letter-spacing: .1em; white-space: nowrap;
  color: #3d2406; background: linear-gradient(180deg, #fff0c4, #e0a93c);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.tsr-card-new--dup { color: #10222f; background: linear-gradient(180deg, #d4efff, #6fb6ff); }
.tsr-card.is-flip .tsr-card-new { animation: tsrNewPop .4s cubic-bezier(.2, 1.7, .3, 1) .28s both; }
@keyframes tsrNewPop { to { transform: translateX(-50%) scale(1); } }

/* ---------- подвал и результат сцены ---------- */
.tsr-chest-foot { margin-top: 14px; text-align: center; transition: opacity .3s; }
.tsr-chest-foot.is-hide { display: none; }
.tsr-locks { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.tsr-pip { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 224, 168, .18); box-shadow: inset 0 0 0 1px rgba(146, 104, 50, .8); transition: background .3s, box-shadow .3s; }
.tsr-pip.is-on { background: linear-gradient(180deg, #ffe2a4, #cf9530); box-shadow: 0 0 8px rgba(255, 190, 80, .8); }
.tsr-chest-hint { font-size: 11.5px; color: #c0a689; }
.tsr-result { margin-top: 12px; min-height: 44px; display: none; }
.tsr-result.is-on { display: block; animation: tsrFadeIn .3s ease both; }
@keyframes tsrFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tsr-result-row { display: flex; gap: 9px; }
.tsr-result-row .tsr-btn { flex: 1 1 0; }
.tsr-count { flex: 0 0 auto; align-self: center; font-size: 11.5px; color: #c9a877; }
.tsr-count b { font-family: 'Exo 2', 'Manrope', sans-serif; font-size: 16px; font-weight: 800; color: #ffe0a3; }
.tsr-count em { font-style: normal; margin: 0 4px 0 1px; font-size: 12px; color: #8f7245; }

/* ---------- кнопка рулетки на карте города ---------- */
.city-fortune-btn {
  position: absolute; right: 12px; top: calc(var(--hud-height, 96px) + 12px); z-index: 44;
  width: 62px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .55));
}
.city-fortune-btn img { width: 62px; height: 62px; object-fit: contain; animation: tsrFortuneBob 3.2s ease-in-out infinite; }
@keyframes tsrFortuneBob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-4px) rotate(1.5deg); } }
.city-fortune-btn b {
  padding: 2px 8px; border-radius: 999px; font-family: 'Exo 2', 'Manrope', sans-serif; font-size: 9.5px; font-weight: 900;
  letter-spacing: .06em; text-transform: uppercase; color: #3a2204; white-space: nowrap;
  background: linear-gradient(180deg, #ffe9b6, #d9a13a); box-shadow: 0 2px 6px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.city-fortune-btn:active img { transform: translateY(2px) scale(.96); }
.city-fortune-btn.has-free b { color: #10240f; background: linear-gradient(180deg, #ccf7cf, #62b071); }

/* ---------- модалка янтаря: вариант D (герой-набор + тонкие строки) ---------- */
.tsr-shop { padding-bottom: 14px; }
.tsr-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 11px; padding: 12px 12px 13px; margin-bottom: 9px;
  border-image: url("../img/ui/r_wood.png") 34 fill / 13px stretch;
  box-shadow: 0 0 0 1px rgba(255, 206, 110, .45), 0 0 18px rgba(255, 186, 80, .25);
}
.tsr-hero-ray {
  position: absolute; inset: -60% -20%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 18% 50%, rgba(255, 196, 92, .16) 0deg 4deg, rgba(255, 196, 92, 0) 4deg 14deg);
  animation: tsrSpin 30s linear infinite;
}
.tsr-hero > img {
  position: relative; z-index: 1; width: 58px; height: 58px; object-fit: contain;
  filter: drop-shadow(0 4px 9px rgba(0, 0, 0, .6)); animation: tsrHeroBob 2.8s ease-in-out infinite;
}
@keyframes tsrHeroBob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.03); } }
.tsr-hero-body { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tsr-hero-flag {
  align-self: flex-start; margin-bottom: 1px; padding: 1px 8px; border-radius: 7px;
  font-size: 8.5px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; color: #35110a;
  background: linear-gradient(180deg, #ffd0a0, #e0642c);
}
.tsr-hero-amt {
  display: flex; align-items: baseline; gap: 7px; flex-wrap: nowrap; white-space: nowrap;
  font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 800; font-size: 22px; line-height: 1.05; color: #fff3d8;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5);
}
.tsr-hero-amt em { font-style: normal; font-size: 11.5px; font-weight: 800; color: #86d191; white-space: nowrap; }
.tsr-hero-sub { font-size: 10px; color: #c1a375; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsr-hero-buy {
  position: relative; z-index: 1; flex: 0 0 auto; min-width: 82px; border: 0; cursor: pointer; padding: 9px 10px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 800; font-size: 14px; color: #43290a;
  background: linear-gradient(180deg, #ffe7b0, #cf8f26); box-shadow: 0 4px 0 #6d4512, inset 0 1px 0 rgba(255, 255, 255, .5);
}
.tsr-hero-buy svg { width: 13px; height: 13px; }
.tsr-hero-buy:active { transform: translateY(3px); box-shadow: 0 1px 0 #6d4512, inset 0 1px 0 rgba(255, 255, 255, .5); }
.tsr-hero-buy[disabled], .tsr-srow[disabled] { filter: saturate(.4) brightness(.8); pointer-events: none; }
.tsr-rows { display: flex; flex-direction: column; gap: 6px; }
.tsr-srow {
  display: grid; grid-template-columns: 38px 1fr auto auto; align-items: center; gap: 9px; padding: 6px 9px;
  border: 0; cursor: pointer; text-align: left;
  border-image: url("../img/ui/r_wood.png") 34 fill / 11px stretch;
}
.tsr-srow:active { transform: translateY(1px); filter: brightness(1.06); }
.tsr-srow img { width: 36px; height: 36px; object-fit: contain; }
.tsr-srow-amt { font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 800; font-size: 17px; color: #ffeec9; }
.tsr-srow-bonus { font-style: normal; font-size: 11px; font-weight: 800; color: #86d191; }
.tsr-srow-bonus--none { color: #7d6640; }
.tsr-srow-price {
  min-width: 74px; text-align: center; padding: 5px 10px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 800; font-size: 12.5px; color: #43290a;
  background: linear-gradient(180deg, #ffe7b0, #cf8f26); box-shadow: 0 3px 0 #6d4512;
}
.tsr-srow-price svg { width: 12px; height: 12px; }
.tsr-repeat {
  display: flex; align-items: center; gap: 8px; margin: 0 0 9px; padding: 6px 9px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(58, 38, 16, .8), rgba(26, 16, 7, .92));
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .16), inset 0 0 0 1px rgba(116, 80, 36, .65); cursor: pointer;
}
.tsr-repeat img { width: 26px; height: 26px; }
.tsr-repeat-t { flex: 1 1 auto; font-size: 11px; color: #c1a375; }
.tsr-repeat-t b { color: #ffeec9; font-weight: 800; }
.tsr-safe { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px; font-size: 11px; color: #a3865c; }
.tsr-safe-i { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; background: radial-gradient(circle at 40% 35%, #ffe4a8, #b47f2a); box-shadow: 0 0 8px rgba(255, 196, 96, .5); }
.tsr-shop-status { margin: 16px 4px; text-align: center; font-size: 12.5px; color: #c0a689; }

@media (max-width: 400px) {
  .tsr-stage { height: 306px; }
  .tsr-card { width: 90px; height: 130px; }
  .tsr-reel { height: 232px; }
  .tsr-chests { gap: 8px; }
  .city-fortune-btn, .city-fortune-btn img { width: 56px; }
  .city-fortune-btn img { height: 56px; }
}

/* контейнеры экранов рулетки / сундука */
.tsr-case { position: relative; }
.tsr-stage-hold { position: relative; }
.tsr-cta--slim { min-height: 44px; border-radius: 13px; }
.tsr-cta--slim .tsr-cta-t { font-size: 15px; }
/* иконка-картинка внутри бейджа кнопки «Лапа Фортуны» в Коллекции */
.lane-clash-predict-btn .misc-icon-badge img { width: 20px; height: 20px; object-fit: contain; display: block; }

/* Фаза 102 (правка по итогам QA): собственная тёмная панель вместо пергаментной
   .city-modal-card -- утверждённый концепт p103 построен на тёмном фоне, светлый пергамент
   убивал контраст подписей (#c0a689 по светлому) и обрезал сетку призов по ширине. */
.tsr-modal {
  padding: 15px 14px 16px; border-radius: 22px; color: #fff3da;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 176, 66, .12), rgba(255, 176, 66, 0) 62%),
    linear-gradient(180deg, #2b1c0e 0%, #1a1108 58%, #120c06 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 231, 182, .22), inset 0 0 0 2px rgba(146, 104, 50, .95),
    0 0 0 1px rgba(255, 206, 110, .28), 0 26px 60px rgba(0, 0, 0, .68);
}
.tsr-close {
  position: absolute; right: 8px; top: 8px; z-index: 6; width: 34px; height: 34px; padding: 0;
  border: 0; background: none; cursor: pointer;
}
.tsr-close img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .6)); }
.tsr-close:active { transform: scale(.94); }
.tsr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 38px; margin-bottom: 12px; }
.tsr-head-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tsr-head-t h3 {
  margin: 0; font-family: 'PT Serif', Georgia, serif; font-weight: 700; font-size: 19px; line-height: 1.1;
  color: #ffeec9; text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
.tsr-head-sub { font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #b1936a; }
.tsr-case-title { font-family: 'Exo 2', 'Manrope', sans-serif; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; color: #b1936a; }

/* Фаза 102 (правки по итогам визуального QA):
   1) border-image r_wood на тонких строках магазина и на герой-плашке при растяжении давал светлую
      «рамку» по краю (текстура рассчитана на высокие блоки) -- заменено на тот же тёмный градиент
      с золотым внутренним кантом, что у остальных плиток раздела;
   2) бейдж типа карты переехал в низ арта и получил nowrap -- в две строки он наезжал на пипсы
      редкости и на бейдж «Новое»;
   3) плашка имени карты получила фиксированную высоту -- иначе двухстрочные имена ломали ряд;
   4) лучи и луч света в сцене сундука приглушены, светлое пятно перебивало арт. */
.tsr-hero {
  border-image: none; border-radius: 16px;
  background:
    radial-gradient(120% 90% at 22% 0%, rgba(255, 196, 92, .18), rgba(255, 196, 92, 0) 62%),
    linear-gradient(180deg, rgba(74, 48, 20, .95), rgba(30, 19, 8, .98));
  box-shadow: inset 0 1px 0 rgba(255, 231, 182, .26), inset 0 0 0 1.5px rgba(214, 160, 74, .85),
    0 0 18px rgba(255, 186, 80, .22), 0 10px 22px rgba(0, 0, 0, .45);
}
.tsr-srow {
  border-image: none; border-radius: 13px; padding: 8px 10px;
  background: linear-gradient(180deg, rgba(58, 38, 16, .92), rgba(24, 15, 7, .96));
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .18), inset 0 0 0 1px rgba(146, 104, 50, .85);
}
.tsr-card-back { border-image: none; border-radius: 12px; background: linear-gradient(180deg, #5c3d1b, #2a1a09); box-shadow: inset 0 0 0 1.5px rgba(214, 160, 74, .8), 0 8px 18px rgba(0, 0, 0, .5); }
.tsr-hero-sub { font-size: 10.5px; color: #c9ab7c; }
.tsr-repeat-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsr-card-kind {
  top: auto; right: 4px; bottom: 4px; white-space: nowrap; max-width: calc(100% - 8px);
  overflow: hidden; text-overflow: ellipsis; font-size: 7.5px; padding: 2px 4px;
}
.tsr-card-plate { min-height: 40px; display: flex; flex-direction: column; justify-content: center; }
.tsr-card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tsr-stage.is-charging .tsr-rays { opacity: .4; }
.tsr-stage.is-open .tsr-rays { opacity: .6; }
.tsr-stage.is-cards .tsr-rays { opacity: .34; }
.tsr-stage.is-cards .tsr-beam { opacity: .16; }

/* ===================== Фаза 102.1 — доработки по замечаниям =====================
   Блок только ДОПОЛНЯЕТ ранее написанные правила (ничего не удаляется), поэтому все
   изменения оформлены как перекрытия с конца файла.

   п.1 Нарисованный кит модалок. Новые модалки («Лапа Фортуны», сундук, покупка янтаря)
       переводятся на ту же деревянную раму с пергаментом, что и модалки взаимодействия
       со зданиями (.city-modal-card → border-image modal.png + close.png в углу).
       Поскольку пергамент светлый, все заголовки и подписи, ранее рассчитанные на тёмную
       панель, здесь перекрашиваются в тёмно-коричневый; внутренние панели (лента, сетка
       призов, сцена сундука, строки магазина) остаются тёмными — они читаются как врезки.
   п.5 Максимальная высота всех модалок — 75dvh со скроллом внутри тела. */
.tsr-modal, .tsr-shop {
  width: min(360px, 100%);
  padding: 14px 40px 40px;
  border-radius: 0;
  border: 0;
  border-image: url("../img/ui/modal.png") 168 fill / 48px stretch;
  background: none;
  box-shadow: none;
  color: #3f2708;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .6));
  display: flex;
  flex-direction: column;
  max-height: 75dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.tsr-modal::-webkit-scrollbar { width: 0; height: 0; }
.city-modal-card { max-height: 75dvh; }
/* Крестик и шапка скроллятся вместе с содержимым — рама border-image остаётся на месте. */
.tsr-modal > * { flex: 0 0 auto; }
/* Крестик — круглый, как в модалках зданий. */
.tsr-close {
  right: -1px; top: -1px; width: 42px; height: 42px;
  background: url("../img/ui/close.png") center / 100% 100% no-repeat;
  transition: transform 110ms ease;
}
.tsr-close img { display: none; }
.tsr-close:active { transform: scale(.96); }
/* Текст по пергаменту. */
.tsr-head { padding-right: 40px; }
.tsr-head-t h3 { color: #3f2708; text-shadow: 0 1px 0 rgba(255, 244, 214, .5); }
.tsr-head-sub, .tsr-case-title { color: #7a5524; }
.tsr-empty, .tsr-shop-status, .tsr-chest-hint { color: #6b4a1c; }
.tsr-switch { color: #5c3f16; }
.tsr-safe { color: #6b4a1c; }
.tsr-div b { color: #5c3f16; }
.tsr-div s { background: linear-gradient(90deg, rgba(120, 82, 34, 0), rgba(120, 82, 34, .5), rgba(120, 82, 34, 0)); }
.tsr-div i { background: #8a6027; }
/* Узкая рама → компактнее карты и плитки, иначе ряд из трёх карт не влезает в 276px. */
.tsr-cards { gap: 5px; }
.tsr-card { width: 86px; height: 124px; }
@media (max-width: 400px) { .tsr-card { width: 82px; height: 118px; } }

/* п.3 Кратные прокрутки ×2/×5 под основной кнопкой. */
.tsr-multi-row { display: flex; gap: 8px; margin: 8px 0 2px; }
.tsr-mbtn {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 6px; border: 0; border-radius: 12px; cursor: pointer; color: #ffeec9;
  background: linear-gradient(180deg, rgba(74, 48, 20, .96), rgba(30, 19, 8, .98));
  box-shadow: inset 0 1px 0 rgba(255, 231, 182, .22), inset 0 0 0 1.5px rgba(146, 104, 50, .9), 0 6px 14px rgba(0, 0, 0, .35);
  transition: transform 110ms ease, filter 110ms ease;
}
.tsr-mbtn b { font-family: 'Exo 2', 'Manrope', sans-serif; font-size: 14px; font-weight: 900; color: #ffdc8a; }
.tsr-mbtn em {
  display: inline-flex; align-items: center; gap: 3px; font-style: normal;
  font-family: 'Exo 2', 'Manrope', sans-serif; font-size: 12px; font-weight: 800; color: #f2dcb0;
}
.tsr-mbtn em img { width: 15px; height: 15px; }
.tsr-mbtn:active { transform: scale(.97); }
.tsr-mbtn:disabled { filter: grayscale(.5) brightness(.8); cursor: default; }

/* Итог серии ×2/×5. */
.tsr-won {
  margin: 10px 0 2px; padding: 9px 10px 10px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(44, 29, 12, .96), rgba(22, 14, 6, .98));
  box-shadow: inset 0 1px 0 rgba(255, 224, 168, .18), inset 0 0 0 1px rgba(146, 104, 50, .85);
}
.tsr-won-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tsr-won-head b { font-size: 11.5px; font-weight: 800; color: #ffdc8a; }
.tsr-won-x { border: 0; background: none; padding: 0; font-size: 11px; font-weight: 700; color: #b1936a; cursor: pointer; }
.tsr-won-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.tsr-won-i {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(62, 40, 17, .95), rgba(26, 16, 7, .98));
  box-shadow: inset 0 0 0 1px var(--rc, #9aa6b8), 0 0 10px rgba(255, 186, 80, .12);
}
.tsr-won-i img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.tsr-won-i em {
  position: absolute; right: -2px; bottom: -3px; padding: 1px 4px; border-radius: 6px; font-style: normal;
  font-family: 'Exo 2', 'Manrope', sans-serif; font-size: 9.5px; font-weight: 900; color: #1a1008;
  background: linear-gradient(180deg, #ffe4a8, #e0ad4c);
}

/* п.4 Сундук вскрывается только по клику: подсказка + пульсация кликабельного сундука. */
.tsr-chest.is-tap { cursor: pointer; }
.tsr-chest.is-tap::after {
  content: ''; position: absolute; left: 50%; top: 52%; width: 150px; height: 150px; margin: -75px 0 0 -75px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 206, 110, .3), rgba(255, 206, 110, 0) 70%);
  animation: tsrTapPulse 1.7s ease-in-out infinite;
}
@keyframes tsrTapPulse { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: .9; transform: scale(1.08); } }
.tsr-chest-tap {
  margin-top: 5px; font-size: 11.5px; font-weight: 800; color: #7a5524;
  animation: tsrTapHint 1.9s ease-in-out infinite;
}
.tsr-chest-tap.is-hide { display: none; }
@keyframes tsrTapHint { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* п.4 Анимация переворота вернулась: idle-покачивание переехало на отдельную обёртку,
   раньше keyframes tsrCardWait на .tsr-card-in перебивал transition rotateY(180deg)
   и карта «прыгала» в открытое состояние без анимации. */
.tsr-card-idle { position: absolute; inset: 0; transform-style: preserve-3d; }
.tsr-cards .tsr-card:not(.is-flip) .tsr-card-idle { animation: tsrCardWait 2.4s ease-in-out infinite; }
.tsr-cards .tsr-card:not(.is-flip) .tsr-card-in { animation: none; }

/* п.4 Арт занимает карточку целиком (были чёрные поля слева/справа и снизу из-за 94%/contain),
   слои питомца растягиваются так же. */
.tsr-card-art img, .tsr-card-art .pet-layers {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform: none;
  object-fit: cover; border-radius: 0;
}
.tsr-card-art .pet-layers { display: block; }
.tsr-card-art .pet-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* п.4 Бейдж «Питомец/Заклинание» — по центру снизу арта. */
.tsr-card-kind {
  left: 50%; right: auto; bottom: 4px; top: auto; transform: translateX(-50%);
  max-width: calc(100% - 10px); text-align: center;
}

/* Фаза 102.1 (правка по итогам визуального QA рамы): верхняя кромка modal.png занимает ~40px,
   поэтому шапка модалки уезжала под угловой узор, а заголовок ломался в две строки под крестиком.
   Увеличен верхний отступ, уменьшен кегль заголовка, подпись уведена в одну строку. */
.tsr-modal, .tsr-shop { padding: 40px 34px 34px; }
.tsr-head { align-items: flex-start; padding-right: 30px; margin-bottom: 10px; }
.tsr-head-t h3 { font-size: 17px; }
.tsr-head-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px; letter-spacing: .1em; }
.tsr-bal { padding: 3px 9px 3px 5px; }
.tsr-bal img { width: 17px; height: 17px; }
.tsr-bal b { font-size: 12px; }
/* Нижняя кромка рамы перекрывала последнюю строку контента при скролле. */
.tsr-modal > *:last-child { margin-bottom: 6px; }

/* Фаза 102.1 (правки по итогам QA на 390px внутри узкой рамы modal.png):
   1) длинные имена карт («Искра Пробуждения») обрезались по ширине — разрешён перенос по слогам;
   2) строка результата («0/3 вскрыто» + кнопки) не влезала в 276px и уезжала под раму;
   3) в герой-плашке магазина «+11% янтаря» наезжал на кнопку покупки — бонус вынесен на строку ниже;
   4) подсказка «Нажмите на сундук» упиралась в нижнюю кромку рамы. */
.tsr-card-name { font-size: 10.5px; word-break: break-word; overflow-wrap: anywhere; hyphens: auto; }
.tsr-card-rar { font-size: 8px; letter-spacing: .06em; }
.tsr-result-row { gap: 6px; }
.tsr-count { font-size: 10px; white-space: nowrap; }
.tsr-result-row .tsr-btn { padding-left: 10px; padding-right: 10px; font-size: 11.5px; white-space: nowrap; }
.tsr-hero { padding-right: 10px; }
.tsr-hero-amt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.05; }
.tsr-hero-amt em { font-size: 9.5px; white-space: nowrap; }
.tsr-hero-buy { flex: 0 0 auto; }
.tsr-chest-foot { margin-bottom: 6px; }

/* Фаза 102.1: счётчик «N/3 вскрыто» на 390px залезал под кнопки — выносим его
   отдельной строкой над кнопками и центрируем. */
.tsr-result-row { flex-wrap: wrap; justify-content: center; }
.tsr-result-row .tsr-count { flex: 0 0 100%; text-align: center; margin: 0 0 4px; }

/* Фаза 102.2 (правки по репортам: призы вылезали за раму, контент скроллился поверх модалки,
   ×2/×5 отличались от основной кнопки, перенос «Быстро»/таймера).
   1) Скролл теперь во внутреннем контейнере .tsr-scroll: шапка и крестик остаются на месте,
      а рама modal.png больше не перекрывается содержимым (у .tsr-modal overflow: hidden).
   2) Сетка призов получает minmax(0, 1fr) + min-width: 0 — без этого содержимое карточек
      растягивало колонки и правая колонка уезжала за padding-box.
   3) ×2/×5 используют .tsr-cta (тот же градиент, рельеф и блик), строка — на всю ширину.
   4) Верхняя строка: «Прокруток» + баланс янтаря + тумблер «Быстро»; таймер — в шапке. */
.tsr-modal { overflow: hidden; }
.tsr-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.tsr-scroll::-webkit-scrollbar { width: 0; height: 0; }
.tsr-scroll > *:last-child { margin-bottom: 6px; }

.tsr-drops { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tsr-drop { min-width: 0; overflow: hidden; }
.tsr-drop b, .tsr-drop em, .tsr-drop span { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tsr-drop b { font-size: 10.5px; line-height: 1.2; }

.tsr-multi-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0 2px; }
.tsr-multi-row .tsr-cta { width: 100%; min-width: 0; }
.tsr-cta--multi { min-height: 40px; }
.tsr-cta--multi .tsr-cta-t { font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 900; font-size: 15px; }
.tsr-cta--multi .tsr-cta-price { font-size: 11.5px; }

.tsr-case-head { flex-wrap: nowrap; gap: 8px; }
.tsr-case-head .tsr-case-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsr-case-bal {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  padding: 3px 9px 3px 5px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(58, 34, 4, .92), rgba(32, 18, 3, .95));
  box-shadow: inset 0 0 0 1.5px rgba(214, 160, 74, .85);
  font-family: 'Exo 2', 'Manrope', sans-serif; font-weight: 900; font-size: 12px; color: #ffdc8a;
}
.tsr-case-bal img { width: 16px; height: 16px; }
.tsr-case-head .tsr-switch { margin-left: auto; }
.tsr-head .tsr-case-timer { flex: 0 0 auto; white-space: nowrap; }

/* Фаза 102.2: внутренности модалки можно было сдвинуть по горизонтали (жест/широкий ребёнок
   давал горизонтальный скролл у .tsr-scroll). Запрещаем ось X полностью: скролл только
   вертикальный, жест по X не перехватывается, дети не шире контейнера. */
.tsr-modal, .tsr-scroll { overflow-x: hidden; max-width: 100%; }
.tsr-scroll { touch-action: pan-y; overscroll-behavior-x: none; overscroll-behavior-y: contain; }
.tsr-scroll > * { max-width: 100%; }
.tsr-case, .tsr-stage-hold, .tsr-shop-list { min-width: 0; max-width: 100%; }
.tsr-case > *, .tsr-stage-hold > * { min-width: 0; max-width: 100%; }
.tsr-reel, .tsr-reel-mask, .tsr-strip { max-width: 100%; overflow-x: hidden; }
.tsr-won-grid, .tsr-chests, .tsr-cards { max-width: 100%; }

/* Фаза 102.2: внутренние блоки со сценами/лентой тоже не должны панорамироваться по X.
   touch-action: pan-y запрещает горизонтальный жест, не обрезая при этом свечения и
   вылетающие карты (overflow там остаётся видимым). */
.tsr-case, .tsr-stage, .tsr-stage-hold, .tsr-reel, .tsr-drops, .tsr-won-grid, .tsr-shop-list { touch-action: pan-y; }

/* Фаза 102.2 (регрессия предыдущего правила): `overflow-x: hidden` при `overflow-y: visible`
   по спецификации превращает вторую ось в `auto`, поэтому маска и сама лента призов стали
   вертикально прокручиваемыми — игрок мог отскроллить ленту и увидеть весь строп из 42 позиций
   вместо трёх стартовых. Возвращаем маске сплошной hidden, а ленте — visible (её сдвигает
   только transform), и запрещаем любой скролл-жест внутри окна рулетки. */
.tsr-reel, .tsr-reel-mask { overflow: hidden; }
.tsr-strip { overflow: visible; }
.tsr-reel, .tsr-reel-mask, .tsr-strip { touch-action: none; overscroll-behavior: none; }

/* `overflow: hidden` всё ещё оставляет элемент программно прокручиваемым (scrollTop можно
   выставить из JS или сместить фокусом), поэтому маске ленты ставим `clip` — она перестаёт
   быть скролл-контейнером вообще. */
.tsr-reel-mask { overflow: clip; }

/* Фаза 102.2: арт сундуков в PNG занимает ~52% ширины и ~58% высоты канвы (замерено по альфе
   с порогом 40), а иконки ресурсов — 92–99%. При одинаковом боксе с object-fit: contain сундуки
   выглядели почти вдвое мельче ресурсов. Компенсируем масштабом по data-kind="chest": бокс и
   сетка не меняются, увеличивается только сама картинка. Для ленты и плиток призов запас по
   месту есть, поэтому 1.7×/1.6× не задевает соседние элементы. */
.tsr-item[data-kind="chest"] img { transform: scale(1.7); transform-origin: center; }
.tsr-drop[data-kind="chest"] img { transform: scale(1.6); transform-origin: center; }
.tsr-won-i[data-kind="chest"] img { transform: scale(1.55); transform-origin: center; }
.tsr-item .tsr-ico, .tsr-drop, .tsr-won-i { overflow: hidden; }

/* Правка: у плиток «Выпало за N прокруток» бейдж количества лежит на нижней кромке, поэтому
   overflow: hidden срезал цифры. Возвращаем видимый overflow, а масштаб сундука уменьшаем до
   значения, при котором картинка остаётся внутри плитки. */
.tsr-won-i { overflow: visible; }
.tsr-won-i[data-kind="chest"] img { transform: scale(1.4); }

/* Правка: пилюля количества в «Выпало за N прокруток» была прижата за пределы плитки
   (right: -2px; bottom: -3px) и обрезалась кромкой блока. Убираем свес — пилюля лежит внутри
   плитки по центру низа, а сама картинка чуть приподнята, чтобы пилюля её не накрывала. */
.tsr-won-i em {
  right: auto; left: 50%; bottom: 2px; transform: translateX(-50%);
  max-width: calc(100% - 6px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}
.tsr-won-i img { margin-bottom: 7px; }

/* Правка: на плитках «В этой рулетке» сундук при 1.6 подходил под бейдж вероятности в углу.
   Слегка уменьшаем масштаб — читаемость сохраняется, наложения нет. */
.tsr-drop[data-kind="chest"] img { transform: scale(1.45); }

/* По правке: отступ справа у шапки модалки не нужен — обнуляем padding-right
   (перекрывает 30px из блока .tsr-head выше, правило append-only). */
.tsr-head { padding-right: 0; }

/* ---------- Фаза 102.3: снят второй хедер .city-hud ----------
   Ресурсные ячейки дублировали основной хедер (.game-hud.hud9) и убраны из разметки. Две рабочие
   кнопки — «Собрать всё» и строители — живут теперь в плавающей группе .city-actions слева,
   симметрично кнопке «Лапы Фортуны» справа. Правила только добавляются (файл append-only). */
.city-actions {
  position: absolute;
  z-index: 44;
  left: 12px;
  top: calc(var(--hud-height, 96px) + 12px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  pointer-events: none;
}
.city-actions > * { pointer-events: auto; }
.city-actions .city-hud-collect,
.city-actions .city-hud-builders { position: static; margin: 0; }
.city-actions .city-hud-builders {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #ffeecb;
  background: linear-gradient(180deg, rgba(52, 32, 14, 0.92), rgba(30, 18, 7, 0.94));
  border: 1px solid rgba(214, 165, 96, 0.55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 226, 170, 0.22);
  cursor: pointer;
}
@media (max-width: 420px) {
  .city-actions { left: 10px; gap: 6px; }
}

/* Фаза 102.3: названия призов в ленте — на Exo 2 вместо PT Serif (по правке дизайна).
   Файл append-only, поэтому строка 10526 не редактируется, а перекрывается здесь. */
.tsr-name { font-family: 'Exo 2', 'Manrope', sans-serif; }

/* ---------- Фаза 102.3 (исправление): коллизия имени .city-actions ----------
   Группа кнопок «Собрать всё» / строители была по ошибке названа .city-actions — этим же классом
   уже размечен ряд кнопок действий над зданием («Улучшить», «Подробнее», «Перейти»), поэтому
   правила выше сломали ему раскладку. Группа в разметке переименована в .city-hud-tools, а здесь
   восстанавливаются исходные значения .city-actions (файл append-only, строки выше не правим). */
.city-actions {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, -18%);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
  width: min(48vw, 236px);
  gap: 5px;
  z-index: 10;
  pointer-events: auto;
  animation: cityActionsIn 150ms ease-out;
}
.city-hud-tools {
  position: absolute;
  z-index: 44;
  left: 12px;
  top: calc(var(--hud-height, 96px) + 12px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  pointer-events: none;
}
.city-hud-tools > * { pointer-events: auto; }
.city-hud-tools .city-hud-collect,
.city-hud-tools .city-hud-builders { position: static; margin: 0; }
.city-hud-tools .city-hud-builders {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #ffeecb;
  background: linear-gradient(180deg, rgba(52, 32, 14, 0.92), rgba(30, 18, 7, 0.94));
  border: 1px solid rgba(214, 165, 96, 0.55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 226, 170, 0.22);
  cursor: pointer;
}
@media (max-width: 420px) {
  .city-hud-tools { left: 10px; gap: 6px; }
}

/* ==========================================================================
   Фаза 117: ЛИСТ КАРТЫ -- стили перенесены ОДИН В ОДИН из утверждённого
   прототипа proto_col1 (col1). Ничего не придумано заново: значения градиентов,
   теней, радиусов, размеров и цветов скопированы из прототипа, изменены только
   имена классов -- добавлен префикс cs- , чтобы generic-имена прототипа
   (.sheet/.tabs/.tb/.hero/.stat/.block/.btn/.rail/.note...) не столкнулись с
   уже существующими правилами репозитория. Блок только ДОПИСАН в конец файла.
   ========================================================================== */
.cs-sheet{
  position:fixed;inset:0;z-index:30;display:flex;flex-direction:column;
  background:
    radial-gradient(80% 45% at 50% 0%, rgba(126,74,30,.4), rgba(10,7,5,0) 62%),
    linear-gradient(180deg, #16100b 0%, #0a0705 62%);
  font-family:'Exo 2',sans-serif
}
.cs-top{flex:none;display:flex;align-items:center;gap:10px;padding:13px 14px 4px}
.cs-ico{
  width:38px;height:38px;flex:none;border:0;border-radius:13px;cursor:pointer;display:grid;place-items:center;
  background:linear-gradient(180deg, rgba(48,33,22,.9), rgba(22,15,10,.95));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.22);color:#e8c98c;font-size:17px
}
.cs-top .cs-who{flex:1;min-width:0;text-align:center}
.cs-kick{display:block;font-size:9px;font-weight:800;letter-spacing:.18em;text-transform:uppercase;color:#b0894f}
.cs-top .cs-who b{display:block;font-family:'PT Serif',serif;font-size:18px;color:#ffe6ae;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cs-gold{color:#ffd98a}

.cs-hero{flex:none;display:flex;align-items:center;gap:13px;padding:6px 16px 10px}
.cs-hero .cs-frame{
  position:relative;width:104px;flex:none;aspect-ratio:1/1.12;border-radius:16px;overflow:hidden;
  box-shadow:inset 0 0 0 2px rgba(255,205,120,.5), 0 12px 26px rgba(0,0,0,.6)
}
.cs-hero .cs-frame img{width:100%;height:100%;object-fit:cover;display:block}
.cs-hero .cs-frame:after{content:'';position:absolute;inset:0;box-shadow:inset 0 -26px 30px -16px rgba(8,5,3,.9)}
.cs-hero .cs-side{flex:1;min-width:0}
.cs-hero .cs-stars{display:flex;gap:3px;margin-bottom:6px}
.cs-hero .cs-stars span{width:14px;height:14px;display:block;background:#4a3a24;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
.cs-hero .cs-stars span.on{background:linear-gradient(180deg,#fff0bd,#e5a93f);filter:drop-shadow(0 0 6px rgba(255,190,90,.5))}
.cs-hero .cs-pills{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px}
.cs-pill{padding:4px 9px;border-radius:9px;font-size:10px;font-weight:800;letter-spacing:.05em}
.cs-pill.rar{color:#dcb6ff;background:rgba(170,110,255,.14);box-shadow:inset 0 0 0 1px rgba(190,140,255,.3)}
.cs-pill.mana{color:#a8d6ff;background:rgba(90,168,232,.14);box-shadow:inset 0 0 0 1px rgba(120,190,255,.3)}
.cs-pill.role{color:#e9cb94;background:rgba(255,214,140,.1);box-shadow:inset 0 0 0 1px rgba(255,216,150,.22)}
.cs-power{
  display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;font-size:14px;font-weight:800;color:#ffe3a8;
  background:linear-gradient(180deg, rgba(48,33,20,.95), rgba(20,13,9,.97));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.26)
}
.cs-power img{width:16px;height:16px}

.cs-tabs{
  flex:none;display:flex;gap:4px;margin:0 14px 10px;padding:4px;border-radius:14px;
  background:linear-gradient(180deg, rgba(30,21,14,.92), rgba(14,9,6,.95));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.12)
}
.cs-tb{
  flex:1;height:38px;border:0;border-radius:11px;cursor:pointer;position:relative;
  font-family:'Exo 2',sans-serif;font-size:11.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
  color:#9d8259;background:transparent
}
.cs-tb.is-on{
  color:#ffe3a8;background:linear-gradient(180deg, rgba(58,40,25,.96), rgba(28,19,12,.98));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.28), 0 4px 12px rgba(0,0,0,.4)
}
.cs-tb .cs-bell{position:absolute;top:6px;right:8px;width:7px;height:7px;border-radius:50%;background:#ff8a4c;box-shadow:0 0 8px rgba(255,120,60,.9)}
.cs-body{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:0 14px 34px}
.cs-body::-webkit-scrollbar{width:0}
.cs-foot{
  flex:none;padding:10px 14px calc(12px + env(safe-area-inset-bottom));
  background:linear-gradient(180deg, rgba(10,7,5,0), rgba(9,6,4,.96) 40%)
}
.cs-btn{
  border:0;cursor:pointer;height:50px;padding:0 18px;border-radius:15px;width:100%;
  font-family:'Exo 2',sans-serif;font-size:14.5px;font-weight:800;color:#3c2407;
  background:linear-gradient(180deg,#ffeec2 0%,#f6cd80 42%,#dfa84c 100%);
  box-shadow:0 4px 0 #7d4e12, 0 10px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.6);
  display:flex;align-items:center;justify-content:center;gap:8px
}
.cs-btn:active{transform:translateY(2px);box-shadow:0 2px 0 #7d4e12}
.cs-btn[disabled]{filter:grayscale(.55) brightness(.7);box-shadow:0 4px 0 #3d2a12;cursor:default}
.cs-btn.ghost{
  background:linear-gradient(180deg, rgba(58,40,26,.95), rgba(26,18,12,.96));color:#e9cb94;height:44px;font-size:13px;
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.24), 0 8px 18px rgba(0,0,0,.4)
}
.cs-btn.ghost:active{transform:translateY(1px);box-shadow:inset 0 0 0 1px rgba(255,216,150,.24)}
.cs-btn.danger{background:linear-gradient(180deg,#f0c0a6,#d98d6a 45%,#b4643f);box-shadow:0 4px 0 #6a3318,0 10px 22px rgba(0,0,0,.4)}

.cs-stat{display:flex;align-items:center;gap:9px;padding:7px 0;border-bottom:1px solid rgba(255,216,150,.07)}
.cs-stat:last-child{border-bottom:0}
.cs-stat .nm{flex:none;width:86px;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#a98f66}
.cs-stat .cs-rail{flex:1;height:6px;border-radius:4px;background:rgba(255,255,255,.06);overflow:hidden}
.cs-stat .cs-rail i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,#f0b860,#ffe3a0)}
.cs-stat .vl{flex:none;min-width:58px;text-align:right;font-size:13px;font-weight:800;color:#ffe3a8}
.cs-block{
  margin:12px 0 0;padding:12px 13px;border-radius:15px;
  background:linear-gradient(180deg, rgba(44,30,19,.9), rgba(18,12,8,.94));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.14)
}
.cs-block h4{margin:0 0 6px;font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#c69b64}
.cs-block p{margin:0;font-size:12.5px;line-height:1.55;color:#ddc9a6}
.cs-block b.sp{color:#ffd98a;display:block;font-family:'PT Serif',serif;font-size:14px;margin-bottom:3px}

.cs-starway{padding:12px 0 2px}
.cs-starrow{display:flex;justify-content:center;gap:9px;margin-bottom:12px}
.cs-sw{position:relative;width:46px;text-align:center}
.cs-sw .pt{
  width:38px;height:38px;margin:0 auto 5px;border-radius:12px;display:grid;place-items:center;
  background:linear-gradient(180deg, rgba(40,27,17,.95), rgba(17,11,8,.97));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.16)
}
.cs-sw .pt span{width:19px;height:19px;display:block;background:#4a3a24;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
.cs-sw.done .pt span{background:linear-gradient(180deg,#fff0bd,#e5a93f)}
.cs-sw.done .pt{box-shadow:inset 0 0 0 1.5px rgba(255,205,120,.45)}
.cs-sw.next .pt{box-shadow:inset 0 0 0 2px #ffd98a, 0 0 18px rgba(255,180,80,.3)}
.cs-sw.next .pt span{background:linear-gradient(180deg,#6b5636,#4a3a24)}
.cs-sw .cap{display:block;font-size:8.5px;font-weight:800;line-height:1.25;color:#8d7551;letter-spacing:.02em}
.cs-sw.done .cap{color:#c8a978}
.cs-sw.next .cap{color:#ffd98a}
.cs-sw:after{content:'';position:absolute;top:19px;right:-9px;width:9px;height:2px;background:rgba(255,216,150,.16)}
.cs-sw:last-child:after{display:none}
.cs-sw.done:after{background:rgba(255,205,120,.45)}

.cs-delta{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid rgba(255,216,150,.07)}
.cs-delta:last-of-type{border-bottom:0}
.cs-delta .nm{flex:1;font-size:11px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:#a98f66}
.cs-delta .a{font-size:13px;font-weight:800;color:#e9d3aa}
.cs-delta .ar{color:#7d6746;font-size:12px}
.cs-delta .b{font-size:13px;font-weight:800;color:#95e08d}
.cs-invest{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:11px}
.cs-inv{
  padding:11px 11px 12px;border-radius:15px;
  background:linear-gradient(180deg, rgba(46,31,20,.92), rgba(18,12,8,.95));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.15)
}
.cs-inv .hd{display:flex;align-items:center;gap:6px;margin-bottom:7px}
.cs-inv .hd img{width:19px;height:19px}
.cs-inv .hd b{font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#c69b64}
.cs-inv .big{font-size:15px;font-weight:800;color:#ffe3a8;margin-bottom:6px}
.cs-inv .big em{font-style:normal;font-size:11px;color:#8d7551}
.cs-inv .bar{height:6px;border-radius:4px;background:rgba(255,255,255,.07);overflow:hidden;margin-bottom:9px}
.cs-inv .bar i{display:block;height:100%;border-radius:4px}
.cs-inv .bar i.dup{background:linear-gradient(90deg,#ffd98a,#e5a93f)}
.cs-inv .bar i.frg{background:linear-gradient(90deg,#c98bff,#8f4fe0)}
.cs-inv .cs-btn{height:38px;font-size:12px;border-radius:12px}
.cs-inv.full{grid-column:1 / -1}
.cs-note{margin:9px 1px 0;font-size:10.5px;line-height:1.5;color:#8d7551}
.cs-note b{color:#c8a978}

/* ==========================================================================
   Фаза 117: вкладка «НАВЫКИ» листа карты -- 1:1 порт утверждённого прототипа
   proto_sk1 (медальоны навыков, полоса резонанса, лист навыка с развилкой).
   Правила переноса те же, что и для блока «ЛИСТ КАРТЫ» выше: классы прототипа
   получают префикс cs-sk-, значения (радиусы, тени, размеры шрифтов, градиенты)
   НЕ пересчитываются и НЕ «улучшаются» -- копируются как есть. Общие элементы
   (cs-btn, cs-note, cs-block) уже перенесены выше и повторно здесь не описаны.
   ========================================================================== */
.cs-sk-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:2px 0 10px}
.cs-sk-sl{display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer;background:none;border:0;padding:0;transition:transform .16s ease}
.cs-sk-sl:active{transform:scale(.95)}
.cs-sk-fr{position:relative;width:66px;height:66px;border-radius:19px;overflow:hidden;background:linear-gradient(180deg, rgba(40,27,18,.9), rgba(16,11,7,.95));box-shadow:inset 0 0 0 1.5px rgba(255,214,140,.30), 0 8px 18px rgba(0,0,0,.55)}
.cs-sk-fr img{width:100%;height:100%;display:block;object-fit:contain}
.cs-sk-sl.is-on .cs-sk-fr{box-shadow:inset 0 0 0 2px #ffd98a, 0 0 0 4px rgba(255,199,110,.16), 0 10px 22px rgba(0,0,0,.6)}
.cs-sk-sl.locked .cs-sk-fr img{filter:grayscale(.85) brightness(.55)}
.cs-sk-lv{padding:2px 8px;border-radius:8px;font-size:9.5px;font-weight:800;letter-spacing:.04em;color:#ffe3a8;background:linear-gradient(180deg, rgba(48,32,21,.96), rgba(20,13,9,.98));box-shadow:inset 0 0 0 1px rgba(255,216,150,.24);white-space:nowrap}
.cs-sk-pad{position:absolute;right:5px;bottom:5px;font-size:15px;filter:drop-shadow(0 1px 2px #000)}
.cs-sk-dot{position:absolute;top:-3px;right:-3px;width:16px;height:16px;border-radius:50%;background:radial-gradient(circle at 35% 30%, #fff3cf, #e0a23c);box-shadow:0 0 0 2px rgba(20,13,9,.95), 0 0 12px rgba(255,190,90,.8);display:grid;place-items:center;font-size:10px;font-weight:900;color:#4a2c08}
.cs-reso{display:flex;align-items:center;gap:7px;overflow-x:auto;scrollbar-width:none;padding:0 0 9px}
.cs-reso::-webkit-scrollbar{display:none}
.cs-reso-lbl{flex:none;font-size:9px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#b09060;padding-right:2px}
.cs-rs{flex:none;display:flex;align-items:center;gap:5px;padding:5px 9px 5px 5px;border-radius:11px;background:linear-gradient(180deg, rgba(38,26,17,.9), rgba(16,11,7,.94));box-shadow:inset 0 0 0 1px rgba(255,216,150,.14);white-space:nowrap}
.cs-rs b{font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#9d8259}
.cs-rs i{font-style:normal;font-size:10px;font-weight:800;color:#7d6746}
.cs-rs.dim b{display:none}
.cs-rs.lit b{color:#ffe3a8}
.cs-rs.lit i{color:#95e08d}
.cs-rs.lit{box-shadow:inset 0 0 0 1.5px rgba(255,205,120,.5), 0 0 16px rgba(255,170,70,.18)}
.cs-shhead{display:flex;align-items:flex-start;gap:10px;margin-bottom:9px}
.cs-shhead h3{font-family:'PT Serif',serif;margin:0;font-size:18px;color:#ffe6ae;line-height:1.15;flex:1}
.cs-kind{flex:none;padding:4px 8px;border-radius:8px;font-size:8.5px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#f3c98a;background:rgba(255,190,90,.12);box-shadow:inset 0 0 0 1px rgba(255,200,110,.28);margin-top:2px}
.cs-kind.psv{color:#b9c8e8;background:rgba(150,180,255,.12);box-shadow:inset 0 0 0 1px rgba(150,180,255,.26)}
.cs-eff{margin:0 0 4px;font-size:13.5px;line-height:1.5;color:#efdfc4}
.cs-nxt{margin:0 0 11px;font-size:11.5px;line-height:1.5;color:#a98f66}
.cs-nxt b{color:#ffd98a;font-weight:800}
.cs-paths{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 11px}
.cs-pth{display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:9px;background:rgba(255,214,140,.07);box-shadow:inset 0 0 0 1px rgba(255,216,150,.16)}
.cs-pth span{font-size:10.5px;font-weight:700;color:#e9d3aa}
.cs-pth.empty{background:rgba(255,255,255,.02);box-shadow:inset 0 0 0 1px rgba(255,255,255,.07)}
.cs-pth.empty span{color:#7d6746}
.cs-forkwrap{margin:0 0 11px}
.cs-forkttl{display:flex;align-items:center;gap:7px;margin-bottom:8px}
.cs-forkttl b{font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#ffd08a}
.cs-forkttl i{font-style:normal;font-size:10px;color:#9d8259;margin-left:auto}
.cs-opts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cs-opt{position:relative;padding:10px 10px 11px;border-radius:15px;cursor:pointer;text-align:left;border:0;background:linear-gradient(180deg, rgba(52,36,23,.92), rgba(22,15,10,.95));box-shadow:inset 0 0 0 1px rgba(255,216,150,.16);transition:transform .14s ease}
.cs-opt:active{transform:scale(.98)}
.cs-opt.is-on{box-shadow:inset 0 0 0 2px #ffd98a, 0 0 18px rgba(255,180,80,.22)}
.cs-opt .tag{display:flex;align-items:center;gap:5px;margin-bottom:7px}
.cs-opt .tag span{font-size:8.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#c69b64}
.cs-opt h4{margin:0 0 4px;font-family:'PT Serif',serif;font-size:13.5px;color:#ffe6ae;line-height:1.2}
.cs-opt p{margin:0;font-size:11px;line-height:1.45;color:#cdb794}
.cs-row2{display:flex;gap:8px;align-items:center;margin-top:8px}
.cs-row2 .cs-btn{flex:1}
/* В прототипе несобранный чип резонанса сжимался до ИКОНКИ стихии и счёта, поэтому подпись
   скрывалась. В репозитории иконок стихий пока нет (только 42 иконки навыков), и без подписи
   чип «1/3» не сообщает, о какой стихии речь -- возвращаем подпись, оставляя тусклый цвет
   прототипа. Когда появятся иконки стихий, это правило снимается. */
.cs-reso .cs-rs.dim b{display:inline}

/* =====================================================================================
   Фаза 103 (Кузница) -- вкладка «КОВКА» листа карты. Стили перенесены ОДИН В ОДИН из
   утверждённого прототипа proto_fg1 («Клейма и Жар»): значения цветов, радиусов, теней и
   размеров не пересчитывались, только селекторы получили префикс .cs-fg, чтобы жить внутри
   листа карты рядом с уже портированными .cs-* блоками прототипа col1/sk1.
   ===================================================================================== */
.cs-fg{display:block}
.cs-fg-steps{display:flex;gap:5px;margin:0 0 12px}
.cs-fg-step{flex:1 1 0;padding:6px 3px 5px;border-radius:9px;text-align:center;font-size:9.5px;font-weight:900;
  letter-spacing:.05em;text-transform:uppercase;color:#8c7557;background:rgba(0,0,0,.4);
  box-shadow:inset 0 0 0 1px rgba(214,160,74,.24)}
.cs-fg-step.is-on{color:#3a2204;background:linear-gradient(180deg,#ffe9b6,#d9a13a);box-shadow:0 3px 10px rgba(255,180,70,.25)}
.cs-fg-step.is-done{color:#8fd79a;box-shadow:inset 0 0 0 1px rgba(127,224,138,.4)}

.cs-fg-box{margin:0 0 12px;padding:11px 12px 12px;border-radius:14px;
  background:linear-gradient(180deg, rgba(38,24,12,.86), rgba(18,11,6,.92));
  box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.3)}
.cs-fg-box h4{margin:0 0 7px;display:flex;align-items:baseline;justify-content:space-between;gap:8px;
  font-family:'PT Serif',Georgia,serif;font-size:14px;font-weight:700;color:#fff3d8}
.cs-fg-box h4 small{font-family:'Exo 2',sans-serif;font-size:9.5px;font-weight:900;letter-spacing:.08em;
  text-transform:uppercase;color:#a98a5e}
.cs-fg-box p{margin:0}
.cs-fg-tag{margin:0 0 9px;font-size:10.5px;font-weight:700;line-height:1.5;color:#b59a78}
.cs-fg-tag b{color:#ffdc8a}
.cs-fg-hint{margin:9px 0 0;padding:8px 10px;border-radius:10px;font-size:10.5px;line-height:1.5;color:#b59a78;
  background:rgba(0,0,0,.34);box-shadow:inset 0 0 0 1px rgba(214,160,74,.26)}
.cs-fg-hint b{color:#ffdc8a}
.cs-fg-warn{margin:9px 0 0;padding:8px 10px;border-radius:10px;font-size:10.5px;line-height:1.45;color:#ffc9b3;
  background:rgba(120,40,20,.32);box-shadow:inset 0 0 0 1px rgba(255,120,90,.45)}

/* ---- Заготовка и гнёзда ---- */
.cs-fg-blank{position:relative;display:block;margin:2px auto 12px;width:238px;height:268px}
.cs-fg-blank .metal{position:absolute;inset:0;border-radius:18px 18px 46% 46%/18px 18px 30% 30%;
  background:linear-gradient(160deg,#4a4038 0%,#2b2420 42%,#1a1512 100%);
  box-shadow:inset 0 0 0 1.6px rgba(214,160,74,.55), inset 0 22px 44px rgba(255,190,110,.07),
             0 14px 30px rgba(0,0,0,.6)}
.cs-fg-blank .metal::after{content:"";position:absolute;inset:7px;border-radius:14px 14px 44% 44%/14px 14px 28% 28%;
  box-shadow:inset 0 0 0 1px rgba(214,160,74,.22);
  background:repeating-linear-gradient(118deg, rgba(255,255,255,.035) 0 2px, rgba(0,0,0,0) 2px 9px)}
.cs-fg-blank .heatglow{position:absolute;inset:-6px;border-radius:22px 22px 48% 48%/22px 22px 32% 32%;pointer-events:none;
  background:radial-gradient(60% 46% at 50% 84%, rgba(255,120,30,.55), transparent 72%);
  opacity:0;transition:opacity .25s}
.cs-fg-blank.is-hot .heatglow{opacity:1}
.cs-fg-sk{position:absolute;width:56px;height:56px;margin:-28px 0 0 -28px;border:0;padding:0;cursor:pointer;
  border-radius:50%;background:transparent}
.cs-fg-sk .ring{position:absolute;inset:0;border-radius:50%;
  background:radial-gradient(circle at 50% 34%, rgba(255,200,110,.16), rgba(0,0,0,.62));
  box-shadow:inset 0 0 0 1.6px rgba(214,160,74,.6), 0 5px 12px rgba(0,0,0,.55);
  transition:box-shadow .16s, transform .12s}
.cs-fg-sk.core{width:66px;height:66px;margin:-33px 0 0 -33px}
.cs-fg-sk.core .ring{box-shadow:inset 0 0 0 2px rgba(255,214,130,.85), 0 0 0 4px rgba(255,170,60,.12), 0 6px 14px rgba(0,0,0,.6)}
.cs-fg-sk .glyph{position:absolute;inset:0;display:grid;place-items:center;font-size:23px;line-height:1;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.8))}
.cs-fg-sk .glyph img{width:40px;height:40px;object-fit:contain}
.cs-fg-sk.core .glyph img{width:50px;height:50px}
.cs-fg-sk .tag{position:absolute;left:50%;bottom:-15px;transform:translateX(-50%);white-space:nowrap;
  font-size:8.5px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:#a98a5e}
.cs-fg-sk.is-pick .ring{box-shadow:inset 0 0 0 2px #ffd98a, 0 0 0 5px rgba(255,190,80,.22), 0 6px 14px rgba(0,0,0,.6)}
.cs-fg-sk.is-full .ring{background:radial-gradient(circle at 50% 32%, rgba(255,205,120,.4), rgba(52,28,10,.9))}
.cs-fg-sk:active{transform:scale(.94)}
.cs-fg-sk .mult{position:absolute;right:-3px;top:-3px;padding:1px 5px;border-radius:7px;font-size:8.5px;font-weight:900;
  color:#3a2204;background:linear-gradient(180deg,#ffe9b6,#d9a13a);box-shadow:0 2px 5px rgba(0,0,0,.5)}

/* ---- Лоток клейм ---- */
.cs-fg-tray{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.cs-fg-st{position:relative;padding:8px 6px 7px;border:0;cursor:pointer;border-radius:12px;text-align:center;
  background:linear-gradient(180deg, rgba(48,30,14,.92), rgba(24,15,7,.96));
  box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.4);transition:box-shadow .16s, transform .1s}
.cs-fg-st.is-on{box-shadow:inset 0 0 0 1.8px #ffd98a, 0 0 16px rgba(255,180,70,.28);transform:translateY(-2px)}
.cs-fg-st:disabled{opacity:.42;filter:grayscale(.6);cursor:default}
.cs-fg-st .g{display:block;font-size:21px;line-height:1.1;filter:drop-shadow(0 2px 3px rgba(0,0,0,.7))}
.cs-fg-st .g img{width:38px;height:38px;object-fit:contain}
.cs-fg-st .n{display:block;margin-top:3px;font-size:10px;font-weight:900;color:#ffeaba;line-height:1.15}
.cs-fg-st .v{display:block;margin-top:2px;font-size:9px;font-weight:800;line-height:1.3;color:#8fd79a}
.cs-fg-st .v s{display:block;text-decoration:none;color:#ff9c80}
.cs-fg-st .v s.free{color:#c37bff}
.cs-fg-st .q{position:absolute;right:4px;top:4px;min-width:16px;padding:0 4px;border-radius:6px;
  font-size:9px;font-weight:900;color:#3a2204;background:linear-gradient(180deg,#ffe9b6,#d9a13a)}
.cs-fg-st.rareish{box-shadow:inset 0 0 0 1.2px rgba(195,123,255,.6)}
.cs-fg-st.rareish.is-on{box-shadow:inset 0 0 0 1.8px #d8a5ff, 0 0 16px rgba(180,110,255,.3)}

/* ---- Развилка закалки ---- */
.cs-fg-forks{display:grid;gap:7px}
.cs-fg-fk{position:relative;display:flex;gap:9px;align-items:center;padding:9px 11px;border:0;cursor:pointer;text-align:left;
  border-radius:13px;background:linear-gradient(180deg, rgba(44,28,13,.92), rgba(22,14,6,.96));
  box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.38);transition:box-shadow .16s}
.cs-fg-fk.is-on{box-shadow:inset 0 0 0 1.8px #ffd98a, 0 0 18px rgba(255,180,70,.24)}
.cs-fg-fk:disabled{opacity:.45;cursor:default}
.cs-fg-fk .fi{flex:0 0 36px;width:36px;height:36px;border-radius:11px;display:grid;place-items:center;font-size:19px;
  background:radial-gradient(circle at 50% 35%, rgba(255,200,110,.3), rgba(0,0,0,.6));
  box-shadow:inset 0 0 0 1.3px rgba(214,160,74,.5)}
.cs-fg-fk .fi img{width:30px;height:30px;object-fit:contain}
.cs-fg-fk .ft{min-width:0}
.cs-fg-fk .ft b{display:block;font-family:'PT Serif',Georgia,serif;font-size:13.5px;color:#fff3d8}
.cs-fg-fk .ft span{display:block;margin-top:2px;font-size:10px;font-weight:700;line-height:1.35;color:#b59a78}
.cs-fg-fk .ft span em{font-style:normal;color:#8fd79a}
.cs-fg-fk .ft span i{font-style:normal;color:#ff9c80}

/* ---- Жар ---- */
.cs-fg-heat{position:relative;display:block;height:42px;margin:4px 0 9px;padding:12px 18px;
  border-image:url("../img/ui/gauge_track2.png") 18 112 18 112 fill stretch}
.cs-fg-heat .rail{position:absolute;left:18px;right:18px;top:11px;bottom:11px;border-radius:5px;overflow:hidden;
  background:linear-gradient(180deg,#120c07,#241708)}
.cs-fg-heat .rail u{position:absolute;top:0;bottom:0;text-decoration:none}
.cs-fg-heat .zone{background:radial-gradient(60% 120% at 50% 50%, rgba(255,214,130,.5), rgba(255,160,50,.16) 70%, transparent)}
.cs-fg-heat .burn{right:0;background:linear-gradient(90deg, rgba(255,90,40,0), rgba(255,70,30,.42))}
.cs-fg-heat .fill{left:0;width:0;
  background:linear-gradient(90deg,#6b2d0c 0%,#c2531a 42%,#ffb347 78%,#fff2cf 100%);
  box-shadow:0 0 14px rgba(255,150,50,.6)}
.cs-fg-heat .mk{position:absolute;top:-9px;width:12px;height:52px;margin-left:-6px;pointer-events:none;
  background:url("../img/ui/gauge_marker.png") center/contain no-repeat;
  filter:drop-shadow(0 0 7px rgba(255,190,90,.8))}
.cs-fg-scale{display:flex;justify-content:space-between;margin:-2px 2px 10px;
  font-size:8.5px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#8c7557}
.cs-fg-hold{position:relative;width:100%;height:56px;border:0;cursor:pointer;border-radius:15px;
  font-family:'Exo 2',sans-serif;font-size:14px;font-weight:900;letter-spacing:.04em;color:#3a2204;
  background:linear-gradient(180deg,#ffe9b6 0%,#f0bf62 48%,#d09333 100%);
  box-shadow:0 6px 0 #7d4e12, 0 12px 24px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.6);
  touch-action:none;user-select:none}
.cs-fg-hold.is-down{transform:translateY(4px);box-shadow:0 2px 0 #7d4e12, inset 0 1px 0 rgba(255,255,255,.6)}
.cs-fg-hold:disabled{opacity:.45;filter:grayscale(.5);cursor:default;transform:none}
.cs-fg-grade{display:flex;align-items:center;justify-content:center;gap:7px;margin:9px 0 0;min-height:20px;
  font-size:12px;font-weight:900;color:#ffdc8a}
.cs-fg-grade s{text-decoration:none;color:#ff9c80}

/* ---- Итоговые статы ---- */
.cs-fg-srow{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:10px;margin-bottom:5px;
  background:rgba(0,0,0,.38);box-shadow:inset 0 0 0 1px rgba(214,160,74,.28)}
.cs-fg-srow i{flex:0 0 58px;font-style:normal;font-size:9px;font-weight:900;letter-spacing:.09em;
  text-transform:uppercase;color:#a98a5e}
.cs-fg-srow .bar{position:relative;flex:1 1 auto;height:8px;border-radius:4px;overflow:hidden;background:rgba(0,0,0,.6)}
.cs-fg-srow .bar u{position:absolute;left:0;top:0;bottom:0;text-decoration:none;
  background:linear-gradient(90deg,#d9a13a,#ffe9b6);transition:width .3s}
.cs-fg-srow .bar u.dn{background:linear-gradient(90deg,#8c3a20,#ff9c80)}
.cs-fg-srow b{flex:0 0 78px;text-align:right;font-size:13px;font-weight:900;color:#fff1cd}
.cs-fg-srow b.dn{color:#ff9c80}
.cs-fg-srow b em{font-style:normal;font-size:10.5px;color:#8fd79a}
.cs-fg-srow b em.dn{color:#ff9c80}
.cs-fg-row{display:flex;gap:7px;margin-top:9px}
.cs-fg-row .cs-btn{flex:1 1 0;min-width:0}
/* QA-проверка на 390px: дельта «+14%» упиралась в само значение стата, а маркер жара тонул в
   заливке -- разводим их и добавляем маркеру тёмную подложку. Правки только добавляющие. */
.cs-fg-srow b em{margin-left:5px}
.cs-fg-srow b{flex-basis:88px}
.cs-fg-heat .mk{z-index:2;filter:drop-shadow(0 0 3px rgba(0,0,0,.9)) drop-shadow(0 0 8px rgba(255,190,90,.9))}

/* ==========================================================================================
   Фаза 103 (Кузница, часть 3): городской экран Кузницы -- порт прототипа ws10 (разделы
   «Формы», «Пыль», «Витрина») плюс наковальня из ws9 (удары молотом). Раздел «Клейма» из
   прототипа в игру не берётся, этапы гравировки и закалки -- тоже: в «Формах» остаются
   только удары молотом и кнопка сбора готовой карты.
   Префикс .cs-kz-* -- блок дописан в конец файла, ни одно правило выше не изменено.
   ========================================================================================== */
.cs-kz-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 0 11px;padding-bottom:2px}
.cs-kz-tabs::-webkit-scrollbar{display:none}
.cs-kz-tabs button{flex:0 0 auto;white-space:nowrap;padding:9px 13px 8px;border:0;cursor:pointer;border-radius:12px;
  font-family:inherit;font-size:11.5px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:#a98a5e;
  background:linear-gradient(180deg,rgba(42,26,12,.9),rgba(20,12,5,.95));box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.3)}
.cs-kz-tabs button.is-on{color:#fff1cd;box-shadow:inset 0 0 0 1.7px rgba(255,214,130,.9),0 0 14px rgba(255,180,70,.16)}
.cs-kz-tag{font-size:10.5px;line-height:1.5;color:#a98a5e;margin:0 0 10px}
.cs-kz-tag b{color:#e7cfa2}

/* лента карт с фрагментами */
.cs-kz-strip{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding-bottom:3px;margin-bottom:10px}
.cs-kz-strip::-webkit-scrollbar{display:none}
.cs-kz-card{position:relative;flex:0 0 74px;border-radius:12px;padding:5px;cursor:pointer;border:0;
  background:linear-gradient(180deg,rgba(0,0,0,.4),rgba(0,0,0,.62));box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.3)}
.cs-kz-card.is-on{box-shadow:inset 0 0 0 1.7px rgba(255,214,130,.95),0 0 15px rgba(255,180,70,.2)}
.cs-kz-card img{width:100%;height:74px;object-fit:cover;border-radius:9px;display:block;margin-bottom:4px}
.cs-kz-card span{display:block;font-size:9px;font-weight:900;color:#e7cfa2;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cs-kz-card em{display:block;font-style:normal;font-size:8.5px;font-weight:900;text-align:center;color:#a98a5e}
.cs-kz-card i.rdy{position:absolute;top:3px;right:3px;width:16px;height:16px;border-radius:50%;display:grid;place-items:center;
  font-style:normal;font-size:10px;color:#20340f;background:linear-gradient(180deg,#b6f0a0,#6fc45a)}

/* форма на 10 гнёзд */
.cs-kz-mould{position:relative;padding:12px 12px 13px;border-radius:15px;margin-bottom:10px;overflow:hidden;
  background:radial-gradient(72% 60% at 50% 34%,rgba(255,150,50,.16),rgba(10,6,3,.93) 74%);
  box-shadow:inset 0 0 0 1.3px rgba(214,160,74,.38)}
.cs-kz-mh{display:flex;align-items:center;gap:11px;margin-bottom:11px}
.cs-kz-mh .pic{position:relative;width:70px;height:96px;flex:0 0 70px;border-radius:11px;overflow:hidden;
  box-shadow:0 0 0 1.5px rgba(214,160,74,.65),0 8px 18px rgba(0,0,0,.6)}
.cs-kz-mh .pic img{width:100%;height:100%;object-fit:cover;display:block}
.cs-kz-mh .pic.dim img{filter:grayscale(.8) brightness(.5)}
.cs-kz-mh .mh{flex:1 1 auto;min-width:0}
.cs-kz-mh h4{margin:0 0 3px;font-family:'PT Serif',Georgia,serif;font-size:16px;color:#fff1cd}
.cs-kz-mh p{margin:0;font-size:10.5px;line-height:1.4;color:#ab9375}
.cs-kz-chip{display:inline-block;padding:2px 8px;border-radius:7px;font-size:8.5px;font-weight:900;letter-spacing:.08em;
  text-transform:uppercase;margin-bottom:4px}
.cs-kz-chip.common,.cs-kz-chip.uncommon{color:#dfe9f5;background:rgba(90,120,150,.4);box-shadow:inset 0 0 0 1px rgba(150,190,230,.5)}
.cs-kz-chip.rare{color:#cfe8ff;background:rgba(40,90,160,.45);box-shadow:inset 0 0 0 1px rgba(110,180,255,.6)}
.cs-kz-chip.epic{color:#eed4ff;background:rgba(95,45,150,.45);box-shadow:inset 0 0 0 1px rgba(195,123,255,.6)}
.cs-kz-chip.legendary{color:#ffe6b8;background:rgba(150,90,20,.45);box-shadow:inset 0 0 0 1px rgba(255,190,90,.7)}
.cs-kz-sockets{display:grid;grid-template-columns:repeat(10,1fr);gap:5px;margin-bottom:9px}
.cs-kz-so{position:relative;aspect-ratio:1/1;border-radius:50%;
  background:radial-gradient(circle at 50% 38%,rgba(48,30,14,.95),rgba(12,7,3,.98));box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.28)}
.cs-kz-so.f{background:radial-gradient(circle at 45% 35%,#fff0cd,#e6a63c 62%,#b9761f);box-shadow:0 0 10px rgba(255,180,70,.55)}
.cs-kz-so.d{background:radial-gradient(circle at 45% 35%,#eaf3ff,#8fb4d8 62%,#5e7f9f);box-shadow:0 0 9px rgba(160,200,240,.45)}
.cs-kz-so.hot{animation:csKzSo 1.4s ease-in-out infinite}
@keyframes csKzSo{0%,100%{box-shadow:inset 0 0 0 1.4px rgba(255,214,130,.7)}50%{box-shadow:inset 0 0 0 1.4px rgba(255,240,200,1),0 0 12px rgba(255,190,80,.5)}}
.cs-kz-legend{display:flex;gap:11px;margin-bottom:10px;flex-wrap:wrap}
.cs-kz-legend span{display:flex;align-items:center;gap:5px;font-size:9.5px;font-weight:800;color:#a98a5e}
.cs-kz-legend i{width:11px;height:11px;border-radius:50%;display:block}
.cs-kz-legend i.f{background:linear-gradient(180deg,#fff0cd,#e6a63c)}
.cs-kz-legend i.d{background:linear-gradient(180deg,#eaf3ff,#8fb4d8)}
.cs-kz-mrow{display:flex;gap:7px;align-items:center}
.cs-kz-mrow button{flex:1 1 0}

/* горн: заготовка ждёт ударов */
.cs-kz-hearth{display:flex;align-items:center;gap:11px;padding:11px;border-radius:13px;margin-bottom:9px;
  background:linear-gradient(180deg,rgba(48,28,12,.95),rgba(20,12,5,.97));box-shadow:inset 0 0 0 1.5px rgba(255,214,130,.6),0 0 18px rgba(255,170,60,.12)}
.cs-kz-hearth .hp{position:relative;width:54px;height:74px;flex:0 0 54px;border-radius:10px;overflow:hidden;box-shadow:0 0 0 1.3px rgba(214,160,74,.6)}
.cs-kz-hearth .hp img{width:100%;height:100%;object-fit:cover}
.cs-kz-hearth .hb{flex:1 1 auto;min-width:0}
.cs-kz-hearth h6{margin:0 0 3px;font-size:12.5px;font-weight:900;color:#fff1cd}
.cs-kz-hearth p{margin:0 0 6px;font-size:10.5px;color:#ab9375}
.cs-kz-empty{display:grid;place-items:center;padding:18px 12px;border-radius:13px;margin-bottom:9px;text-align:center;
  background:rgba(0,0,0,.35);box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.22)}
.cs-kz-empty span{font-size:11px;color:#a98a5e;line-height:1.45}

/* пыль и витрина: строки-карточки */
.cs-kz-dustbar{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:10px}
.cs-kz-dcell{padding:7px 3px 6px;border-radius:12px;text-align:center;
  background:linear-gradient(180deg,rgba(42,26,12,.92),rgba(20,12,5,.96));box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.32)}
.cs-kz-dcell img{width:26px;height:26px;display:block;margin:0 auto 2px}
.cs-kz-dcell b{display:block;font-size:14px;font-weight:900;color:#fff1cd;line-height:1.1}
.cs-kz-dcell u{display:block;text-decoration:none;font-size:8px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:#a98a5e}
.cs-kz-row{display:flex;align-items:center;gap:10px;padding:10px;border-radius:13px;margin-bottom:8px;
  background:linear-gradient(180deg,rgba(42,26,12,.9),rgba(20,12,5,.95));box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.3)}
.cs-kz-row>img{width:30px;height:30px;display:block;flex:0 0 30px}
.cs-kz-row .rb{flex:1 1 auto;min-width:0}
.cs-kz-row h6{margin:0 0 3px;font-size:12.5px;font-weight:900;color:#fff1cd}
.cs-kz-row p{margin:0;font-size:10.5px;color:#ab9375}
.cs-kz-pill{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:9px;font-size:11px;font-weight:900;
  color:#fff1cd;background:rgba(0,0,0,.45);box-shadow:inset 0 0 0 1px rgba(214,160,74,.35);white-space:nowrap}
.cs-kz-pill img{width:15px;height:15px;display:block}
.cs-kz-pill.lack{color:#ffb4a0;box-shadow:inset 0 0 0 1px rgba(255,120,90,.55)}
.cs-kz-timer{font-size:10px;font-weight:900;letter-spacing:.05em;text-transform:uppercase;color:#d9bd8c}
.cs-kz-wide{display:flex;align-items:center;justify-content:center;gap:7px;width:100%}
.cs-kz-wide img{width:17px;height:17px;display:block}

/* наковальня (порт ws9): оверлей серии ударов */
.cs-kz-ov{position:fixed;inset:0;z-index:120;display:grid;place-items:center;background:rgba(5,3,1,.9);backdrop-filter:blur(3px)}
.cs-kz-pan{position:relative;width:min(358px,94%);max-height:94vh;overflow-y:auto;padding:14px 14px 15px;border-radius:20px;
  background:linear-gradient(180deg,rgba(26,16,7,.99),rgba(14,8,3,.99));
  box-shadow:inset 0 0 0 1.6px rgba(214,160,74,.6),0 24px 54px rgba(0,0,0,.82)}
.cs-kz-pan h3{margin:0 0 2px;font-family:'PT Serif',Georgia,serif;font-size:18px;color:#fff3d8;text-align:center}
.cs-kz-pan .sub{display:block;font-size:10px;color:#c2a577;text-align:center;margin-bottom:9px}
.cs-kz-stage{position:relative;height:178px;margin-bottom:8px}
.cs-kz-stage .anvil{position:absolute;left:46%;bottom:0;width:172px;margin-left:-86px;display:block;filter:drop-shadow(0 12px 20px rgba(0,0,0,.7))}
.cs-kz-stage .blank{position:absolute;left:40%;bottom:104px;width:40px;height:26px;margin-left:-20px;border-radius:5px;
  background:radial-gradient(circle at 50% 40%,#fff6d8,#ff9b28 58%,#b23a06);box-shadow:0 0 22px rgba(255,150,40,.75)}
.cs-kz-stage .blank.cool{background:radial-gradient(circle at 50% 40%,#b9c3cc,#66727d 60%,#39424a);box-shadow:none}
.cs-kz-stage .hammer{position:absolute;right:6px;bottom:44px;width:88px;transform-origin:22% 88%;transform:rotate(-16deg);
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.6))}
.cs-kz-stage.is-swing .hammer{animation:csKzSwing .26s cubic-bezier(.3,.9,.4,1)}
@keyframes csKzSwing{0%{transform:rotate(-16deg)}45%{transform:rotate(26deg) translate(-26px,34px)}100%{transform:rotate(-16deg)}}
.cs-kz-stage.is-hit .anvil{animation:csKzShake .22s ease}
@keyframes csKzShake{0%,100%{transform:none}40%{transform:translateY(4px) scale(1.012)}}
.cs-kz-stage .flash{position:absolute;left:40%;bottom:112px;width:10px;height:10px;margin-left:-5px;border-radius:50%;opacity:0;
  background:#fff;box-shadow:0 0 34px 20px rgba(255,205,120,.9)}
.cs-kz-stage.is-hit .flash{animation:csKzFl .3s ease-out}
@keyframes csKzFl{0%{opacity:1;transform:scale(.35)}100%{opacity:0;transform:scale(3)}}
.cs-kz-stage .verdict{position:absolute;left:0;right:0;top:18px;text-align:center;opacity:0;
  font-family:'PT Serif',Georgia,serif;font-size:22px;color:#ffe9b6;text-shadow:0 0 16px rgba(255,170,50,.9),0 2px 8px rgba(0,0,0,.9)}
.cs-kz-stage.is-hit .verdict{animation:csKzVd .6s ease-out}
@keyframes csKzVd{0%{opacity:0;transform:translateY(6px) scale(.85)}22%{opacity:1}100%{opacity:0;transform:translateY(-28px) scale(1.1)}}
.cs-kz-heatbar{position:relative;height:8px;border-radius:5px;background:rgba(0,0,0,.55);overflow:hidden;box-shadow:inset 0 0 0 1px rgba(214,160,74,.32)}
.cs-kz-heatbar i{position:absolute;left:0;top:0;bottom:0;border-radius:5px;transition:width .18s;
  background:linear-gradient(90deg,#8b3a08,#ff9b28,#ffe6a6)}
.cs-kz-note{display:flex;justify-content:space-between;font-size:9px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;
  color:#a98a5e;margin:5px 0 9px}
.cs-kz-timing{position:relative;height:54px;margin-bottom:10px;border-radius:12px;cursor:pointer;
  background:linear-gradient(180deg,rgba(0,0,0,.5),rgba(0,0,0,.72));box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.35)}
.cs-kz-timing .rail{position:absolute;inset:1px;overflow:hidden;border-radius:11px}
.cs-kz-timing .zone{position:absolute;top:0;bottom:0;background:linear-gradient(180deg,rgba(120,230,150,.3),rgba(60,160,90,.22));
  box-shadow:inset 0 0 0 1px rgba(150,240,180,.55)}
.cs-kz-timing .core{position:absolute;top:0;bottom:0;background:linear-gradient(180deg,rgba(255,240,200,.85),rgba(255,180,70,.6))}
.cs-kz-timing .mk{position:absolute;top:-6px;bottom:-6px;width:4px;margin-left:-2px;border-radius:3px;z-index:3;
  background:linear-gradient(180deg,#fff,#ffe6a6);box-shadow:0 0 12px rgba(255,214,130,.95),0 0 4px rgba(0,0,0,.9)}
.cs-kz-pips{display:flex;gap:5px;justify-content:center;margin-bottom:9px}
.cs-kz-pips i{width:26px;height:6px;border-radius:4px;background:rgba(0,0,0,.55);box-shadow:inset 0 0 0 1px rgba(214,160,74,.35)}
.cs-kz-pips i.p1{background:linear-gradient(90deg,#8a97a4,#c3cdd6)}
.cs-kz-pips i.p2{background:linear-gradient(90deg,#3f7fd0,#9fd0ff)}
.cs-kz-pips i.p3{background:linear-gradient(90deg,#8d45d8,#dfb4ff)}
.cs-kz-pips i.p4{background:linear-gradient(90deg,#e09a22,#ffe9b6);box-shadow:0 0 10px rgba(255,190,90,.6)}
.cs-kz-qline{display:flex;align-items:baseline;justify-content:center;gap:8px;margin-bottom:10px}
.cs-kz-qline b{font-size:26px;font-weight:900;color:#fff1cd;line-height:1}
.cs-kz-qline span{font-size:10.5px;font-weight:800;color:#ab9375}
.cs-kz-frow{display:flex;gap:7px}
.cs-kz-frow button{flex:1 1 0}
.cs-kz-err{margin:0 0 9px;font-size:10.5px;font-weight:800;color:#ffb4a0;text-align:center}

/* Фаза 103 (Кузница, часть 3): арт карты в форме -- слои питомца вместо одной картинки.
   Каталог карт хранит ПАПКУ слоёв (assets/pets/<вид>/layers/<тир>), поэтому вместо <img> здесь
   стоит .pet-layers из petArtHtml(); эти правила лишь задают ему бокс и обрезку. */
.cs-kz-card .art { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: rgba(12, 10, 20, .55); }
.cs-kz-card .art .pet-layers { position: absolute; inset: 0; }
.cs-kz-card .art .pet-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cs-kz-mh .pic .pet-layers, .cs-kz-hearth .hp .pet-layers { position: absolute; inset: 0; }
.cs-kz-mh .pic .pet-layer, .cs-kz-hearth .hp .pet-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cs-kz-mh .pic, .cs-kz-hearth .hp { position: relative; overflow: hidden; }
.cs-kz-row .rimg { position: relative; display: block; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 9px; overflow: hidden; background: rgba(12, 10, 20, .5); }
.cs-kz-row .rimg .pet-layers { position: absolute; inset: 0; }
.cs-kz-row .rimg .pet-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* Фаза 103 (Кузница, часть 3): кнопки разделов кузницы -- копия .btn из прототипа ws10.
   В боевом style.css нет глобального золотого стиля кнопок (каждый экран красит свои), поэтому
   переносим вид кнопки прототипа 1:1 и вешаем на кнопки внутри блоков .cs-kz-*. */
.cs-kz-mrow button, .cs-kz-frow button, .cs-kz-row button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 14px; height: 40px; border: 0; cursor: pointer; border-radius: 12px;
  font-size: 13px; font-weight: 900; color: #3a2204;
  background: linear-gradient(180deg, #ffe9b6 0%, #f0bf62 48%, #d09333 100%);
  box-shadow: 0 5px 0 #7d4e12, 0 10px 20px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .1s, box-shadow .1s;
}
.cs-kz-row button { height: 34px; padding: 0 12px; font-size: 12px; border-radius: 11px; flex: 0 0 auto;
  box-shadow: 0 3px 0 #7d4e12, inset 0 1px 0 rgba(255, 255, 255, .5); }
.cs-kz-mrow button:active, .cs-kz-frow button:active, .cs-kz-row button:active {
  transform: translateY(3px); box-shadow: 0 2px 0 #7d4e12, inset 0 1px 0 rgba(255, 255, 255, .6); }
.cs-kz-mrow button.ghost, .cs-kz-frow button.ghost, .cs-kz-row button.ghost {
  color: #ffdda0; background: linear-gradient(180deg, rgba(58, 36, 16, .95), rgba(30, 18, 8, .98));
  box-shadow: 0 4px 0 rgba(0, 0, 0, .5), inset 0 0 0 1.4px rgba(214, 160, 74, .6); }
.cs-kz-mrow button:disabled, .cs-kz-frow button:disabled, .cs-kz-row button:disabled {
  opacity: .5; filter: grayscale(.5); cursor: default; transform: none; }
.cs-kz-mrow button img, .cs-kz-frow button img, .cs-kz-row button img { width: 18px; height: 18px; object-fit: contain; }
/* Кнопка обновления ассортимента -- широкая, во всю карточку витрины. */
.panel > button.ghost:has(.cs-kz-wide) {
  display: flex; width: 100%; height: 44px; margin-top: 4px; border: 0; cursor: pointer; border-radius: 13px;
  font-size: 13.5px; font-weight: 900; color: #ffdda0;
  background: linear-gradient(180deg, rgba(58, 36, 16, .95), rgba(30, 18, 8, .98));
  box-shadow: 0 4px 0 rgba(0, 0, 0, .5), inset 0 0 0 1.4px rgba(214, 160, 74, .6);
}
.panel > button.ghost:has(.cs-kz-wide):disabled { opacity: .5; filter: grayscale(.5); cursor: default; }

/* ==========================================================================================
   Фаза 103 (Кузница, часть 5): разделы кузницы должны выглядеть ровно как прототип ws10/ws9.
   Раньше новые панели наследовали игровые .panel/.screen-head и получались «в стиле игры», а не
   прототипа. Ниже -- перенос обёрточных стилей base.css прототипа под префиксом .cs-kz-:
   деревянные рамки r_wood.png, золотые вкладки во всю ширину, серифные заголовки, сигил локации.
   Правила идут последними в файле, поэтому корректно переопределяют ранний блок .cs-kz-tabs.
   ========================================================================================== */
.cs-kz-wrap { position: relative; margin: 0 -4px; padding: 10px 12px 14px; border-radius: 18px;
  font-family: 'Exo 2', 'Manrope', system-ui, sans-serif; color: #f6e5c6;
  background: radial-gradient(120% 70% at 50% 0%, rgba(255, 170, 60, .16), transparent 60%),
    linear-gradient(180deg, rgba(8, 5, 3, .9), rgba(8, 5, 3, .96) 45%, rgba(8, 5, 3, .99)); }
/* лента разделов: равные доли, активная -- золотая плашка (как .tab/.tab.is-on в прототипе) */
.cs-kz-tabs { display: flex; gap: 6px; margin: 0 0 14px; padding: 0; overflow: visible; }
.cs-kz-tabs button { flex: 1 1 0; padding: 9px 4px 8px; border: 0; cursor: pointer; color: #d8c0a0; border-radius: 12px;
  font-family: 'Exo 2', sans-serif; font-size: 11.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(180deg, rgba(48, 30, 14, .9), rgba(26, 16, 8, .95));
  box-shadow: inset 0 0 0 1.2px rgba(214, 160, 74, .35); }
.cs-kz-tabs button.is-on { color: #3a2204; background: linear-gradient(180deg, #ffe9b6, #d9a13a);
  box-shadow: 0 4px 14px rgba(255, 180, 70, .3), inset 0 1px 0 rgba(255, 255, 255, .55); }
/* шапка локации: сигил кузницы + серифный заголовок */
.cs-kz-loc { display: flex; align-items: center; gap: 10px; margin: 4px 2px 12px; }
.cs-kz-loc .sigil { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(255, 200, 110, .35), rgba(0, 0, 0, .6));
  box-shadow: inset 0 0 0 1.5px rgba(214, 160, 74, .85), 0 6px 14px rgba(0, 0, 0, .5); }
.cs-kz-loc .sigil img { width: 28px; height: 28px; object-fit: contain; }
.cs-kz-loc h1 { margin: 0; font-family: 'PT Serif', Georgia, serif; font-size: 21px; line-height: 1.1; color: #fff3d8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.cs-kz-loc span { display: block; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #c99a4e; }
.cs-kz-loc .cs-kz-ref { margin-left: auto; width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center;
  border: 0; cursor: pointer; border-radius: 12px; font-size: 18px; color: #ffdda0;
  background: linear-gradient(180deg, rgba(58, 36, 16, .95), rgba(30, 18, 8, .98));
  box-shadow: inset 0 0 0 1.4px rgba(214, 160, 74, .6); }
/* деревянная панель прототипа */
.cs-kz-panel { position: relative; padding: 14px 13px 15px; margin-bottom: 13px;
  border-image: url("../img/ui/r_wood.png") 34 fill / 14px stretch;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5), inset 0 0 0 1.5px rgba(214, 160, 74, .55); }
.cs-kz-pt { display: flex; align-items: center; gap: 7px; margin: 0 0 10px;
  font-family: 'PT Serif', Georgia, serif; font-size: 15px; color: #ffeaba; }
.cs-kz-pt small { margin-left: auto; font-family: 'Exo 2', sans-serif; font-size: 10px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: #bb8d47; }
.cs-kz-hr { height: 1px; margin: 11px 0; background: linear-gradient(90deg, transparent, rgba(214, 160, 74, .5), transparent); }
.cs-kz-wrap .cs-kz-tag { margin: 0 0 11px; font-size: 11.5px; line-height: 1.5; color: #bda486; }
.cs-kz-wrap .cs-kz-tag b { color: #ffdc8a; }
.cs-kz-note-empty { padding: 26px 12px; text-align: center; font-size: 11.5px; color: #a98a5e; }
/* витрина: кнопка обновления во всю ширину панели, как .btn.ghost.wide в прототипе */
.cs-kz-reroll { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 44px;
  border: 0; cursor: pointer; border-radius: 13px; font-family: 'Exo 2', sans-serif; font-size: 13.5px; font-weight: 900;
  color: #ffdda0; background: linear-gradient(180deg, rgba(58, 36, 16, .95), rgba(30, 18, 8, .98));
  box-shadow: 0 4px 0 rgba(0, 0, 0, .5), inset 0 0 0 1.4px rgba(214, 160, 74, .6); }
.cs-kz-reroll img { width: 18px; height: 18px; object-fit: contain; }
.cs-kz-reroll:disabled { opacity: .5; filter: grayscale(.5); cursor: default; }

/* Уточнение: в самом ws10 лента вкладок переопределена инлайном -- прокрутка по горизонтали,
   вкладки по содержимому (.tabs{overflow-x:auto} / .tab{flex:0 0 auto;white-space:nowrap;
   padding:9px 13px 8px}). Повторяем ровно это, иначе «Снаряжение» ломается на две строки. */
.cs-kz-tabs { overflow-x: auto; scrollbar-width: none; }
.cs-kz-tabs::-webkit-scrollbar { display: none; }
.cs-kz-tabs button { flex: 0 0 auto; white-space: nowrap; padding: 9px 13px 8px; }

/* Фаза 103 часть 6: бегунок проковки был упрощён (плоская зелёная зона + белая палочка).
   Ниже -- точная копия .timing из прототипа ws9: рамка-жёлоб gauge_track2.png с растяжкой по
   краям, радиальная зелёная зона с тонкой осевой линией, ядро с тёплым свечением, стеклянный
   блик сверху и маркер-спрайт gauge_marker.png. Правила идут после раннего блока и его
   переопределяют (файл только дописывается). */
.cs-kz-timing { position: relative; height: 54px; margin-bottom: 10px; box-sizing: border-box; border-radius: 0;
  border: 6px solid transparent; border-left-width: 28px; border-right-width: 28px;
  border-image: url("../img/ui/gauge_track2.png") 18 112 18 112 fill stretch;
  background: none; box-shadow: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55)); }
.cs-kz-timing .rail { position: absolute; inset: auto; left: -4px; right: -4px; top: 1px; bottom: 1px;
  overflow: hidden; border-radius: 10px; }
.cs-kz-timing .zone { position: absolute; top: 0; bottom: 0; pointer-events: none; border-radius: 0; box-shadow: none;
  background: radial-gradient(56% 78% at 50% 50%, rgba(150, 255, 180, .5) 0%, rgba(96, 226, 142, .3) 40%, rgba(70, 190, 120, .1) 70%, rgba(70, 190, 120, 0) 100%); }
.cs-kz-timing .zone:before { content: ''; position: absolute; left: 6%; right: 6%; top: 50%; height: 1px; margin-top: -.5px;
  background: linear-gradient(90deg, rgba(200, 255, 215, 0), rgba(214, 255, 226, .5), rgba(200, 255, 215, 0)); }
.cs-kz-timing .core { position: absolute; top: 0; bottom: 0; pointer-events: none; border-radius: 0;
  background: radial-gradient(44% 86% at 50% 50%, rgba(255, 252, 236, .95) 0%, rgba(255, 214, 126, .5) 40%, rgba(255, 168, 56, .16) 72%, rgba(255, 160, 40, 0) 100%); }
.cs-kz-timing .core:after { content: ''; position: absolute; left: 50%; top: 14%; bottom: 14%; width: 1.5px; margin-left: -.75px;
  background: linear-gradient(180deg, rgba(255, 248, 224, 0), rgba(255, 246, 218, .9), rgba(255, 248, 224, 0)); }
.cs-kz-timing .glass { position: absolute; left: 0; right: 0; top: 0; height: 42%; pointer-events: none; z-index: 4;
  background: linear-gradient(180deg, rgba(255, 242, 210, .10), rgba(255, 242, 210, 0)); }
.cs-kz-timing .mk { position: absolute; top: -13px; bottom: -13px; width: 26px; margin-left: -13px; z-index: 6;
  pointer-events: none; border-radius: 0; box-shadow: none;
  background: url("../img/ui/gauge_marker.png") center/100% 100% no-repeat;
  filter: drop-shadow(0 0 7px rgba(255, 206, 120, .85)) drop-shadow(0 0 16px rgba(255, 160, 50, .4)); }

/* ============================================================================
   Фаза 104: раздел «Коллекция» -- побуквенный порт утверждённого прототипа col1
   (/home/user/workspace/proto_col1/index.html, блоки «шапка», «колода», «фильтры»,
   «сетка карт»). Значения скопированы из прототипа без изменений; заново ничего не
   придумано. Префикс .cs-col- отделяет порт от старой сетки .grimoire-* , которую
   он замещает. Лист карты (.cs-sheet и далее) портирован ранее и не дублируется.
   ========================================================================== */
.cs-col-screen { position: relative; display: flex; flex-direction: column; min-height: 0; }

/* ---- шапка ---- */
.cs-col-hdr { flex: none; padding: 13px 14px 9px; display: flex; align-items: center; gap: 10px; }
.cs-col-hdr .ttl { flex: 1; min-width: 0; }
.cs-col-hdr .ttl b { display: block; font-family: 'PT Serif', serif; font-size: 19px; color: #ffe6ae; line-height: 1.1; }
.cs-col-hdr .cs-kick { display: block; }
.cs-col-purse { display: flex; gap: 6px; }
.cs-col-coin { display: flex; align-items: center; gap: 4px; padding: 6px 9px 6px 6px; border-radius: 11px;
  font-size: 11px; font-weight: 800; color: #ffe3a8;
  background: linear-gradient(180deg, rgba(46, 31, 20, .94), rgba(20, 13, 9, .96));
  box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .2); }
.cs-col-coin img { width: 17px; height: 17px; display: block; }

/* ---- колода ---- */
.cs-col-deckbar { flex: none; margin: 0 12px 9px; padding: 9px 10px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(40, 27, 18, .9), rgba(17, 11, 8, .94));
  box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .15); }
.cs-col-deckbar .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cs-col-deckbar .row b { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #c69b64; flex: 1; }
.cs-col-deckbar .row i { font-style: normal; font-size: 11px; font-weight: 800; color: #ffd98a; }
.cs-col-dslots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; max-width: 372px; margin: 0 auto; }
.cs-col-ds { position: relative; aspect-ratio: 1/1.1; border-radius: 12px; overflow: hidden; cursor: pointer;
  padding: 0; border: 0; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .13); }
.cs-col-ds img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-col-ds.empty:after { content: '+'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; color: #6a5638; }
.cs-col-ds .mn { position: absolute; left: 4px; top: 4px; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 6px;
  font-size: 10px; font-weight: 900; color: #0b1830; display: grid; place-items: center;
  background: linear-gradient(180deg, #bfe4ff, #5aa8e8); box-shadow: 0 2px 5px rgba(0, 0, 0, .5); }

/* ---- фильтры ---- */
.cs-col-filters { flex: none; display: flex; gap: 6px; padding: 0 12px 9px; overflow-x: auto; scrollbar-width: none; }
.cs-col-filters::-webkit-scrollbar { display: none; }
.cs-col-fc { flex: none; padding: 7px 12px; border: 0; border-radius: 11px; cursor: pointer;
  font-family: 'Exo 2', sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #9d8259;
  background: linear-gradient(180deg, rgba(36, 25, 16, .9), rgba(16, 11, 7, .93));
  box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .11); white-space: nowrap; }
.cs-col-fc.is-on { color: #ffe3a8; box-shadow: inset 0 0 0 1.5px rgba(255, 205, 120, .45); }
.cs-col-fc em { font-style: normal; color: #f0a86a; margin-left: 5px; }

/* ---- сетка карт ---- */
.cs-col-grid { min-height: 0; padding: 2px 12px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; align-content: start; }
.cs-col-grid::-webkit-scrollbar { width: 0; }
.cs-col-tile { position: relative; padding: 6px 6px 8px; border-radius: 15px; cursor: pointer;
  background: linear-gradient(180deg, rgba(48, 33, 21, .92), rgba(18, 12, 8, .95));
  box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .14), 0 8px 18px rgba(0, 0, 0, .45);
  transition: transform .13s ease; }
.cs-col-tile:active { transform: scale(.97); }
.cs-col-tile .art { position: relative; border-radius: 11px; overflow: hidden; aspect-ratio: 1/1.08; background: #140d09; }
.cs-col-tile .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-col-tile .art:after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 -22px 26px -14px rgba(8, 5, 3, .95); }
.cs-col-tile .nm { margin: 6px 1px 4px; font-size: 10.5px; font-weight: 800; line-height: 1.2; color: #f0dfc0;
  text-align: center; min-height: 25px; display: flex; align-items: center; justify-content: center; }
.cs-col-tile .sr { display: flex; justify-content: center; gap: 2px; margin-bottom: 4px; }
.cs-col-tile .sr span { width: 9px; height: 9px; display: block; background: #4a3a24;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.cs-col-tile .sr span.on { background: linear-gradient(180deg, #ffe9ae, #e5a93f); }
.cs-col-tile .bar { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.cs-col-tile .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #c98bff, #8f4fe0); }
.cs-col-tile .frac { margin: 4px 0 0; text-align: center; font-size: 9.5px; font-weight: 800; color: #a98f66; }
.cs-col-tile .mn { position: absolute; left: 9px; top: 9px; z-index: 2; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 7px;
  display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #0b1830;
  background: linear-gradient(180deg, #cfeaff, #5aa8e8); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.cs-col-tile .lv { position: absolute; right: 9px; top: 9px; z-index: 2; width: 22px; height: 22px; transform: rotate(45deg); border-radius: 6px;
  display: grid; place-items: center; background: linear-gradient(180deg, #ffe6ae, #dba24a); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.cs-col-tile .lv b { transform: rotate(-45deg); font-size: 10px; font-weight: 900; color: #4a2c08; }
.cs-col-tile.rr:before, .cs-col-tile.re:before, .cs-col-tile.rl:before { content: ''; position: absolute; inset: -1px; border-radius: 16px; pointer-events: none; }
.cs-col-tile.rr:before { box-shadow: inset 0 0 0 1.5px rgba(120, 190, 255, .5), 0 0 16px rgba(80, 160, 255, .14); }
.cs-col-tile.re:before { box-shadow: inset 0 0 0 1.5px rgba(196, 140, 255, .55), 0 0 18px rgba(150, 80, 255, .16); }
.cs-col-tile.rl:before { box-shadow: inset 0 0 0 1.5px rgba(255, 197, 110, .65), 0 0 22px rgba(255, 170, 60, .2); }
.cs-col-tile.indeck .art:before { content: 'В КОЛОДЕ'; position: absolute; left: 5px; bottom: 5px; z-index: 2; padding: 2px 6px; border-radius: 6px;
  font-size: 7.5px; font-weight: 900; letter-spacing: .1em; color: #22160a;
  background: linear-gradient(180deg, #ffdc95, #e0a446); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.cs-col-tile.ready { animation: cs-col-rdy 2.4s ease-in-out infinite; }
@keyframes cs-col-rdy {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .14), 0 8px 18px rgba(0, 0, 0, .45); }
  50% { box-shadow: inset 0 0 0 1.5px rgba(255, 220, 150, .6), 0 0 22px rgba(255, 180, 70, .28), 0 8px 18px rgba(0, 0, 0, .45); }
}
.cs-col-tile .up { margin: 6px -1px -2px; height: 24px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 4px;
  border: 0; width: 100%; font-family: 'Exo 2', sans-serif; font-size: 9.5px; font-weight: 900; letter-spacing: .1em; color: #3c2407;
  background: linear-gradient(180deg, #fff0c6 0%, #f7cf84 45%, #e0aa50 100%);
  box-shadow: 0 2px 0 #8a5614, inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 14px rgba(255, 185, 80, .3); }
.cs-col-tile .up img { width: 12px; height: 12px; display: block; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .4)); }
.cs-col-tile .up.ph { visibility: hidden; }
.cs-col-tile .up.fk { background: linear-gradient(180deg, #e8d5ff 0%, #c49bf3 45%, #9a63dd 100%);
  box-shadow: 0 2px 0 #4c2478, inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 14px rgba(160, 90, 240, .35); color: #2b1148; }

/* ==========================================================================================
   Фаза 126: «Рюкзак» — порт утверждённого прототипа proto_bag2 (горизонтальные строки, один
   слот в строке). Разметку и значения см. в прототипе; шапка, кошелёк и лента фильтров
   переиспользуют уже портированные правила Коллекции (.cs-col-hdr/.cs-col-purse/.cs-col-coin/
   .cs-col-filters/.cs-col-fc) и её анимацию готовности (cs-col-rdy) — новых стилей не вводим.
   ========================================================================================== */
.cs-bag-screen { position: relative; display: flex; flex-direction: column; min-height: 0; }
.cs-bag-cap { flex: none; margin: 0 12px 9px; padding: 9px 11px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(40, 27, 18, .9), rgba(17, 11, 8, .94));
  box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .15); }
.cs-bag-cap .row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.cs-bag-cap .row b { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #c69b64; flex: 1; }
.cs-bag-cap .row i { font-style: normal; font-size: 11px; font-weight: 800; color: #ffd98a; }
.cs-bag-cap .track { height: 7px; border-radius: 5px; background: rgba(0, 0, 0, .45); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.cs-bag-cap .track i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #ffd98a, #e09a42); box-shadow: 0 0 10px rgba(255, 180, 80, .45); }
.cs-bag-body { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 0 18px; scrollbar-width: none; }
.cs-bag-body::-webkit-scrollbar { width: 0; }
.cs-bag-sec { padding: 0 12px; margin-bottom: 16px; }
.cs-bag-sec[hidden] { display: none; }
.cs-bag-sechd { display: flex; flex-direction: column; gap: 2px; margin: 0 2px 8px; }
.cs-bag-sechd b { font-family: 'PT Serif', serif; font-size: 14px; color: #ffe6ae; }
.cs-bag-sechd i { font-style: normal; font-size: 10px; font-weight: 600; color: #9d8259; line-height: 1.35; }
.cs-bag-rows { display: flex; flex-direction: column; gap: 8px; }
.cs-bag-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 15px;
  background: linear-gradient(180deg, rgba(48, 33, 21, .92), rgba(18, 12, 8, .95));
  box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .14), 0 8px 18px rgba(0, 0, 0, .45);
  transition: transform .13s ease; }
.cs-bag-row:active { transform: scale(.99); }
.cs-bag-row.rr { box-shadow: inset 0 0 0 1.5px rgba(120, 190, 255, .42), 0 8px 18px rgba(0, 0, 0, .45); }
.cs-bag-row.re { box-shadow: inset 0 0 0 1.5px rgba(196, 140, 255, .46), 0 8px 18px rgba(0, 0, 0, .45); }
.cs-bag-row.rl { box-shadow: inset 0 0 0 1.5px rgba(255, 197, 110, .55), 0 0 20px rgba(255, 170, 60, .16), 0 8px 18px rgba(0, 0, 0, .45); }
.cs-bag-row.ready { animation: cs-col-rdy 2.4s ease-in-out infinite; }
.cs-bag-row .ico { position: relative; flex: none; width: 54px; height: 54px; border-radius: 13px; display: grid; place-items: center;
  background: radial-gradient(62% 62% at 50% 40%, rgba(255, 214, 150, .12), rgba(0, 0, 0, 0) 72%), rgba(0, 0, 0, .35);
  box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .12); }
.cs-bag-row .ico img { width: 44px; height: 44px; display: block; object-fit: contain; }
.cs-bag-row .ico.card { width: 46px; height: 56px; border-radius: 11px; overflow: visible; background: #140d09; }
.cs-bag-row .ico.card img { width: 46px; height: 56px; border-radius: 11px; object-fit: cover; }
.cs-bag-row .ico .cs-bag-cnt { position: absolute; right: -5px; top: -5px; z-index: 2; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 8px;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 900; color: #3c2407;
  background: linear-gradient(180deg, #ffe6ae, #dba24a); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.cs-bag-row .body { flex: 1; min-width: 0; }
.cs-bag-row .body b { display: block; font-family: 'PT Serif', serif; font-size: 13.5px; color: #ffe6ae; line-height: 1.2; }
.cs-bag-row .body p { margin: 2px 0 0; font-size: 10.5px; font-weight: 600; color: #b5a17e; line-height: 1.3; }
.cs-bag-row .meta { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.cs-bag-row .meta .rar { font-size: 8.5px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; color: #9d8259; }
.cs-bag-row .meta .dur { display: flex; align-items: center; gap: 3px; font-size: 9.5px; font-weight: 800; color: #c69b64; }
.cs-bag-row .meta .dur img { width: 12px; height: 12px; display: block; }
.cs-bag-row .meta .bar { flex: 1; min-width: 52px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.cs-bag-row .meta .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #c98bff, #8f4fe0); }
.cs-bag-row .meta .bar.gold i { background: linear-gradient(90deg, #ffd98a, #e09a42); }
.cs-bag-row .meta .bar.hot i { background: linear-gradient(90deg, #ffb37a, #e2683f); }
.cs-bag-row .meta .frac { flex: none; font-size: 9.5px; font-weight: 800; color: #a98f66; }
.cs-bag-row .sr { display: inline-flex; gap: 2px; margin-top: 3px; }
.cs-bag-row .sr span { width: 9px; height: 9px; display: block; background: #4a3a24;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.cs-bag-row .sr span.on { background: linear-gradient(180deg, #ffe9ae, #e5a93f); }
.cs-bag-row .act { flex: none; border: 0; cursor: pointer; min-width: 86px; height: 32px; padding: 0 12px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-family: 'Exo 2', sans-serif; font-size: 10px; font-weight: 900; letter-spacing: .1em; color: #3c2407;
  background: linear-gradient(180deg, #fff0c6 0%, #f7cf84 45%, #e0aa50 100%);
  box-shadow: 0 2px 0 #8a5614, inset 0 1px 0 rgba(255, 255, 255, .55); }
.cs-bag-row .act img { width: 13px; height: 13px; display: block; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .4)); }
.cs-bag-row .act:active { transform: translateY(2px); box-shadow: 0 0 0 #8a5614; }
.cs-bag-row .act[disabled] { opacity: .55; cursor: default; }
.cs-bag-row .act.ghost { flex-direction: column; gap: 0; color: #9d8259; background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 0 1px rgba(255, 216, 150, .12); cursor: default; min-width: 64px; }
.cs-bag-row .act.ghost span { font-size: 13px; font-weight: 900; color: #e9cb94; line-height: 1.05; }
.cs-bag-row .qty { flex: none; min-width: 74px; text-align: right; }
.cs-bag-row .qty b { display: block; font-family: 'PT Serif', serif; font-size: 17px; color: #ffe6ae; line-height: 1.1; }
.cs-bag-row .qty span { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8d7550; }

/* =============================================================================
   Фаза 127: время суток на карте города и компактные игровые часы.
   Дописано в конец файла — правки style.css только append-only.
   ============================================================================= */

/* Подложка меняется сменой src, поэтому переход смягчаем прозрачностью. */
.city-map-img { transition: opacity 600ms ease; }

/* Спрайты зданий нарисованы при дневном свете. Чтобы они не выглядели вклеенными
   из дневного кадра, тонируем их под текущую фазу тем же сдвигом, который получила
   подложка: утро — холоднее и светлее, закат — теплее и контрастнее, ночь — синее
   и заметно темнее. Значения подобраны по разнице кадров карты. */
.city-map-world .city-building-img { transition: filter 600ms ease; }
.city-map-world[data-tod="morning"] .city-building-img {
  filter: brightness(0.97) saturate(0.92) hue-rotate(-6deg) contrast(0.98);
}
.city-map-world[data-tod="sunset"] .city-building-img {
  filter: brightness(0.94) saturate(1.12) sepia(0.16) hue-rotate(-12deg);
}
.city-map-world[data-tod="night"] .city-building-img {
  filter: brightness(0.58) saturate(0.72) hue-rotate(18deg) contrast(1.06);
}
/* Тень тоже живёт по фазе: её dx/dy/alpha задаёт JS инлайном на .city-map-world. */
.city-map-world .city-building-shadow { transition: opacity 600ms ease, transform 600ms ease; }

/* Отражённые по горизонтали здания (сейчас — шахта золота). Тень отражается вместе
   со спрайтом, поэтому зеркалим весь блок, а подписи возвращаем обратно. */
.city-building.is-flipped .city-building-img,
.city-building.is-flipped .city-building-shadow { transform: scaleX(-1); }
.city-building.is-flipped .city-building-shadow {
  transform: scaleX(-1) translate(var(--city-shadow-dx), var(--city-shadow-dy)) scaleY(0.42) skewX(26deg);
}

/* --- компактные игровые часы под хедером ------------------------------------ */
.city-clock {
  position: absolute;
  top: calc(var(--hud-height, 56px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(28, 24, 18, .82), rgba(16, 14, 11, .88));
  border: 1px solid rgba(255, 216, 150, .22);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 216, 150, .08);
  backdrop-filter: blur(6px);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.city-clock-icon { font-size: 13px; line-height: 1; }
.city-clock-time {
  font-family: 'PT Serif', serif;
  font-size: 14px;
  font-weight: 700;
  color: #ffe6ae;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.city-clock-phase {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #a08a63;
  line-height: 1;
}
/* Ободок часов подсказывает фазу, не перетягивая внимание с карты. */
.city-clock[data-phase="morning"] { border-color: rgba(190, 214, 235, .34); }
.city-clock[data-phase="day"]     { border-color: rgba(255, 216, 150, .30); }
.city-clock[data-phase="sunset"]  { border-color: rgba(240, 168, 96, .38); }
.city-clock[data-phase="night"]   { border-color: rgba(140, 170, 220, .34); }
.city-clock[data-phase="night"] .city-clock-time { color: #dce8ff; }


/* =============================================================================
   Фаза 128: хижина алхимика. Стили перенесены из одобренного прототипа proto_alc3
   как есть — каждый селектор лишь ограничен контейнером .alc-root, чтобы общие
   имена прототипа (.btn, .hdr, .coin, .card) не задевали остальную игру, а имена
   анимаций получили префикс alc-. Правки дизайна не вносились.
   Дописано в конец файла — правки style.css только append-only.
   ============================================================================= */
.alc-root * {box-sizing:border-box;-webkit-tap-highlight-color:transparent}
.alc-root {height:100%}
.alc-root {font-family:'Exo 2',system-ui,sans-serif;color:#f3e6cf;
  background:
    radial-gradient(90% 60% at 50% -10%, rgba(120,72,30,.34), rgba(10,7,5,0) 60%),
    radial-gradient(70% 50% at 50% 104%, rgba(86,48,22,.3), rgba(10,7,5,0) 58%),
    #0b0806;
  overflow:hidden}
.alc-root:before {content:'';position:fixed;inset:0;pointer-events:none;z-index:0;opacity:.5;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,214,150,.022) 0 2px, rgba(0,0,0,0) 2px 7px),
    repeating-linear-gradient(-35deg, rgba(0,0,0,.14) 0 3px, rgba(0,0,0,0) 3px 9px)}
.alc-root .screen {position:relative;z-index:1;height:100%;display:flex;flex-direction:column}
.alc-root .kick {font-size:9px;font-weight:800;letter-spacing:.18em;text-transform:uppercase;color:#b0894f}
.alc-root .gold {color:#ffd98a}
.alc-root .pos {color:#95e08d}
.alc-root .hl {box-shadow:inset 0 0 0 1px rgba(255,216,150,.16)}
.alc-root .btn {border:0;cursor:pointer;height:50px;padding:0 18px;border-radius:15px;width:100%;
  font-family:'Exo 2',sans-serif;font-size:14.5px;font-weight:800;color:#3c2407;
  background:linear-gradient(180deg,#ffeec2 0%,#f6cd80 42%,#dfa84c 100%);
  box-shadow:0 4px 0 #7d4e12, 0 10px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.6);
  display:flex;align-items:center;justify-content:center;gap:8px}
.alc-root .btn:active {transform:translateY(2px);box-shadow:0 2px 0 #7d4e12}
.alc-root .btn[disabled] {filter:grayscale(.55) brightness(.7);box-shadow:0 4px 0 #3d2a12;cursor:default}
.alc-root .btn img {width:19px;height:19px;display:block}
.alc-root .btn.ghost {background:linear-gradient(180deg, rgba(58,40,26,.95), rgba(26,18,12,.96));color:#e9cb94;height:44px;font-size:13px;
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.24), 0 8px 18px rgba(0,0,0,.4)}
.alc-root .btn.ghost:active {transform:translateY(1px);box-shadow:inset 0 0 0 1px rgba(255,216,150,.24)}
.alc-root .btn.danger {background:linear-gradient(180deg,#f0c0a6,#d98d6a 45%,#b4643f);box-shadow:0 4px 0 #6a3318,0 10px 22px rgba(0,0,0,.4)}
.alc-root .hdr {flex:none;padding:13px 14px 9px;display:flex;align-items:center;gap:10px}
.alc-root .hdr .ttl {flex:1;min-width:0}
.alc-root .hdr .ttl b {display:block;font-family:'PT Serif',serif;font-size:19px;color:#ffe6ae;line-height:1.1}
.alc-root .purse {display:flex;gap:6px}
.alc-root .coin {display:flex;align-items:center;gap:4px;padding:6px 9px 6px 6px;border-radius:11px;font-size:11px;font-weight:800;color:#ffe3a8;
  background:linear-gradient(180deg, rgba(46,31,20,.94), rgba(20,13,9,.96));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.2)}
.alc-root .coin img {width:17px;height:17px;display:block}
.alc-root .deckbar {flex:none;margin:0 12px 9px;padding:9px 10px;border-radius:16px;
  background:linear-gradient(180deg, rgba(40,27,18,.9), rgba(17,11,8,.94));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.15)}
.alc-root .deckbar .row {display:flex;align-items:center;gap:8px;margin-bottom:8px}
.alc-root .deckbar .row b {font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#c69b64;flex:1}
.alc-root .deckbar .row i {font-style:normal;font-size:11px;font-weight:800;color:#ffd98a}
.alc-root .dslots {display:grid;grid-template-columns:repeat(4,1fr);gap:7px;max-width:372px;margin:0 auto}
.alc-root .ds {position:relative;aspect-ratio:1/1.1;border-radius:12px;overflow:hidden;cursor:pointer;
  background:rgba(255,255,255,.03);box-shadow:inset 0 0 0 1px rgba(255,216,150,.13)}
.alc-root .ds img {width:100%;height:100%;object-fit:cover;display:block}
.alc-root .ds.empty:after {content:'+';position:absolute;inset:0;display:grid;place-items:center;font-size:20px;color:#6a5638}
.alc-root .ds .mn {position:absolute;left:4px;top:4px;min-width:17px;height:17px;padding:0 3px;border-radius:6px;
  font-size:10px;font-weight:900;color:#0b1830;display:grid;place-items:center;
  background:linear-gradient(180deg,#bfe4ff,#5aa8e8);box-shadow:0 2px 5px rgba(0,0,0,.5)}
.alc-root .filters {flex:none;display:flex;gap:6px;padding:0 12px 9px;overflow-x:auto;scrollbar-width:none}
.alc-root .filters::-webkit-scrollbar {display:none}
.alc-root .fc {flex:none;padding:7px 12px;border:0;border-radius:11px;cursor:pointer;
  font-family:'Exo 2',sans-serif;font-size:11px;font-weight:800;letter-spacing:.06em;color:#9d8259;
  background:linear-gradient(180deg, rgba(36,25,16,.9), rgba(16,11,7,.93));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.11);white-space:nowrap}
.alc-root .fc.is-on {color:#ffe3a8;box-shadow:inset 0 0 0 1.5px rgba(255,205,120,.45)}
.alc-root .fc em {font-style:normal;color:#f0a86a;margin-left:5px}
.alc-root .grid {flex:1;min-height:0;overflow-y:auto;padding:2px 12px 16px;
  display:grid;grid-template-columns:repeat(3,1fr);gap:9px;align-content:start}
.alc-root .grid::-webkit-scrollbar {width:0}
.alc-root .tile {position:relative;padding:6px 6px 8px;border-radius:15px;cursor:pointer;
  background:linear-gradient(180deg, rgba(48,33,21,.92), rgba(18,12,8,.95));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.14), 0 8px 18px rgba(0,0,0,.45);
  transition:transform .13s ease}
.alc-root .tile:active {transform:scale(.97)}
.alc-root .tile .art {position:relative;border-radius:11px;overflow:hidden;aspect-ratio:1/1.08;background:#140d09}
.alc-root .tile .art img {width:100%;height:100%;object-fit:cover;display:block}
.alc-root .tile .art:after {content:'';position:absolute;inset:0;box-shadow:inset 0 -22px 26px -14px rgba(8,5,3,.95)}
.alc-root .tile .nm {margin:6px 1px 4px;font-size:10.5px;font-weight:800;line-height:1.2;color:#f0dfc0;
  text-align:center;min-height:25px;display:flex;align-items:center;justify-content:center}
.alc-root .tile .sr {display:flex;justify-content:center;gap:2px;margin-bottom:4px}
.alc-root .tile .sr span {width:9px;height:9px;display:block;background:#4a3a24;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
.alc-root .tile .sr span.on {background:linear-gradient(180deg,#ffe9ae,#e5a93f)}
.alc-root .tile .bar {height:4px;border-radius:3px;background:rgba(255,255,255,.07);overflow:hidden}
.alc-root .tile .bar i {display:block;height:100%;border-radius:3px;background:linear-gradient(90deg,#c98bff,#8f4fe0)}
.alc-root .tile .frac {margin:4px 0 0;text-align:center;font-size:9.5px;font-weight:800;color:#a98f66}
.alc-root .tile .mn {position:absolute;left:9px;top:9px;z-index:2;min-width:20px;height:20px;padding:0 4px;border-radius:7px;
  display:grid;place-items:center;font-size:11px;font-weight:900;color:#0b1830;
  background:linear-gradient(180deg,#cfeaff,#5aa8e8);box-shadow:0 2px 6px rgba(0,0,0,.5)}
.alc-root .tile .lv {position:absolute;right:9px;top:9px;z-index:2;width:22px;height:22px;transform:rotate(45deg);border-radius:6px;
  display:grid;place-items:center;background:linear-gradient(180deg,#ffe6ae,#dba24a);box-shadow:0 2px 6px rgba(0,0,0,.5)}
.alc-root .tile .lv b {transform:rotate(-45deg);font-size:10px;font-weight:900;color:#4a2c08}
.alc-root .tile.rr:before, .alc-root .tile.re:before, .alc-root .tile.rl:before {content:'';position:absolute;inset:-1px;border-radius:16px;pointer-events:none}
.alc-root .tile.rr:before {box-shadow:inset 0 0 0 1.5px rgba(120,190,255,.5), 0 0 16px rgba(80,160,255,.14)}
.alc-root .tile.re:before {box-shadow:inset 0 0 0 1.5px rgba(196,140,255,.55), 0 0 18px rgba(150,80,255,.16)}
.alc-root .tile.rl:before {box-shadow:inset 0 0 0 1.5px rgba(255,197,110,.65), 0 0 22px rgba(255,170,60,.2)}
.alc-root .tile.indeck .art:before {content:'В КОЛОДЕ';position:absolute;left:5px;bottom:5px;z-index:2;padding:2px 6px;border-radius:6px;
  font-size:7.5px;font-weight:900;letter-spacing:.1em;color:#22160a;background:linear-gradient(180deg,#ffdc95,#e0a446);
  box-shadow:0 2px 6px rgba(0,0,0,.5)}
.alc-root .tile.ready {animation:alc-rdy 2.4s ease-in-out infinite}
@keyframes alc-rdy{0%,100%{box-shadow:inset 0 0 0 1px rgba(255,216,150,.14), 0 8px 18px rgba(0,0,0,.45)}
  50%{box-shadow:inset 0 0 0 1.5px rgba(255,220,150,.6), 0 0 22px rgba(255,180,70,.28), 0 8px 18px rgba(0,0,0,.45)}}
.alc-root .tile .up {margin:6px -1px -2px;height:24px;border-radius:9px;display:flex;align-items:center;justify-content:center;gap:4px;
  font-size:9.5px;font-weight:900;letter-spacing:.1em;color:#3c2407;
  background:linear-gradient(180deg,#fff0c6 0%,#f7cf84 45%,#e0aa50 100%);
  box-shadow:0 2px 0 #8a5614, inset 0 1px 0 rgba(255,255,255,.55), 0 0 14px rgba(255,185,80,.3)}
.alc-root .tile .up img {width:12px;height:12px;display:block;filter:drop-shadow(0 1px 0 rgba(255,255,255,.4))}
.alc-root .tile .up.ph {visibility:hidden}
.alc-root .tile .up.fk {background:linear-gradient(180deg,#e8d5ff 0%,#c49bf3 45%,#9a63dd 100%);box-shadow:0 2px 0 #4c2478, inset 0 1px 0 rgba(255,255,255,.5), 0 0 14px rgba(160,90,240,.35);color:#2b1148}
.alc-root .bg-cap {flex:none;margin:0 12px 9px;padding:9px 11px;border-radius:16px;
  background:linear-gradient(180deg, rgba(40,27,18,.9), rgba(17,11,8,.94));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.15)}
.alc-root .bg-cap .row {display:flex;align-items:center;gap:8px;margin-bottom:7px}
.alc-root .bg-cap .row b {font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#c69b64;flex:1}
.alc-root .bg-cap .row i {font-style:normal;font-size:11px;font-weight:800;color:#ffd98a}
.alc-root .bg-cap .track {height:7px;border-radius:5px;background:rgba(0,0,0,.45);overflow:hidden;box-shadow:inset 0 1px 2px rgba(0,0,0,.6)}
.alc-root .bg-cap .track i {display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,#ffd98a,#e09a42);box-shadow:0 0 10px rgba(255,180,80,.45)}
.alc-root .bg-body {flex:1;min-height:0;overflow-y:auto;padding:2px 0 18px;scrollbar-width:none}
.alc-root .bg-body::-webkit-scrollbar {width:0}
.alc-root .bg-sec {padding:0 12px;margin-bottom:16px}
.alc-root .bg-sec[hidden] {display:none}
.alc-root .bg-sechd {display:flex;flex-direction:column;gap:2px;margin:0 2px 8px}
.alc-root .bg-sechd b {font-family:'PT Serif',serif;font-size:14px;color:#ffe6ae}
.alc-root .bg-sechd i {font-style:normal;font-size:10px;font-weight:600;color:#9d8259;line-height:1.35}
.alc-root .bg-rows {display:flex;flex-direction:column;gap:8px}
.alc-root .bg-row {position:relative;display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:15px;
  background:linear-gradient(180deg, rgba(48,33,21,.92), rgba(18,12,8,.95));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.14), 0 8px 18px rgba(0,0,0,.45);
  transition:transform .13s ease}
.alc-root .bg-row:active {transform:scale(.99)}
.alc-root .bg-row.rr {box-shadow:inset 0 0 0 1.5px rgba(120,190,255,.42), 0 8px 18px rgba(0,0,0,.45)}
.alc-root .bg-row.re {box-shadow:inset 0 0 0 1.5px rgba(196,140,255,.46), 0 8px 18px rgba(0,0,0,.45)}
.alc-root .bg-row.rl {box-shadow:inset 0 0 0 1.5px rgba(255,197,110,.55), 0 0 20px rgba(255,170,60,.16), 0 8px 18px rgba(0,0,0,.45)}
.alc-root .bg-row.ready {animation:alc-rdy 2.4s ease-in-out infinite}
.alc-root .bg-row .ico {position:relative;flex:none;width:54px;height:54px;border-radius:13px;display:grid;place-items:center;
  background:radial-gradient(62% 62% at 50% 40%, rgba(255,214,150,.12), rgba(0,0,0,0) 72%), rgba(0,0,0,.35);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.12)}
.alc-root .bg-row .ico img {width:44px;height:44px;display:block;object-fit:contain}
.alc-root .bg-row .ico.card {width:46px;height:56px;border-radius:11px;overflow:visible;background:#140d09}
.alc-root .bg-row .ico.card img {width:46px;height:56px;border-radius:11px;object-fit:cover}
.alc-root .bg-row .ico .bg-cnt {position:absolute;right:-5px;top:-5px;z-index:2;min-width:21px;height:21px;padding:0 5px;border-radius:8px;
  display:grid;place-items:center;font-size:10.5px;font-weight:900;color:#3c2407;
  background:linear-gradient(180deg,#ffe6ae,#dba24a);box-shadow:0 2px 6px rgba(0,0,0,.5)}
.alc-root .bg-row .body {flex:1;min-width:0}
.alc-root .bg-row .body b {display:block;font-family:'PT Serif',serif;font-size:13.5px;color:#ffe6ae;line-height:1.2}
.alc-root .bg-row .body p {margin:2px 0 0;font-size:10.5px;font-weight:600;color:#b5a17e;line-height:1.3}
.alc-root .bg-row .meta {display:flex;align-items:center;gap:7px;margin-top:5px}
.alc-root .bg-row .meta .rar {font-size:8.5px;font-weight:900;letter-spacing:.11em;text-transform:uppercase;color:#9d8259}
.alc-root .bg-row .meta .dur {display:flex;align-items:center;gap:3px;font-size:9.5px;font-weight:800;color:#c69b64}
.alc-root .bg-row .meta .dur img {width:12px;height:12px;display:block}
.alc-root .bg-row .meta .bar {flex:1;min-width:52px;height:5px;border-radius:3px;background:rgba(255,255,255,.07);overflow:hidden}
.alc-root .bg-row .meta .bar i {display:block;height:100%;border-radius:3px;background:linear-gradient(90deg,#c98bff,#8f4fe0)}
.alc-root .bg-row .meta .bar.gold i {background:linear-gradient(90deg,#ffd98a,#e09a42)}
.alc-root .bg-row .meta .bar.hot i {background:linear-gradient(90deg,#ffb37a,#e2683f)}
.alc-root .bg-row .meta .frac {flex:none;font-size:9.5px;font-weight:800;color:#a98f66}
.alc-root .bg-row .sr {display:inline-flex;gap:2px;margin-top:3px}
.alc-root .bg-row .sr span {width:9px;height:9px;display:block;background:#4a3a24;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
.alc-root .bg-row .sr span.on {background:linear-gradient(180deg,#ffe9ae,#e5a93f)}
.alc-root .bg-row .act {flex:none;border:0;cursor:pointer;min-width:86px;height:32px;padding:0 12px;border-radius:11px;
  display:flex;align-items:center;justify-content:center;gap:4px;
  font-family:'Exo 2',sans-serif;font-size:10px;font-weight:900;letter-spacing:.1em;color:#3c2407;
  background:linear-gradient(180deg,#fff0c6 0%,#f7cf84 45%,#e0aa50 100%);
  box-shadow:0 2px 0 #8a5614, inset 0 1px 0 rgba(255,255,255,.55)}
.alc-root .bg-row .act img {width:13px;height:13px;display:block;filter:drop-shadow(0 1px 0 rgba(255,255,255,.4))}
.alc-root .bg-row .act:active {transform:translateY(2px);box-shadow:0 0 0 #8a5614}
.alc-root .bg-row .act.ghost {flex-direction:column;gap:0;color:#9d8259;background:rgba(0,0,0,.3);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.12);cursor:default;min-width:64px}
.alc-root .bg-row .act.ghost span {font-size:13px;font-weight:900;color:#e9cb94;line-height:1.05}
.alc-root .bg-row .qty {flex:none;min-width:74px;text-align:right}
.alc-root .bg-row .qty b {display:block;font-family:'PT Serif',serif;font-size:17px;color:#ffe6ae;line-height:1.1}
.alc-root .bg-row .qty span {font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8d7550}
.alc-root .al-stage {position:relative;flex:none;margin:0 12px 0;height:224px;border-radius:20px;overflow:hidden;
  background:
    radial-gradient(74% 56% at 50% 82%, rgba(255,150,50,.20), rgba(0,0,0,0) 70%),
    radial-gradient(90% 70% at 50% 8%, rgba(120,72,30,.26), rgba(0,0,0,0) 72%),
    linear-gradient(180deg, rgba(38,25,16,.94), rgba(14,9,6,.96));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.16), 0 12px 26px rgba(0,0,0,.5)}
.alc-root .al-stage:before {content:'';position:absolute;inset:0;pointer-events:none;
  background:repeating-linear-gradient(118deg, rgba(255,214,150,.03) 0 2px, rgba(0,0,0,0) 2px 8px)}
.alc-root .al-lvl {position:absolute;left:11px;top:11px;z-index:4;display:flex;align-items:center;gap:5px;
  padding:5px 9px;border-radius:10px;font-size:9.5px;font-weight:900;letter-spacing:.09em;
  text-transform:uppercase;color:#e9cb94;background:rgba(0,0,0,.42);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.18)}
.alc-root .al-lvl img {width:13px;height:13px;display:block}
.alc-root .al-hint {position:absolute;right:11px;top:11px;z-index:4;padding:5px 9px;border-radius:10px;
  font-size:9.5px;font-weight:800;color:#b5a17e;background:rgba(0,0,0,.42);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.12)}
.alc-root .al-pot {position:absolute;left:50%;top:22px;width:186px;height:186px;transform:translateX(-50%);z-index:2}
.alc-root .al-pot img {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;
  opacity:0;transition:opacity .45s ease;filter:drop-shadow(0 12px 18px rgba(0,0,0,.55))}
.alc-root .al-pot img.on {opacity:1}
.alc-root .al-pot.shake {animation:alc-al-shake .34s ease-in-out}
@keyframes alc-al-shake{0%,100%{transform:translateX(-50%)}
  25%{transform:translateX(calc(-50% - 3px)) rotate(-.7deg)}
  75%{transform:translateX(calc(-50% + 3px)) rotate(.7deg)}}
.alc-root .al-glow {position:absolute;left:50%;top:126px;width:250px;height:110px;transform:translateX(-50%);z-index:1;
  border-radius:50%;opacity:.5;filter:blur(16px);transition:opacity .5s ease, background .5s ease;
  background:radial-gradient(50% 50% at 50% 50%, rgba(255,150,50,.55), rgba(0,0,0,0) 70%);
  animation:alc-al-breathe 3.1s ease-in-out infinite}
@keyframes alc-al-breathe{0%,100%{transform:translateX(-50%) scale(1)}50%{transform:translateX(-50%) scale(1.09)}}
.alc-root .al-stage.s3 .al-glow {background:radial-gradient(50% 50% at 50% 50%, rgba(214,140,255,.6), rgba(0,0,0,0) 70%);opacity:.75}
.alc-root .al-stage.s0 .al-glow {opacity:.12}
.alc-root .al-steam {position:absolute;left:50%;top:4px;width:160px;height:120px;transform:translateX(-50%);z-index:3;pointer-events:none;opacity:0;transition:opacity .6s ease}
.alc-root .al-stage.s1 .al-steam, .alc-root .al-stage.s2 .al-steam, .alc-root .al-stage.s3 .al-steam {opacity:1}
.alc-root .al-steam i {position:absolute;bottom:0;width:40px;height:40px;border-radius:50%;background:rgba(255,230,190,.10);
  filter:blur(7px);animation:alc-al-rise 3.4s linear infinite}
.alc-root .al-steam i:nth-child(1) {left:14px;animation-delay:0s}
.alc-root .al-steam i:nth-child(2) {left:56px;width:52px;animation-delay:.9s}
.alc-root .al-steam i:nth-child(3) {left:104px;animation-delay:1.8s}
@keyframes alc-al-rise{0%{transform:translateY(16px) scale(.6);opacity:0}
  25%{opacity:.8}
  100%{transform:translateY(-78px) scale(1.5);opacity:0}}
.alc-root .al-sparks {position:absolute;left:50%;top:18px;width:210px;height:190px;transform:translateX(-50%);z-index:3;pointer-events:none;opacity:0;transition:opacity .5s ease}
.alc-root .al-stage.s3 .al-sparks {opacity:1}
.alc-root .al-sparks i {position:absolute;bottom:34px;width:4px;height:4px;border-radius:50%;background:#ffe6ae;
  box-shadow:0 0 7px rgba(255,200,120,.95);animation:alc-al-spark 2.6s ease-in-out infinite}
.alc-root .al-sparks i:nth-child(1) {left:36px;animation-delay:.1s}
.alc-root .al-sparks i:nth-child(2) {left:74px;animation-delay:.7s}
.alc-root .al-sparks i:nth-child(3) {left:112px;animation-delay:1.2s}
.alc-root .al-sparks i:nth-child(4) {left:150px;animation-delay:1.7s}
.alc-root .al-sparks i:nth-child(5) {left:94px;animation-delay:2.2s}
@keyframes alc-al-spark{0%{transform:translateY(0) scale(.5);opacity:0}
  30%{opacity:1}
  100%{transform:translateY(-104px) scale(1.15);opacity:0}}
.alc-root .al-slots {position:relative;z-index:6;margin:-34px 12px 0;padding-bottom:22px;display:flex;justify-content:center;gap:12px}
.alc-root .al-slot {position:relative;width:62px;height:62px;border-radius:17px;cursor:pointer;
  display:grid;place-items:center;transition:transform .14s ease, box-shadow .2s ease;
  background:radial-gradient(64% 64% at 50% 38%, rgba(255,214,150,.10), rgba(0,0,0,0) 74%), rgba(10,7,5,.72);
  box-shadow:inset 0 0 0 1.5px rgba(255,216,150,.20), 0 6px 14px rgba(0,0,0,.5)}
.alc-root .al-slot:active {transform:scale(.96)}
.alc-root .al-slot.full {box-shadow:inset 0 0 0 1.5px rgba(255,216,150,.44), 0 0 18px rgba(255,170,60,.18), 0 6px 14px rgba(0,0,0,.5)}
.alc-root .al-slot.full.rr {box-shadow:inset 0 0 0 1.5px rgba(120,190,255,.5), 0 0 18px rgba(90,160,255,.16), 0 6px 14px rgba(0,0,0,.5)}
.alc-root .al-slot.full.re {box-shadow:inset 0 0 0 1.5px rgba(196,140,255,.52), 0 0 18px rgba(160,90,255,.18), 0 6px 14px rgba(0,0,0,.5)}
.alc-root .al-slot.locked {opacity:.5;cursor:default}
.alc-root .al-slot img {width:46px;height:46px;display:block;object-fit:contain;animation:alc-al-drop .3s ease}
@keyframes alc-al-drop{0%{transform:translateY(-14px) scale(.8);opacity:0}100%{transform:none;opacity:1}}
.alc-root .al-slot .ph {font-size:22px;font-weight:300;color:rgba(255,216,150,.34);line-height:1}
.alc-root .al-slot .lk {width:15px;height:15px;opacity:.6}
.alc-root .al-slot .x {position:absolute;right:-5px;top:-5px;width:20px;height:20px;border-radius:7px;display:grid;place-items:center;
  font-size:11px;font-weight:900;color:#3c2407;background:linear-gradient(180deg,#ffe6ae,#dba24a);
  box-shadow:0 2px 6px rgba(0,0,0,.5)}
.alc-root .al-slot .cap {position:absolute;left:-8px;right:-8px;bottom:-16px;text-align:center;font-size:8px;font-weight:800;
  letter-spacing:.06em;text-transform:uppercase;color:#9d8259;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.alc-root .al-ess {flex:none;margin:0 12px 11px;padding:10px 11px;border-radius:16px;
  background:linear-gradient(180deg, rgba(40,27,18,.9), rgba(17,11,8,.94));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.15)}
.alc-root .al-ess .hd {display:flex;align-items:center;gap:8px;margin-bottom:9px}
.alc-root .al-ess .hd b {flex:1;font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#c69b64}
.alc-root .al-ess .hd i {font-style:normal;font-size:10px;font-weight:800;color:#8d7550}
.alc-root .al-ess .grid {display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}
.alc-root .al-e {display:flex;align-items:center;gap:7px}
.alc-root .al-e span {flex:none;width:44px;font-size:9.5px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:#9d8259}
.alc-root .al-e .track {flex:1;height:6px;border-radius:4px;background:rgba(0,0,0,.45);overflow:hidden;box-shadow:inset 0 1px 2px rgba(0,0,0,.55)}
.alc-root .al-e .track i {display:block;height:100%;width:0;border-radius:4px;transition:width .35s cubic-bezier(.3,1.2,.4,1)}
.alc-root .al-e.hot .track i {background:linear-gradient(90deg,#ffb37a,#e2683f);box-shadow:0 0 8px rgba(226,104,63,.5)}
.alc-root .al-e.cold .track i {background:linear-gradient(90deg,#a9dcff,#4f93e0);box-shadow:0 0 8px rgba(79,147,224,.5)}
.alc-root .al-e.zeal .track i {background:linear-gradient(90deg,#c98bff,#8f4fe0);box-shadow:0 0 8px rgba(143,79,224,.5)}
.alc-root .al-e.calm .track i {background:linear-gradient(90deg,#b6e8a6,#5aa757);box-shadow:0 0 8px rgba(90,167,87,.5)}
.alc-root .al-e b {flex:none;min-width:14px;text-align:right;font-size:11px;font-weight:900;color:#e9cb94}
.alc-root .al-e.top span, .alc-root .al-e.top b {color:#ffd98a}
.alc-root .al-go {flex:none;margin:0 12px 6px}
.alc-root .al-note {flex:none;margin:0 14px 16px;font-size:10px;font-weight:600;color:#8d7550;line-height:1.4;text-align:center}
.alc-root .al-fire {position:fixed;inset:0;z-index:40;display:none;align-items:flex-end;
  background:radial-gradient(70% 50% at 50% 70%, rgba(120,50,16,.36), rgba(0,0,0,.82) 70%);
  backdrop-filter:blur(3px)}
.alc-root .al-fire.on {display:flex;animation:alc-al-fade .22s ease}
@keyframes alc-al-fade{from{opacity:0}to{opacity:1}}
.alc-root .al-fire .sheet {width:100%;padding:16px 14px calc(16px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;
  background:linear-gradient(180deg, rgba(46,31,20,.98), rgba(16,11,7,.99));
  box-shadow:inset 0 1px 0 rgba(255,216,150,.2), 0 -14px 34px rgba(0,0,0,.6);
  animation:alc-al-up .26s cubic-bezier(.2,1.1,.3,1)}
@keyframes alc-al-up{from{transform:translateY(18px)}to{transform:none}}
.alc-root .al-fire .ttl {text-align:center;margin-bottom:12px}
.alc-root .al-fire .ttl b {display:block;font-family:'PT Serif',serif;font-size:17px;color:#ffe6ae}
.alc-root .al-fire .ttl p {margin:3px 0 0;font-size:10.5px;font-weight:600;color:#b5a17e}
.alc-root .al-phases {display:flex;justify-content:center;gap:6px;margin-bottom:13px}
.alc-root .al-phases div {min-width:74px;padding:5px 8px;border-radius:10px;text-align:center;font-size:9px;font-weight:900;
  letter-spacing:.08em;text-transform:uppercase;color:#7d6746;background:rgba(0,0,0,.34);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.1);transition:color .2s ease, box-shadow .2s ease}
.alc-root .al-phases div.now {color:#ffd98a;box-shadow:inset 0 0 0 1.5px rgba(255,216,150,.4)}
.alc-root .al-phases div.done {color:#95e08d;box-shadow:inset 0 0 0 1px rgba(149,224,141,.34)}
.alc-root .al-bar {position:relative;height:56px;border-radius:15px;overflow:hidden;margin-bottom:11px;
  background:linear-gradient(90deg, #2a4f7a 0%, #35617f 22%, #4a6a3c 42%, #6d6428 58%, #8a4a1e 78%, #a33314 100%);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.18), inset 0 3px 10px rgba(0,0,0,.5)}
.alc-root .al-bar .ticks {position:absolute;inset:0;background:repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 1px, rgba(0,0,0,0) 1px 5%)}
.alc-root .al-bar .win {position:absolute;top:0;bottom:0;border-radius:8px;
  background:linear-gradient(180deg, rgba(255,240,200,.30), rgba(255,210,130,.14));
  box-shadow:inset 0 0 0 1.5px rgba(255,235,180,.75), 0 0 20px rgba(255,200,120,.4);
  transition:left .3s ease, width .3s ease}
.alc-root .al-bar .win.sweet {position:absolute;top:8px;bottom:8px;border-radius:6px;background:rgba(255,255,255,.22);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7), 0 0 16px rgba(255,255,255,.5)}
.alc-root .al-bar .mk {position:absolute;top:-3px;bottom:-3px;width:5px;margin-left:-2.5px;border-radius:3px;
  background:linear-gradient(180deg,#fff8e6,#ffd98a);box-shadow:0 0 12px rgba(255,220,150,.95), 0 0 3px #fff}
.alc-root .al-bar .lbl {position:absolute;bottom:4px;font-size:8px;font-weight:900;letter-spacing:.1em;
  text-transform:uppercase;color:rgba(255,255,255,.5)}
.alc-root .al-bar .lbl.l {left:8px}
.alc-root .al-bar .lbl.r {right:8px}
.alc-root .al-bar.flash:after {content:'';position:absolute;inset:0;background:rgba(255,255,255,.55);animation:alc-al-flash .3s ease forwards}
@keyframes alc-al-flash{to{opacity:0}}
.alc-root .al-scores {display:flex;gap:6px;margin-bottom:12px}
.alc-root .al-scores div {flex:1;padding:7px 4px;border-radius:11px;text-align:center;background:rgba(0,0,0,.32);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.1)}
.alc-root .al-scores div span {display:block;font-size:8px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#7d6746}
.alc-root .al-scores div b {display:block;margin-top:2px;font-size:14px;font-weight:900;color:#4a3a24}
.alc-root .al-scores div.has b {color:#ffe6ae}
.alc-root .al-res {position:fixed;inset:0;z-index:50;display:none;align-items:center;justify-content:center;padding:18px;
  background:radial-gradient(60% 45% at 50% 42%, rgba(150,96,30,.34), rgba(0,0,0,.86) 70%);
  backdrop-filter:blur(4px)}
.alc-root .al-res.on {display:flex;animation:alc-al-fade .22s ease}
.alc-root .al-res .card {position:relative;width:100%;max-width:330px;padding:18px 16px 16px;border-radius:22px;text-align:center;
  background:linear-gradient(180deg, rgba(52,35,22,.98), rgba(17,11,7,.99));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.24), 0 18px 40px rgba(0,0,0,.6);
  animation:alc-al-pop .34s cubic-bezier(.2,1.3,.35,1)}
@keyframes alc-al-pop{from{transform:scale(.9);opacity:0}to{transform:none;opacity:1}}
.alc-root .al-res .rays {position:absolute;left:50%;top:14px;width:250px;height:250px;transform:translateX(-50%);pointer-events:none;
  background:repeating-conic-gradient(from 0deg, rgba(255,214,150,.16) 0 4deg, rgba(0,0,0,0) 4deg 26deg);
  -webkit-mask-image:radial-gradient(closest-side, rgba(0,0,0,.9) 22%, rgba(0,0,0,0) 76%);
  mask-image:radial-gradient(closest-side, rgba(0,0,0,.9) 22%, rgba(0,0,0,0) 76%);
  animation:alc-al-spin 26s linear infinite;opacity:.55}
@keyframes alc-al-spin{to{transform:translateX(-50%) rotate(360deg)}}
.alc-root .al-res .vial {position:relative;width:104px;height:104px;margin:2px auto 10px;border-radius:26px;display:grid;place-items:center;
  background:radial-gradient(60% 60% at 50% 38%, rgba(255,214,150,.18), rgba(0,0,0,0) 72%), rgba(0,0,0,.4);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.2)}
.alc-root .al-res .vial img {width:84px;height:84px;object-fit:contain;animation:alc-al-float 3.4s ease-in-out infinite}
@keyframes alc-al-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
.alc-root .al-res .q {display:inline-flex;align-items:center;gap:5px;padding:5px 11px;border-radius:10px;margin-bottom:8px;
  font-size:9.5px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#ffd98a;
  background:rgba(0,0,0,.4);box-shadow:inset 0 0 0 1px rgba(255,216,150,.26)}
.alc-root .al-res h3 {margin:0;font-family:'PT Serif',serif;font-size:19px;color:#ffe6ae;line-height:1.2}
.alc-root .al-res .desc {margin:5px 0 12px;font-size:11px;font-weight:600;color:#b5a17e;line-height:1.4}
.alc-root .al-res .stats {display:flex;gap:7px;margin-bottom:13px}
.alc-root .al-res .stats div {flex:1;padding:8px 5px;border-radius:12px;background:rgba(0,0,0,.32);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.12)}
.alc-root .al-res .stats span {display:block;font-size:8px;font-weight:900;letter-spacing:.07em;text-transform:uppercase;color:#7d6746}
.alc-root .al-res .stats b {display:block;margin-top:3px;font-size:13px;font-weight:900;color:#ffe6ae}
.alc-root .al-res .stats b.pos {color:#95e08d}
.alc-root .al-res .dbl {margin:0 0 12px;padding:8px 10px;border-radius:12px;font-size:10.5px;font-weight:800;color:#95e08d;
  background:rgba(70,120,60,.16);box-shadow:inset 0 0 0 1px rgba(149,224,141,.3)}
.alc-root .al-res .acts {display:flex;gap:8px}
.alc-root .al-res .acts .btn {height:46px;font-size:12.5px}
.alc-root .al-res .acts .btn.ghost {height:46px;font-size:12.5px}
.alc-root .al-body {flex:1;min-height:0;overflow-y:auto;padding:2px 0 18px;scrollbar-width:none}
.alc-root .al-body::-webkit-scrollbar {width:0}
.alc-root .al-pane[hidden] {display:none}
.alc-root .al-tags {display:flex;align-items:center;gap:4px;margin-top:5px}
.alc-root .al-tag {padding:2px 6px;border-radius:6px;font-size:8.5px;font-weight:900;letter-spacing:.05em;text-transform:uppercase;
  background:rgba(0,0,0,.34);box-shadow:inset 0 0 0 1px rgba(255,255,255,.07)}
.alc-root .al-tag.hot {color:#f0a678}
.alc-root .al-tag.cold {color:#8fc6f5}
.alc-root .al-tag.zeal {color:#c39bf0}
.alc-root .al-tag.calm {color:#9dd18f}
.alc-root .al-locked {filter:grayscale(.5);opacity:.72}
.alc-root button.bg-row {text-align:left;font-family:'Exo 2',sans-serif;border:0;width:100%;cursor:pointer}
.alc-root .al-up {margin:0 12px 18px;padding:11px 12px;border-radius:16px;
  background:linear-gradient(180deg, rgba(40,27,18,.9), rgba(17,11,8,.94));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.15)}
.alc-root .al-up .hd {display:flex;align-items:center;gap:8px;margin-bottom:8px}
.alc-root .al-up .hd b {flex:1;font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#c69b64}
.alc-root .al-up .hd i {font-style:normal;font-size:10px;font-weight:800;color:#ffd98a}
.alc-root .al-up ul {margin:0;padding:0 0 0 14px;list-style:none}
.alc-root .al-up li {position:relative;font-size:10.5px;font-weight:600;color:#b5a17e;line-height:1.55}
.alc-root .al-up li:before {content:'';position:absolute;left:-12px;top:6px;width:5px;height:5px;border-radius:50%;background:#dba24a}
.alc-root .vx {position:fixed;inset:0;z-index:40;display:none;flex-direction:column;
  background:
    radial-gradient(64% 44% at 50% 46%, rgba(140,70,20,.34), rgba(0,0,0,0) 68%),
    radial-gradient(90% 60% at 50% 104%, rgba(90,40,14,.3), rgba(0,0,0,0) 62%),
    #0a0705;
  touch-action:none;user-select:none}
.alc-root .vx.on {display:flex;animation:alc-vx-in .26s ease}
@keyframes alc-vx-in{from{opacity:0}to{opacity:1}}
.alc-root .vx:before {content:'';position:absolute;inset:0;pointer-events:none;opacity:.5;
  background:repeating-linear-gradient(115deg, rgba(255,214,150,.022) 0 2px, rgba(0,0,0,0) 2px 7px)}
.alc-root .vx-top {position:relative;flex:none;padding:16px 16px 0;text-align:center}
.alc-root .vx-top .st {display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:10px;margin-bottom:7px;
  font-size:9px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:#c69b64;
  background:rgba(0,0,0,.4);box-shadow:inset 0 0 0 1px rgba(255,216,150,.16)}
.alc-root .vx-top b {display:block;font-family:'PT Serif',serif;font-size:21px;color:#ffe6ae;line-height:1.15}
.alc-root .vx-top p {margin:4px 0 0;font-size:11px;font-weight:600;color:#b5a17e;line-height:1.35;min-height:30px}
.alc-root .vx-time {flex:none;height:5px;margin:10px 18px 0;border-radius:4px;background:rgba(0,0,0,.5);overflow:hidden;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.6)}
.alc-root .vx-time i {display:block;height:100%;width:100%;border-radius:4px;
  background:linear-gradient(90deg,#ffd98a,#e09a42);box-shadow:0 0 10px rgba(255,180,80,.45)}
.alc-root .vx-arena {position:relative;flex:1;min-height:0;display:grid;place-items:center}
.alc-root .vx-canvas {position:relative;display:block;touch-action:none;cursor:grab}
.alc-root .vx-canvas:active {cursor:grabbing}
.alc-root .vx-tip {position:absolute;left:50%;bottom:6px;transform:translateX(-50%);
  padding:6px 12px;border-radius:11px;font-size:10px;font-weight:800;letter-spacing:.06em;color:#e9cb94;
  background:rgba(0,0,0,.52);box-shadow:inset 0 0 0 1px rgba(255,216,150,.16);
  white-space:nowrap;opacity:0;transition:opacity .3s ease;pointer-events:none}
.alc-root .vx-tip.on {opacity:1}
.alc-root .vx-heat {position:absolute;left:14px;top:50%;transform:translateY(-50%);width:34px;text-align:center}
.alc-root .vx-heat .tube {position:relative;height:186px;border-radius:13px;overflow:hidden;
  background:linear-gradient(180deg, rgba(26,17,11,.92), rgba(14,9,6,.92));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.18), inset 0 2px 8px rgba(0,0,0,.5)}
.alc-root .vx-heat .fill {position:absolute;left:0;right:0;bottom:0;height:0;border-radius:0 0 13px 13px;
  background:linear-gradient(180deg,#ffb37a,#e2683f);transition:height .12s linear}
.alc-root .vx-heat .zone {position:absolute;left:0;right:0;border-top:1px dashed rgba(255,225,160,.55);
  border-bottom:1px dashed rgba(255,225,160,.55);
  background:linear-gradient(180deg, rgba(255,214,140,.20), rgba(255,180,90,.12))}
.alc-root .vx-heat .mark {position:absolute;left:-4px;right:-4px;height:2px;background:#fff8e6;
  box-shadow:0 0 8px rgba(255,220,150,.9);transition:bottom .12s linear}
.alc-root .vx-heat span {display:block;margin-top:6px;font-size:8px;font-weight:900;letter-spacing:.1em;
  text-transform:uppercase;color:#8d7550}
.alc-root .vx-heat.over .fill {background:linear-gradient(180deg,#ff8f6a,#c9331a)}
.alc-root .vx-heat.over .tube {box-shadow:inset 0 0 0 1.5px rgba(255,120,80,.6), inset 0 2px 8px rgba(0,0,0,.5);
  animation:alc-vx-alarm .5s ease-in-out infinite}
@keyframes alc-vx-alarm{0%,100%{opacity:1}50%{opacity:.68}}
.alc-root .vx-ess {position:absolute;right:14px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:9px}
.alc-root .vx-e {width:34px;text-align:center}
.alc-root .vx-e .tube {position:relative;height:40px;border-radius:9px;overflow:hidden;background:rgba(0,0,0,.45);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.14)}
.alc-root .vx-e .fill {position:absolute;left:0;right:0;bottom:0;height:0;transition:height .3s cubic-bezier(.3,1.2,.4,1)}
.alc-root .vx-e.hot .fill {background:linear-gradient(180deg,#ffb37a,#e2683f)}
.alc-root .vx-e.cold .fill {background:linear-gradient(180deg,#a9dcff,#4f93e0)}
.alc-root .vx-e.zeal .fill {background:linear-gradient(180deg,#c98bff,#8f4fe0)}
.alc-root .vx-e.calm .fill {background:linear-gradient(180deg,#b6e8a6,#5aa757)}
.alc-root .vx-e span {display:block;margin-top:3px;font-size:8px;font-weight:900;letter-spacing:.06em;
  text-transform:uppercase;color:#8d7550}
.alc-root .vx-e.pulse .tube {animation:alc-vx-pulse .5s ease}
@keyframes alc-vx-pulse{0%{box-shadow:inset 0 0 0 1px rgba(255,216,150,.14)}
  40%{box-shadow:inset 0 0 0 2px rgba(255,235,180,.85), 0 0 16px rgba(255,200,120,.5)}
  100%{box-shadow:inset 0 0 0 1px rgba(255,216,150,.14)}}
.alc-root .vx-bot {flex:none;padding:0 14px calc(16px + env(safe-area-inset-bottom))}
.alc-root .vx-steps {display:flex;gap:6px;margin-bottom:10px}
.alc-root .vx-steps div {flex:1;padding:8px 4px;border-radius:12px;text-align:center;background:rgba(0,0,0,.34);
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.1);transition:box-shadow .25s ease}
.alc-root .vx-steps div span {display:block;font-size:8px;font-weight:900;letter-spacing:.07em;text-transform:uppercase;color:#7d6746}
.alc-root .vx-steps div b {display:block;margin-top:3px;font-size:14px;font-weight:900;color:#4a3a24}
.alc-root .vx-steps div.now {box-shadow:inset 0 0 0 1.5px rgba(255,216,150,.42)}
.alc-root .vx-steps div.now span {color:#ffd98a}
.alc-root .vx-steps div.has b {color:#ffe6ae}
.alc-root .vx-steps div.good b {color:#95e08d}
.alc-root .vx-note {margin:0;text-align:center;font-size:9.5px;font-weight:700;color:#7d6746;letter-spacing:.04em}
.alc-root .vx-pop {position:absolute;z-index:5;pointer-events:none;font-family:'PT Serif',serif;font-size:15px;font-weight:700;
  color:#ffe6ae;text-shadow:0 2px 8px rgba(0,0,0,.8);animation:alc-vx-fly .85s ease-out forwards}
.alc-root .vx-pop.miss {color:#e8927a}
@keyframes alc-vx-fly{0%{transform:translate(-50%,-50%) scale(.7);opacity:0}
  25%{transform:translate(-50%,-64%) scale(1.06);opacity:1}
  100%{transform:translate(-50%,-116%) scale(1);opacity:0}}
.alc-root .cu-xp {margin:9px 0 2px;height:9px;border-radius:6px;background:rgba(0,0,0,.5);overflow:hidden;position:relative;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.65)}
.alc-root .cu-xp i {display:block;height:100%;border-radius:6px;width:0;
  background:linear-gradient(90deg,#c98bff,#ffd98a 70%,#fff3cf);
  box-shadow:0 0 12px rgba(255,200,130,.45);transition:width .7s cubic-bezier(.2,.9,.25,1)}
.alc-root .cu-xp.gain i {animation:alc-cu-shine .9s ease}
@keyframes alc-cu-shine{0%,100%{filter:none}45%{filter:brightness(1.5)}}
.alc-root .cu-meta {display:flex;justify-content:space-between;align-items:baseline;margin:0 0 9px}
.alc-root .cu-meta span {font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#7d6746}
.alc-root .cu-meta b {font-family:'PT Serif',serif;font-size:13px;color:#ffe6ae}
.alc-root .cu-act {display:flex;gap:8px;align-items:stretch;margin-top:11px}
.alc-root .cu-act .btn {flex:1;height:46px;font-size:12px}
.alc-root .cu-act .btn[disabled] {opacity:.42;filter:saturate(.35);pointer-events:none}
.alc-root .cu-note {margin:9px 0 0;font-size:9.5px;font-weight:700;line-height:1.5;color:#7d6746}
.alc-root .cu-next {margin:0 0 6px;font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#c69b64}
.alc-root .cu-max {margin:10px 0 0;padding:10px;border-radius:12px;text-align:center;
  background:rgba(255,216,150,.07);box-shadow:inset 0 0 0 1px rgba(255,216,150,.2);
  font-size:11px;font-weight:800;color:#ffe6ae}
.alc-root .cu-have {display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
.alc-root .cu-have span {padding:4px 8px;border-radius:8px;font-size:9px;font-weight:800;color:#95e08d;
  background:rgba(90,167,87,.13);box-shadow:inset 0 0 0 1px rgba(149,224,141,.24)}
.alc-root .cz {position:relative;margin:0 12px 13px;padding:0 0 11px;border-radius:22px;overflow:hidden;
  background:linear-gradient(180deg, rgba(44,30,19,.96), rgba(18,12,8,.98));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.20), 0 16px 34px rgba(0,0,0,.5)}
.alc-root .cz:before {content:'';position:absolute;inset:0;pointer-events:none;border-radius:22px;
  background:linear-gradient(180deg, rgba(255,216,150,.07), rgba(0,0,0,0) 34%)}
.alc-root .cz .al-stage {margin:0;height:182px;border-radius:22px 22px 16px 16px;
  box-shadow:inset 0 -18px 32px rgba(0,0,0,.45)}
.alc-root .cz .al-slots {margin:-30px 0 0;padding-bottom:0;gap:11px;z-index:7}
.alc-root .cz .al-slot {width:58px;height:58px;border-radius:16px}
.alc-root .cz .al-slot .cap {bottom:-15px;font-size:7.6px}
.alc-root .cz-foot {display:flex;align-items:center;gap:10px;margin:26px 12px 0}
.alc-root .cz-xp {flex:1;min-width:0}
.alc-root .cz-l {display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:5px}
.alc-root .cz-l span {font-size:8.6px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#8d7450;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.alc-root .cz-l b {font-family:'PT Serif',serif;font-size:12.5px;color:#ffe6ae;white-space:nowrap}
.alc-root .cz-xp .cu-xp {margin:0;height:8px}
.alc-root .cz-hint {display:block;margin-top:5px;font-size:8.6px;font-weight:800;font-style:normal;
  letter-spacing:.06em;text-transform:uppercase;color:#7d6746}
.alc-root .cz-up {flex:none;border:0;cursor:pointer;min-width:104px;height:46px;padding:0 13px;border-radius:13px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  font-family:'Exo 2',sans-serif;color:#3c2407;
  background:linear-gradient(180deg,#fff0c6 0%,#f7cf84 45%,#e0aa50 100%);
  box-shadow:0 2px 0 #8a5614, inset 0 1px 0 rgba(255,255,255,.55);
  transition:filter .2s ease}
.alc-root .cz-up .t {font-size:10px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#3c2407}
.alc-root .cz-up .c {display:flex;align-items:center;gap:3px;font-size:9.5px;font-weight:800;
  letter-spacing:.03em;color:#5d3a0d}
.alc-root .cz-up .c:before {content:'';width:11px;height:11px;flex:none;
  background:url('assets/ico/gold.png') center/contain no-repeat}
.alc-root .cz-up:active {transform:translateY(2px);box-shadow:0 0 0 #8a5614}
.alc-root .cz-up.ready {animation:alc-cz-pulse 2s ease-in-out infinite}
@keyframes alc-cz-pulse{0%,100%{filter:none}50%{filter:brightness(1.07) drop-shadow(0 0 10px rgba(255,190,110,.5))}}
.alc-root .cz-up[disabled] {cursor:default;filter:grayscale(.5) brightness(.62);animation:none}
.alc-root .cz-up[disabled]:active {transform:none;box-shadow:0 2px 0 #8a5614, inset 0 1px 0 rgba(255,255,255,.55)}
.alc-root .cz-up.wait:not(.poor) .c:before {display:none}
.alc-root .cz-up[disabled] {cursor:not-allowed;
  background:linear-gradient(180deg, rgba(126,104,74,.5), rgba(74,58,38,.6));
  box-shadow:0 2px 0 rgba(58,40,20,.7), inset 0 1px 0 rgba(255,255,255,.1);
  animation:none}
.alc-root .cz-up[disabled] .t {color:#a08a63}
.alc-root .cz-up[disabled] .c {color:#8d7450;font-size:9px}
.alc-root .cz-up.poor .c {color:#7a3d18}
.alc-root .cz-up.shake {animation:alc-cz-shake .42s ease}
@keyframes alc-cz-shake{0%,100%{transform:none}20%{transform:translateX(-4px)}40%{transform:translateX(4px)}
  60%{transform:translateX(-3px)}80%{transform:translateX(2px)}}
.alc-root .cz-hint.warn {color:#ff9e6e}
.alc-root .cz-more {display:flex;align-items:center;justify-content:space-between;gap:8px;width:calc(100% - 24px);
  margin:11px 12px 0;padding:9px 11px;border:0;border-radius:12px;cursor:pointer;
  background:rgba(0,0,0,.28);box-shadow:inset 0 0 0 1px rgba(255,216,150,.12);
  font-size:8.8px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#c69b64}
.alc-root .cz-more .chev {width:8px;height:8px;border-right:1.6px solid #c69b64;border-bottom:1.6px solid #c69b64;
  transform:rotate(45deg) translateY(-2px);transition:transform .22s ease}
.alc-root .cz-more.on {color:#ffe6ae}
.alc-root .cz-more.on .chev {border-color:#ffe6ae;transform:rotate(-135deg) translateY(-2px)}
.alc-root .cz-drop {margin:0 12px;max-height:0;overflow:hidden;opacity:0;
  transition:max-height .32s cubic-bezier(.2,.9,.25,1), opacity .24s ease, margin-top .32s ease}
.alc-root .cz-drop.on {max-height:320px;opacity:1;margin-top:9px}
.alc-root .cz-drop ul {margin:0;padding:0;list-style:none}
.alc-root .cz-drop li {position:relative;padding:7px 9px 7px 24px;margin-bottom:5px;border-radius:10px;
  font-size:11px;font-weight:700;line-height:1.4;color:#e9cb94;
  background:rgba(0,0,0,.26);box-shadow:inset 0 0 0 1px rgba(255,216,150,.1)}
.alc-root .cz-drop li:before {content:'';position:absolute;left:9px;top:12px;width:7px;height:7px;border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #fff6dd, #e8a544);box-shadow:0 0 7px rgba(255,190,110,.65)}
.alc-root .cz-note {margin:8px 0 0;font-size:9.4px;font-weight:700;line-height:1.5;color:#7d6746}
.alc-root .rxp {margin:12px 0 2px;padding:11px 12px 9px;border-radius:13px;text-align:left;
  background:rgba(0,0,0,.32);box-shadow:inset 0 0 0 1px rgba(255,216,150,.13)}
.alc-root .rxp-hd {display:flex;justify-content:space-between;align-items:baseline;margin-bottom:7px}
.alc-root .rxp-hd span {font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#8d7450}
.alc-root .rxp-hd b {font-family:'PT Serif',serif;font-size:14px;color:#ffd98a}
.alc-root .rxp-bar {height:7px;border-radius:5px;background:rgba(0,0,0,.55);overflow:hidden}
.alc-root .rxp-bar i {display:block;height:100%;width:0;border-radius:5px;
  background:linear-gradient(90deg,#c98bff,#ffd98a 72%,#fff3cf);
  box-shadow:0 0 10px rgba(255,200,130,.5);transition:width 1s cubic-bezier(.2,.9,.25,1)}
.alc-root .rxp p {margin:7px 0 0;font-size:9.5px;font-weight:700;color:#8d7450}
.alc-root .rxp .rdy {color:#95e08d}
.alc-root .cu-modal {position:fixed;inset:0;z-index:60;display:none;place-items:center;padding:22px;
  background:rgba(6,4,3,.82);backdrop-filter:blur(3px)}
.alc-root .cu-modal.on {display:grid;animation:alc-vx-in .25s ease}
.alc-root .cu-modal .card {position:relative;width:100%;max-width:330px;padding:24px 20px 20px;border-radius:22px;text-align:center;
  background:linear-gradient(180deg, rgba(58,40,24,.98), rgba(28,18,12,.99));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.28), 0 26px 60px rgba(0,0,0,.7);
  animation:alc-cu-pop .45s cubic-bezier(.2,1.3,.35,1)}
@keyframes alc-cu-pop{from{transform:scale(.82) translateY(14px);opacity:0}to{transform:none;opacity:1}}
.alc-root .cu-modal .halo {position:absolute;left:50%;top:26px;width:230px;height:230px;transform:translateX(-50%);
  pointer-events:none;border-radius:50%;
  background:radial-gradient(circle, rgba(255,214,140,.30), rgba(201,139,255,.12) 45%, rgba(0,0,0,0) 70%);
  animation:alc-cu-halo 2.6s ease-in-out infinite}
@keyframes alc-cu-halo{0%,100%{transform:translateX(-50%) scale(1);opacity:.85}50%{transform:translateX(-50%) scale(1.12);opacity:1}}
.alc-root .cu-modal .crest {position:relative;width:96px;height:96px;margin:0 auto 12px;border-radius:24px;display:grid;place-items:center;
  background:linear-gradient(180deg, rgba(255,214,140,.2), rgba(120,70,30,.28));
  box-shadow:inset 0 0 0 1px rgba(255,216,150,.35), 0 12px 26px rgba(0,0,0,.5)}
.alc-root .cu-modal .crest img {width:56px;height:56px;image-rendering:auto;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.6));animation:alc-cu-rise 2.2s ease-in-out infinite}
@keyframes alc-cu-rise{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
.alc-root .cu-modal .kick {display:inline-block;padding:4px 10px;border-radius:9px;margin-bottom:8px;
  font-size:9px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:#ffe6ae;
  background:rgba(255,216,150,.12);box-shadow:inset 0 0 0 1px rgba(255,216,150,.28)}
.alc-root .cu-modal h3 {margin:0 0 4px;font-family:'PT Serif',serif;font-size:24px;color:#ffe6ae}
.alc-root .cu-modal .sub {margin:0 0 14px;font-size:11.5px;font-weight:600;color:#b5a17e}
.alc-root .cu-modal ul {margin:0 0 16px;padding:0;list-style:none;text-align:left}
.alc-root .cu-modal li {position:relative;padding:8px 10px 8px 30px;margin-bottom:6px;border-radius:11px;
  font-size:11.5px;font-weight:700;line-height:1.4;color:#e9cb94;
  background:rgba(0,0,0,.3);box-shadow:inset 0 0 0 1px rgba(255,216,150,.12)}
.alc-root .cu-modal li:before {content:'';position:absolute;left:11px;top:13px;width:9px;height:9px;border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #fff6dd, #e8a544);box-shadow:0 0 8px rgba(255,190,110,.7)}
.alc-root .cu-modal .btn {width:100%;height:48px}

/* =============================================================================
   Фаза 128.2: тонировка построек по времени суток и модалка выбора времени.
   Дописано в конец файла — правки style.css только append-only.
   ============================================================================= */

/* Прежние фильтры на .city-building-img ночь почти не синили: hue-rotate уводил
   коричневое дерево в ещё более тёплую сторону, а saturate/brightness лишь притемняли.
   На карте выходил холодный фон с тёплыми домами — ровно то, что было видно на скриншоте.
   Теперь работают два слоя: сам спрайт гасится по яркости и насыщенности, а поверх него
   по маске этого же спрайта ложится цвет фазы в режиме multiply. Маска берётся из
   --cb-sprite, которую JS проставляет инлайном вместе с координатами. */
.city-map-world[data-tod="morning"] .city-building-img,
.city-map-world[data-tod="sunset"] .city-building-img,
.city-map-world[data-tod="night"] .city-building-img { filter: none; }

.city-building-tint {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--cb-tint, transparent);
  opacity: var(--cb-tint-alpha, 0);
  /* Режим color, а не multiply: multiply просто затемняет и оставляет дерево коричневым
     (проверено на стенде — постройки выходили бурыми на синей карте). color подменяет
     тон и насыщенность, сохраняя светлоту, поэтому объём и детали спрайта не пропадают. */
  mix-blend-mode: color;
  transition: opacity 600ms ease, background-color 600ms ease;
  -webkit-mask-image: var(--cb-sprite); mask-image: var(--cb-sprite);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.city-building-hit { position: relative; }

/* День — родной вид спрайта, без тона. Остальные фазы: яркость и насыщенность на самом
   спрайте + цвет фазы поверх. Значения подобраны по кадрам карты, ночь сверена с
   референсом v_tod_built (постройки уходят в синий, но детали ещё читаются). */
.city-map-world[data-tod="morning"] .city-building-img { filter: brightness(0.95) saturate(0.90); }
.city-map-world[data-tod="morning"] .city-building-tint { --cb-tint: #96a8d6; --cb-tint-alpha: 0.26; }

.city-map-world[data-tod="sunset"] .city-building-img { filter: brightness(0.93) saturate(1.05); }
.city-map-world[data-tod="sunset"] .city-building-tint { --cb-tint: #e29656; --cb-tint-alpha: 0.42; }

.city-map-world[data-tod="night"] .city-building-img { filter: brightness(0.60) saturate(0.95); }
.city-map-world[data-tod="night"] .city-building-tint { --cb-tint: #4f74c8; --cb-tint-alpha: 0.55; }

/* Плашка часов стала кнопкой: сохраняем прежний вид, добавляем отклик на нажатие. */
.city-clock { border: 0; cursor: pointer; -webkit-appearance: none; appearance: none; font: inherit; }
.city-clock:active { transform: translateX(-50%) scale(0.96); }
.city-clock.is-forced .city-clock-phase { color: #ffd98a; }
.city-clock.is-forced::after {
  content: ''; position: absolute; top: 5px; right: 7px; width: 5px; height: 5px;
  border-radius: 50%; background: #ffd98a; box-shadow: 0 0 6px rgba(255, 217, 138, .8);
}

/* Список фаз в модалке — те же плитки, что у выбора в мини-меню зданий. */
.city-tod-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.city-tod-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px;
  border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid rgba(120, 94, 58, .55);
  background: linear-gradient(180deg, rgba(58, 44, 29, .92), rgba(38, 28, 18, .94));
  box-shadow: inset 0 1px 0 rgba(255, 226, 168, .10), 0 2px 6px rgba(0, 0, 0, .35);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}
.city-tod-item:active { transform: scale(0.985); }
.city-tod-item.is-active {
  border-color: rgba(233, 188, 106, .95);
  box-shadow: inset 0 1px 0 rgba(255, 234, 186, .18), 0 0 0 1px rgba(233, 188, 106, .35), 0 3px 10px rgba(0, 0, 0, .40);
}
.city-tod-ico {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 19px;
  border-radius: 11px; border: 1px solid rgba(120, 94, 58, .6);
  background: radial-gradient(120% 120% at 30% 20%, rgba(96, 74, 46, .95), rgba(44, 32, 20, .95));
}
.city-tod-text { flex: 1 1 auto; min-width: 0; display: block; }
.city-tod-text b { display: block; font-family: 'PT Serif', serif; font-size: 15px; color: #ffe6ae; line-height: 1.15; }
.city-tod-text i { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: #a28a62; }
.city-tod-mark {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(120, 94, 58, .8); background: rgba(24, 17, 11, .8);
}
.city-tod-item.is-active .city-tod-mark {
  border-color: rgba(233, 188, 106, .95);
  background: radial-gradient(circle at 50% 40%, #ffe9b8, #c79a48 62%, #8a6526 100%);
  box-shadow: 0 0 8px rgba(233, 188, 106, .55);
}

/* Разрушенные и выбранные постройки имеют собственные filter (выцветание и золотое свечение),
   а специфичность у них такая же, как у фазовых правил выше — то есть фазовый фильтр их
   затирал. Дописываем комбинации явно, чтобы состояние и время суток складывались. */
.city-map-world[data-tod="morning"] .city-building.is-ruined .city-building-img { filter: brightness(0.87) saturate(0.63); }
.city-map-world[data-tod="sunset"]  .city-building.is-ruined .city-building-img { filter: brightness(0.86) saturate(0.74); }
.city-map-world[data-tod="night"]   .city-building.is-ruined .city-building-img { filter: brightness(0.55) saturate(0.66); }

.city-map-world[data-tod="morning"] .city-building.is-active .city-building-img,
.city-map-world[data-tod="morning"] .city-building-hit:hover .city-building-img {
  filter: brightness(0.95) saturate(0.90) drop-shadow(0 0 10px rgba(255, 214, 138, 0.55));
}
.city-map-world[data-tod="sunset"] .city-building.is-active .city-building-img,
.city-map-world[data-tod="sunset"] .city-building-hit:hover .city-building-img {
  filter: brightness(0.93) saturate(1.05) drop-shadow(0 0 10px rgba(255, 214, 138, 0.55));
}
.city-map-world[data-tod="night"] .city-building.is-active .city-building-img,
.city-map-world[data-tod="night"] .city-building-hit:hover .city-building-img {
  filter: brightness(0.60) saturate(0.95) drop-shadow(0 0 12px rgba(255, 214, 138, 0.62));
}
/* Выбранное здание не должно тонуть в ночном тоне — приглушаем накладку. */
.city-map-world[data-tod="night"] .city-building.is-active .city-building-tint { --cb-tint-alpha: 0.38; }

/* Правка: первая версия плиток выбора времени была сделана в тёмной гамме, а модалки города
   с фазы UI-кита стоят на светлом пергаменте (border-image modal.png, текст #3f2708).
   Тёмные плитки на нём выглядели вставкой из другого макета. Переопределяем под пергамент —
   как строки .city-req и .city-detail-list, только кликабельные. */
.city-tod-list { gap: 6px; margin-top: 8px; }
.city-tod-item {
  padding: 8px 10px;
  border: 1px solid rgba(150, 110, 55, 0.42);
  border-radius: 12px;
  color: #3f2708;
  background: linear-gradient(180deg, rgba(255, 246, 224, 0.55), rgba(238, 219, 180, 0.38));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.city-tod-item.is-active {
  border-color: rgba(176, 128, 48, 0.95);
  background: linear-gradient(180deg, rgba(255, 238, 197, 0.95), rgba(240, 212, 156, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 0 0 1px rgba(176, 128, 48, 0.35);
}
.city-tod-ico {
  width: 34px; height: 34px; font-size: 18px; border-radius: 9px;
  border: 1px solid rgba(150, 110, 55, 0.45);
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.85), rgba(233, 211, 170, 0.6));
}
.city-tod-text b { font-size: 14.5px; color: #3f2708; text-shadow: 0 1px 0 rgba(255, 250, 232, 0.6); }
.city-tod-text i { color: #8a6a33; font-size: 11px; }
.city-tod-mark {
  width: 16px; height: 16px;
  border: 1px solid rgba(150, 110, 55, 0.7);
  background: rgba(255, 250, 236, 0.75);
}
.city-tod-item.is-active .city-tod-mark {
  border-color: rgba(176, 128, 48, 0.95);
  background: radial-gradient(circle at 50% 38%, #fff3d2, #d8a94f 60%, #9a7028 100%);
  box-shadow: 0 0 6px rgba(176, 128, 48, 0.5);
}

/* =====================================================================================
   Фаза 128.3: круглый выбор времени суток.
   Кольцо и янтарный бегунок — арт (assets/img/ui/clock), код только возит камень по
   дорожке и поворачивает его по касательной. Заголовок и крестик берутся от общей
   модалки города (.city-modal-card / .city-modal-head / .city-modal-close).
   ===================================================================================== */
.city-tod-card { text-align: center; }

.city-dial {
  position: relative; width: min(236px, 62vw); margin: 10px auto 2px;
  aspect-ratio: 1 / 1; touch-action: none; user-select: none; cursor: grab;
  container-type: inline-size;
}
.city-dial.is-dragging { cursor: grabbing; }
.city-dial-ring {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; -webkit-user-drag: none;
}
/* Камень «лежит» на дорожке: к сдвигу в центр добавлен поворот по углу времени. */
.city-dial-knob {
  position: absolute; z-index: 3; width: 25%; height: auto;
  transform: translate(-50%, -50%) rotate(var(--dial-angle, 0deg));
  transform-origin: 50% 50%;
  pointer-events: none; -webkit-user-drag: none;
  filter: drop-shadow(0 0 10px rgba(255, 170, 60, 0.7)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  transition: filter 0.15s ease;
}
.city-dial.is-dragging .city-dial-knob {
  filter: drop-shadow(0 0 17px rgba(255, 190, 80, 0.95)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.city-dial-num {
  position: absolute; z-index: 2; pointer-events: none;
  transform: translate(-50%, -50%);
  font-family: 'PT Serif', Georgia, serif; font-size: 9.2cqw; font-weight: 700; line-height: 1;
  color: #ffefc4;
  text-shadow: 0 0 4px rgba(40, 22, 4, 0.95), 0 2px 3px rgba(40, 22, 4, 0.95), 0 0 10px rgba(255, 208, 120, 0.4);
}
.city-dial-num.is-n0  { left: 50%;   top: 9.6%;  }
.city-dial-num.is-n6  { left: 90.4%; top: 50%;   }
.city-dial-num.is-n12 { left: 50%;   top: 90.4%; }
.city-dial-num.is-n18 { left: 9.6%;  top: 50%;   }

.city-dial-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 1px; width: 62%; pointer-events: none;
}
.city-dial-time {
  font-family: 'PT Serif', Georgia, serif; font-size: clamp(26px, 8.4vw, 34px);
  font-weight: 700; line-height: 1;
  background: linear-gradient(180deg, #fff3cd, #e6bb66 55%, #bb8b3c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px rgba(90, 60, 18, 0.35));
}
.city-dial-phase {
  font-style: normal; font-family: 'PT Serif', Georgia, serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.3em; text-indent: 0.3em;
  text-transform: uppercase; color: #a67c35;
  text-shadow: 0 1px 0 rgba(255, 251, 238, 0.6);
}
.city-dial-rule {
  width: 82%; height: 9px; margin-top: 5px; opacity: 0.85;
  background:
    linear-gradient(90deg, transparent, #c79a48 18%, #c79a48 82%, transparent) center / 100% 1px no-repeat,
    radial-gradient(circle at 50% 50%, #c79a48 3px, transparent 3.4px) center / 100% 100% no-repeat;
}

.city-tod-sub {
  margin: 8px 2px; font-family: 'PT Serif', Georgia, serif;
  font-size: 14px; line-height: 1.3; color: #5c421d;
}
.city-tod-sub span { font-size: 13px; color: #7d5f2e; }

.city-tod-row { display: flex; align-items: flex-start; justify-content: center; gap: 0; margin-bottom: 10px; }
.city-tod-sep {
  flex: 0 0 auto; width: 9px; height: 9px; margin-top: 22px; opacity: 0.75;
  background: radial-gradient(circle at 50% 50%, #c79a48 2.6px, transparent 3px) center / 100% 100% no-repeat;
}
.city-tod-chip {
  display: grid; justify-items: center; gap: 5px; flex: 1 1 0; min-width: 0;
  padding: 0; border: 0; background: none; cursor: pointer;
  font-family: 'PT Serif', Georgia, serif; font-size: 11.5px; font-weight: 700; color: #6b4f22;
}
.city-tod-chip img {
  display: block; width: 100%; max-width: 52px; height: auto;
  filter: saturate(0.7) brightness(0.93);
  transition: transform 0.14s ease, filter 0.14s ease;
}
.city-tod-chip:active img { transform: scale(0.94); }
.city-tod-chip.is-active img { filter: none; transform: scale(1.07); }
.city-tod-chip.is-active { color: #3f2708; }

.city-tod-auto {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 8px 15px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #5a4118;
  border: 1px solid rgba(150, 110, 55, 0.55);
  background: linear-gradient(180deg, rgba(255, 246, 224, 0.85), rgba(233, 211, 168, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.city-tod-dot { width: 8px; height: 8px; border-radius: 50%; background: #bfa367; }
.city-tod-auto.is-on { color: #2f6a35; border-color: rgba(84, 138, 74, 0.65); }
.city-tod-auto.is-on .city-tod-dot { background: #4f9a46; box-shadow: 0 0 8px rgba(79, 154, 70, 0.75); }

@media (max-width: 380px) {
  .city-dial { width: min(216px, 60vw); }
  .city-tod-chip img { max-width: 46px; }
  .city-tod-chip { font-size: 11px; }
}

/* Шапка и крестик — как у остальных модалок города (слева, inline-блок), центруем
   только содержимое часов. */
.city-tod-card { text-align: left; }
.city-tod-card .city-dial { margin-left: auto; margin-right: auto; }
.city-tod-sub { text-align: center; }
.city-tod-auto { display: flex; margin: 0 auto; }

/* Доводка после прогона в браузере: цифры уводим на дорожку (снаружи они налезали
   на золотой обод), кнопка авто-режима — по содержимому, а не во всю карточку. */
.city-dial-num.is-n0  { top: 13.2%; }
.city-dial-num.is-n12 { top: 86.8%; }
.city-dial-num.is-n6  { left: 86.8%; }
.city-dial-num.is-n18 { left: 13.2%; }
.city-dial-num { font-size: 8.2cqw; }
.city-tod-auto { width: fit-content; max-width: 100%; white-space: nowrap; }

/* Доводка часов по замечаниям: шапка как в «Лапе Фортуны» (без плашки-подложки),
   подпись — серифом с золотыми усиками, как в эмалевом концепте, и нижний отступ,
   чтобы кнопка авто-режима не выходила за золотую раму. */
.city-tod-card { padding-bottom: 52px; }

.city-tod-card .city-modal-head {
  display: block; width: auto; max-width: calc(100% - 52px);
  margin: 6px 0 4px; padding: 0;
  background: none; box-shadow: none; border-radius: 0;
}
.city-tod-card .city-modal-head h3 { font-size: 21px; }
.city-tod-card .city-modal-head span {
  display: block; margin-top: 2px;
  font-size: 10px; font-weight: 900; letter-spacing: 0.14em; color: #7a5524;
  text-shadow: 0 1px 0 rgba(255, 250, 232, 0.6);
}

/* Усики с ромбом над подписью — тот же приём, что у .tsr-div в рулетке. */
.city-tod-div { display: flex; align-items: center; gap: 9px; margin: 12px 4px 7px; }
.city-tod-div s {
  flex: 1 1 auto; height: 1px; text-decoration: none;
  background: linear-gradient(90deg, rgba(120, 82, 34, 0), rgba(150, 108, 48, 0.62), rgba(120, 82, 34, 0));
}
.city-tod-div i {
  flex: 0 0 auto; width: 6px; height: 6px; transform: rotate(45deg);
  background: linear-gradient(180deg, #e3bd77, #8a6027);
  box-shadow: 0 1px 0 rgba(255, 250, 232, 0.55);
}

.city-tod-sub {
  margin: 0 2px 10px; text-align: center;
  font-family: 'PT Serif', Georgia, serif; font-size: 16px; font-weight: 700;
  line-height: 1.25; color: #4a3212; text-shadow: 0 1px 0 rgba(255, 250, 232, 0.65);
}
.city-tod-sub span {
  display: block; margin-top: 1px;
  font-size: 14px; font-weight: 400; font-style: normal; color: #7a5524;
}

/* Заголовок без плашки садился на деревянный верх рамы — опускаем содержимое ниже,
   как в «Лапе Фортуны». */
.city-tod-card { padding-top: 34px; }
.city-tod-card .city-modal-head { margin-top: 0; }

/* Плашка часов была индикатором и не принимала клики (pointer-events: none из блока
   .city-clock выше). Теперь это кнопка открытия выбора времени суток — клики
   возвращаем, содержимое оставляем прозрачным для попаданий. */
.city-clock { pointer-events: auto; }
.city-clock > * { pointer-events: none; }

/* =====================================================================================
   Фаза 128.5: правки по замечаниям на живой сборке.
   ===================================================================================== */

/* Плитки выбора времени — квадратные картинки с круглым медальоном внутри, поэтому
   притемнение ложилось на весь квадрат. Обрезаем по кругу: гаснет сам медальон. */
.city-tod-chip img {
  border-radius: 50%;
  clip-path: circle(49% at 50% 50%);
  box-shadow: 0 2px 6px rgba(40, 24, 4, 0.28);
}
.city-tod-chip img { filter: saturate(0.55) brightness(0.82); }
.city-tod-chip.is-active img {
  filter: saturate(1.08) brightness(1.06);
  transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(226, 176, 104, 0.9), 0 3px 10px rgba(40, 24, 4, 0.38);
}

/* Подписи локаций: ближе к зданию и без «таблетки» — притемнение, плавно исчезающее
   к левому и правому краю, без скруглений. */
.city-building-label {
  transform: translate(-50%, -2px);
  padding: 1px 12px 2px;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(90deg,
    rgba(12, 8, 3, 0) 0%, rgba(12, 8, 3, 0.55) 24%,
    rgba(12, 8, 3, 0.55) 76%, rgba(12, 8, 3, 0) 100%);
}

/* «Собрать всё» — компактная золотая плашка вместо широкой зелёной кнопки со стрелкой. */
.city-hud-collect {
  padding: 5px 13px 6px;
  border-radius: 10px 4px 10px 4px;
  font: 800 11.5px/1 var(--font-ui, inherit);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3a2408;
  background: linear-gradient(180deg, #ffe7b0 0%, #f0bd55 46%, #cf8f26 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), inset 0 0 0 1.5px rgba(122, 78, 20, 0.9),
    0 3px 0 #6d4512, 0 6px 14px rgba(0, 0, 0, 0.38);
  text-shadow: 0 1px 0 rgba(255, 246, 219, 0.6);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.city-hud-collect:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 0 0 1.5px rgba(122, 78, 20, 0.9),
    0 1px 0 #6d4512, 0 3px 8px rgba(0, 0, 0, 0.35);
}

/* Плашка часов осталась без иконки — сужаем отступы под «12:45 ЗАКАТ».
   backdrop-filter убран: размытие под плашкой заметно грузило прокрутку карты. */
.city-clock { gap: 6px; padding: 4px 12px 5px; backdrop-filter: none; }

/* Тон построек днём не нужен, а 17 слоёв с mix-blend-mode всё равно участвовали в
   композитинге и подъедали кадры — на дневной фазе слой просто выключаем. */
.city-map-world[data-tod="day"] .city-building-tint { display: none; }

/* Фаза 128.6: на невысоких экранах карточка часов упиралась в лимит max-height: 75dvh,
   и нижние кнопки вылезали за золотую раму. Размер циферблата теперь ограничен и по
   высоте окна, а на низких экранах вся вертикальная «вода» поджимается. */
.city-dial { width: min(236px, 62vw, 40dvh); }

@media (max-height: 720px) {
  .city-tod-card { padding-top: 26px; padding-bottom: 40px; }
  .city-tod-card .city-modal-head h3 { font-size: 19px; }
  .city-dial { width: min(200px, 54vw, 34dvh); margin-top: 6px; }
  .city-dial-time { font-size: clamp(22px, 7vw, 28px); }
  .city-dial-phase { font-size: 11px; }
  .city-tod-div { margin: 8px 4px 4px; }
  .city-tod-sub { margin-bottom: 7px; font-size: 15px; }
  .city-tod-sub span { font-size: 13px; }
  .city-tod-row { margin-bottom: 7px; }
  .city-tod-chip img { max-width: 44px; }
  .city-tod-auto { padding: 7px 13px; }
}
@media (max-height: 620px) {
  .city-tod-card { padding-top: 22px; padding-bottom: 34px; }
  .city-dial { width: min(172px, 46vw, 30dvh); }
  .city-tod-sub { font-size: 14px; }
  .city-tod-sub span { font-size: 12px; }
  .city-tod-chip img { max-width: 38px; }
  .city-tod-chip { font-size: 10.5px; }
}

/* ==========================================================================================
   Фаза 129: Мастерская «Кольцо Мастера» — стили перенесены из прототипа proto_ws7 как есть
   и скоуплены по `.mring-root`; id прототипа стали классами `.mr-*`, имена keyframes — `mr-*`.
   Блок append-only: ни одно правило выше не переопределяется.
   ========================================================================================== */
.mring-root *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
.mring-root .hud{position:sticky;top:0;z-index:30;display:flex;gap:6px;align-items:center;padding:7px 8px;margin:0 -4px 10px;
  border-image:url("../img/ui/r_wood.png") 34 fill / 13px stretch;
  box-shadow:0 8px 22px rgba(0,0,0,.55), inset 0 0 0 1.5px rgba(214,160,74,.6)}
.mring-root .hud-cell{display:flex;align-items:center;gap:5px;flex:1 1 0;min-width:0;padding:4px 7px;border-radius:11px;
  background:linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.6));
  box-shadow:inset 0 0 0 1px rgba(214,160,74,.4)}
.mring-root .hud-cell img{width:20px;height:20px;object-fit:contain;filter:drop-shadow(0 2px 3px rgba(0,0,0,.6))}
.mring-root .hud-cell b{font-size:13px;font-weight:900;color:var(--gold-2);text-shadow:0 1px 2px rgba(0,0,0,.8);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mring-root .loc-head{display:flex;align-items:center;gap:10px;margin:4px 2px 12px}
.mring-root .loc-head .sigil{width:44px;height:44px;flex:0 0 44px;border-radius:13px;display:grid;place-items:center;
  background:radial-gradient(circle at 50% 35%, rgba(255,200,110,.35), rgba(0,0,0,.6));
  box-shadow:inset 0 0 0 1.5px var(--frame), 0 6px 14px rgba(0,0,0,.5)}
.mring-root .loc-head .sigil img{width:28px;height:28px;object-fit:contain}
.mring-root .loc-head h1{margin:0;font-family:'PT Serif',Georgia,serif;font-size:21px;line-height:1.1;color:#fff3d8;
  text-shadow:0 2px 6px rgba(0,0,0,.8)}
.mring-root .loc-head span{display:block;font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#c99a4e}
.mring-root .tabs{display:flex;gap:6px;margin:0 0 14px}
.mring-root .tab{flex:1 1 0;padding:9px 4px 8px;border:0;cursor:pointer;color:#d8c0a0;border-radius:12px;
  font-family:'Exo 2',sans-serif;font-size:11.5px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;
  background:linear-gradient(180deg, rgba(48,30,14,.9), rgba(26,16,8,.95));
  box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.35)}
.mring-root .tab.is-on{color:#3a2204;background:linear-gradient(180deg,#ffe9b6,#d9a13a);
  box-shadow:0 4px 14px rgba(255,180,70,.3), inset 0 1px 0 rgba(255,255,255,.55)}
.mring-root .screen{display:none}
.mring-root .screen.is-on{display:block;animation:mr-fadeUp .26s ease-out}
@keyframes mr-fadeUp{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
.mring-root .panel{position:relative;padding:14px 13px 15px;margin-bottom:13px;
  border-image:url("../img/ui/r_wood.png") 34 fill / 14px stretch;
  box-shadow:0 10px 26px rgba(0,0,0,.5), inset 0 0 0 1.5px rgba(214,160,74,.55)}
.mring-root .panel-t{display:flex;align-items:center;gap:7px;margin:0 0 10px;
  font-family:'PT Serif',Georgia,serif;font-size:15px;color:#ffeaba}
.mring-root .panel-t small{margin-left:auto;font-family:'Exo 2',sans-serif;font-size:10px;font-weight:800;
  letter-spacing:.08em;text-transform:uppercase;color:#bb8d47}
.mring-root .hr{height:1px;margin:11px 0;background:linear-gradient(90deg,transparent,rgba(214,160,74,.5),transparent)}
.mring-root .tagline{margin:0 0 11px;font-size:11.5px;line-height:1.5;color:#bda486}
.mring-root .tagline b{color:#ffdc8a}
.mring-root .btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 16px;height:44px;
  border:0;cursor:pointer;border-radius:13px;font-family:'Exo 2',sans-serif;font-size:13.5px;font-weight:900;
  color:#3a2204;background:linear-gradient(180deg,#ffe9b6 0%,#f0bf62 48%,#d09333 100%);
  box-shadow:0 5px 0 #7d4e12, 0 10px 20px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.6);
  transition:transform .1s, box-shadow .1s}
.mring-root .btn:active{transform:translateY(3px);box-shadow:0 2px 0 #7d4e12, 0 6px 12px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.6)}
.mring-root .btn.wide{width:100%}
.mring-root .btn.ghost{color:#ffdda0;background:linear-gradient(180deg, rgba(58,36,16,.95), rgba(30,18,8,.98));
  box-shadow:0 4px 0 rgba(0,0,0,.5), inset 0 0 0 1.4px rgba(214,160,74,.6)}
.mring-root .btn.danger{color:#ffe6dc;background:linear-gradient(180deg,#d97148,#a1391f);
  box-shadow:0 5px 0 #5c1c0c, 0 10px 20px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.35)}
.mring-root .btn:disabled{opacity:.5;filter:grayscale(.5);cursor:default;transform:none}
.mring-root .btn img{width:18px;height:18px;object-fit:contain}
.mring-root .btn.mini{padding:0 12px;height:34px;font-size:12px;border-radius:11px;box-shadow:0 3px 0 #7d4e12, inset 0 1px 0 rgba(255,255,255,.5)}
.mring-root .btn-note{display:block;margin-top:5px;text-align:center;font-size:10.5px;font-weight:700;color:#b79a75}
.mring-root .stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.mring-root .stat{padding:6px 8px;border-radius:10px;background:rgba(0,0,0,.4);box-shadow:inset 0 0 0 1px rgba(214,160,74,.32)}
.mring-root .stat i{display:block;font-style:normal;font-size:9px;font-weight:900;letter-spacing:.1em;color:#a98a5e;text-transform:uppercase}
.mring-root .stat b{font-size:14px;font-weight:900;color:#fff1cd}
.mring-root .stat b em{font-style:normal;font-size:11px;color:var(--ok)}
.mring-root .pill{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:8px;font-size:11px;font-weight:900;
  color:#ffeaba;background:rgba(0,0,0,.45);box-shadow:inset 0 0 0 1px rgba(214,160,74,.4)}
.mring-root .pill img{width:13px;height:13px;object-fit:contain}
.mring-root .cost{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:9px;font-size:12px;font-weight:900;
  color:#ffeaba;background:rgba(0,0,0,.45);box-shadow:inset 0 0 0 1px rgba(214,160,74,.45)}
.mring-root .cost img{width:15px;height:15px;object-fit:contain}
.mring-root .cost.is-lack{color:#ffb3a0;box-shadow:inset 0 0 0 1px rgba(255,120,90,.6)}
.mring-root .mr-toast{position:fixed;left:50%;bottom:90px;transform:translate(-50%,20px);z-index:60;opacity:0;pointer-events:none;
  display:flex;align-items:center;gap:7px;padding:9px 14px;border-radius:12px;font-size:12.5px;font-weight:800;color:#fff3d8;
  background:linear-gradient(180deg, rgba(48,30,14,.98), rgba(24,14,6,.99));
  box-shadow:0 10px 26px rgba(0,0,0,.6), inset 0 0 0 1.3px rgba(214,160,74,.7);
  transition:opacity .2s, transform .2s}
.mring-root .mr-toast.show{opacity:1;transform:translate(-50%,0)}
.mring-root .mr-toast img{width:18px;height:18px;object-fit:contain}
.mring-root .ov{position:fixed;inset:0;z-index:50;display:none;place-items:center;padding:16px;
  background:rgba(6,3,1,.72);backdrop-filter:blur(3px)}
.mring-root .ov.is-on{display:grid}
.mring-root .modal{position:relative;width:min(360px,100%);padding:30px 26px 24px;
  border-image:url("../img/ui/modal.png") 168 fill / 44px stretch;
  animation:mr-mIn .26s cubic-bezier(.2,1.3,.3,1)}
.mring-root .modal::before{content:"";position:absolute;inset:16px;border-radius:15px;
  background:linear-gradient(180deg, rgba(30,18,8,.95), rgba(13,8,3,.98));
  box-shadow:inset 0 0 0 1.3px rgba(214,160,74,.6)}
.mring-root .modal > *{position:relative;z-index:1}
.mring-root .modal > h3{margin:14px 0 4px;text-align:center;font-family:'PT Serif',Georgia,serif;font-size:19px;color:#fff3d8}
.mring-root .modal .sub{margin:0 0 14px;text-align:center;font-size:11.5px;color:#b59a78}
.mring-root .modal .btn.wide{margin-bottom:10px}
@keyframes mr-mIn{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}
.mring-root .mclose{position:absolute;right:-1px;top:-1px;width:42px;height:42px;border:0;cursor:pointer;z-index:2;
  background:url("../img/ui/close.png") center/contain no-repeat}
.mring-root .reveal{display:grid;place-items:center;gap:8px;margin:6px 0 14px}
.mring-root .reveal .glow{position:relative;width:118px;height:118px;border-radius:50%;display:grid;place-items:center;
  background:radial-gradient(circle,rgba(255,190,80,.35),transparent 68%)}
.mring-root .reveal .glow img{width:92px;height:92px;object-fit:contain;animation:mr-bob 2.6s ease-in-out infinite}
@keyframes mr-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.mring-root .reveal b{font-family:'PT Serif',Georgia,serif;font-size:17px;color:#ffe9b6}
.mring-root .reveal span{font-size:11.5px;color:#bda486;text-align:center}
.mring-root .rays{position:absolute;inset:-30%;pointer-events:none;border-radius:50%;
  background:repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,196,92,.14) 0deg 4deg, rgba(255,196,92,0) 4deg 15deg);
  animation:mr-spin 26s linear infinite}
@keyframes mr-spin{to{transform:rotate(360deg)}}
.mring-root .pill{white-space:nowrap}
.mring-root .lright{max-width:104px}
.mring-root .tabs{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:2px}
.mring-root .tabs::-webkit-scrollbar{display:none}
.mring-root .tabs .tab{flex:0 0 auto;padding:9px 13px 8px;white-space:nowrap}
.mring-root .sky{position:relative;height:356px;margin:0 -4px 11px;border-radius:16px;overflow:hidden;
  background:radial-gradient(70% 58% at 50% 48%, rgba(255,170,60,.17), rgba(8,5,2,.93) 72%);
  box-shadow:inset 0 0 0 1.3px rgba(214,160,74,.36)}
.mring-root .sky .dust{position:absolute;inset:-30%;border-radius:50%;pointer-events:none;opacity:.45;
  background:repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,196,92,.10) 0deg 3deg, rgba(255,196,92,0) 3deg 17deg);
  animation:mr-spin 46s linear infinite}
.mring-root .sky .ringline{position:absolute;left:50%;top:50%;width:250px;height:250px;border-radius:50%;
  transform:translate(-50%,-50%);pointer-events:none;box-shadow:inset 0 0 0 1px rgba(214,160,74,.16)}
.mring-root .heroCard{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:92px;height:126px;border-radius:13px;
  overflow:hidden;box-shadow:0 0 0 1.8px rgba(255,214,130,.9), 0 0 32px rgba(255,170,60,.26), 0 10px 22px rgba(0,0,0,.65)}
.mring-root .heroCard img{width:100%;height:100%;object-fit:cover;display:block}
.mring-root .heroCard .lv{position:absolute;left:0;right:0;bottom:0;padding:13px 3px 4px;text-align:center;
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.92))}
.mring-root .heroCard .lv b{display:block;font-size:15px;font-weight:900;color:#ffe9b6;line-height:1.1}
.mring-root .heroCard .lv i{display:block;font-style:normal;font-size:8.5px;font-weight:900;letter-spacing:.09em;
  text-transform:uppercase;color:#c99a4e}
.mring-root .star{position:absolute;width:24px;height:24px;margin:-12px 0 0 -12px;border-radius:50%;display:grid;place-items:center;
  font-size:10px;font-weight:900;color:#6e5b3c;
  background:radial-gradient(circle at 50% 40%, rgba(60,40,18,.95), rgba(16,10,4,.98));
  box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.32);transition:box-shadow .25s, color .25s, background .25s}
.mring-root .star.is-lit{color:#3a2204;background:radial-gradient(circle at 50% 35%,#fff6d8,#f0bf62 62%,#cf9028);
  box-shadow:0 0 15px rgba(255,190,90,.75), inset 0 1px 0 rgba(255,255,255,.7)}
.mring-root .star.is-next{color:#ffdc8a;animation:mr-pulseStar 1.5s ease-in-out infinite}
@keyframes mr-pulseStar{0%,100%{box-shadow:inset 0 0 0 1.6px rgba(255,214,130,.85), 0 0 9px rgba(255,180,70,.22)}
  50%{box-shadow:inset 0 0 0 1.6px rgba(255,236,190,1), 0 0 21px rgba(255,190,80,.6)}}
.mring-root .star.flash{animation:mr-starFlash .6s ease-out}
@keyframes mr-starFlash{0%{transform:scale(.55)}45%{transform:scale(1.55)}100%{transform:scale(1)}}
.mring-root .star.crack{animation:mr-starCrack .5s ease-out}
@keyframes mr-starCrack{0%,100%{transform:translate(0,0)}22%{transform:translate(-3px,1px)}58%{transform:translate(3px,-1px)}82%{transform:translate(-2px,0)}}
.mring-root .beam{position:absolute;height:2px;transform-origin:0 50%;border-radius:2px;pointer-events:none;
  background:linear-gradient(90deg, rgba(255,210,120,.8), rgba(255,170,60,.22));box-shadow:0 0 8px rgba(255,180,70,.45)}
.mring-root .skyTop{position:absolute;left:11px;right:11px;top:10px;display:flex;align-items:center;gap:7px;z-index:3}
.mring-root .skyTop span{font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#c99a4e;white-space:nowrap}
.mring-root .skyTop .rb{flex:1 1 0;height:6px;border-radius:4px;background:rgba(0,0,0,.6);overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(214,160,74,.3)}
.mring-root .skyTop .rb i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,#d08b2a,#ffe6a6);
  box-shadow:0 0 9px rgba(255,190,90,.5)}
.mring-root .forge{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:13px;margin-bottom:10px;
  background:linear-gradient(180deg, rgba(44,27,12,.94), rgba(22,13,6,.97));box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.4)}
.mring-root .gauge{position:relative;width:62px;height:62px;flex:0 0 62px;border-radius:50%;display:grid;place-items:center;
  background:conic-gradient(#ffd782 calc(var(--p)*1%), rgba(0,0,0,.55) 0);
  box-shadow:0 0 0 1.2px rgba(214,160,74,.5), 0 0 18px rgba(255,170,60,.15)}
.mring-root .gauge::after{content:"";position:absolute;inset:6px;border-radius:50%;
  background:radial-gradient(circle at 50% 35%, rgba(46,28,12,.98), rgba(12,7,3,.99))}
.mring-root .gauge b{position:relative;z-index:1;font-size:15px;font-weight:900;color:#fff1cd}
.mring-root .gauge b em{font-style:normal;font-size:9px;color:#c99a4e}
.mring-root .fbody{flex:1 1 auto;min-width:0}
.mring-root .fbody h5{margin:0 0 3px;font-family:'PT Serif',Georgia,serif;font-size:14px;color:#fff1cd}
.mring-root .fbody p{margin:0 0 6px;font-size:10.5px;line-height:1.45;color:#b59a78}
.mring-root .costrow{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:6px}
.mring-root .heat{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:8px;font-size:10.5px;font-weight:900;
  color:#ffd4a0;background:rgba(120,50,20,.45);box-shadow:inset 0 0 0 1px rgba(255,130,70,.5)}
.mring-root .tokrow{display:flex;gap:7px;margin-top:9px}
.mring-root .tokrow .btn{flex:1 1 0}
.mring-root .sk{position:relative;padding:11px 11px 12px;border-radius:13px;margin-bottom:9px;
  background:linear-gradient(180deg, rgba(42,26,12,.92), rgba(20,12,5,.96));box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.32)}
.mring-root .sk.is-lock{filter:saturate(.4);opacity:.75}
.mring-root .sk-h{display:flex;align-items:center;gap:9px;margin-bottom:8px}
.mring-root .sk-h .gl{width:42px;height:42px;flex:0 0 42px;border-radius:12px;display:grid;place-items:center;font-size:19px;
  background:radial-gradient(circle at 50% 35%, rgba(255,200,110,.3), rgba(0,0,0,.65));
  box-shadow:inset 0 0 0 1.3px rgba(214,160,74,.5)}
.mring-root .sk-h .tt{flex:1 1 auto;min-width:0}
.mring-root .sk-h h5{margin:0 0 2px;font-family:'PT Serif',Georgia,serif;font-size:14px;color:#fff1cd}
.mring-root .sk-h p{margin:0;font-size:10.5px;color:#ab9375}
.mring-root .sk-lv{display:flex;gap:3px}
.mring-root .sk-lv i{width:9px;height:9px;border-radius:3px;background:rgba(0,0,0,.5);box-shadow:inset 0 0 0 1px rgba(214,160,74,.4)}
.mring-root .sk-lv i.on{background:linear-gradient(180deg,#ffe9b6,#d9a13a);box-shadow:0 0 8px rgba(255,190,90,.6)}
.mring-root .sk-num{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:10px;margin-bottom:8px;
  background:rgba(0,0,0,.42);box-shadow:inset 0 0 0 1px rgba(214,160,74,.28)}
.mring-root .sk-num u{text-decoration:none;font-size:9px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:#a98a5e}
.mring-root .sk-num b{font-size:14px;font-weight:900;color:#fff1cd;margin-left:auto}
.mring-root .sk-num b em{font-style:normal;font-size:11px;color:var(--ok);margin-left:4px}
.mring-root .mast{position:relative;height:10px;border-radius:6px;background:rgba(0,0,0,.5);overflow:hidden;margin:0 0 4px;
  box-shadow:inset 0 0 0 1px rgba(214,160,74,.3)}
.mring-root .mast i{position:absolute;left:0;top:0;bottom:0;border-radius:6px;background:linear-gradient(90deg,#6f4bc0,#d3b0ff);
  box-shadow:0 0 9px rgba(170,120,255,.5)}
.mring-root .mast u{position:absolute;inset:0;display:grid;place-items:center;text-decoration:none;font-size:8px;font-weight:900;color:#fff}
.mring-root .branch{display:flex;gap:7px;margin-top:8px}
.mring-root .br{flex:1 1 0;padding:8px 9px;border-radius:11px;cursor:pointer;
  background:linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.6));box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.3)}
.mring-root .br.is-pick{background:linear-gradient(160deg, rgba(120,70,190,.42), rgba(30,18,8,.6));
  box-shadow:inset 0 0 0 1.6px rgba(200,140,255,.85), 0 0 14px rgba(170,110,255,.18)}
.mring-root .br.is-off{opacity:.42}
.mring-root .br b{display:block;font-size:11.5px;font-weight:900;color:#fff1cd;margin-bottom:2px}
.mring-root .br span{display:block;font-size:10px;line-height:1.35;color:#ab9375}
.mring-root .echo{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:11px;margin-bottom:8px;
  background:linear-gradient(90deg, rgba(60,30,90,.45), rgba(20,12,6,.6));box-shadow:inset 0 0 0 1.1px rgba(190,130,255,.35)}
.mring-root .echo img{width:22px;height:22px;object-fit:contain}
.mring-root .echo b{font-size:13px;color:#e5c7ff}
.mring-root .echo span{display:block;margin-top:2px;font-size:10.5px;line-height:1.35;color:#b59ccf}
.mring-root .lockline{display:flex;align-items:center;gap:6px;font-size:10.5px;font-weight:800;color:#c08f55;margin-top:6px}
.mring-root .ord{position:relative;padding:10px 11px 11px;border-radius:13px;margin-bottom:8px;overflow:hidden;
  background:linear-gradient(180deg, rgba(44,27,12,.92), rgba(21,13,6,.96));box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.32)}
.mring-root .ord.is-done{box-shadow:inset 0 0 0 1.5px rgba(127,224,138,.6)}
.mring-root .ord-h{display:flex;align-items:flex-start;gap:9px;margin-bottom:7px}
.mring-root .ord-h .oi{width:36px;height:36px;flex:0 0 36px;border-radius:11px;display:grid;place-items:center;font-size:17px;overflow:hidden;
  background:rgba(0,0,0,.5);box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.4)}
/* Фаза 129.9 (баг «огромная картинка награды перекрывает карточку наряда»): у .oi не было
   ограничения размера самого <img> -- icon_path нарядов иногда указывает на полноразмерный
   арт (кубок и т.п.), а display:grid;place-items:center лишь центрирует, но не масштабирует и
   не режет содержимое без overflow:hidden (добавлено выше) + явного размера img ниже. */
.mring-root .ord-h .oi img{width:22px;height:22px;object-fit:contain}
.mring-root .ord-h .ob{flex:1 1 auto;min-width:0}
.mring-root .ord-h h5{margin:0 0 2px;font-size:12.5px;font-weight:900;color:#fff1cd}
.mring-root .ord-h p{margin:0;font-size:10.5px;line-height:1.4;color:#ab9375}
.mring-root .ord .pr{position:relative;height:10px;border-radius:6px;background:rgba(0,0,0,.5);overflow:hidden;margin-bottom:7px;
  box-shadow:inset 0 0 0 1px rgba(214,160,74,.3)}
.mring-root .ord .pr i{position:absolute;left:0;top:0;bottom:0;border-radius:6px;background:linear-gradient(90deg,#d08b2a,#ffe6a6)}
.mring-root .ord .pr u{position:absolute;inset:0;display:grid;place-items:center;text-decoration:none;font-size:8px;font-weight:900;color:#2b1a05}
.mring-root .ord-f{display:flex;align-items:center;gap:7px}
.mring-root .ord-f .rw{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:5px;font-size:11px;font-weight:900;color:#ffeaba}
.mring-root .ord-f .rw img{width:15px;height:15px;object-fit:contain}
.mring-root .slotempty{display:grid;place-items:center;gap:7px;padding:16px 12px;border-radius:13px;margin-bottom:8px;
  background:rgba(0,0,0,.35);box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.22)}
.mring-root .slotempty span{font-size:11px;color:#a98a5e}
.mring-root .draft{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding-bottom:3px}
.mring-root .draft::-webkit-scrollbar{display:none}
.mring-root .dcard{flex:0 0 46%;padding:10px;border-radius:12px;cursor:pointer;
  background:linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.62));box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.32)}
.mring-root .dcard b{display:flex;align-items:center;gap:4px;font-size:11.5px;font-weight:900;color:#fff1cd;margin-bottom:3px;line-height:1.25}
.mring-root .dcard b>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.mring-root .dcard b img{width:16px;height:16px;flex:0 0 auto;object-fit:contain}
.mring-root .dcard span{display:block;font-size:10px;line-height:1.35;color:#ab9375;margin-bottom:6px;white-space:normal}
.mring-root .dcard .rw{display:flex;align-items:center;gap:4px;font-size:11px;font-weight:900;color:#ffeaba}
.mring-root .dcard .rw img{width:14px;height:14px;object-fit:contain}
.mring-root .fuse{position:relative;display:flex;align-items:center;justify-content:center;gap:7px;padding:13px 6px 9px;margin:0 -2px 10px;
  border-radius:14px;overflow:hidden;
  background:radial-gradient(74% 66% at 50% 46%, rgba(120,90,255,.2), rgba(10,6,3,.92) 74%);
  box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.34)}
.mring-root .fcard{position:relative;width:76px;height:104px;border-radius:11px;overflow:hidden;
  box-shadow:0 0 0 1.5px rgba(214,160,74,.6), 0 8px 16px rgba(0,0,0,.6)}
.mring-root .fcard.is-pick{box-shadow:0 0 0 2px rgba(200,140,255,.95), 0 0 20px rgba(170,110,255,.35), 0 8px 16px rgba(0,0,0,.6)}
.mring-root .fcard img{width:100%;height:100%;object-fit:cover;display:block}
.mring-root .fcard .nm{position:absolute;left:0;right:0;bottom:0;padding:11px 3px 3px;text-align:center;font-size:9px;font-weight:900;
  color:#ffeec4;background:linear-gradient(180deg,transparent,rgba(0,0,0,.88))}
.mring-root .fcard .st{position:absolute;left:0;right:0;top:0;padding:2px 4px;font-size:8.5px;font-weight:900;text-align:center;
  color:#ffd9a2;background:linear-gradient(180deg,rgba(0,0,0,.82),transparent)}
.mring-root .arrow{font-size:18px;font-weight:900;color:#c9a35e}
.mring-root .trait{display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:12px;margin-bottom:7px;cursor:pointer;
  background:linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.6));box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.3)}
.mring-root .trait.is-pick{background:linear-gradient(90deg, rgba(120,70,190,.42), rgba(30,18,8,.55));
  box-shadow:inset 0 0 0 1.6px rgba(200,140,255,.85), 0 0 16px rgba(170,110,255,.2)}
.mring-root .trait .mark{width:24px;height:24px;flex:0 0 24px;border-radius:8px;display:grid;place-items:center;font-size:13px;
  background:rgba(0,0,0,.5);box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.45)}
.mring-root .trait.is-pick .mark{color:#2b1a05;background:linear-gradient(180deg,#e8c7ff,#a865e0)}
.mring-root .trait .tb{flex:1 1 auto;min-width:0}
.mring-root .trait h5{margin:0 0 1px;font-size:12.5px;font-weight:900;color:#fff1cd}
.mring-root .trait p{margin:0;font-size:10.5px;color:#ae9678}
.mring-root .trait .src{font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#9b7fc9}
.mring-root .keepbox{display:flex;align-items:center;gap:9px;padding:10px;border-radius:12px;margin:2px 0 8px;cursor:pointer;
  background:linear-gradient(90deg, rgba(60,30,90,.45), rgba(20,12,6,.6));box-shadow:inset 0 0 0 1.1px rgba(190,130,255,.35)}
.mring-root .keepbox.is-on{box-shadow:inset 0 0 0 1.6px rgba(200,140,255,.9), 0 0 16px rgba(170,110,255,.2)}
.mring-root .keepbox .mark{width:22px;height:22px;flex:0 0 22px;border-radius:7px;display:grid;place-items:center;font-size:12px;
  background:rgba(0,0,0,.5);box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.45)}
.mring-root .keepbox.is-on .mark{color:#2b1a05;background:linear-gradient(180deg,#e8c7ff,#a865e0)}
.mring-root .keepbox b{font-size:12.5px;color:#fff1cd}
.mring-root .keepbox p{margin:1px 0 0;font-size:10.5px;color:#b59ccf}
.mring-root .frag{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:12px;margin-bottom:8px;
  background:linear-gradient(180deg, rgba(44,27,12,.9), rgba(21,13,6,.95));box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.3)}
.mring-root .frag .pic{position:relative;width:48px;height:64px;flex:0 0 48px;border-radius:9px;overflow:hidden;
  box-shadow:0 0 0 1.3px rgba(214,160,74,.55)}
.mring-root .frag .pic img{width:100%;height:100%;object-fit:cover}
.mring-root .frag .fb{flex:1 1 auto;min-width:0}
.mring-root .frag .fb h5{margin:0 0 3px;font-size:12.5px;font-weight:900;color:#fff1cd}
.mring-root .shbar{position:relative;height:11px;border-radius:6px;background:rgba(0,0,0,.5);overflow:hidden;margin-bottom:4px;
  box-shadow:inset 0 0 0 1px rgba(214,160,74,.3)}
.mring-root .shbar i{position:absolute;left:0;top:0;bottom:0;border-radius:6px;background:linear-gradient(90deg,#8a5bd0,#e0b6ff)}
.mring-root .shbar i.dust{background:linear-gradient(90deg,rgba(190,160,110,.75),rgba(240,220,170,.8))}
.mring-root .shbar u{position:absolute;inset:0;display:grid;place-items:center;text-decoration:none;font-size:8px;font-weight:900;color:#fff}
.mring-root .chip{display:inline-block;padding:2px 8px;border-radius:7px;font-size:8.5px;font-weight:900;letter-spacing:.08em;
  text-transform:uppercase;margin-bottom:3px}
.mring-root .chip.c{color:#dfe9f5;background:rgba(90,120,150,.4);box-shadow:inset 0 0 0 1px rgba(150,190,230,.5)}
.mring-root .chip.r{color:#cfe8ff;background:rgba(40,90,160,.45);box-shadow:inset 0 0 0 1px rgba(110,180,255,.6)}
.mring-root .chip.e{color:#eed4ff;background:rgba(95,45,150,.45);box-shadow:inset 0 0 0 1px rgba(195,123,255,.6)}
.mring-root .chip.l{color:#ffe6b8;background:rgba(150,90,20,.45);box-shadow:inset 0 0 0 1px rgba(255,190,90,.7)}
.mring-root .offer{display:flex;gap:10px;align-items:center;padding:10px;border-radius:13px;margin-bottom:8px;
  background:linear-gradient(180deg, rgba(44,27,12,.92), rgba(21,13,6,.96));box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.32)}
.mring-root .offer .pic{position:relative;width:58px;height:78px;flex:0 0 58px;border-radius:10px;overflow:hidden;
  box-shadow:0 0 0 1.4px rgba(214,160,74,.6)}
.mring-root .offer .pic img{width:100%;height:100%;object-fit:cover}
.mring-root .ob2{flex:1 1 auto;min-width:0}
.mring-root .ob2 h5{margin:0 0 3px;font-family:'PT Serif',Georgia,serif;font-size:13px;color:#fff1cd}
.mring-root .ob2 p{margin:0 0 5px;font-size:10.5px;color:#ab9375}
.mring-root .lim{font-size:9.5px;font-weight:800;color:#c08f55}
.mring-root .line{position:relative;display:flex;align-items:center;gap:10px;padding:10px;border-radius:13px;margin-bottom:9px;overflow:hidden;
  background:linear-gradient(180deg, rgba(42,26,12,.92), rgba(22,13,6,.96));box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.35)}
.mring-root .line.is-run{box-shadow:inset 0 0 0 1.5px rgba(255,214,130,.7), 0 0 18px rgba(255,170,60,.13)}
.mring-root .wslot{position:relative;width:52px;height:52px;flex:0 0 52px;border-radius:14px;display:grid;place-items:center;cursor:pointer;
  background:linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.7));box-shadow:inset 0 0 0 1.3px rgba(214,160,74,.45)}
.mring-root .wslot img{width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 3px 6px rgba(0,0,0,.6))}
.mring-root .wslot.is-empty::after{content:"+";font-size:21px;font-weight:900;color:rgba(214,160,74,.5)}
.mring-root .lbody{flex:1 1 auto;min-width:0}
.mring-root .lbody h5{margin:0 0 2px;font-family:'PT Serif',Georgia,serif;font-size:13.5px;color:#fff1cd}
.mring-root .lbody p{margin:0 0 6px;font-size:10.5px;color:#b59a78}
.mring-root .track{position:relative;height:9px;border-radius:6px;background:rgba(0,0,0,.5);overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(214,160,74,.3)}
.mring-root .track i{position:absolute;left:0;top:0;bottom:0;border-radius:6px;background:linear-gradient(90deg,#d08b2a,#ffe6a6);
  box-shadow:0 0 10px rgba(255,190,90,.5)}
.mring-root .lright{display:flex;flex-direction:column;align-items:flex-end;gap:5px;max-width:96px}
.mring-root .lright .tm{font-size:12px;font-weight:900;color:#ffdc8a}
.mring-root .pool{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.mring-root .wk{position:relative;border-radius:13px;padding:5px 3px 4px;text-align:center;cursor:pointer;
  background:linear-gradient(180deg, rgba(0,0,0,.4), rgba(0,0,0,.6));box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.3)}
.mring-root .wk.is-sel{box-shadow:inset 0 0 0 1.6px rgba(255,214,130,.95), 0 0 15px rgba(255,180,70,.24)}
.mring-root .wk.is-busy{opacity:.38;filter:grayscale(.7)}
.mring-root .wk img{width:100%;height:44px;object-fit:contain}
.mring-root .wk span{display:block;font-size:8.5px;font-weight:900;color:#c9ab84;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mring-root .skyStats{position:absolute;left:10px;right:10px;bottom:9px;z-index:3;display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.mring-root .skyStats .s{padding:5px 2px 4px;border-radius:9px;text-align:center;
  background:linear-gradient(180deg,rgba(38,24,10,.86),rgba(14,9,4,.92));
  box-shadow:inset 0 0 0 1px rgba(214,160,74,.3)}
.mring-root .skyStats .s i{display:block;font-style:normal;font-size:7.6px;font-weight:900;letter-spacing:.1em;
  text-transform:uppercase;color:#a8834a;margin-bottom:1px}
.mring-root .skyStats .s b{display:block;font-size:12.5px;font-weight:900;color:#ffe9b6;line-height:1}
.mring-root .keeper{margin-top:11px;padding:11px 12px 12px;border-radius:13px;
  background:linear-gradient(180deg,rgba(44,27,12,.94),rgba(22,13,6,.97));
  box-shadow:inset 0 0 0 1.3px rgba(255,200,110,.5), 0 0 22px rgba(255,170,60,.12)}
.mring-root .keeper .kh{display:flex;align-items:center;gap:10px;margin-bottom:9px}
.mring-root .keeper .kh img{width:44px;height:44px;border-radius:10px;object-fit:cover;flex:0 0 44px;
  box-shadow:0 0 0 1.2px rgba(214,160,74,.5)}
.mring-root .keeper .kh b{display:block;font-size:13.5px;font-weight:900;color:#ffe9b6;line-height:1.15}
.mring-root .keeper .kh span{display:block;margin-top:2px;font-size:10.5px;line-height:1.35;color:#c2a172}
.mring-root .kbar{position:relative;height:16px;border-radius:9px;margin-bottom:9px;overflow:hidden;
  background:rgba(0,0,0,.6);box-shadow:inset 0 0 0 1px rgba(214,160,74,.32)}
.mring-root .kbar i{display:block;height:100%;border-radius:9px;background:linear-gradient(90deg,#d08b2a,#ffe6a6);
  box-shadow:0 0 10px rgba(255,190,90,.5);transition:width .5s linear}
.mring-root .kbar u{position:absolute;inset:0;display:grid;place-items:center;text-decoration:none;
  font-size:9.5px;font-weight:900;color:#2a1a06;text-shadow:0 1px 0 rgba(255,240,200,.45)}
.mring-root .ladder{display:grid;gap:8px}
.mring-root .lad{padding:10px 11px;border-radius:12px;background:linear-gradient(180deg,rgba(40,25,11,.9),rgba(20,12,5,.95));
  box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.3)}
.mring-root .lad.is-ready{box-shadow:inset 0 0 0 1.4px rgba(255,205,115,.72), 0 0 18px rgba(255,170,60,.14)}
.mring-root .lad-t{display:flex;align-items:center;justify-content:center;gap:9px;margin-bottom:8px;
  font-size:12.5px;font-weight:900;letter-spacing:.01em}
.mring-root .lad-t em{font-style:normal;opacity:.5;font-size:11px}
.mring-root .r-c{color:#cbb894}
.mring-root .r-r{color:#7fc4ff}
.mring-root .r-e{color:#c79bff}
.mring-root .r-l{color:#ffc061}
.mring-root .lad .btn{width:100%}
.mring-root .lad .btn:disabled{opacity:.5}
.mring-root .fway{display:flex;align-items:center;justify-content:center;gap:9px;margin-bottom:11px}
.mring-root .fway .pil{padding:6px 12px;border-radius:999px;font-size:11.5px;font-weight:900;
  background:linear-gradient(180deg,rgba(48,30,13,.95),rgba(24,15,6,.97));
  box-shadow:inset 0 0 0 1.2px rgba(214,160,74,.42)}
.mring-root .fway .ar{color:#c99a4e;font-weight:900}
.mring-root .pickhead{display:flex;align-items:baseline;gap:8px;margin:0 2px 8px}
.mring-root .pickhead b{font-size:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:#c99a4e}
.mring-root .pickhead u{margin-left:auto;text-decoration:none;font-size:11px;font-weight:900;color:#e7c98c}
.mring-root .pickrow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.mring-root .pk{position:relative;padding:6px 4px 7px;border-radius:12px;cursor:pointer;text-align:center;
  background:linear-gradient(180deg,rgba(40,25,11,.9),rgba(20,12,5,.95));
  box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.26);transition:transform .12s, box-shadow .12s}
.mring-root .pk img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:8px;display:block;margin-bottom:5px}
.mring-root .pk b{display:block;font-size:9.6px;font-weight:900;color:#f0dcb4;line-height:1.1;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mring-root .pk span{display:block;margin-top:2px;font-size:8.6px;font-weight:900;letter-spacing:.06em;
  text-transform:uppercase;color:#8fd6a0}
.mring-root .pk .lv{position:absolute;left:8px;top:8px;padding:1px 5px;border-radius:6px;font-size:8.4px;font-weight:900;
  color:#2a1a06;background:linear-gradient(180deg,#ffe6a6,#d59b34)}
.mring-root .pk.is-pick{transform:translateY(-2px);box-shadow:inset 0 0 0 1.7px rgba(255,214,130,.95), 0 0 16px rgba(255,180,70,.34)}
.mring-root .pk.is-off{opacity:.42;cursor:default}
.mring-root .lnk{border:0;background:none;padding:0;cursor:pointer;font:inherit;font-size:11px;font-weight:900;color:#e0b972}
.mring-root .payrow{display:flex;align-items:center;gap:9px;margin-top:8px}
.mring-root .payrow .btn{flex:0 0 auto}
.mring-root .payhint{font-size:10px;font-weight:800;color:#9c7b47}
.mring-root .btn.mini.wide{width:100%;margin-top:8px}
.mring-root .rail{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;padding:2px 2px 8px;
  scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.mring-root .rail::-webkit-scrollbar{display:none}
.mring-root .rail > *{flex:0 0 96px;scroll-snap-align:start}
.mring-root .pickRail > *{flex:0 0 104px}
.mring-root .seg{display:flex;gap:6px;margin-bottom:8px}
.mring-root .seg.thin{gap:5px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.mring-root .seg.thin::-webkit-scrollbar{display:none}
.mring-root .sg{flex:1 0 auto;padding:7px 12px;border:0;cursor:pointer;border-radius:999px;font:inherit;
  font-size:11px;font-weight:900;color:#c2a172;white-space:nowrap;
  background:linear-gradient(180deg,rgba(40,25,11,.9),rgba(20,12,5,.95));
  box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.26)}
.mring-root .seg.thin .sg{flex:0 0 auto;padding:6px 11px;font-size:10.4px}
.mring-root .sg.is-on{color:#2a1a06;background:linear-gradient(180deg,#ffe6a6,#d59b34);
  box-shadow:0 2px 8px rgba(255,180,70,.28)}
.mring-root .mc{position:relative;padding:5px 5px 6px;border-radius:12px;cursor:pointer;text-align:center;
  background:linear-gradient(180deg,rgba(40,25,11,.9),rgba(20,12,5,.95));
  box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.26);transition:transform .14s, box-shadow .14s}
.mring-root .mc img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:9px;display:block}
.mring-root .mc .nm{display:block;margin-top:4px;font-size:9.4px;font-weight:900;color:#f0dcb4;line-height:1.1;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mring-root .mc .rr{display:block;margin-top:2px;font-size:8.2px;font-weight:900;letter-spacing:.07em;text-transform:uppercase}
.mring-root .mc .lvp{position:absolute;left:7px;top:7px;padding:1px 5px;border-radius:6px;font-size:8.2px;font-weight:900;
  color:#2a1a06;background:linear-gradient(180deg,#ffe6a6,#d59b34)}
.mring-root .mc .mbar{position:relative;height:6px;margin-top:5px;border-radius:4px;overflow:hidden;
  background:rgba(0,0,0,.6);box-shadow:inset 0 0 0 1px rgba(214,160,74,.25)}
.mring-root .mc .mbar i{display:block;height:100%;background:linear-gradient(90deg,#d08b2a,#ffe6a6)}
.mring-root .mc .mbar.is-full i{background:linear-gradient(90deg,#63d38a,#c8ffd8)}
.mring-root .mc .stt{display:block;margin-top:4px;font-size:8px;font-weight:900;letter-spacing:.05em;
  text-transform:uppercase;color:#8fd6a0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mring-root .mc .stt.wait{color:#ffce7a}
.mring-root .mc .stt.work{color:#7fc4ff}
.mring-root .mc.is-sel{transform:translateY(-3px);box-shadow:inset 0 0 0 1.8px rgba(255,214,130,.95), 0 0 16px rgba(255,180,70,.32)}
.mring-root .mc.is-busy::after{content:'';position:absolute;inset:5px 5px auto;aspect-ratio:3/4;border-radius:9px;
  background:radial-gradient(circle at 50% 42%, rgba(120,190,255,.32), rgba(8,14,26,.72));
  box-shadow:inset 0 0 0 1.4px rgba(140,200,255,.6)}
.mring-root .mc .work-ic{position:absolute;right:8px;top:8px;z-index:3;width:20px;height:20px;border-radius:50%;
  display:grid;place-items:center;font-size:11px;
  background:linear-gradient(180deg,#8ec7ff,#3d78c4);box-shadow:0 2px 7px rgba(0,0,0,.5)}
.mring-root .railEmpty{flex:1 1 100%;padding:16px 10px;text-align:center;font-size:11px;font-weight:800;color:#9c7b47}
.mring-root .kp{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:12px;margin-bottom:8px;
  background:linear-gradient(180deg,rgba(40,25,11,.9),rgba(20,12,5,.95));
  box-shadow:inset 0 0 0 1.1px rgba(214,160,74,.28)}
.mring-root .kp.is-free{box-shadow:inset 0 0 0 1.3px rgba(140,225,160,.5)}
.mring-root .kp > img{width:46px;height:46px;flex:0 0 46px;border-radius:10px;object-fit:cover;
  box-shadow:0 0 0 1.2px rgba(214,160,74,.45)}
.mring-root .kp .kb{min-width:0;flex:1}
.mring-root .kp .kb h5{margin:0;font-size:12.6px;font-weight:900;color:#ffe9b6;line-height:1.15;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mring-root .kp .kb p{margin:2px 0 0;font-size:10px;line-height:1.3;color:#c2a172;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mring-root .kp .xpb{position:relative;height:5px;margin-top:5px;border-radius:3px;overflow:hidden;
  background:rgba(0,0,0,.6);box-shadow:inset 0 0 0 1px rgba(214,160,74,.22)}
.mring-root .kp .xpb i{display:block;height:100%;background:linear-gradient(90deg,#8a6adf,#d3b8ff)}
.mring-root .kp .kact{flex:0 0 auto;display:flex;flex-direction:column;gap:5px}
.mring-root .kp .btn.mini{padding:6px 10px;font-size:10.4px}
.mring-root .kovList{max-height:44dvh;overflow-y:auto;margin-bottom:10px;text-align:left}
.mring-root .kovList .kp{cursor:pointer}
.mring-root .kovList .kp.is-off{opacity:.45;cursor:default}
.mring-root .fx{position:fixed;inset:0;z-index:70;display:none;
  background:radial-gradient(circle at 50% 44%, rgba(46,25,6,.97), rgba(3,2,0,.995));
  backdrop-filter:blur(3px)}
.mring-root .fx.is-on{display:block}
.mring-root .fxStage{position:absolute;inset:0;display:grid;place-items:center}
.mring-root .fxCore{position:relative;width:250px;height:250px;display:grid;place-items:center}
.mring-root .fxRing{position:absolute;inset:0;border-radius:50%;
  background:conic-gradient(from 0deg, rgba(255,198,104,0) 0deg, rgba(255,226,156,.75) 120deg, rgba(255,198,104,0) 240deg);
  mask:radial-gradient(circle, transparent 60%, #000 63%, #000 84%, transparent 87%);
  -webkit-mask:radial-gradient(circle, transparent 60%, #000 63%, #000 84%, transparent 87%);
  animation:mr-fxspin 1.9s linear infinite}
.mring-root .fxRing2{position:absolute;inset:26px;border-radius:50%;
  box-shadow:inset 0 0 0 1.5px rgba(255,206,122,.45), 0 0 34px rgba(255,170,60,.22);
  animation:mr-fxpulse 1.5s ease-in-out infinite}
@keyframes mr-fxspin{to{transform:rotate(360deg)}}
@keyframes mr-fxpulse{0%,100%{transform:scale(1);opacity:.85}50%{transform:scale(1.06);opacity:1}}
.mring-root .fxCards{position:absolute;inset:0}
.mring-root .fxCards img{position:absolute;left:50%;top:50%;width:78px;aspect-ratio:3/4;object-fit:cover;
  border-radius:11px;box-shadow:0 10px 26px rgba(0,0,0,.65), 0 0 0 1.6px rgba(255,208,124,.75);
  animation:mr-fxdraw 1.55s cubic-bezier(.5,.02,.3,1) var(--d) forwards}
@keyframes mr-fxdraw{
  0%  {transform:translate(-50%,-50%) translate(var(--dx),var(--dy)) scale(1) rotate(var(--rot));opacity:1}
  62% {transform:translate(-50%,-50%) translate(calc(var(--dx)*.22),calc(var(--dy)*.22)) scale(.86) rotate(0deg);opacity:1}
  100%{transform:translate(-50%,-50%) scale(.16) rotate(10deg);opacity:0}
}
.mring-root .fxBurst{position:absolute;left:50%;top:50%;width:26px;height:26px;margin:-13px 0 0 -13px;border-radius:50%;opacity:0;
  background:radial-gradient(circle, #fffaf0 0%, #ffd98c 34%, #ff9f3a 56%, rgba(255,140,40,0) 74%)}
.mring-root .fx.is-win .fxBurst{animation:mr-fxwin 1.05s cubic-bezier(.18,.72,.26,1) 1.5s forwards}
@keyframes mr-fxwin{0%{opacity:.35;transform:scale(1)}50%{opacity:1;transform:scale(13)}100%{opacity:0;transform:scale(21)}}
.mring-root .fx.is-fail .fxRing{animation:mr-fxspin 1.9s linear infinite, mr-fxdim .8s ease 1.5s forwards}
.mring-root .fx.is-fail .fxRing2{animation:mr-fxpulse 1.5s ease-in-out infinite, mr-fxdim .8s ease 1.5s forwards}
@keyframes mr-fxdim{to{opacity:.22;filter:grayscale(1) brightness(.6)}}
.mring-root .fx.is-fail .fxCore{animation:mr-fxshake .55s ease 1.5s}
@keyframes mr-fxshake{0%,100%{transform:translateX(0)}18%{transform:translateX(-10px)}42%{transform:translateX(8px)}68%{transform:translateX(-5px)}88%{transform:translateX(3px)}}
.mring-root .fxCap{position:fixed;left:0;right:0;bottom:15%;text-align:center;padding:0 22px}
.mring-root .fxTitle{display:block;font-size:20px;font-weight:900;color:#ffe9b6;letter-spacing:.01em;
  text-shadow:0 2px 12px rgba(0,0,0,.75)}
.mring-root .fxSub{display:block;margin-top:5px;font-size:11.8px;font-weight:800;color:#c2a172}
.mring-root .fx.is-win .fxTitle{color:#ffe08a;text-shadow:0 0 22px rgba(255,190,80,.55)}
.mring-root .fx.is-fail .fxTitle{color:#e8907e}
.mring-root .tabs{overflow-x:auto;scrollbar-width:none}
.mring-root .tabs::-webkit-scrollbar{display:none}
.mring-root .tabs .tab{flex:0 0 auto;padding-left:13px;padding-right:13px;font-size:11.4px}
.mring-root [hidden]{display:none !important}
.mring-root .igrow{display:flex;gap:8px;align-items:stretch}
.mring-root .igrow .btn{flex:1 1 0;min-width:0;margin:0;padding-left:10px;padding-right:10px;
  font-size:12.4px;white-space:nowrap}
.mring-root .igrow .btn img{width:15px;height:15px}
.mring-root .mc .mbar{position:relative;height:7px;margin:5px 1px 0;border-radius:999px;overflow:hidden;
  background:rgba(8,5,2,.78);box-shadow:inset 0 0 0 1px rgba(214,160,74,.45)}
.mring-root .mc .mbar i{display:block;height:100%;border-radius:999px;
  background:linear-gradient(90deg,#c9861f,#ffd98c)}
.mring-root .mc .mbar.is-full i{background:linear-gradient(90deg,#4fb877,#b6f5cd)}
.mring-root .rail{align-items:stretch}
.mring-root .rail > *{flex:0 0 100px;display:flex;flex-direction:column}
.mring-root .pickRail > *{flex:0 0 104px}
.mring-root .mc img{width:100%;height:118px;aspect-ratio:auto;object-fit:cover;
  border-radius:9px;display:block;flex:0 0 118px}
.mring-root .pickRail .mc img{height:124px;flex:0 0 124px}
.mring-root .mc .stt{margin-top:auto;padding-top:4px}
.mring-root .kbar{height:18px}
.mring-root .kbar i{background:linear-gradient(90deg,#8a5410,#d79a34)}
.mring-root .kbar u{color:#fff3d6;font-size:10px;letter-spacing:.02em;
  text-shadow:0 1px 2px rgba(0,0,0,.85), 0 0 6px rgba(0,0,0,.6)}
.mring-root .kp .kact.wide{flex:0 0 108px;align-items:stretch;gap:3px}
.mring-root .kp .kact.wide .btn{width:100%;padding:7px 8px;font-size:11px}
.mring-root .xpnote{display:flex;align-items:center;justify-content:center;gap:3px;
  font-size:8.8px;font-weight:900;color:#c2a172;white-space:nowrap}
.mring-root .xpnote img{width:11px;height:11px;object-fit:contain}
.mring-root .xpbtn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  line-height:1.05;padding:6px 8px 5px}
.mring-root .xpbtn b{font-size:11px;font-weight:900}
.mring-root .xpbtn .xpnote{font-size:8.6px;font-weight:900;color:#4b3410;opacity:.92}
.mring-root .xpbtn:disabled .xpnote{color:#7a6238}
.mring-root .rail > *{flex:0 0 100px !important;width:100px;max-width:100px;min-width:100px;box-sizing:border-box}
.mring-root .pickRail > *{flex:0 0 104px !important;width:104px;max-width:104px;min-width:104px}
.mring-root .rail .railEmpty{flex:1 1 100% !important;width:auto;max-width:none;min-width:0}
.mring-root .mc .nm, .mring-root .mc .rr, .mring-root .mc .stt{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mring-root .mc .stt.max{color:#ffd489;letter-spacing:.09em}
.mring-root .mc .mbar.is-work{box-shadow:inset 0 0 0 1px rgba(130,195,255,.55)}
.mring-root .mc .mbar.is-work i{background:linear-gradient(90deg,#3f7fc4,#a8d8ff)}
.mring-root .mc.is-busy::after{content:none}
.mring-root .mc .work-ic{background:linear-gradient(180deg,#8ec7ff,#3d78c4)}
.mring-root .mc .mbar.is-full i{background:linear-gradient(90deg,#c9861f,#ffd98c)}

/* ------------------------------------------------------------------------------------------
   Фаза 129.1: посадка «Кольца Мастера» в экран проекта.
   Прототип жил в рамке ровно 390px, поэтому ряд фильтров (.seg с flex:1 0 auto + nowrap) и
   отрицательные поля (.sky/.hud с margin:0 -4px) растягивали контейнер шире вьюпорта: блоки
   уезжали вправо, а текст кнопок и карта в центре кольца оказывались за краем экрана.
   Здесь ширина жёстко привязывается к экрану, ряды фильтров скроллятся, поля обнуляются.
   ------------------------------------------------------------------------------------------ */
.mring-root { width: 100%; max-width: 100%; overflow-x: hidden; }
.mring-root > * { max-width: 100%; }
.mring-root .sky,
.mring-root .hud,
.mring-root .panel,
.mring-root .mr-upgrade,
.mring-root .keeper { margin-left: 0; margin-right: 0; }
.mring-root .seg { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.mring-root .seg::-webkit-scrollbar { display: none; }
.mring-root .sky { height: 348px; }
.mring-root .heroCard { z-index: 4; }
.mring-root .heroCard img { background: rgba(20, 12, 5, 0.9); }

/* Модалка выбора хранителя: кит города (.city-modal + .city-modal-card, рамка modal.png),
   поэтому текст тёмный по светлой рамке, а не светлый по тёмной плашке прототипа. */
.mring-root .mr-modal .mr-picklist { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; max-height: 46dvh; overflow-y: auto; }
.mring-root .mr-modal .mr-pick-keeper {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 12px; text-align: left;
  background: linear-gradient(180deg, rgba(120, 86, 40, 0.16), rgba(120, 86, 40, 0.06));
  box-shadow: inset 0 0 0 1.2px rgba(160, 118, 58, 0.45);
}
.mring-root .mr-modal .mr-pick-keeper img {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 10px; object-fit: cover;
  box-shadow: inset 0 0 0 1.2px rgba(160, 118, 58, 0.5);
}
.mring-root .mr-modal .mr-pick-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.mring-root .mr-modal .mr-pick-body b { font-size: 13.5px; font-weight: 900; color: #3f2708; }
.mring-root .mr-modal .mr-pick-body i { font-style: normal; font-size: 11px; font-weight: 800; color: #8a6a33; }
.mring-root .mr-modal .mr-pick-body em { font-style: normal; font-size: 11px; font-weight: 700; color: #6d5427; }
.mring-root .mr-modal .mr-pick-keeper.is-off { opacity: 0.55; filter: grayscale(0.5); }
/* Отдельная кнопка «Назначить» на карточке хранителя (Фаза 129.9: раньше вся карточка была
   кнопкой без явного CTA -- по просьбе пользователя вернули отдельную кнопку, как в прототипе
   proto_ws7, чтобы было очевидно, куда нажимать). */
.mring-root .mr-modal .mr-pick-assign-btn {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255, 214, 130, 0.55);
  background: linear-gradient(180deg, #ffd77a, #e79a2c); color: #3a2205; font-size: 12.5px;
  font-weight: 900; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}
.mring-root .mr-modal .mr-pick-assign-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.5); box-shadow: none; }
.mring-root .mr-modal .city-modal-note { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: #6d5427; }
/* Модалка «Карта улучшена» (Сбор завершённой работы хранителя, Fase 129.9). */
.mring-root .mr-modal .mr-collect-trophy { display: flex; justify-content: center; margin: 4px 0 10px; }
.mring-root .mr-modal .mr-collect-trophy img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.mring-root .mr-modal .mr-collect-cardline { margin: 0 0 6px; text-align: center; font-size: 13.5px; font-weight: 900; color: #3f2708; }
/* Страховка на случай, если экран Мастерской окажется flex-элементом: без min-width:0 такой
   элемент растягивается по max-content самой широкой строки (ряд фильтров, карусель карт). */
.ws-root.mring-root { min-width: 0; }
.mring-root .rail, .mring-root .seg, .mring-root .ladder, .mring-root .draft { width: 100%; }


/* ------------------------------------------------------------------------------------------
   Фаза 129.5: ширина экрана Мастерской — настоящая причина.
   `.ws-root { display: grid }` без явных колонок создаёт одну колонку auto, а такая колонка
   растёт до max-content своего содержимого. Панели Мастерской содержат горизонтальные ленты
   (карусель карт, ряды фильтров, лента купели) шириной под тысячу пикселей, поэтому колонка
   раздувалась до ~996px, и весь экран уезжал за правый край: замер на стенде показывал
   grid-template-columns: 996px при окне 390px. Прошлые попытки (min-width родителей, contain,
   overflow) лечили следствие и потому ничего не меняли.
   Колонка становится minmax(0, 1fr) — то есть ровно по ширине экрана, — а детям разрешено
   сжиматься, чтобы ленты прокручивались внутри своей ширины, а не растягивали сетку.
   Правило адресовано только Мастерской (.mring-root); сетка других экранов .ws-root не тронута.
   ------------------------------------------------------------------------------------------ */
.mring-root { grid-template-columns: minmax(0, 1fr); }
.mring-root > * { min-width: 0; }
.mring-root .panel { min-width: 0; }

/* Фаза 129.6 (баг 3): карточки предложений (.dcard) растягивались по высоте — тексты нарядов
   фазы 129 длиннее прототипных ("Продержи всех хранителей занятыми 4 часа" против "зажги 5 звёзд,
   не потратив жетон"), а .dcard b/span были обычным block без ограничения строк, поэтому перенос
   текста раздувал карточку. Заголовок (b>span) остаётся в 2 строки, но описание (Фаза 129.9,
   по жалобе пользователя: обрезка мешала понять, что за наряд берёшь) больше не клампится —
   карточка растёт по высоте свободно, ряд .draft всё равно листается горизонтально. */