/* ИГЛА — пергаментный дизайн (по хендоффу claude.ai/design «ИГЛА — Бой»).
   Язык: пергамент в ореховой раме, Ruslan Display + PT Serif + Marck Script. */
:root{
  --ink:#0c0d14; --ink2:#12141f;
  --bone:#e8e2d0; --bone-dim:#a9a494; --cream:#f0e6cf;
  --teal:#3fd1c4; --gold:#c9982e; --gold-hi:#f3c96b; --seal:#c7a457;
  --blood:#c8283c; --blood-hi:#ff4d63; --emerald:#3fae62;
  --walnut:#1a120a; --pink1:#ece0bd; --pink2:#d3bd93; --pink3:#c7ad7e;
  --pdark:#241a10; --pbrown:#4a3316; --pmut:#5a4326; --pline:#8a6a3a;
  --t-atk:#8a1f1c; --t-blk:#1f5a63; --t-pow:#8a5a1f; --t-ndl:#a01a1a;
  --disp:'Ruslan Display',Georgia,serif; --serif:'PT Serif',Georgia,serif; --script:'Marck Script',cursive;
}

/* ===================== ПЕРВЫЙ РАЗРЫВ · ОБУЧЕНИЕ ===================== */
.tutorial-menu-button{display:flex!important;align-items:center;justify-content:center;gap:9px}
.tutorial-menu-button span{font-family:"PT Serif",serif;font-size:9px;letter-spacing:.11em;text-transform:uppercase;color:#9b2c24}
.tutorial-offer-wrap{padding:0;background:#050506;backdrop-filter:none}
.tutorial-offer-screen{position:relative;width:min(440px,100vw);height:100%;overflow:hidden;background:#080706;box-shadow:0 0 80px rgba(0,0,0,.9)}
.tutorial-offer-art{position:absolute;inset:0;background:url('../img/intro/11-rift-v2.webp') 52% center/cover no-repeat;filter:contrast(1.08) saturate(.72);transform:scale(1.025)}
.tutorial-offer-art::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(4,3,3,.06) 20%,rgba(4,3,3,.28) 54%,rgba(4,3,3,.88) 100%)}
.tutorial-offer-screen .tutorial-offer-panel{position:absolute;z-index:2;left:14px;right:14px;bottom:max(14px,env(safe-area-inset-bottom));max-height:calc(100% - 28px);overflow-y:auto;text-align:center}
.tutorial-offer-panel small,.tutorial-kicker,.tutorial-story small,.tutorial-phase-card small,.tutorial-rift-copy small,.tutorial-failure small{display:block;margin-bottom:5px;font-family:"PT Serif",serif;font-size:11px;font-weight:700;letter-spacing:.16em;color:#8e2821}
.tutorial-offer-panel h3{margin:0 0 8px;font:30px/1.05 "Ruslan Display",serif;color:#4a3316}
.tutorial-offer-panel p{margin:0 auto 9px;max-width:320px;font-family:"PT Serif",serif;font-size:17px;line-height:1.42;color:#3e2b1d}
.tutorial-offer-time{margin:0 0 13px;font:11px/1.35 "PT Serif",serif;color:#715945}
.tutorial-offer-panel .btn{width:100%;margin-top:6px}

.tutorial-prologue,.tutorial-phases,.tutorial-rift,.tutorial-failure{position:relative;min-height:100%;overflow:hidden;background:#080706}
.tutorial-prologue-art,.tutorial-rift-art,.tutorial-phase-bg{position:absolute;inset:0;background:center/cover no-repeat;transform:scale(1.025)}
.tutorial-prologue-art{background-image:url('../img/intro/11-rift-v2.webp');background-position:52% center}
.tutorial-story,.tutorial-rift-copy{position:absolute;z-index:2;left:18px;right:18px;bottom:max(22px,env(safe-area-inset-bottom));padding:19px 19px 16px;border:1px solid rgba(123,39,31,.7);background:linear-gradient(145deg,rgba(230,215,175,.97),rgba(204,181,133,.96));box-shadow:0 18px 50px #000,0 0 0 3px rgba(30,15,8,.28);color:#27180f;text-align:center}
.tutorial-story h1,.tutorial-rift-copy h1{margin:0 0 10px;font-size:34px;line-height:1;color:#27140d}
.tutorial-story p,.tutorial-rift-copy p{margin:7px 0;font:16px/1.45 "PT Serif",serif}
.tutorial-story .narrator,.tutorial-rift-copy .narrator{font-style:italic;color:#6d201b}
.tutorial-story .btn,.tutorial-rift-copy .btn{width:100%;margin-top:9px}

.tutorial-map::before{content:"";position:absolute;inset:0;z-index:0;background:linear-gradient(180deg,rgba(18,6,6,.15),rgba(0,0,0,.72));pointer-events:none}
.tutorial-map .scroll-wrap{filter:sepia(.16) contrast(1.04)}
.tutorial-map .scroll-hd .s-act{background:#761f1a;color:#ead9b2}
.tutorial-map .worldmap::after{content:"";position:absolute;left:50%;top:2%;bottom:2%;width:2px;transform:translateX(-50%);background:linear-gradient(transparent,#77251f 12%,#77251f 88%,transparent);opacity:.18;pointer-events:none}
.tutorial-map .worldwrap{display:flex;align-items:center;justify-content:center;overflow:hidden;padding:2px 0}
.tutorial-map .worldmap-fit{margin:0 auto}

.tutorial-coach{position:fixed;z-index:97;left:50%;width:min(356px,calc(100vw - 22px));transform:translateX(-50%);padding:11px 13px 10px;border:1px solid #8d2a23;background:linear-gradient(145deg,#eadcb8,#ceb789);box-shadow:0 10px 30px rgba(0,0,0,.65),0 0 0 3px rgba(25,12,6,.32);color:#28180f;text-align:left;animation:tutorialCoachIn .24s ease-out both}
.tutorial-coach.coach-top{top:max(52px,env(safe-area-inset-top))}
.tutorial-coach.coach-bottom{bottom:max(98px,calc(env(safe-area-inset-bottom) + 88px))}
.tutorial-coach small{display:block;margin-bottom:3px;font:700 11px/1.2 "PT Serif",serif;letter-spacing:.12em;color:#8a251f}
.tutorial-coach b{display:block;font-family:"Ruslan Display",serif;font-size:22px;line-height:1.12;color:#25150d}
.tutorial-coach p{margin:6px 0 0;font:16px/1.38 "PT Serif",serif;color:#3c281a}
.tutorial-coach .btn{width:100%;margin-top:8px;min-height:34px}
@keyframes tutorialCoachIn{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
.tutorial-focus{outline:3px solid #c94738!important;outline-offset:4px!important;filter:drop-shadow(0 0 8px rgba(214,61,48,.95))!important;animation:tutorialFocusPulse 1.45s ease-in-out infinite!important}
.tutorial-drop-target{outline:4px solid #f0ad75!important;outline-offset:5px!important;filter:drop-shadow(0 0 12px rgba(235,80,55,.95))!important;animation:tutorialFocusPulse 1.05s ease-in-out infinite!important}
@keyframes tutorialFocusPulse{0%,100%{outline-color:#a82d25;filter:drop-shadow(0 0 5px rgba(196,49,38,.65))}50%{outline-color:#f0ad75;filter:drop-shadow(0 0 13px rgba(235,80,55,1))}}

.tutorial-gear .panel{max-width:390px}
.tutorial-gear .panel-in{text-align:center}
.tutorial-gear .tutorial-item{display:flex;justify-content:center;margin:12px 0}
.tutorial-gear .item-card{width:100%;max-width:310px;text-align:left}

.tutorial-phase-bg{background-image:url('../img/intro/04-fall.webp');filter:saturate(.55) contrast(1.1)}
.tutorial-phase-card{position:absolute;z-index:2;left:13px;right:13px;top:50%;transform:translateY(-50%);padding:17px 15px 15px;border:1px solid rgba(112,31,25,.8);background:linear-gradient(145deg,rgba(232,218,180,.97),rgba(196,171,121,.96));box-shadow:0 18px 55px #000;text-align:center;color:#26160d}
.tutorial-phase-card h2{margin:0 0 10px;font-size:31px}
.tutorial-phase-portraits{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;height:230px;margin:0 0 10px}
.tutorial-phase-portraits>div{position:relative;overflow:hidden;border:1px solid rgba(61,37,21,.36);background:#17120e;opacity:.43;filter:grayscale(.8);transition:.3s}
.tutorial-phase-portraits>div.on{opacity:1;filter:none;border-color:#a53229;box-shadow:0 0 0 2px rgba(165,50,41,.3),0 8px 20px rgba(0,0,0,.35)}
.tutorial-phase-portraits img{width:100%;height:100%;object-fit:cover;object-position:center top}
.tutorial-phase-portraits span{position:absolute;left:0;right:0;bottom:0;padding:5px 2px;background:linear-gradient(transparent,rgba(0,0,0,.9));font:10px "PT Serif",serif;letter-spacing:.08em;color:#eee0bf}
.tutorial-body-bar{position:relative;height:22px;margin:5px 0 9px;border:1px solid #5b2a21;background:#24100d;overflow:hidden;color:#f0dfbd}
.tutorial-body-bar i{position:absolute;inset:0 auto 0 0;background:linear-gradient(90deg,#65211d,#a83c2f);transition:width .45s}
.tutorial-body-bar span{position:relative;z-index:1;font:700 11px/20px "PT Serif",serif;text-shadow:0 1px 2px #000}
.tutorial-phase-card p{min-height:52px;margin:0 2px 10px;font:16px/1.4 "PT Serif",serif;color:#442d1d}
.tutorial-phase-card .btn{width:100%}

.tutorial-rift-art{background-image:url('../img/intro/11-rift-v2.webp');background-position:center;transition:filter 1.1s,transform 1.1s}
.tutorial-rift::after{content:"";position:absolute;z-index:1;left:50%;top:-10%;width:3px;height:120%;background:#c83b31;box-shadow:0 0 12px 4px #a5110b,0 0 45px 18px rgba(198,28,20,.35);opacity:0;transform:rotate(-5deg) scaleY(.1);transition:opacity .28s,transform 1s cubic-bezier(.2,.8,.2,1)}
.tutorial-rift.breaking::after{opacity:1;transform:rotate(-5deg) scaleY(1)}
.tutorial-rift.breaking .tutorial-rift-art{filter:contrast(1.2) brightness(.72) saturate(.65);transform:scale(1.08)}
.tutorial-rift-copy{transition:transform .7s,background .7s}
.tutorial-rift.breaking .tutorial-rift-copy{transform:translateY(-5px);background:linear-gradient(145deg,rgba(229,211,170,.97),rgba(186,146,103,.97))}
.tutorial-failure{background-position:center;background-size:cover}
.tutorial-failure .panel{position:relative;z-index:2}

@media(max-width:340px),(max-height:650px){
  .tutorial-offer-screen .tutorial-offer-panel{left:8px;right:8px;bottom:6px;padding:3px 7px}.tutorial-offer-panel h3{font-size:25px}.tutorial-offer-panel p{font-size:15px;line-height:1.34}.tutorial-offer-time{font-size:12px}
  .tutorial-story,.tutorial-rift-copy{left:9px;right:9px;bottom:8px;padding:12px}.tutorial-story h1,.tutorial-rift-copy h1{font-size:27px}
  .tutorial-story p,.tutorial-rift-copy p{font-size:15px;line-height:1.34}.tutorial-story .btn,.tutorial-rift-copy .btn{margin-top:5px}
  .tutorial-coach{padding:9px 10px}.tutorial-coach b{font-size:20px}.tutorial-coach p{font-size:15px;line-height:1.32}.tutorial-coach.coach-top{top:42px}.tutorial-coach.coach-bottom{bottom:82px}
  .tutorial-phase-card{top:48%;padding:11px 10px}.tutorial-phase-card h2{font-size:24px;margin-bottom:6px}.tutorial-phase-portraits{height:150px;margin-bottom:6px}.tutorial-phase-card p{min-height:0;font-size:14px;margin-bottom:6px}
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
input,textarea,select,[contenteditable="true"]{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}
:root{--sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px)}
html,body{height:100%}
body{background:#05060a;color:var(--bone);font-family:var(--serif);display:flex;justify-content:center;overflow:hidden}
#app{width:min(440px,100vw);height:100vh;height:100svh;position:relative;background:var(--ink);box-shadow:0 0 80px rgba(0,0,0,.8)}
#app.native-screen-next{opacity:0;pointer-events:none}
#app.native-screen-next.native-screen-ready{opacity:1;transition:opacity .21s ease-out}
.native-screen-buffer{position:fixed;z-index:89;left:50%;top:0;width:min(440px,100vw);height:100vh;height:100svh;transform:translateX(-50%);overflow:hidden;background:var(--ink);opacity:1;pointer-events:none;transition:opacity .21s ease-out;box-shadow:0 0 80px rgba(0,0,0,.8)}
.native-screen-buffer.native-screen-leave{opacity:0}
.native-screen-prepared .panel{animation:none}
.native-screen-prepared .cr-catalog-v2 .cr-mini-card,.native-screen-prepared .cr-catalog-v2 .cr-mini-item{opacity:1;animation:none}
@media (prefers-reduced-motion:reduce){#app.native-screen-next.native-screen-ready,.native-screen-buffer{transition:none}}
/* iOS Safari: svh занижает высоту → снизу проступает чёрный body. dvh фиксит. Только iOS,
   чтобы НЕ ломать иммерсив-скрытие системной навбар на Android (там оставляем svh). */
@supports (-webkit-touch-callout:none){#app{height:100dvh}}

.screen{position:absolute;inset:0;background-size:cover;background-position:center;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}
.biome-bg-shift{position:absolute;inset:0;z-index:0;pointer-events:none;background-size:cover;background-position:center;opacity:0;transition:opacity .9s ease-in-out}
.biome-bg-shift.on{opacity:1}
.biome-bg-shift~*{position:relative;z-index:1}
.veil{position:absolute;inset:0;background:linear-gradient(180deg,rgba(5,6,10,.5),rgba(5,6,10,.35) 40%,rgba(5,6,10,.78) 88%);pointer-events:none}
.veil.dark{background:rgba(5,6,10,.82)}
.red{color:var(--blood-hi)}
h1{font-family:var(--disp);font-size:60px;letter-spacing:.02em;font-weight:400}
h2{font-family:var(--disp);font-size:24px;font-weight:400}
.kick{font-size:13px;letter-spacing:.3em;text-transform:uppercase;color:var(--teal)}
.sub{color:var(--bone-dim);font-size:13px;font-style:italic;padding:0 18px 8px;position:relative;z-index:2}
.chip{font-family:var(--disp);background:rgba(10,11,18,.72);border:1px solid rgba(232,226,208,.2);border-radius:10px;padding:4px 11px;font-size:13px;color:#e8dcc0;display:inline-block}

.btn{display:inline-block;border:none;border-radius:11px;padding:13px 26px;font-size:15px;font-family:var(--serif);cursor:pointer;transition:transform .12s,filter .12s;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.btn:hover{transform:translateY(-1px);filter:brightness(1.06)}
.btn.gold{font-family:var(--disp);background:linear-gradient(180deg,var(--gold-hi),var(--gold));color:#231a08;box-shadow:0 5px 16px rgba(201,152,46,.4),inset 0 0 0 1px rgba(122,90,48,.5)}
.btn.blood{background:linear-gradient(180deg,var(--blood-hi),var(--blood));color:#fff;font-weight:700}
.btn.ghost{border:1.5px solid var(--pline);color:#3a2810;background:rgba(60,40,20,.08);font-weight:700}
.btn.sm{padding:8px 16px;font-size:13px}
.btn.big{font-size:18px;padding:15px 40px}
/* ghost-кнопки на тёмном фоне (вне пергамента) */
.dark-ui .btn.ghost,.hd .btn.ghost,.hs-hd .btn.ghost{border-color:rgba(232,226,208,.4);color:var(--bone);background:rgba(12,13,20,.5);font-weight:400}

/* ==== ПЕРГАМЕНТ В ОРЕХОВОЙ РАМЕ (панели событий/наград/меню/модалок) ==== */
/* цельный лист обгоревшей бумаги: центр и рваные обугленные края из одной текстуры (border-image fill).
   Общий класс .burnt-edge — применяем к панели/модалке/инвентарю. У меню/диалогов — просто чёрный кант (без огоньков). */
.panel{position:relative;z-index:2;background:transparent;padding:0;animation:panelIn .34s ease;filter:drop-shadow(0 14px 24px rgba(0,0,0,.6))}
.panel-in{position:relative;padding:8px 12px;background:transparent;
  border:34px solid transparent;border-image:url('../img/ui_paper_burnt.webp') 132 fill / 34px stretch;
  display:flex;flex-direction:column;gap:13px}
@keyframes emberFlicker{0%,100%{opacity:.4}30%{opacity:.9}55%{opacity:.6}80%{opacity:1}}
.panel-in>*{position:relative;z-index:1}
.panel h2{color:var(--pbrown);text-align:center}
/* чернильная иконка в заголовке (напр. «Клад») — вместо эмодзи-квадрата */
.hd-ic{width:26px;height:26px;object-fit:contain;vertical-align:-6px;margin-right:2px}
.ic-inl{height:1.05em;width:auto;vertical-align:-.16em;margin:0 1px;object-fit:contain}
.dz-i{height:1.15em;width:auto;vertical-align:-.2em;margin-right:5px;object-fit:contain;filter:drop-shadow(0 2px 6px rgba(0,0,0,.8))}
.panel .rule{height:1px;background:rgba(122,90,48,.5);margin:0 2px}
.ev-text{font-size:15px;line-height:1.55;color:var(--pdark);text-align:center}
.panel.blood .panel-in{background:transparent;box-shadow:none}
.panel.blood h1{color:#9a1f1c;font-size:clamp(24px,8.6vw,32px);line-height:1.15;letter-spacing:.04em;text-align:center}
.col{display:flex;flex-direction:column;gap:11px}
.row{display:flex;gap:10px;justify-content:center}
.skaz-img{position:absolute;inset:0;background-size:cover;background-position:center 15%}
.screen.event.skaz .veil.dark{background:rgba(5,6,10,.52)}
.gameover{background:radial-gradient(ellipse at 50% 30%,#2a0d14,#0c0d14 70%);justify-content:center;padding:20px}
.panel.center .panel-in{text-align:center;align-items:center}
.gameover-failure{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:0;padding:0;overflow:hidden;isolation:isolate;background:#08080b}
.gameover-failure:before{content:"";position:absolute;z-index:1;inset:0;background:linear-gradient(180deg,rgba(4,4,6,.05) 0%,rgba(6,5,8,.14) 36%,rgba(7,6,9,.78) 65%,rgba(5,6,10,.98) 86%);pointer-events:none}
.defeat-strip{position:relative;z-index:2;flex:0 0 auto;width:100%;height:104px;margin-top:min(52svh,calc(100svh - 496px - env(safe-area-inset-bottom,0px)));color:#f7ecd2;filter:drop-shadow(0 13px 17px #000);animation:defeatTextFade .9s 1.55s ease both}
.defeat-strip:before{content:"";position:absolute;z-index:2;inset:0;background:linear-gradient(90deg,#3c0e11 0%,rgba(12,8,10,.96) 52%,#21090c 100%);-webkit-mask:url('../img/ui_narrator_charcoal.png') center/100% 172% no-repeat;mask:url('../img/ui_narrator_charcoal.png') center/100% 172% no-repeat}
.defeat-strip:after{content:"";position:absolute;z-index:4;left:22px;right:22px;bottom:18px;height:1px;background:linear-gradient(90deg,transparent,rgba(211,71,66,.35) 18%,#d34742 50%,rgba(211,71,66,.35) 82%,transparent);opacity:.82}
.defeat-heading{position:absolute;z-index:5;left:22px;right:20px;bottom:27px;text-align:center;text-shadow:0 2px 6px #000}
.defeat-heading small{display:block;margin-bottom:5px;color:#d9bd82;font:700 12px/1.1 var(--serif);letter-spacing:.16em}
.defeat-heading h1{margin:0;color:#f07369;font:400 29px/1.05 var(--disp);letter-spacing:.045em;white-space:nowrap;text-shadow:0 2px 7px #000,0 0 24px rgba(211,71,66,.52)}
.defeat-source{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;gap:7px;width:min(344px,calc(100% - 32px));min-height:18px;margin-top:7px;color:#d9bd82;font:700 12px/1.25 var(--serif);letter-spacing:.04em;text-align:center;text-shadow:0 2px 5px #000;animation:defeatTextFade .9s 1.55s ease both}
.defeat-source img{display:block;width:17px;height:17px;object-fit:contain}
.defeat-art{position:absolute;z-index:0;inset:0;overflow:hidden;background:#08080b;animation:defeatArtShake .46s .76s ease-out both}
.defeat-art img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;object-position:center top;filter:saturate(.94) contrast(1.04)}
.defeat-art-whole{opacity:1;animation:defeatWholeBreak 1.05s ease-in both}
.defeat-art-broken{opacity:0;animation:defeatBrokenReveal 1.24s .72s cubic-bezier(.16,.8,.24,1) both}
.defeat-blood-flash{position:absolute;inset:0;background:radial-gradient(circle at 51% 37%,rgba(255,50,35,.95) 0,rgba(160,0,0,.58) 5%,rgba(84,0,0,.18) 15%,transparent 31%);mix-blend-mode:screen;opacity:0;animation:defeatBloodBurst .94s .73s ease-out both}
.defeat-copy{position:relative;z-index:2;width:min(344px,calc(100% - 32px));margin-top:7px;color:#f0dfc3;text-align:center;text-shadow:0 2px 4px #000;animation:defeatTextFade .9s 1.55s ease both}
.defeat-copy-avatar{position:absolute;left:0;top:50%;display:block;width:54px;height:54px;border:1px solid rgba(217,189,130,.78);border-radius:50%;object-fit:cover;transform:translateY(-50%);box-shadow:0 0 0 2px rgba(58,13,16,.82),0 4px 13px #000}
.defeat-copy p{margin:0;font:400 20px/1.28 var(--script);text-wrap:pretty}
.defeat-copy-avatar+p{padding-left:62px}
.defeat-footer{position:relative;z-index:2;display:flex;flex-direction:column;gap:10px;width:min(344px,calc(100% - 32px));margin-top:14px;animation:defeatTextFade .9s 1.55s ease both}
.defeat-footer .xp-panel{width:100%;box-sizing:border-box;margin:0;background:rgba(16,11,10,.9);border-color:rgba(180,126,57,.64);box-shadow:0 8px 22px rgba(0,0,0,.4);text-align:center}
.defeat-footer .xp-hd{justify-content:center;gap:14px}
.defeat-footer .xp-cls{font:700 14px/1 var(--serif);letter-spacing:.08em}
.defeat-footer .xp-gain{color:#ff675c;font:700 16px/1 var(--serif);text-shadow:0 0 10px rgba(255,55,45,.62),0 1px 3px #000}
.defeat-footer .xp-bar i:first-child{background:linear-gradient(90deg,#64110f,#c82d27);transform-origin:left center;animation:defeatXpFill 1.12s 2.35s cubic-bezier(.15,.75,.2,1) both}
.defeat-footer .xp-bar .xp-gained{background:linear-gradient(90deg,#d33129,#ff7467);box-shadow:0 0 10px rgba(255,64,54,.72);transform-origin:left center;animation:defeatXpFill 1.02s 2.5s cubic-bezier(.15,.75,.2,1) both}
.defeat-footer .xp-bar .xp-lv{font-family:var(--serif);font-size:13px;font-weight:700;letter-spacing:.02em}
.defeat-footer .xp-need{font-family:var(--serif);font-size:13px;font-weight:400;letter-spacing:0}
.defeat-footer>.btn{width:100%;padding:12px 18px;font-family:var(--serif);font-size:16px;font-weight:700}
@keyframes defeatWholeBreak{0%,67%{opacity:1;transform:scale(1);filter:saturate(.94) contrast(1.04)}76%{opacity:1;transform:scale(1.008);filter:saturate(1.15) contrast(1.12) brightness(1.28)}79%,100%{opacity:0;transform:scale(1.018);filter:brightness(1.8)}}
@keyframes defeatBrokenReveal{0%,4%{opacity:0;transform:scale(.985);filter:saturate(1.4) brightness(1.9)}10%{opacity:1;transform:scale(1.025);filter:saturate(1.35) brightness(1.5)}36%{opacity:1;transform:scale(.997);filter:saturate(1.08) brightness(1.08)}100%{opacity:1;transform:scale(1);filter:saturate(.94) contrast(1.04)}}
@keyframes defeatBloodBurst{0%{opacity:0;transform:scale(.45)}13%{opacity:1;transform:scale(1.08)}42%{opacity:.76;transform:scale(1.32)}100%{opacity:0;transform:scale(1.65)}}
@keyframes defeatArtShake{0%,100%{transform:translate3d(0,0,0)}18%{transform:translate3d(-5px,2px,0)}36%{transform:translate3d(4px,-2px,0)}55%{transform:translate3d(-3px,1px,0)}75%{transform:translate3d(2px,0,0)}}
@keyframes defeatTextFade{from{opacity:0}to{opacity:1}}
@keyframes defeatXpFill{from{transform:scaleX(0);filter:brightness(1.55)}to{transform:scaleX(1);filter:brightness(1)}}
@media(prefers-reduced-motion:reduce){.defeat-art,.defeat-art-whole,.defeat-art-broken,.defeat-blood-flash,.defeat-strip,.defeat-source,.defeat-copy,.defeat-footer,.defeat-footer .xp-gain,.defeat-footer .xp-bar i{animation:none!important}.defeat-art-whole{opacity:0}.defeat-art-broken,.defeat-strip,.defeat-source,.defeat-copy,.defeat-footer{opacity:1}.defeat-blood-flash{display:none}}
@media(max-height:640px){
  .defeat-strip{height:84px;margin-top:min(45svh,calc(100svh - 424px - env(safe-area-inset-bottom,0px)))}
  .defeat-strip:after{left:16px;right:16px;bottom:14px}
  .defeat-heading{left:17px;right:15px;bottom:21px}
  .defeat-heading small{margin-bottom:3px;font-size:11px}
  .defeat-heading h1{font-size:24px}
  .defeat-source{width:calc(100% - 28px);min-height:15px;margin-top:4px;gap:6px;font-size:11px}
  .defeat-source img{width:14px;height:14px}
  .defeat-copy{width:calc(100% - 28px);margin-top:4px}
  .defeat-copy-avatar{width:44px;height:44px}
  .defeat-copy p{font-size:18px;line-height:1.28}
  .defeat-copy-avatar+p{padding-left:50px}
  .defeat-footer{gap:6px;margin-top:6px}
  .defeat-footer .xp-panel{padding:8px 10px}
  .defeat-footer .xp-hd{margin-bottom:4px}
  .defeat-footer .xp-need{margin-top:3px;font-size:12px}
  .defeat-footer>.btn{padding:9px 16px;font-size:15px}
}

/* MENU */
.menu{justify-content:center;align-items:stretch}
.menu-inner{position:relative;z-index:2;margin:calc(14px + var(--sat,0px)) 14px calc(14px + var(--sab));text-align:center}
.menu .kick{color:#8a6a3a}
.menu-logo{position:relative;display:flex;align-items:center;justify-content:center;width:min(100%,390px);height:68px;margin:0 auto}
.menu-logo .logo-thread{position:absolute;z-index:0;left:50%;top:50%;width:min(100%,366px);height:auto;transform:translate(-50%,-50%);pointer-events:none}
.menu h1{position:relative;z-index:1;font-size:56px;line-height:1;color:#21170d;margin:6px 0 4px;padding:0 13px}
.menu h1 .red{color:#9a1f1c}
.menu .tag{font-family:var(--script);font-size:17px;color:var(--pbrown);margin-bottom:12px}
.menu .foot{font-size:11px;color:#7a6a4a;margin-top:10px}
.pereskaz-chip{display:inline-block;background:rgba(154,31,28,.12);border:1.5px solid #9a1f1c;color:#9a1f1c;border-radius:12px;padding:4px 12px;font-size:13px;margin-bottom:8px}
.diff-pick{display:flex;gap:8px;margin:2px 0 8px}
.diff{flex:1;display:flex;flex-direction:column;align-items:center;gap:1px;padding:7px 4px;border-radius:10px;border:1.5px solid var(--pline);background:transparent;color:var(--pbrown);cursor:pointer;font-family:var(--serif);opacity:.72;transition:transform .12s,opacity .15s}
.diff:hover{transform:translateY(-1px)}
.diff .di{width:24px;height:24px;object-fit:contain;margin-bottom:1px}
.diff .d-name{font-family:var(--disp);font-size:13px}
.diff .d-sub{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--pline)}
.diff.on{border-color:#9a1f1c;background:rgba(154,31,28,.12);opacity:1}
.diff.on .d-sub{color:#9a1f1c}
/* описание сложности: фикс. высота (не скачет) + рукописная перепись */
/* Рукописный Marck Script читается заметно хуже наборного при том же кегле: тонкий штрих, мелкий
   x-height, а лежит он на текстурном пергаменте. 14.5px с межстрочным 1.28 — на грани. Поднимаем
   кегль, разводим строки и добавляем контраста; гарнитуру не трогаем — это голос сказительницы. */
.diff-tag{font-family:var(--script);font-size:clamp(15.5px,4.4vw,17.5px);line-height:1.5;color:#3a2510;min-height:112px;display:flex;align-items:center;justify-content:center;text-align:center;margin-bottom:8px;padding:2px 6px}
@keyframes dtOut{from{clip-path:inset(0 0 0 0);opacity:1}to{clip-path:inset(0 0 0 100%);opacity:0}}
@keyframes dtIn{from{clip-path:inset(0 100% 0 0);opacity:0}to{clip-path:inset(0 0 0 0);opacity:1}}
.diff-lbl{color:var(--gold-hi)}
/* отдельный экран сложности — вертикальный список */
.diff-h{margin:0 0 2px}
.diff-pick.col{flex-direction:column;gap:9px;margin:6px 0 8px}
.diff-pick.col .diff{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;align-items:center;justify-items:start;column-gap:14px;row-gap:0;padding:9px 15px}
.diff-pick.col .diff .di{grid-column:1;grid-row:1/3;width:34px;height:34px;margin:0}
.diff-pick.col .diff .d-name{grid-column:2;grid-row:1;font-size:18px;line-height:1.1}
.diff-pick.col .diff .d-sub{grid-column:2;grid-row:2;margin:0}
/* компактнее кнопки главного экрана */
.menu .panel-in{gap:8px}
.menu-row{display:flex;gap:8px;justify-content:center;margin-top:11px}
/* кнопка установки: иконка + текст */
#btn-install{display:flex;align-items:center;justify-content:center;gap:8px}
#btn-install .mi{width:22px;height:22px;object-fit:contain}
/* строка иконок-кнопок (об игре / поделиться / обновить) в стиле иконок сложности */
/* гейт установки */
.gate .ins-ico{width:88px;height:88px;border-radius:20px;box-shadow:0 8px 22px rgba(0,0,0,.4);border:1px solid rgba(122,90,48,.5);margin:0 auto 4px}
.gate-txt{font-family:var(--serif);font-size:15px;line-height:1.5;color:var(--pbrown);text-align:center;margin:4px 4px 6px}
.gate-hint{font-family:var(--serif);font-size:13px;line-height:1.45;color:var(--pmut);text-align:center;margin:2px 4px}
.gate-hint b{color:var(--pbrown)}
/* все кнопки главного экрана — Ruslan Display + компактная раскладка с иконкой (в 1 строку) */
.menu .btn,.menu .ib-lbl{font-family:var(--disp)}
.menu .panel-in>.btn{display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;font-size:15px;padding:11px 12px}
.menu .panel-in>.btn.big{font-size:18px}
.menu .panel-in>.btn.sm{font-size:13px;padding:8px 10px}
.menu .panel-in>.btn .mi{width:18px;height:18px;flex:none}
.menu-icons{display:flex;gap:9px;justify-content:center}
.icon-btn{width:46px;height:46px;padding:0;display:flex;align-items:center;justify-content:center;border:1.5px solid var(--pline);border-radius:12px;background:rgba(120,80,40,.06);cursor:pointer;transition:transform .12s,border-color .15s,background .15s}
.icon-btn:hover,.icon-btn:active{transform:translateY(-1px);border-color:#9a1f1c;background:rgba(154,31,28,.1)}
.icon-btn .mi{width:26px;height:26px;object-fit:contain}
.audio-toggle{position:relative;color:#351f12}
.audio-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
.audio-settings .icon-btn{display:flex;flex-direction:row;gap:6px;width:100%;height:34px;padding:5px 10px;border-radius:9px}
.audio-settings .icon-btn .mi{width:20px;height:20px}
.audio-svg{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
.audio-toggle.off{opacity:.48;background:rgba(45,32,20,.12)}
.audio-toggle.off::after{content:'';position:absolute;width:31px;height:2px;background:#8f2020;transform:rotate(-43deg);box-shadow:0 1px 0 #ead7aa}

/* Покупка и обратная связь продолжают визуальный язык главного меню. */
.commerce-menu .panel-in{gap:8px}.commerce-menu h2{font-size:28px;line-height:1}
.commerce-lead{display:flex;flex-direction:column;gap:2px;margin:0 3px 2px;color:var(--pmut);font:13px/1.25 var(--serif);text-align:center}.commerce-lead b{color:#8f241d;font:14px var(--disp);font-weight:400}
.act-offer{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;width:100%;height:88px;padding:10px 10px 9px;overflow:hidden;border:2px solid #6f4a27;border-radius:5px;background:#23170f;color:#f4e5c3;text-align:left;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(244,220,171,.5),0 3px 7px rgba(42,22,8,.28)}
.act-offer.full-pass{height:128px;border-color:#c79335;box-shadow:inset 0 0 0 1px #f0ca70,0 4px 11px rgba(93,50,12,.35)}
.act-collage{position:absolute;z-index:-2;inset:0;display:grid;grid-template-columns:repeat(3,1fr);background:#1b130e}.act-collage.five{grid-template-columns:repeat(5,1fr)}.act-collage i{position:relative;background-position:center;background-size:cover;filter:saturate(1.08) contrast(1.05)}.act-collage i+i{margin-left:-10px;clip-path:polygon(15% 0,100% 0,85% 100%,0 100%)}
.act-offer:before{content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,rgba(12,8,6,.9) 0,rgba(16,10,7,.68) 56%,rgba(12,8,6,.82) 100%)}.act-offer:after{content:'';position:absolute;z-index:0;inset:0;border-top:1px solid rgba(255,225,162,.35);pointer-events:none}
.act-copy{position:relative;z-index:1;display:flex;min-width:0;flex-direction:column;text-shadow:0 2px 3px #000}.act-copy small{color:#e9c66f;font:12px/1 var(--disp);letter-spacing:.08em}.act-copy b{margin:3px 0 2px;color:#fff2cf;font:19px/1 var(--disp);font-weight:400}.act-copy em{overflow:hidden;color:#e6d8bb;font:12px/1.1 var(--serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis}.act-copy em br{display:block}
.act-price{position:relative;z-index:2;display:flex;flex-direction:column;align-items:flex-end;margin-left:7px;padding:5px 7px;border:1px solid rgba(248,216,145,.62);border-radius:5px;background:rgba(31,18,9,.78);box-shadow:0 2px 7px #0008}.act-price b{color:#ffd675;font:20px/1 var(--disp);font-weight:400;white-space:nowrap}.act-price small{margin-top:3px;color:#f0dfbe;font:10px/1 var(--serif);white-space:nowrap}.act-price.sale{justify-content:center}.act-price del{margin-bottom:3px;color:#d8c5a5;font:13px/1 var(--disp);text-decoration-color:#e35243;text-decoration-thickness:2px;white-space:nowrap}
.full-pass .act-copy b{font-size:clamp(18px,5.3vw,22px);white-space:nowrap}.full-pass .act-price b{font-size:25px}.full-pass .act-price{border-color:#e2b954;background:rgba(92,43,7,.8)}.act-two{height:96px}
.act-offer.coming{cursor:not-allowed;border-color:#60564b}.act-offer.coming .act-collage{filter:grayscale(.9) sepia(.2) brightness(.46)}.act-offer.coming:before{background:linear-gradient(90deg,rgba(18,16,14,.94),rgba(20,18,16,.76) 58%,rgba(13,12,11,.9))}.act-offer.coming .act-copy small,.act-offer.coming .act-price b{color:#c5b9a3}.act-offer.coming .act-copy b{color:#ded5c5}.act-offer.coming .act-copy em,.act-offer.coming .act-price small{color:#a99f90}.act-offer.coming .act-price{border-color:#6c6256;background:rgba(20,18,16,.8)}
.act-status{position:absolute;z-index:3;right:-22px;top:8px;width:104px;padding:2px 0;transform:rotate(24deg);border-top:1px solid #d2b06a;border-bottom:1px solid #d2b06a;background:rgba(111,24,21,.92);color:#f0d7a7;font:12px/1 var(--disp);letter-spacing:.08em;text-align:center;box-shadow:0 2px 5px #0008}
.commerce-rule{display:flex;align-items:center;gap:8px;color:#80613c;font:16px var(--script)}.commerce-rule:before,.commerce-rule:after{content:'';height:1px;flex:1;background:rgba(122,90,48,.45)}
.purchase-contact-wrap,.error-report-wrap,.code-activation-wrap{padding:12px}.purchase-contact,.error-report,.code-activation{width:min(370px,calc(100vw - 24px))}.purchase-contact .modal-in,.error-report .modal-in,.code-activation .modal-in{align-items:stretch;gap:10px;text-align:center}.error-report-title{display:flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap}.error-report-spider{width:28px;height:28px;flex:0 0 28px;object-fit:contain}.error-report-title h3{padding:0;font-size:22px}.purchase-contact h3,.error-report h3,.code-activation h3{font:26px/1.05 var(--disp);font-weight:400;color:#8f241d}.error-report-title h3{font-size:22px}.purchase-contact p{margin:3px 0 5px;color:#4c351f;font:16px/1.45 var(--serif)}.purchase-contact .btn{display:block;width:100%;text-decoration:none;text-align:center}
.install #m-btns{display:grid;grid-template-columns:1fr;gap:8px;width:100%}.install #m-btns .btn{width:100%;min-height:38px;margin:0}
.report-field{display:flex;flex-direction:column;gap:6px;text-align:left}.report-field>span{color:#66472b;font:14px var(--disp)}.report-field textarea,.report-field input{width:100%;min-height:44px;padding:10px 11px;border:1.5px solid #846139;border-radius:6px;outline:none;background:rgba(250,235,198,.55);color:#382417;font:15px/1.35 var(--serif);box-shadow:inset 0 2px 7px rgba(70,42,18,.14)}.report-field textarea{min-height:100px;resize:vertical}.error-report .report-field textarea{height:82px;min-height:82px}.report-field textarea:focus,.report-field input:focus{border-color:#9a1f1c;box-shadow:0 0 0 2px rgba(154,31,28,.1),inset 0 2px 7px rgba(70,42,18,.14)}.report-field textarea::placeholder,.report-field input::placeholder{color:#846f55}
.report-shot-picker{display:flex;flex-direction:column;gap:7px;padding:9px 10px;border:1px solid rgba(122,90,48,.55);border-radius:6px;background:rgba(96,61,29,.06);color:#4a321e;text-align:left}.report-shot-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.report-shot-head b{font:14px var(--disp);font-weight:400}.report-shot-head small{color:#74583a;font:12px var(--serif)}.report-shot-empty{display:flex;gap:7px}.report-shot-empty .btn{display:flex;flex:1;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:6px 8px}.report-action-icon{width:18px;height:18px;object-fit:contain}.report-shot-empty[hidden],.report-shot-preview[hidden]{display:none}.report-shot-preview{display:flex;min-width:0;flex-direction:column;gap:6px}.report-shot-list{display:grid;max-height:127px;grid-template-columns:repeat(3,72px);justify-content:center;gap:8px 10px;overflow-y:auto;scrollbar-width:thin}.report-shot-card{position:relative;display:grid;width:72px;grid-template-rows:98px auto;gap:3px;margin:0}.report-shot-card>img{width:72px;height:98px;border:1px solid #80613c;border-radius:4px;background:#21170f;object-fit:contain}.report-shot-card figcaption{display:flex;min-width:0;flex-direction:column}.report-shot-card b{overflow:hidden;font:10px/1.15 var(--serif);text-overflow:ellipsis;white-space:nowrap}.report-shot-card small{color:#74583a;font:9px/1.15 var(--serif)}.report-shot-card>button{position:absolute;right:3px;top:3px;display:grid;width:22px;height:22px;padding:2px;border:1px solid #6f211d;border-radius:50%;background:#ead9b8;place-items:center;box-shadow:0 1px 3px #0008;cursor:pointer}.report-shot-card>button img{width:15px;height:15px;object-fit:contain}.report-shot-actions{display:flex;align-items:center;gap:6px}.report-shot-actions button{display:flex;align-items:center;gap:4px;min-height:27px;padding:4px 7px;border:1px solid #85633a;border-radius:5px;background:rgba(245,226,185,.72);color:#61241f;font:11px var(--serif);box-shadow:0 1px 2px #5c3b1f33;cursor:pointer}.report-shot-actions button img{width:16px;height:16px;object-fit:contain}.report-shot-actions small{margin-left:auto;color:#74583a;font:11px var(--serif)}.form-error{min-height:16px;margin:0;color:#91261e;font:13px/1.2 var(--serif)}
@media(max-height:600px){.error-report .modal-in{gap:4px}.error-report .report-field textarea{height:40px;min-height:40px}}

.demo-locked-button{flex-direction:column;gap:1px!important;padding:5px 12px!important;border-color:#817b72!important;color:#4f4b45!important;background:rgba(86,82,76,.08)!important}
.demo-locked-button .demo-lock-label{color:#746f67;font:10px/1.05 var(--serif);font-weight:400;letter-spacing:.03em}
.access-gate{display:flex;min-height:240px;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:22px;color:#4f351f;text-align:center}
.access-gate>img{width:46px;height:46px;object-fit:contain;filter:sepia(.5) saturate(.8)}.access-gate h2{margin:2px 0 0;color:#92261e;font:24px/1.12 var(--disp);font-weight:400}.access-gate p{max-width:280px;margin:0;color:#674b2e;font:15px/1.4 var(--serif)}.access-gate .btn{min-width:150px;margin-top:3px}
.access-inline{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:82px;padding:12px;border:1px dashed #8d2b22;background:rgba(141,43,34,.07);color:#5d3923;text-align:left}.access-inline>img{width:30px;height:30px;object-fit:contain;filter:sepia(.4)}.access-inline span{display:flex;flex-direction:column;gap:3px}.access-inline b{color:#92261e;font:15px/1.15 var(--disp);font-weight:400}.access-inline small{color:#70472a;font:13px var(--serif);text-decoration:underline}
.access-mini-label{position:absolute;z-index:6;right:4px;top:4px;display:block;padding:2px 4px;border:1px solid #d39b43;border-radius:3px;background:#7d1e1a;color:#f3d69a!important;font:12px/1 var(--disp)!important;letter-spacing:.04em;text-shadow:0 1px 2px #000!important}

@media(max-width:340px), (max-height:720px){
  .commerce-menu .panel-in{gap:4px}.commerce-menu h2{font-size:23px}.commerce-lead{font-size:11px;line-height:1.15}.commerce-lead b{font-size:12px}
  .act-offer{height:72px;padding:6px 7px 5px}.act-offer.full-pass{height:98px}.act-offer.act-two{height:78px}.act-copy small{font-size:12px}.act-copy b{margin:2px 0 1px;font-size:14px}.act-copy em{font-size:10px;line-height:1.05}.act-price{margin-left:4px;padding:4px 5px}.act-price b{font-size:15px}.act-price small{font-size:9px}.act-price del{font-size:11px}.full-pass .act-copy b{font-size:18px}.full-pass .act-price b{font-size:18px}.act-status{top:5px;font-size:12px}
}

/* HEROES */
.heroes{background:var(--ink)}
.heroes .veil{background:rgba(5,6,10,.8)}
.hd{display:flex;gap:12px;align-items:center;padding:calc(16px + var(--sat)) 18px 4px;position:relative;z-index:2}
.hd h2{color:var(--cream);font-size:18px}
.hero-list{display:flex;flex-direction:column;gap:12px;padding:8px 16px calc(16px + var(--sab));position:relative;z-index:2}
.hero-card{display:flex;gap:10px;background:var(--walnut);box-shadow:inset 0 0 0 1px rgba(200,163,90,.4);border-radius:12px;overflow:hidden;padding:8px;min-height:126px}
.hero-card.locked{background:#141019;box-shadow:inset 0 0 0 1px rgba(232,226,208,.1);opacity:.6;filter:grayscale(.4)}
.hp-img{position:relative;width:88px;border-radius:8px;flex:none;background-size:cover;background-position:center 12%;box-shadow:inset 0 0 0 2px rgba(63,209,196,.5)}
.hero-card.locked .hp-img{box-shadow:none}
/* уровень класса + прогресс на экране выбора */
.hp-lvl-badge{position:absolute;top:-6px;left:-6px;background:rgba(8,9,14,.92);border:1.5px solid var(--gold);border-radius:9px;padding:1px 6px;font-family:var(--disp);font-size:12px;color:var(--gold-hi);box-shadow:0 2px 6px rgba(0,0,0,.6)}
.hp-xp{display:flex;flex-direction:column;gap:2px;margin:1px 0}
.hp-xp-bar{position:relative;height:6px;border-radius:4px;background:rgba(8,9,14,.7);border:1px solid rgba(217,164,65,.3);overflow:hidden}
.hp-xp-bar i{display:block;height:100%;background:linear-gradient(90deg,#b9822c,var(--gold-hi));transition:width .3s}
.hp-xp-bar.max i{background:linear-gradient(90deg,#c98a2c,#f3c96b)}
.hp-xp-lbl{font-size:11px;color:#c9b78f;letter-spacing:.02em}
.hp-info{padding:2px 2px 2px 0;display:flex;flex-direction:column;gap:3px;min-width:0}
.hp-name{font-family:var(--disp);font-size:15px;color:var(--cream);font-weight:400}
.hp-vice{font-size:13px;color:#ff8a8a}
.hp-vice-desc{font-size:13px;color:var(--bone-dim);font-style:italic}
.hp-desc{font-size:13px;line-height:1.35;color:#b8b2a4}
.hp-info .btn{align-self:flex-start;margin-top:auto;font-family:var(--disp);font-size:15px;padding:8px 18px}
.lock{font-size:13px;color:#8a8578;margin-top:auto}

/* MAP — пергаментный свиток */
.map-inner{position:relative;z-index:2;padding:calc(3px + var(--sat)) 14px calc(16px + var(--sab));display:flex;flex-direction:column;min-height:100%}
.hd-row{display:flex;gap:8px;align-items:center}
/* HUD-полоса на не-боевых экранах (события/торг/привал/клад): обёртка гасит минус-марджины .hud */
.rhud{position:relative;z-index:3;padding:calc(3px + var(--sat)) 14px 0;flex:none}
.rhud .hud{margin:0}
.hud{display:flex;align-items:center;gap:11px;background:url('../img/_parch.webp') center/cover;border:none;border-top:2px solid #1a120a;border-bottom:2px solid #1a120a;border-radius:0;padding:9px 14px;margin:0 -14px 14px;position:relative;z-index:3;box-shadow:0 5px 15px rgba(0,0,0,.42),inset 0 0 34px rgba(120,80,30,.13)}
.map-inner>.hud{margin-bottom:0}
.hud-portrait{position:relative;width:58px;height:58px;border-radius:9px;border:2px solid #1a120a;background-size:cover;background-position:center;flex:none}
.hud-portrait .ph-badge{bottom:-4px;right:-4px;min-width:21px;height:21px;font-size:13px;background:radial-gradient(circle at 40% 34%,#c0342f,#7a1010)!important;color:#f4e2c0!important;border:1px solid #4a0808!important;box-shadow:0 1px 3px rgba(0,0,0,.5)}
.hud-portrait.clickable{cursor:pointer;transition:border-color .15s,transform .12s}
.hud-portrait.clickable:hover,.hud-portrait.clickable:active{border-color:#7a1616;transform:translateY(-1px)}
/* HUD в пергаментно-чернильном стиле (цвета сохранены) */
.hud .hud-name{color:#8f2020;text-shadow:0 1px 0 rgba(255,255,255,.28)}
.hud .bar.body{background:#e6d6ad;border:1.5px solid #1a120a;box-shadow:inset 0 1px 2px rgba(90,60,20,.35)}
.hud .bar.body .bar-txt{color:#241a0e;text-shadow:0 1px 0 rgba(255,255,255,.35)}
.hud .bar .seg{background:rgba(60,40,16,.7)}
.hud .telo-ic{display:none}
.hud .gold-chip{background:rgba(226,206,158,.62);border:1.5px solid #7a5a1a;color:#7a4310}
.hud .hud-deck{background:rgba(226,206,158,.55);border:1.5px solid #1a120a;color:#3a2a16}
.hud .hud-deck:hover,.hud .hud-deck:active{border-color:#7a1616}
.hud .hud-deck b{color:#3a2410}
.hud .hud-deck .hd-svg{display:block}
.hud-portrait .inv-hint{position:absolute;top:-7px;left:-7px;width:20px;height:20px;border-radius:50%;background:rgba(8,9,14,.92);border:1.5px solid rgba(217,164,65,.7);display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(0,0,0,.5)}
.row-btns{display:flex;gap:9px;justify-content:center;flex-wrap:wrap}
.hud-mid{flex:1;min-width:0}
.hud-top{display:flex;justify-content:space-between;align-items:baseline;gap:6px}
.hud-name{font-family:var(--disp);font-size:15px;color:var(--cream);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hud-phase{font-family:var(--disp);font-size:13px;flex:none}
.hud-phase.p1{color:var(--teal)}.hud-phase.p2{color:var(--gold-hi)}.hud-phase.p3{color:var(--blood-hi)}
.hud-mid .bar{margin-top:4px}
.hud-relics{margin-top:6px;justify-content:flex-start;gap:5px}
.hud-relics .relic{width:26px;height:26px;font-size:15px}
.hud-deck{flex:none;align-self:stretch;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:44px;background:rgba(12,13,20,.7);border:1px solid rgba(201,152,46,.35);border-radius:11px;color:var(--bone);cursor:pointer;font-family:inherit;transition:transform .12s}
.hud-deck:hover,.hud-deck:active{transform:translateY(-1px);border-color:var(--gold)}
.hud-deck .hd-card{width:14px;height:18px;border:1.5px solid #d9a441;border-radius:3px;display:block}
.hud-deck b{font-family:var(--disp);font-size:13px;color:#e0c08a;font-weight:400}
.act-strip{text-align:center;font-size:13px;color:#c9b78f;padding:6px 10px 2px;letter-spacing:.02em}
.map-hint{text-align:center;font-family:var(--script);font-size:16px;color:#e0c08a;margin:0 0 6px;text-shadow:0 1px 3px #000}
.screen.map{overflow:hidden}
/* карта всплывает снизу на пергаменте после выбора маршрута у камня */
.map-rise .scroll-wrap{animation:mapRise 1.15s cubic-bezier(.16,.82,.28,1) both}
@keyframes mapRise{0%{transform:translateY(72%) scale(.97);opacity:0}55%{opacity:1}100%{transform:translateY(0) scale(1);opacity:1}}
/* Путевой камень — развилка на входе в биом */
.screen.waystone{background-size:cover;background-position:center;display:flex;flex-direction:column;justify-content:space-between;
  padding:calc(20px + var(--sat)) 16px calc(26px + var(--sab));animation:wsIn .5s ease both}
@keyframes wsIn{from{opacity:0}to{opacity:1}}
.screen.waystone.ws-leave{animation:wsOut .42s ease forwards}
@keyframes wsOut{to{opacity:0;transform:scale(1.04)}}
.waystone .ws-hd{text-align:center;background:rgba(238,224,190,.9);border:1.5px solid #7a5a30;border-radius:12px;padding:8px 14px;
  box-shadow:0 4px 14px rgba(0,0,0,.5);align-self:center}
.waystone .ws-title{font-family:var(--disp);font-size:24px;color:#8f2020;letter-spacing:.03em}
.waystone .ws-sub{font-family:var(--script);font-size:16px;color:#5a4326;margin-top:2px}
/* Подписи-дороги: старорусский шрифт (Ruslan Display) на пергаментной подложке для читаемости */
/* раскладка: Чаща сверху по центру, Опушка+Болота ниже в ряд; все кнопки одинаковые */
.waystone .ws-routes{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}
.waystone .ws-row{display:flex;gap:16px;justify-content:center}
.waystone .ws-label{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;
  width:158px;min-height:76px;padding:8px 12px;border:2px solid #6a4a24;border-radius:12px;background:rgba(238,224,190,.93);
  box-shadow:0 5px 16px rgba(0,0,0,.6);transition:transform .12s,box-shadow .12s;text-align:center}
.waystone .wl-name{font-family:var(--disp);font-size:24px;line-height:1;color:#1a120a;letter-spacing:.02em;white-space:nowrap}
.waystone .wl-go{font-family:var(--disp);font-size:15px;color:#8f1414}
.waystone .wl-fog{font-family:var(--serif);font-size:13px;color:#5a4326;display:flex;align-items:center;gap:3px}
.waystone .ws-lock{width:12px;height:12px;object-fit:contain;opacity:.85}
/* открытая дорога — золотая подложка, кровь-красный текст, пульс */
.waystone .ws-label.open{border-color:#c9982e;background:rgba(246,233,198,.97);
  box-shadow:0 6px 18px rgba(0,0,0,.6),0 0 0 2px rgba(201,152,46,.55),0 0 20px rgba(201,152,46,.5);animation:wlPulse 1.6s ease-in-out infinite}
.waystone .ws-label.open .wl-name{color:#8f1414}
.waystone .ws-label.open:active{transform:scale(.96)}
@keyframes wlPulse{0%,100%{box-shadow:0 6px 18px rgba(0,0,0,.6),0 0 0 2px rgba(201,152,46,.5),0 0 16px rgba(201,152,46,.4)}50%{box-shadow:0 6px 20px rgba(0,0,0,.6),0 0 0 2px rgba(201,152,46,.85),0 0 28px rgba(201,152,46,.8)}}
.waystone .ws-label.locked{cursor:default;opacity:.9;filter:grayscale(.35)}
.waystone .ws-label.locked .wl-name{color:#4a3a2a}
/* На развилке Акта II подписи привязаны к изображённым дорогам:
   Деревня выше самого поселения, Поля и Река ниже своих ориентиров. */
.act2-crossroads .ws-routes{justify-content:center;gap:0;transform:translateY(-34px)}
.act2-crossroads .ws-c{transform:translateY(-92px)}
.act2-crossroads .ws-row{transform:translateY(88px)}
.act2-crossroads .ws-label.open:active{transform:none}
.act2-crossroads .ws-c.open:active{transform:translateY(-92px)}
/* свиток */
.scroll-wrap{position:relative;flex:1;min-height:0;border-radius:10px;overflow:hidden;background:linear-gradient(150deg,var(--pink1),#ddc99f 52%,#cdb488);box-shadow:0 16px 40px rgba(0,0,0,.55),inset 0 0 60px rgba(120,86,40,.4),inset 0 0 0 2px rgba(90,61,32,.5);display:flex;flex-direction:column}
.map{--map-ink:#6b4a2a;--map-done:#6b4a2a;--map-live:#a5771f;--map-ring:201,152,46;--map-title:#5a3d20;--map-muted:#7a2f2a;--map-paper-a:#ead9ae;--map-paper-b:#ddc99f;--map-paper-c:#cdb488}
.map .scroll-wrap{background:linear-gradient(150deg,var(--map-paper-a),var(--map-paper-b) 52%,var(--map-paper-c))}
.scroll-wrap::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 18% 22%,rgba(120,80,40,.28),transparent 26%),radial-gradient(circle at 82% 78%,rgba(120,80,40,.24),transparent 24%);pointer-events:none;z-index:1}
.scroll-hd{position:relative;text-align:center;padding-top:10px;z-index:2}
.scroll-hd .s-title{display:flex;align-items:center;justify-content:center;gap:9px;font-family:var(--disp);font-size:24px;letter-spacing:.04em;color:var(--pbrown)}
.s-act{color:#9a1f1c;font-size:24px}
.s-diff{width:26px;height:26px;object-fit:contain;flex:none}
.scroll-hd .s-sub{font-family:var(--serif);font-size:15px;font-weight:700;letter-spacing:.02em;color:#4b341e}
.worldwrap{position:relative;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:6px 0;z-index:2}
.worldmap-fit{position:relative;margin:0 auto}
.worldmap{position:absolute;top:0;left:0;margin:0;transform-origin:top left}
.map-art{position:absolute;left:-24px;right:-24px;top:-20px;bottom:-12px;z-index:0;pointer-events:none;background-position:center;background-repeat:no-repeat;background-size:100% 100%;opacity:.72;mix-blend-mode:multiply;
  /* Верхний край растворяется в пергаменте формой угольной кромки реплик Сказительницы.
     Маска применяется только к фоновому арту; дороги, узлы и портреты остаются нетронутыми. */
  -webkit-mask-image:url('../img/ui_narrator_charcoal.png'),linear-gradient(to bottom,#000 0,#000 97.8%,transparent 100%);
  -webkit-mask-size:100% 126px,100% calc(100% - 82px);-webkit-mask-position:center top,center 82px;-webkit-mask-repeat:no-repeat,no-repeat;-webkit-mask-composite:source-over;
  mask-image:url('../img/ui_narrator_charcoal.png'),linear-gradient(to bottom,#000 0,#000 97.8%,transparent 100%);
  mask-size:100% 126px,100% calc(100% - 82px);mask-position:center top,center 82px;mask-repeat:no-repeat,no-repeat;mask-composite:add}
.biome-chascha .map-art{background-image:url('../img/map-art-chascha.webp')}
.biome-opushka .map-art{background-image:url('../img/map-art-opushka.webp')}
.biome-village .map-art{background-image:url('../img/village/map.webp');opacity:.82}
.biome-swamp .map-art{opacity:.58;filter:sepia(.12) saturate(.72) contrast(.92) brightness(1.12)}
.map-art.pending{opacity:0!important}
.paths{position:absolute;left:0;top:0;z-index:1;pointer-events:none;overflow:visible}
.map-motifs{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}.map-motif{position:absolute;height:auto;transform:translateY(-50%);opacity:.3;filter:grayscale(.28) sepia(.18) saturate(.72) contrast(1.18);mix-blend-mode:multiply}.map-motif.mirror{transform:translateY(-50%) scaleX(-1)}
.map-ornament{position:absolute;width:112px;height:42px;transform:translateY(-50%);overflow:visible;opacity:.2;fill:none;stroke:var(--map-ink);stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round;mix-blend-mode:multiply}.map-ornament.mo-left{left:-24px}.map-ornament.mo-right{right:-24px}.map-ornament.mirror{transform:translateY(-50%) scaleX(-1)}.map-ornament .orn-leaf{fill:var(--map-ink);fill-opacity:.14;stroke-width:1.05}
.route path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.route-border{stroke:var(--map-ink);stroke-width:10;opacity:.62}
.route-road{stroke:#ead9ae;stroke-width:6;opacity:.9}
.route.done .route-border{stroke:var(--map-done);opacity:.78}
.route.done .route-road{stroke:#d9c493;opacity:.96}
.route.done,.route.closed{opacity:.34}
.route.closed .route-border{stroke:#746f65;opacity:.7}
.route.closed .route-road{stroke:#d6d0c2;opacity:.82}
.route.on .route-border{stroke:var(--map-live);stroke-width:11;opacity:.98}
.route.on .route-road{stroke:#f0dfb5;stroke-width:7;opacity:1}
.mnode{position:absolute;transform:translate(-50%,-50%);width:48px;height:48px;border-radius:50%;border:2px solid #3f2c1b;background:radial-gradient(circle at 42% 35%,#f1e2bd 0 54%,#d6bf8e 100%);color:#382516;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px rgba(239,221,181,.96),0 0 0 4px rgba(63,44,27,.82),0 3px 8px rgba(60,40,18,.38),inset 0 0 0 2px rgba(92,62,34,.28);z-index:3;cursor:default;padding:0;font-family:var(--disp);font-size:18px}
.mnode:disabled{cursor:default}
.mnode.far{opacity:1}
.mnode.done,.mnode.closed{opacity:.56;border-color:#77736b;background:radial-gradient(circle at 42% 35%,#e3dfd3 0 54%,#c8c3b7 100%);filter:grayscale(1) brightness(1.02);box-shadow:0 0 0 2px rgba(228,223,210,.82),0 0 0 4px rgba(105,101,94,.62),0 2px 6px rgba(40,38,34,.24),inset 0 0 0 2px rgba(100,96,88,.2)}
.mnode.cur{border-color:#7f211e;background:radial-gradient(circle at 42% 35%,#f5e8c5 0 54%,#dcc393 100%);box-shadow:0 0 0 2px rgba(242,224,184,.98),0 0 0 5px rgba(127,33,30,.84),0 3px 10px rgba(60,40,18,.5);opacity:1}
.mnode.cur{overflow:hidden}
.mnode.t-entry{width:56px;height:56px;overflow:visible;border-color:#7f211e;box-shadow:0 0 0 2px rgba(242,224,184,.98),0 0 0 5px rgba(127,33,30,.72),0 3px 10px rgba(60,40,18,.5)}
.mnode.t-entry .mi-current-hero{overflow:hidden}
.mnode.t-entry.done{opacity:.62}
.mi-current-hero{display:block;width:100%;height:100%;max-width:none;max-height:none;border-radius:50%;object-fit:cover;object-position:center 22%;transform:scale(1.08)}
.mnode.reach{cursor:pointer;border-color:#4c351e;background:radial-gradient(circle at 42% 35%,#f5e6bd 0 54%,#d9c18d 100%);opacity:1;animation:glowGold 2.4s ease-in-out infinite}
@keyframes glowGold{0%,100%{box-shadow:0 0 0 2px rgba(244,226,186,.98),0 0 0 5px rgba(var(--map-ring),.78),0 0 0 7px rgba(69,47,26,.72),0 3px 9px rgba(60,40,18,.45)}50%{box-shadow:0 0 0 2px rgba(244,226,186,.98),0 0 0 6px rgba(var(--map-ring),.96),0 0 0 8px rgba(69,47,26,.78),0 0 15px rgba(var(--map-ring),.52)}}
.mnode.reach:hover,.mnode.reach:active{transform:translate(-50%,-50%) scale(1.1)}
.mnode.t-boss{width:75px;height:75px;font-size:24px;border-width:3px;border-color:#742825;color:#7a1f1c;overflow:hidden}
.mn-lbl{position:absolute;transform:translateX(-50%);width:82px;padding:2px 3px;text-align:center;font-family:var(--serif);font-size:13px;font-weight:700;line-height:1.12;color:#3f2b19;white-space:normal;z-index:3;pointer-events:none;background:radial-gradient(ellipse at center,rgba(238,220,178,.94) 0 54%,rgba(238,220,178,0) 76%);text-shadow:0 1px 0 rgba(255,255,255,.45)}
.mn-lbl.type-boss{width:180px;font-size:15px}
.mn-lbl.faded{color:#614529;opacity:.76;font-size:13px}
.biome-chascha .mn-lbl{letter-spacing:.015em;text-shadow:0 1px 0 #e7dfbd,0 0 7px rgba(76,96,63,.18)}
.biome-opushka .mn-lbl{letter-spacing:.01em;text-shadow:0 1px 0 #ead9b5,0 0 7px rgba(180,75,37,.2)}
/* фигурки узлов — чернильные иконки */
.mi{width:26px;height:26px;object-fit:contain;display:block}
.mi-big{width:36px;height:36px}
.mi-boss-avatar{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block;max-width:none;max-height:none}
.mi-firebird{filter:none;object-position:center 57%;transform:scale(1.16)}
.mi-vasilisk{filter:none;object-position:center 44%;transform:scale(1.18)}
.mnode.far .mi{opacity:.75}
.mnode.t-boss .mi-boss-avatar{opacity:1}
.relic-row{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.relic{width:30px;height:30px;border-radius:50%;background:rgba(8,9,14,.82);border:1.5px solid rgba(217,164,65,.6);display:flex;align-items:center;justify-content:center;font-size:15px;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.5);transition:transform .12s}
.relic:hover,.relic:active{transform:translateY(-2px);border-color:var(--gold-hi)}
.b-top .relic-row{margin:0;gap:5px}
.b-top .relic{width:24px;height:24px;font-size:13px}

/* EVENT / ЭКРАНЫ-ПАНЕЛИ */
.event{justify-content:center;padding:20px}
.choice-event{justify-content:flex-start;padding:0;background-position:center}
.choice-event .event-veil{background:linear-gradient(180deg,rgba(5,6,10,.46),rgba(5,6,10,.58) 36%,rgba(5,6,10,.82))}
.choice-event .rhud{padding:calc(8px + var(--sat)) 10px 0}
.choice-event .hud{padding:7px 10px;gap:8px;margin:0}
.choice-event .hud-portrait{width:52px;height:52px}
.event-panel{margin:auto 10px calc(10px + var(--sab));width:calc(100% - 20px);filter:drop-shadow(0 12px 20px rgba(0,0,0,.66))}
.event-panel .panel-in{gap:8px;padding:3px 8px;border-width:30px;border-image-width:30px}
.event-kind{font-family:var(--disp);font-size:12px;letter-spacing:.18em;text-align:center;color:#795527}
.event-kind.hazard{color:#9a1f1c}
.event-panel h2{font-size:24px;line-height:1.05}
.event-panel .ev-text{font-size:13px;line-height:1.35}
.event-choices{gap:7px}
.event-choice{width:100%;min-height:57px;padding:6px 10px;border-radius:9px;text-align:left;display:flex;align-items:center;gap:9px}
.event-choice:disabled{opacity:.52;cursor:not-allowed;filter:grayscale(.25)}
.event-choice .choice-mark{width:26px;height:26px;flex:0 0 26px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#7d201c;color:#f2dfbd;font:15px var(--disp);box-shadow:inset 0 0 0 1px #4d110f}
.event-choice.leave .choice-mark{background:#756650;box-shadow:inset 0 0 0 1px #4a4032}
.choice-copy{display:flex;flex:1 1 0;min-width:0;flex-direction:column;gap:3px}
.choice-title{max-width:100%;font:13px/1.08 var(--disp);color:#3a2810;overflow-wrap:anywhere}
.choice-result{display:flex;width:100%;min-width:0;align-items:flex-start;gap:3px 9px;flex-wrap:wrap;font:13px/1.2 var(--serif);color:#6a4424}
.event-effect{display:inline-flex;max-width:100%;min-width:0;align-items:flex-start;gap:4px;white-space:normal;overflow-wrap:anywhere}
.event-effect img{width:16px;height:16px;margin-top:1px;object-fit:contain;flex:none}
.event-choice.leave .choice-title,.event-choice.leave .choice-result{color:#625744}
@media(max-width:340px), (max-height:720px){
  .event-panel{margin-top:8px}
  .event-panel .panel-in{gap:6px}
  .event-panel .ev-text{font-size:13px;line-height:1.28}
  .event-choice{min-height:52px;padding:5px 8px}
  .choice-title{font-size:13px}
  .choice-result{font-size:11px}
}

/* BATTLE */
.battle{display:flex;flex-direction:column;overflow:hidden}
.b-top{display:flex;justify-content:space-between;align-items:flex-start;padding:calc(8px + var(--sat)) 0 0;position:relative;z-index:2}
.b-chapter{position:absolute;left:50%;top:calc(30px + var(--sat));width:210px;transform:translate(-50%,-50%);display:flex;flex-direction:row;justify-content:space-between;align-items:center;line-height:1.05;color:#ead9b6;text-shadow:0 2px 5px #000,0 1px 1px #000;pointer-events:none;white-space:nowrap}
.b-chapter span{font-family:var(--disp);font-size:13px;letter-spacing:.06em}
.b-chapter b{font-family:var(--disp);font-size:18px;font-weight:400;color:#fff0cb}
.b-chapter b:last-child{transform:translateX(-20px)}
/* закладки-ленты: пергамент, без контура, горизонтальные — выходят из-за левого/правого края,
   «ласточкин хвост» вырезан на внутреннем (свободном) торце */
.b-top .b-exit,.b-top .b-gold{
  background:url('../img/_parch.webp') center/cover;border:none!important;border-radius:0!important;
  box-shadow:0 3px 8px rgba(0,0,0,.5);
  padding:8px 12px;
  min-height:44px;box-sizing:border-box;
  display:flex;flex-direction:row;align-items:center;gap:5px;
  color:#2a1c10;cursor:pointer;transition:transform .12s}
.b-top .b-exit{padding-left:16px;clip-path:polygon(0 0,100% 0,80% 50%,100% 100%,0 100%)}
.b-top .b-gold{padding-right:16px;padding-left:18px;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,20% 50%)}
.b-top .b-exit:hover,.b-top .b-exit:active,.b-top .b-gold:hover{transform:translateX(2px)}
.b-top .b-gold:hover{transform:translateX(-2px)}
.b-top .b-exit:disabled{opacity:.45;cursor:default}
.rb-ic{width:24px;height:24px;object-fit:contain;display:block}
.rb-val{font-family:var(--disp);font-weight:400;font-size:20px;line-height:1;color:#7a1410}
.b-top .b-gold .rb-ic{width:22px;height:22px}
.vow-warning-slot{position:absolute;z-index:18;top:clamp(188px,24vh,214px);left:0;width:100%;height:0;pointer-events:none}
.vow-warning{position:absolute;top:3px;left:12px;width:calc(100% - 24px);height:66px;overflow:hidden;border:1px solid rgba(205,55,64,.78);border-radius:7px;background:linear-gradient(94deg,rgba(55,13,18,.97),rgba(13,10,13,.97) 48%,rgba(37,10,13,.97));box-shadow:0 7px 18px #000b,inset 0 0 22px rgba(162,25,35,.13);color:#f2e5cd;cursor:pointer;transition:left .72s cubic-bezier(.22,.7,.2,1),width .72s cubic-bezier(.22,.7,.2,1),height .72s cubic-bezier(.22,.7,.2,1),border-radius .72s ease,transform .72s ease;transform:translateX(0);font-family:var(--serif);text-align:left}
.vow-warning-slot .vow-warning{pointer-events:auto}
.vow-warning:before{content:"";position:absolute;inset:0;background:url('../img/ui_narrator_charcoal.png') center/112% 180% no-repeat;opacity:.16;pointer-events:none}
.vow-warning:after{content:"";position:absolute;left:14px;right:14px;bottom:0;height:2px;background:linear-gradient(90deg,transparent,#d83c47 22%,#d83c47 78%,transparent);opacity:.82}
.vow-warning-open{position:absolute;z-index:1;inset:0;display:grid;grid-template-columns:108px minmax(0,1fr);align-items:center;gap:10px;padding:8px 13px;opacity:1;transition:opacity .3s ease}
.vow-warning-heading{display:flex;min-width:0;flex-direction:column;gap:3px;padding-right:10px;border-right:1px solid rgba(222,76,83,.44)}
.vow-warning-heading b{color:#f3c9a8;font:700 12px/1 var(--serif);letter-spacing:.14em}
.vow-warning-heading span{overflow:hidden;color:#fff1d9;font:700 13px/1.1 var(--serif);text-overflow:ellipsis;white-space:nowrap}
.vow-warning-copy{display:grid;grid-template-columns:14px minmax(0,1fr);grid-template-rows:auto auto;min-width:0;align-items:center;column-gap:3px;row-gap:2px;color:#efe0c8;font:700 13px/1.18 var(--serif)}
.vow-warning-copy>span{display:inline-flex;min-width:0;align-items:center;gap:4px;white-space:nowrap}
.vow-warning-copy>span:first-child{grid-column:1/3}.vow-warning-copy>span:last-child{grid-column:2;grid-row:2}
.vow-warning-copy i{grid-column:1;grid-row:2;color:#e07a71;font:700 14px/1 var(--serif);font-style:normal}
.vow-warning-trigger-copy{grid-column:1/3!important;justify-self:start;color:#fff0d7;font-size:15px}
.vow-warning-fx{display:inline-flex!important;flex:0 0 auto;align-items:center!important;gap:2px!important;margin:0!important;color:#fff4da;white-space:nowrap}
.vow-warning-fx img{display:block;width:21px;height:21px;object-fit:contain;filter:drop-shadow(0 2px 2px #000)}
.vow-warning-fx b{font:700 14px/1 var(--serif)}
.vow-warning-tab{position:absolute;z-index:2;inset:0;display:flex;align-items:center;justify-content:center;gap:7px;padding-left:8px;opacity:0;transition:opacity .26s .34s ease}
.vow-warning-tab>b{color:#f5dfc5;font:700 12px/1 var(--serif);letter-spacing:.09em}
.vow-warning-tab>span{display:flex;align-items:center;gap:2px}
.vow-warning-tab img{display:block;width:18px;height:18px;object-fit:contain;filter:drop-shadow(0 2px 2px #000)}
.vow-warning-slot.collapsed .vow-warning{left:calc(100% - 120px);width:121px;height:42px;border-right:0;border-radius:8px 0 0 8px;transform:translateY(1px)}
.vow-warning-slot.collapsed .vow-warning-open{opacity:0;pointer-events:none}
.vow-warning-slot.collapsed .vow-warning-tab{opacity:1}
.vow-warning-slot.collapsed .vow-warning:after{left:12px;right:0}
.vow-warning-slot.triggered .vow-warning{border-color:#ff5965;background:linear-gradient(94deg,rgba(100,18,26,.98),rgba(20,10,13,.98) 52%,rgba(60,12,18,.98));box-shadow:0 8px 22px #000d,0 0 18px rgba(255,54,68,.38),inset 0 0 26px rgba(220,40,52,.19);animation:vowTriggerPulse .7s ease-out}
.vow-warning-slot.triggered .vow-warning-heading b{color:#ff7b82}
@keyframes vowTriggerPulse{0%{filter:brightness(1.65);transform:scale(.98)}100%{filter:brightness(1);transform:scale(1)}}
.enemies{display:flex;justify-content:center;gap:14px;padding:2px 8px 0;position:relative;z-index:2;flex-wrap:wrap}
.enemy{width:118px;text-align:center;cursor:default;display:flex;flex-direction:column;align-items:center}
.slot-reserve{height:26px;display:flex;align-items:center;justify-content:center;margin-bottom:3px;filter:drop-shadow(0 2px 3px #000a)}
.slot-reserve.empty{visibility:hidden}
.slot-reserve span{margin-right:3px;color:#d9c79e;font:12px/1 var(--disp);letter-spacing:.03em;text-shadow:0 1px 2px #000}
.slot-reserve img{width:23px;height:23px;margin-left:-4px;border:1px solid #b69249;border-radius:50%;object-fit:cover;background:#152019}
.slot-reserve img:first-of-type{margin-left:0}
.slot-reserve b{min-width:18px;color:#f3dfae;font:12px/1 var(--disp)}
.enemy.targetable{cursor:pointer;animation:tgt 1s infinite}
@keyframes tgt{0%,100%{filter:brightness(1)}50%{filter:brightness(1.3)}}
.enemy.dead{opacity:.4;font-size:13px;padding-top:20px}
.e-img{position:relative;width:86px;height:86px;border-radius:12px;border:2px solid rgba(201,152,46,.45);background-size:104% 104%;background-position:center;box-shadow:0 6px 18px rgba(0,0,0,.6)}
.e-img.boss{border:3px solid var(--blood);box-shadow:0 6px 18px rgba(0,0,0,.6),0 0 0 1px rgba(255,77,99,.42),0 0 10px rgba(200,40,60,.48)}
.e-img.firebird-crop{background-size:112% 112%;background-position:center 58%}
.e-img.bestennik-crop{background-size:111% 111%;background-position:center 54%}
.enemy-atk-total{position:absolute;left:50%;bottom:0;transform:translate(-50%,50%);z-index:5;min-width:38px;height:20px;padding:0 7px;border:1px solid rgba(220,184,105,.62);border-radius:10px;background:rgba(5,5,7,.94);display:flex;align-items:center;justify-content:center;gap:3px;color:#fff;font:400 13px/1 var(--disp);box-shadow:0 2px 7px #000b}
.enemy-atk-total img{width:13px;height:13px;object-fit:contain;filter:brightness(0) invert(1)}
/* три врага — ужимаем, чтобы влезли в ширину */
.enemies.e3{gap:6px}
.enemies.e3 .enemy{width:104px}
.enemies.e3 .e-img{width:74px;height:74px}
.intents{display:flex;gap:3px;justify-content:center;flex-wrap:nowrap;margin-top:4px}
.intents.fan .ic:not(:only-child){margin:0 -3px}
.intents.fan .ic:first-child{transform:rotate(-5deg)}
.intents.fan .ic:last-child:not(:only-child){transform:rotate(5deg)}
.intents.fan .ic{transform-origin:bottom center}
@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.ic{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:34px;padding:3px 5px;border-radius:6px;background:linear-gradient(168deg,var(--pink1),var(--pink3));border:1px solid var(--pline);color:var(--pdark);box-shadow:0 3px 8px rgba(0,0,0,.5);cursor:pointer;transition:transform .12s;z-index:1}
.ic:hover{transform:translateY(-4px) scale(1.08);z-index:3}
.ic:hover,.ic:active{transform:translateY(-2px)}
.ic-top{font-size:13px;font-weight:700;line-height:1;display:flex;align-items:center;gap:2px}
.ic-nm{font-family:var(--script);font-weight:400;font-size:16px;line-height:1;color:var(--pmut);max-width:56px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ic.i-atk{border-color:#8a2420}.ic.i-atk .ic-top{color:#8a2420}
.ic.i-blk{border-color:#1f5a63}.ic.i-blk .ic-top{color:#1f5a63}
.ic.i-poi{border-color:#4a6a1f}.ic.i-poi .ic-top{color:#4a6a1f}
.ic.i-heal{border-color:#2f7d4a}.ic.i-heal .ic-top{color:#2f7d4a}
.ic.i-buff{border-color:#8a5a1f}.ic.i-buff .ic-top{color:#8a5a1f}
.ic.i-dbf{border-color:#5a3a8a}.ic.i-dbf .ic-top{color:#5a3a8a}
.ic .i-rider{color:#4a6a1f;font-size:11px;margin-left:1px}
/* иконки-картинки в чипах намерений */
.ii{width:14px;height:14px;object-fit:contain;flex:none;display:inline-block}
.ii-sm{width:10px;height:10px;margin-left:2px}
.ecard-play{position:fixed;z-index:85;width:150px;border-radius:13px;padding:12px 11px 11px;background:linear-gradient(168deg,#2a2036,#160c18);border:2px solid rgba(232,226,208,.4);box-shadow:0 16px 40px rgba(0,0,0,.75);transition:transform .68s cubic-bezier(.2,.7,.3,1),opacity .46s;pointer-events:none;color:var(--bone);text-align:center}
.ecard-play.i-atk{border-color:rgba(255,77,99,.7);box-shadow:0 16px 40px rgba(0,0,0,.75),0 0 26px rgba(255,77,99,.4)}
.ecard-play.i-blk{border-color:rgba(63,170,255,.6)}
.ecard-play.i-poi{border-color:rgba(120,180,60,.6)}
.ecard-play.i-heal{border-color:rgba(63,174,98,.6)}
.ecard-play.i-buff{border-color:rgba(217,164,65,.65)}
.ecard-play.i-dbf{border-color:rgba(150,110,230,.6)}
.ecard-play .ea-big{width:74px;height:74px;object-fit:contain;display:block;margin:0 auto 4px;filter:drop-shadow(0 2px 5px rgba(0,0,0,.6))}
.ecard-play .ec-h{font-size:24px;font-weight:700;line-height:1;text-shadow:0 2px 6px #000}
.ecard-play .ec-nm{font-family:var(--disp);font-size:15px;margin:6px 0 4px}
.ecard-play .ec-tx{font-size:11px;line-height:1.32;color:#e8e2d0}
.ecard-play .ec-who{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--bone-dim);margin-top:7px}
/* зум карты врага по тапу (полная версия — статичная, с кровавым швом) */
.ecard-play.zoomed{position:relative;z-index:1;width:214px;padding:20px 15px 15px;transform:none;transition:none;pointer-events:auto;opacity:1}
.ecard-play.zoomed .eband{position:absolute;top:0;left:0;width:100%;height:16px;border-top-left-radius:12px;border-top-right-radius:12px;overflow:hidden}
.ecard-play.zoomed .ea-big{width:118px;height:118px;margin-bottom:8px}
.ecard-play.zoomed .ec-h{font-size:32px}
.ecard-play.zoomed .ec-nm{font-size:18px;margin:9px 0 6px}
.ecard-play.zoomed .ec-tx{font-size:13px;line-height:1.4}
.ecard-play.zoomed .ec-who{font-size:13px;margin-top:10px}
.e-plate{margin-top:5px;width:100%}
.e-name{font-family:var(--disp);font-size:13px;color:var(--cream);text-shadow:0 1px 4px #000;font-weight:400}
.e-name.long-name{font-size:12px;letter-spacing:-.01em}
.bar{position:relative;height:11px;border-radius:6px;background:#160b12;overflow:hidden;border:1px solid rgba(201,152,46,.25);margin-top:3px}
.bar i{display:block;height:100%;background:linear-gradient(90deg,#8f1f30,var(--blood-hi));transition:width .3s}
.bar-txt{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:3px;font-family:var(--disp);font-weight:400;font-size:12px;color:#fff;text-shadow:0 1px 2px #000;z-index:4;pointer-events:none;letter-spacing:.02em}
/* шкала Тела: подпись слева, значение справа */
.bar-txt.lr{justify-content:space-between;padding:0 7px}
.bar-txt.lr .bt-lbl{display:inline-flex;align-items:center}
.bar-txt.lr .bt-val{white-space:nowrap}
.bar.body{height:14px;border-radius:7px;background:#0e1810;border-color:rgba(63,209,196,.3)}
.bar.body.p1 i{background:linear-gradient(90deg,var(--emerald),var(--teal))}
.bar.body.p2 i{background:linear-gradient(90deg,#b9822c,var(--gold-hi))}
.bar.body.p3 i{background:linear-gradient(90deg,#8f1f30,var(--blood-hi))}
.bar.body .bar-txt{font-size:11px}
.telo-ic{width:12px;height:12px;object-fit:contain;vertical-align:-2px;margin-right:1px}
.telo-lbl{font-weight:400}
.bar .seg{position:absolute;top:-1px;bottom:-1px;width:2px;background:rgba(5,6,10,.9);z-index:3;pointer-events:none}
/* подпись шкалы Тела + иконка */
.telo-lbl{font-weight:700;font-size:11px;letter-spacing:.02em;opacity:.95;margin-right:1px}
.bar.body .telo-lbl{font-size:11px}
/* подпись фазы на шкале Тела (вместо «Тело») */
.phase-lbl{font-family:var(--disp);font-weight:400;font-size:12px;letter-spacing:.01em;line-height:1}
.phase-lbl,.phase-lbl.p1,.phase-lbl.p2,.phase-lbl.p3{color:#241a0e}
/* блок/яд прямо на шкале здоровья */
.bar-wrap{position:relative}
.bar-badge{position:absolute;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:1px;font-size:11px;line-height:1;padding:1px 4px;border-radius:8px;z-index:4;box-shadow:0 1px 4px rgba(0,0,0,.6);pointer-events:none;white-space:nowrap}
.bar-badge b{font-weight:700;font-size:11px}
.bar-badge.blk{left:-5px;background:linear-gradient(180deg,#cfe9f2,#5f97ab);color:#07222c;border:1px solid rgba(255,255,255,.55)}
.bar-badge.poi{right:-5px;background:linear-gradient(180deg,#7aa043,#38511d);color:#f0f8dd;border:1px solid rgba(0,0,0,.4)}
/* объём на шкале: яд (Тело под угрозой) и блок (защищённый буфер) */
.bar-poison{position:absolute;top:0;bottom:0;z-index:2;pointer-events:none;background:repeating-linear-gradient(45deg,rgba(166,224,74,.95),rgba(166,224,74,.95) 3px,rgba(20,26,10,.9) 3px,rgba(20,26,10,.9) 6px)}
.bar-bleed{position:absolute;top:0;bottom:0;z-index:2;pointer-events:none;background:repeating-linear-gradient(90deg,rgba(238,65,89,.96),rgba(238,65,89,.96) 2px,rgba(77,8,21,.95) 2px,rgba(77,8,21,.95) 5px)}
.bar-burn{position:absolute;top:0;bottom:0;z-index:2;pointer-events:none;background:repeating-linear-gradient(135deg,rgba(255,151,45,.96),rgba(255,151,45,.96) 3px,rgba(108,28,8,.94) 3px,rgba(108,28,8,.94) 6px)}
.bar-block{position:absolute;top:0;bottom:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,rgba(196,235,248,.8),rgba(73,145,175,.82));box-shadow:inset 1px 0 0 rgba(255,255,255,.75);mix-blend-mode:screen}
.stats-row{display:flex;gap:4px;justify-content:center;flex-wrap:wrap;margin-top:4px}
/* резервируем место под 2 строки статусов, чтобы панель не скакала при росте дебафов и не резала бейджи */
.h-meta .stats-row{justify-content:flex-start;margin:0;height:46px;overflow:hidden;align-content:flex-start}
.st{display:inline-flex;align-items:center;gap:1px;font-size:13px;line-height:1;padding:2px 5px;border-radius:6px;background:rgba(8,9,14,.85);border:1px solid rgba(232,226,208,.22)}
.st b{font-weight:700;font-size:13px}
.st-ic{width:14px;height:14px;object-fit:contain;flex:none}
.st.buff{border-color:rgba(217,164,65,.55);color:var(--gold-hi)}
.st.rescue{border-color:rgba(210,162,66,.78);color:#f0cc73;background:linear-gradient(180deg,rgba(52,34,13,.94),rgba(15,13,12,.92));box-shadow:inset 0 0 7px rgba(210,162,66,.14)}
.st.rescue .st-ic{width:18px;height:18px;margin:-2px 0}
.st.debuff{border-color:rgba(150,110,230,.55);color:#c9a6ff}
.st.burn{border-color:rgba(255,130,38,.72);color:#ffad55}
.st.armor{border-color:rgba(63,170,255,.5);color:#8ad9ff}
.st.scale-life{border-color:rgba(47,158,82,.68);color:#72d28d}
.st.scale-death{border-color:rgba(138,63,192,.72);color:#d0a1f0}
.st.pet-effect{border-color:rgba(211,73,66,.9);box-shadow:inset 0 0 0 1px rgba(255,181,145,.18);color:#f0a07b}

/* герой-бар (оптимизированный: без слова «Тело», энергия — ромбы) */
/* единая пергаментная зона: панель героя + Колода/Сброс с ОДНОЙ текстурой */
.b-foot{position:relative;z-index:4;margin:2px 0 0;background:url('../img/_parch.webp') center/cover;
  border-top:2px solid #1a120a;box-shadow:0 -5px 16px rgba(0,0,0,.5),inset 0 0 46px rgba(120,80,30,.12)}
.b-hero{display:grid;grid-template-columns:76px minmax(0,1fr) 84px;gap:9px;align-items:center;padding:5px 10px;position:relative;background:none;border:none;border-radius:0;min-height:130px}
/* боевая нижняя панель героя — пергамент+чернила (Тело — бирюза, энергия — красные кристаллы, кнопка красная) */
.b-hero .h-portrait{border-color:#1a120a;width:76px;height:76px}
.b-hero .h-name{color:#8f2020;text-shadow:0 1px 0 rgba(255,255,255,.28);display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:8px;align-items:baseline}
.b-hero .h-name span:first-child{flex:0 1 auto;min-width:0}
/* название ипостаси — справа от имени, чёрным, с номером I/II/III */
.h-phase-inl{font-family:var(--disp);font-size:inherit;line-height:1;flex:none;letter-spacing:.02em;color:#241a0e;text-align:right;margin-left:auto;border:0;background:none;padding:5px;margin-top:-5px;margin-right:-5px;margin-bottom:-5px;cursor:help}
.h-portrait .ph-seal.phase-help{pointer-events:auto;cursor:help}
.b-hero .bar.body{background:#e6d6ad;border:1.5px solid #1a120a;box-shadow:inset 0 1px 2px rgba(90,60,20,.35)}
.b-hero .bar.body .bar-txt{color:#241a0e;text-shadow:0 1px 0 rgba(255,255,255,.35)}
.b-hero .bar .seg{background:rgba(60,40,16,.7)}
.h-col{display:flex;flex-direction:column;align-items:center;gap:3px;flex:none}
.h-portrait{position:relative;width:64px;height:64px;border-radius:11px;border:2px solid rgba(201,152,46,.6);background-size:cover;background-position:center;flex:none;transition:border-color .3s}
.h-phase{font-family:var(--disp);font-size:12px;line-height:1}
.h-phase.p1{color:var(--teal)}.h-phase.p2{color:var(--gold-hi)}.h-phase.p3{color:var(--blood-hi)}
.ph-badge{position:absolute;bottom:-5px;right:-5px;min-width:19px;height:19px;padding:0 4px;border-radius:10px;background:rgba(6,7,12,.95);border:1.5px solid;display:flex;align-items:center;justify-content:center;font-family:'Kalam',var(--disp);font-weight:700;font-size:12px;box-shadow:0 2px 6px rgba(0,0,0,.6)}
.ph-badge.p1{color:var(--teal);border-color:var(--teal)}
.ph-badge.p2{color:var(--gold-hi);border-color:var(--gold-hi)}
.ph-badge.p3{color:var(--blood-hi);border-color:var(--blood-hi)}
.h-portrait.danger{border-color:var(--blood-hi);box-shadow:0 0 18px rgba(255,77,99,.5)}
.h-meta{flex:1;min-width:0;font-size:13px;display:flex;flex-direction:column;justify-content:center;gap:3px}
.h-name{font-family:var(--disp);font-size:13px;color:var(--cream);display:flex;justify-content:space-between;align-items:baseline;gap:5px}
.h-name span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.h-name .ph-name{font-family:var(--disp);font-size:12px;flex:none}
.ph-name.p1{color:var(--teal)}.ph-name.p2{color:var(--gold-hi)}.ph-name.p3{color:var(--blood-hi)}
.hero-right{display:flex;flex-direction:column;align-items:center;gap:5px;width:84px;min-width:0}
.energy-pips{display:flex;gap:3px;align-items:center}
.pip{width:16px;height:16px;object-fit:contain;filter:drop-shadow(0 1px 3px rgba(0,0,0,.7))}
.pip.off{filter:grayscale(1) opacity(.3)}
.energy-pips.plus .pip{filter:drop-shadow(0 0 5px rgba(255,77,99,.9)) hue-rotate(-40deg) saturate(1.6)}
.energy-pips.plus .pip.off{filter:grayscale(1) opacity(.3)}
.energy-pips.compact{gap:0;min-width:52px;justify-content:center;white-space:nowrap}
.energy-count{font-family:var(--disp);font-size:18px;line-height:1;color:#8f1414;text-shadow:0 1px 0 rgba(255,255,255,.45);font-variant-numeric:tabular-nums}
.btn.end{position:relative;overflow:hidden;padding:7px 13px;font-family:var(--disp);font-size:13px;border-radius:9px;white-space:nowrap;display:flex;flex-direction:column;align-items:center;line-height:1.1;touch-action:none}
.btn.end:disabled{opacity:.6;cursor:default}
.btn.end small{font-family:var(--serif);font-size:11px;letter-spacing:.12em;text-transform:uppercase;opacity:.85;font-weight:400}
.btn.end.hold::before{content:'';position:absolute;left:0;top:0;bottom:0;width:0;background:rgba(255,255,255,.42);pointer-events:none}
.btn.end.holding::before{animation:holdFill .55s linear forwards}
@keyframes holdFill{from{width:0}to{width:100%}}

/* ==== ПЕРГАМЕНТНЫЕ КАРТЫ ==== */
.hand{display:flex;justify-content:center;align-items:flex-end;flex:1;min-height:0;padding:6px 6px 2px;position:relative;z-index:3}
/* Базовая карта использует тот же цельный пергамент, что актуальное оформление ниже. */
.card{width:72px;min-height:120px;margin:0 -11px;position:relative;cursor:pointer;flex-shrink:0;display:flex;
  background:url('../img/_parch.webp') center/cover no-repeat;
  filter:drop-shadow(0 5px 9px rgba(0,0,0,.55));
  --ember:255,150,50}
/* тип карты — цвет тлеющих угольков по обугленному краю */
.card.atk{--ember:255,72,48}
.card.blk{--ember:72,150,255}
.card.pow{--ember:96,224,96}
.card.needle{--ember:235,42,62}
.card.status{--ember:150,150,160}
.fx-inline{display:inline-flex;align-items:center;gap:2px;margin:0 1px;white-space:nowrap;vertical-align:-2px}.fx-inline img,.fx-inline .ecryst{width:1.05em;height:1.05em;object-fit:contain;filter:drop-shadow(0 1px 1px #0004)}.fx-inline .ecryst{overflow:visible}.fx-inline b{font:inherit;font-weight:600;color:inherit}.card .fx-inline{margin:0;gap:1px;vertical-align:-1px}.card .fx-inline img,.card .fx-inline .ecryst{width:1em;height:1em}.card .fx-inline b{font-size:inherit}
/* Искры «от костра» вдоль обугленного канта (снизу вверх). Ресерч по имитации живого огня:
   всплытие (buoyancy) + боковое качание (турбулентность) + быстрое мерцание яркости (flicker) +
   остывание белое→жёлтое→красное и угасание к вершине + аддитивное свечение + разброс размеров/яркости. */
.card .embers{position:absolute;inset:2px;pointer-events:none;overflow:hidden;z-index:6;mix-blend-mode:screen;border-radius:9px;--travel:120px;--sc:1}
.card .embers i{position:absolute;bottom:-3px;left:var(--ax);
  width:calc(var(--s) * var(--sc));height:calc(var(--s) * var(--sc));margin-left:calc(var(--s) * var(--sc) * -.5);
  border-radius:50%;
  /* малое бело-калёное ядро → сразу НАСЫЩЕННЫЙ цвет уголька (меньше белого = цвет не размыт) */
  background:radial-gradient(circle at 50% 45%,#fff 0%,#ffcf6e 11%,rgba(var(--ember),1) 34%,rgba(var(--ember),.7) 60%,rgba(var(--ember),0) 82%);
  box-shadow:0 0 calc(var(--glow) * var(--sc)) rgba(var(--ember),.9);
  opacity:0;will-change:transform,opacity;
  animation:emRise var(--d) ease-in-out var(--dl) infinite, emFlick var(--fd) ease-in-out var(--dl) infinite}
/* КЛУБЯЩЕЕСЯ всплытие: x гуляет змейкой (+w →−w →+w →−w) пока искра медленно поднимается — вихрится, не летит прямо */
@keyframes emRise{
  0%  {transform:translate3d(0,0,0) scale(.35);opacity:0}
  10% {opacity:var(--b)}
  30% {transform:translate3d(var(--w),calc(var(--travel) * -.26),0) scale(1)}
  52% {transform:translate3d(calc(var(--w) * -.85),calc(var(--travel) * -.52),0) scale(.98)}
  74% {transform:translate3d(calc(var(--w) * .65),calc(var(--travel) * -.76),0) scale(.7);opacity:calc(var(--b) * .5)}
  100%{transform:translate3d(calc(var(--w) * -.35),calc(var(--travel) * -1),0) scale(.32);opacity:0}}
/* мерцание яркости + подкрутка насыщенности (цвет живой и сочный) */
@keyframes emFlick{0%,100%{filter:brightness(1) saturate(1.5)}30%{filter:brightness(1.7) saturate(1.6)}58%{filter:brightness(.75) saturate(1.4)}82%{filter:brightness(1.4) saturate(1.5)}}
/* Сноп искр при розыгрыше карты — радиальный разлёт от места карты, цвет по типу (--ec) */
.spark-b{position:absolute;border-radius:50%;pointer-events:none;transform:translate(-50%,-50%);z-index:82;mix-blend-mode:screen;
  background:radial-gradient(circle at 50% 45%,#fff 0%,#ffe08a 30%,rgba(var(--ec),1) 55%,rgba(var(--ec),0) 80%);
  box-shadow:0 0 6px rgba(var(--ec),.95),0 0 12px rgba(var(--ec),.5);
  animation:sparkBurst var(--dur) cubic-bezier(.15,.7,.35,1) forwards}
@keyframes sparkBurst{
  0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}
  12%{opacity:1;transform:translate(calc(-50% + var(--ex) * .18),calc(-50% + var(--ey) * .18)) scale(1.2)}
  100%{opacity:0;transform:translate(calc(-50% + var(--ex)),calc(-50% + var(--ey))) scale(.3)}}
/* крупные карты (зум/награда/колода/апгрейд) — та же текстура тянется, искры крупнее и путь длиннее */
.zoomwrap .card .embers,.car-item .card .embers,.card-row .card .embers,.reward-fan .card .embers,.upg-card .card .embers{inset:5px;border-radius:14px;--travel:330px;--sc:1.7}
/* Редкость показывает только самоцвет (ромб сверху). Никаких цветных обводок/свечений по канту. */
/* самоцвет редкости — ромб у верхнего края карты */
/* редкость — отрисованный камень (одна форма, тонкий чёрный ободок), тон по редкости */
.rgem{position:absolute;top:-27px;left:50%;transform:translateX(-50%);width:23px;height:37px;z-index:5;
  background-size:contain;background-repeat:no-repeat;background-position:center bottom;filter:drop-shadow(0 2px 3px rgba(0,0,0,.6))}
.zoomwrap .rgem,.car-item .rgem{width:50px;height:80px;top:-58px}
/* контент держим внутри пергамента, подальше от обугленного края */
.cin{position:relative;flex:1;border-radius:2px;padding:11px 6px 6px;background:transparent;display:flex;flex-direction:column;min-width:0;overflow:hidden}
/* улучшенная «+»-карта: зелёное имя */
.card.upgraded .t{color:#2f7d38;text-shadow:0 1px 0 rgba(255,255,255,.35)}
.hand .card{width:80px;height:150px;min-height:0;margin:0 -14px;transform-origin:bottom center;transform:rotate(var(--rot,0deg)) translateY(var(--ty,0px));transition:transform .15s}
.hand .card.needle-danger{filter:drop-shadow(0 5px 9px rgba(0,0,0,.55)) drop-shadow(0 0 6px rgba(242,24,52,.95)) drop-shadow(0 0 12px rgba(128,0,20,.65))}
/* жёсткая фиксация размера карты в руке: длинный текст не растягивает карту, а плавно затухает снизу (не режется резко) */
.hand .card .cin{overflow:hidden}
.hand .card .txt{flex:1;min-height:0;overflow:hidden;-webkit-mask-image:linear-gradient(180deg,#000 90%,transparent);mask-image:linear-gradient(180deg,#000 90%,transparent)}
@media (hover:hover){.hand .card:hover{transform:translateY(-30px) scale(1.22);z-index:9;box-shadow:0 14px 30px rgba(0,0,0,.7)}}
.hand .card.dragging{transition:none;z-index:30;opacity:.97;box-shadow:0 18px 42px rgba(0,0,0,.85)}
.card.sel{transform:translateY(-6px) scale(1.05);filter:brightness(1.12) drop-shadow(0 12px 20px rgba(0,0,0,.75));z-index:20}
.enemy.drop-hi .e-img{border-color:var(--gold-hi);box-shadow:0 0 24px rgba(243,201,107,.85)}
.enemy.drop-hi{transform:translateY(-3px)}
.card.dim .cin{filter:saturate(.55) brightness(.88)}
/* тип показываем цветом названия/иконки/искр — без цветной заливки карты */
.card.status .cin{filter:grayscale(.4)}
/* Стоимость энергии — маленький ПОЛУКРУГЛЫЙ (серповидный) чёрный уголок (ui_corner) с ЖЁЛТОЙ цифрой. */
.card .cost{position:absolute;top:1px;left:1px;width:33px;height:33px;overflow:hidden;border-top-left-radius:9px;
  background:url('../img/ui_corner.webp') top left/100% 100% no-repeat;
  color:#ffd21f;font-family:var(--disp);font-weight:400;font-size:15px;line-height:1;letter-spacing:0;white-space:nowrap;
  display:flex;align-items:flex-start;justify-content:flex-start;padding:3px 0 0 5px;
  text-shadow:0 1px 1px #000;z-index:4}
.card .ph{position:absolute;top:1px;right:1px;width:33px;height:33px;overflow:hidden;border-top-right-radius:9px;
  background:url('../img/ui_corner_r.webp') top right/100% 100% no-repeat;
  color:var(--blood-hi);font-family:'Kalam',var(--disp);font-weight:700;font-size:13px;line-height:1;letter-spacing:-.08em;white-space:nowrap;
  display:flex;align-items:flex-start;justify-content:flex-end;padding:4px 4px 0 0;
  text-shadow:0 1px 1px #000;z-index:4}
/* Две строки-слота всегда (.t2 пустая у однословных) — иначе высота названия скачет и карты
   рядом разъезжаются артами. Поэтому column, а высоту держит сам контент, не min-height. */
.card .t{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-family:var(--disp);font-weight:400;font-size:12px;letter-spacing:-.03em;color:var(--pbrown);line-height:1.08;min-height:30px;overflow-wrap:break-word}
.card .t .t1,.card .t .t2{display:block;max-width:100%}
/* Арт карты — чернильный рисунок на ПРОЗРАЧНОМ фоне, лежит прямо на пергаменте (без тёмной рамки-подложки) */
.cart{height:34px;margin:1px 0 2px;background-size:contain;background-repeat:no-repeat;background-position:center;flex:none}
.hand .card .cart{display:none} /* в руке карте тесно — арт в зуме и наградах */
.card.atk .t{color:var(--t-atk)}
.card.blk .t{color:var(--t-blk)}
.card.pow .t{color:var(--t-pow)}
.card.needle .t{color:var(--t-ndl)}
/* стат-полоса: тёмная планка с иконкой и числом */
.strip{position:relative;height:22px;border-radius:0;margin:2px -10px 4px;background:#0c0a10;box-shadow:none;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:none;cursor:help;touch-action:manipulation}
.strip-inner{position:absolute;left:50%;top:50%;width:max-content;max-width:100%;min-width:0;display:flex;align-items:center;justify-content:center;gap:3px;white-space:nowrap;transform:translate(-50%,-50%)}
.strip.dense .strip-inner{gap:0}
.strip.dense .si{width:11px;height:11px;flex:none}
.strip.dense b{font-size:13px;letter-spacing:-.04em;flex:none}
.zoomwrap .strip,.car-item .strip{margin-left:-10px;margin-right:-10px;border-radius:0}
.card.pow .strip{background:#1a1206;box-shadow:none}
.strip b{font-family:'Kalam',var(--disp);font-weight:700;font-size:15px;color:#e6dccc;line-height:1}
/* Kalam сидит высоко в строке — опускаем цифры к центру иконок */
.strip b,.strip .dmod,.ecard-val .vnum,.ecard-val .i-rider,.ef-val .vnum,.ef-val .i-rider{position:relative;top:.08em}
.strip b.up{color:#7ee0a0}
.strip b.down{color:#ff6f6f}
.strip .dmod{font-family:'Kalam',var(--disp);font-weight:700;font-size:12px;margin-left:1px;vertical-align:1px}
.strip .dmod.up{color:#7ee0a0}
.strip .dmod.down{color:#ff6f6f}
.zoomwrap .strip .dmod,.car-item .strip .dmod{font-size:15px}
.strip b.blkv{color:#dff4ff}
.strip b.healv{color:#7ee0a0}
.strip b.buffv{color:#9ae6a0}
.strip b.dbfv{color:#ff9a9a}
/* сдвиг весов в полосе — цвета те же, что у подсветки Жизни/Смерти в описаниях и в HUD */
.strip b.scv-l{color:#7ee0a0}
.strip b.scv-d{color:#c9a6ff}
/* Числа на чёрной полосе единообразно белые; смысл эффекта уже кодирует цветная иконка. */
.strip b,.strip .dmod,.strip b.up,.strip b.down,.strip .dmod.up,.strip .dmod.down,
.strip b.blkv,.strip b.healv,.strip b.buffv,.strip b.dbfv,.strip b.scv-l,.strip b.scv-d{color:#fff!important}
.si{width:15px;height:15px;object-fit:contain;object-position:center;flex:0 0 15px;display:inline-block}
/* У значков разные прозрачные поля в исходниках. Щит оптически заполняет весь квадрат,
   тогда как остальные мотивы тоньше; лёгкая компенсация держит их в одном визуальном кегле. */
.strip .si[src*="ic_shield"],.strip .si[src*="ic_dodge"],.strip .si[src*="ic_ghost"]{width:14px;height:14px;flex-basis:14px}
.strip .si[src*="ic_burn"]{transform:scale(1.08)}
.strip .si[src*="ic_stone"]{
  filter:brightness(1.75) contrast(1.08) drop-shadow(0 0 2px rgba(255,238,194,.72));
}
.card .txt{text-align:center;font-family:var(--serif);font-style:italic;font-size:11px;line-height:1.17;color:#2a1c10}
.card .txt .phase-mod{display:block;margin-top:.16em;font-family:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;color:inherit}
.card.needle .txt{font-style:italic}
.card .strip .ecryst{width:14px;height:19px;flex:none}
.zoomwrap .card .strip .ecryst,.car-item .card .strip .ecryst{width:20px;height:27px}
/* Ключевые слова едины во всех представлениях: карта, компактный исходник улучшения,
   Склеп и награда. Не привязываем их к .card .txt. */
.kw-life{color:#2c7f45;font-family:var(--serif);font-style:italic;font-weight:700}   /* Жизнь — зелёный */
.kw-death{color:#7b3fb2;font-family:var(--serif);font-style:italic;font-weight:700}  /* Смерть — фиолетовый */
.kw-p1{color:#147a70;font-family:var(--serif);font-style:italic;font-weight:700}     /* Плоть I — бирюза */
.kw-p2{color:#9a6712;font-family:var(--serif);font-style:italic;font-weight:700}     /* Кровь II — золото */
.kw-p3{color:#bf2233;font-family:var(--serif);font-style:italic;font-weight:700}     /* Кость III — кровь */
.card .cost .si{width:13px;height:13px}

/* зум карты по центру боя */
.zoomwrap{position:fixed;inset:0;z-index:44;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 45%,rgba(4,5,9,.72),rgba(4,5,9,.45) 70%)}
.zoomwrap .card,.car-item .card{width:206px;min-height:322px;margin:0;cursor:default;filter:drop-shadow(0 16px 30px rgba(0,0,0,.7))}
.zoomwrap .cin,.car-item .cin{border-radius:6px;padding:38px 10px 10px;background:transparent}
.zoomwrap .card .cost,.car-item .card .cost{width:64px;height:64px;font-size:24px;top:3px;left:3px;padding:9px 0 0 11px;border-top-left-radius:16px}
.zoomwrap .card .cost .si,.car-item .card .cost .si{width:26px;height:26px}
.zoomwrap .card .ph,.car-item .card .ph{width:64px;height:64px;font-size:24px;top:3px;right:3px;padding:9px 11px 0 0;border-top-right-radius:16px}
.zoomwrap .card .t,.car-item .card .t{font-size:24px;min-height:0;margin-bottom:3px;line-height:1}
.zoomwrap .strip,.car-item .strip{height:34px;border-radius:4px;margin:6px 0 8px}
.zoomwrap .strip b,.car-item .strip b{font-size:18px}
.zoomwrap .si,.car-item .si{width:22px;height:22px}
/* В карусели Добычи карта ужата transform:scale(.66), поэтому её полоса требует
   отдельного крупного кегля — иначе иконки визуально падали до 7–14 px. */
.car-item .strip{height:46px}
.car-item .strip b{font-size:24px}
.car-item .strip .si{width:30px;height:30px;flex-basis:30px}
.car-item .strip .dmod{font-size:18px}
.car-item .strip.dense .strip-inner{gap:1px}
.car-item .strip.dense .si{width:21px;height:21px;flex-basis:21px}
.car-item .strip.dense b{font-size:24px;letter-spacing:-.02em}
.zoomwrap .cart,.car-item .cart{height:150px;margin:2px 0 4px;background-size:contain}
.zoomwrap .card .txt,.car-item .card .txt{font-size:15px;line-height:1.4}
.zoom-row{margin-top:18px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px}
.zoom-hint{font-size:13px;font-style:italic;color:#c9b78f;background:rgba(10,11,18,.7);border:1px solid rgba(232,226,208,.16);border-radius:8px;padding:5px 11px;max-width:80%;text-align:center}
.zoom-x{position:absolute;top:calc(14px + env(safe-area-inset-top,0px));right:16px;width:34px;height:34px;border-radius:50%;border:1px solid rgba(232,226,208,.3);color:#c9b78f;display:flex;align-items:center;justify-content:center;font-size:15px;background:rgba(10,11,18,.7);cursor:pointer;z-index:2}
/* полная (zoom) карта врага — пергаментная вёрстка, как у карт героя */
.ecard-full{position:relative;width:206px;height:322px;background:url('../img/_parch.webp') center/cover;border:2px solid #9a1414;border-radius:14px;box-shadow:0 16px 42px rgba(0,0,0,.72);display:grid;grid-template-rows:148px 36px 31px minmax(0,1fr) 18px;justify-items:center;align-items:center;padding:18px 13px 13px;color:#5a4326;text-align:center;overflow:hidden}
.ecard-full>*{min-width:0;min-height:0}
.ecard-full .ef-art{width:148px;height:148px;object-fit:contain;margin:0;filter:drop-shadow(0 1px 2px rgba(40,4,4,.32))}
.ecard-full .ef-val{font-family:'Kalam',var(--disp);font-weight:700;font-size:32px;line-height:1;color:#7a1010;display:flex;align-items:center;gap:5px}
.ecard-full .ef-val img{width:26px;height:26px;object-fit:contain}
.ecard-full .ef-val .i-rider{font-size:24px;margin-left:2px}
.ecard-full .ef-val .ii-sm{width:18px;height:18px}
.ecard-full .ef-nm{width:100%;max-width:100%;font-family:var(--disp);font-weight:400;font-size:24px;letter-spacing:-.01em;color:#6a3020;line-height:1;white-space:normal;overflow:hidden;text-overflow:clip}
.ecard-full.long-name .ef-nm{font-size:18px;line-height:.95;white-space:normal;text-overflow:clip}
.ecard-full .ef-tx{align-self:start;font-family:var(--serif);font-size:15px;color:#5a4326;line-height:1.25;overflow:auto}
.ecard-full .ef-who{align-self:end;font-family:var(--serif);font-size:13px;letter-spacing:.09em;text-transform:uppercase;color:#8a7048}
.ecard-full.i-blk .ef-val{color:#1f5a63}
.ecard-full.i-heal .ef-val{color:#2c7f45}
.ecard-full.i-poi .ef-val{color:#4a7a1a}
.ecard-full.i-burn .ef-val{color:#c95718}
.ecard-full.i-dbf .ef-val,.ecard-full.i-buff .ef-val{color:#7a4a10}
/* карта ДЕЙСТВИЯ врага — та же пергаментная вёрстка, но вылетает от врага в центр */
.ecard-fly{position:fixed;z-index:85;width:196px;min-height:0;padding:16px 13px 12px;transition:transform .68s cubic-bezier(.2,.7,.3,1),opacity .46s;pointer-events:none}
.ecard-fly .ef-art{width:136px;height:136px;margin-bottom:6px}
.ecard-fly .ef-val{font-size:32px}
.ecard-fly .ef-nm{font-size:18px;margin:6px 0 4px}
.ecard-fly .ef-tx{font-size:13px;line-height:1.35}
.ecard-fly .ef-who{font-size:11px;margin-top:8px}
.zoom-play{font-family:var(--disp);font-size:15px;padding:10px 24px}
.zoom-play:disabled{cursor:wait;filter:saturate(.35) brightness(.72);box-shadow:none;opacity:.72}
.event #ev-choices .btn:disabled{opacity:.42;filter:grayscale(.65);cursor:not-allowed;box-shadow:none}
.zoom-play.zoom-play-guarded{position:relative;overflow:hidden}
.zoom-play.zoom-play-guarded:disabled{cursor:default;filter:none;box-shadow:0 5px 16px rgba(201,152,46,.4),inset 0 0 0 1px rgba(122,90,48,.5);opacity:1;transform:none}

/* Выбор зверя подтверждается до розыгрыша карты: отмена оставляет карту и энергию на месте. */
.modal-wrap.pet-picker-wrap{padding:0}
.modal.pet-picker{width:100vw;max-width:100vw}
.pet-picker .modal-in{width:100%;align-items:center;gap:7px;padding:27px 0 29px;border:0;border-radius:0;background:radial-gradient(circle at 50% 0,#3b1718 0,rgba(28,14,15,.98) 30%,rgba(8,9,12,.99) 78%),#09090c;box-shadow:0 18px 42px #000,0 0 26px rgba(129,29,27,.28);-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%);text-align:center;overflow:hidden}
.pet-picker-kicker{font:12px var(--disp);letter-spacing:.18em;color:#c84b43;text-shadow:0 2px 5px #000,0 0 12px #9b272688}
.modal.pet-picker h3{margin:0;font:clamp(21px,6.5vw,28px)/1.08 var(--disp);font-weight:400;color:#f0dfbd;text-shadow:0 2px 7px #000,0 0 18px rgba(214,160,74,.22);text-wrap:balance}
.modal.pet-picker p{margin:0;color:#cdbd9f;font:14px/1.3 var(--serif);text-shadow:0 2px 4px #000}
.pet-picker-grid{display:grid;grid-template-columns:1fr;gap:7px;width:100%;margin-top:4px}
.pet-picker-choice{--pet-tone:#548ab5;--pet-deep:#0a1e30;position:relative;isolation:isolate;display:grid;grid-template-columns:104px minmax(0,1fr);gap:13px;align-items:center;min-width:0;width:100%;padding:11px 14px 11px 8px;border:0;background:transparent;color:#f2e4ca;text-align:left;cursor:pointer;filter:drop-shadow(0 6px 8px #000)}
.pet-picker-choice[data-pet-choice="wolf"]{--pet-tone:#9299a1;--pet-deep:#20242a}
.pet-picker-choice[data-pet-choice="bear"]{--pet-tone:#b99232;--pet-deep:#302306}
.pet-picker-choice:before{content:"";position:absolute;z-index:-2;inset:0;background:linear-gradient(100deg,var(--pet-deep) 0%,color-mix(in srgb,var(--pet-deep) 62%,#0d0d10) 48%,color-mix(in srgb,var(--pet-tone) 18%,#09090c) 100%);-webkit-mask:url('../img/ui_narrator_charcoal.png') center/100% 168% no-repeat;mask:url('../img/ui_narrator_charcoal.png') center/100% 168% no-repeat}
.pet-picker-choice>*{position:relative;z-index:1}
.pet-picker-choice:not(:disabled):hover{filter:drop-shadow(0 7px 10px #000) drop-shadow(0 0 7px color-mix(in srgb,var(--pet-tone) 50%,transparent))}
.pet-picker-choice:not(:disabled):active{transform:translateY(1px);filter:brightness(1.08) drop-shadow(0 3px 5px #000)}
.pet-picker-art{display:block;width:104px;height:104px;overflow:hidden;border:2px solid var(--pet-tone);border-radius:50%;background:#12090a;box-shadow:inset 0 0 0 4px #120a0c,0 4px 10px #000,0 0 13px color-mix(in srgb,var(--pet-tone) 62%,transparent)}
.pet-picker-art img{display:block;width:100%;height:100%;object-fit:cover}
.pet-picker-info{display:flex;min-width:0;align-items:flex-start;flex-direction:column}
.pet-picker-name{display:flex;width:100%;max-width:100%;padding-right:52px;align-items:baseline;gap:7px}
.pet-picker-choice b{overflow:hidden;font:clamp(16px,4.8vw,20px)/1.05 var(--disp);font-weight:400;white-space:nowrap;text-overflow:ellipsis}
.pet-picker-choice small{color:#b7a78d;font:16px/1 var(--script)}
.pet-picker-choice strong{width:100%;margin-top:5px;padding-bottom:4px;border-bottom:1px solid color-mix(in srgb,var(--pet-tone) 52%,transparent);color:var(--pet-tone);font:12px/1.15 var(--disp);font-weight:400;letter-spacing:.05em;text-shadow:0 0 8px color-mix(in srgb,var(--pet-tone) 50%,transparent)}
.pet-picker-desc{margin-top:5px;color:#e3d8c5;font:13px/1.25 var(--serif);text-shadow:0 2px 3px #000}
.pet-picker-choice em{display:inline-flex;align-items:center;gap:4px;margin-top:7px;color:#f0ddb4;font:12px/1 var(--disp);font-style:normal;white-space:nowrap}
.pet-picker-level{padding:0;border:0;background:none;box-shadow:none;color:#bcb4a5!important}
.pet-picker-lock-icon{display:block;width:14px;height:14px;object-fit:contain;opacity:.78;filter:grayscale(1) brightness(1.35)}
.pet-picker-body{position:absolute;top:0;right:0;margin-top:0!important;font-size:18px!important;text-shadow:0 1px 3px #000}
.pet-picker-body-icon{display:block;width:18px;height:18px;object-fit:contain}
.pet-picker-choice.locked{opacity:.64;cursor:not-allowed;filter:drop-shadow(0 5px 7px #000)}
.pet-picker-choice.locked:before{background:linear-gradient(100deg,color-mix(in srgb,var(--pet-deep) 78%,#171719) 0%,color-mix(in srgb,var(--pet-deep) 34%,#0e0e10) 48%,color-mix(in srgb,var(--pet-tone) 14%,#111114) 100%)}
.pet-picker-choice.locked .pet-picker-art img{filter:grayscale(1) brightness(.68)}
.pet-picker-cancel{min-width:112px;margin-top:2px;background:linear-gradient(180deg,#aaa8a2,#74716c);color:#201f1c;box-shadow:0 5px 16px rgba(0,0,0,.38),inset 0 0 0 1px rgba(49,47,43,.55);font-weight:400}
@media(max-width:350px),(max-height:620px){.pet-picker .modal-in{gap:3px;padding:23px 0 25px}.pet-picker-kicker{font-size:11px}.modal.pet-picker h3{font-size:19px}.modal.pet-picker p{font-size:12px}.pet-picker-grid{gap:4px}.pet-picker-choice{grid-template-columns:88px minmax(0,1fr);gap:10px;padding:9px 10px 9px 6px}.pet-picker-art{width:88px;height:88px}.pet-picker-choice b{font-size:15px}.pet-picker-choice small{font-size:15px}.pet-picker-choice strong{margin-top:3px;padding-bottom:3px;font-size:11px}.pet-picker-desc{margin-top:3px;font-size:11.5px;line-height:1.18}.pet-picker-choice em{margin-top:4px;font-size:12px}.pet-picker-cancel{margin-top:0;padding:8px 20px}}

/* Три боевые колоды — равная сетка без пиктограмм и декоративных материалов.
   Внутри пергаментного HUD их различают подписи, счётчики и компактные пиктограммы. */
.b-bottom{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:10px;
  padding:4px 12px calc(7px + var(--sab));position:relative;z-index:4;background:none}
.pile{appearance:none;position:relative;min-width:0;height:38px;padding:3px 7px 4px;
  display:flex;align-items:center;justify-content:center;gap:4px;cursor:pointer;
  font-family:var(--disp);font-size:13px;line-height:1;color:#2a1c10;letter-spacing:.015em;
  background:transparent;border:1.5px solid #1a120a;border-radius:9px;box-shadow:none;transition:background-color .12s ease}
.pile::before,.pile::after{content:none}
.pile .pi-ic{width:16px;height:16px;object-fit:contain;flex:0 0 16px}
.pile span{flex:none;overflow:visible;text-overflow:clip;white-space:nowrap;text-shadow:none}
.pile b{font-family:'Kalam',var(--disp);font-size:16px;line-height:1;color:#811813;
  flex:none;font-variant-numeric:tabular-nums;text-shadow:none}
.pile:hover,.pile:active{background:rgba(26,18,10,.06)}
.pile:focus-visible{outline:2px solid #9b271f;outline-offset:3px}
.pile.receiving{animation:ashPileReceive 1.15s cubic-bezier(.16,.72,.3,1) both}
@keyframes ashPileReceive{0%{filter:brightness(1);transform:translateY(0)}25%{filter:brightness(2.1) saturate(1.8);transform:translateY(3px) scale(.94)}48%{filter:brightness(.72);transform:translateY(-2px) scale(1.05)}72%{filter:brightness(1.35);transform:translateY(1px) scale(.98)}100%{filter:none;transform:none}}
/* карусель наград */
/* карусель награды: карты позиционируются трансформом (без ре-рендера → без миганий) */
.car-stage{position:relative;min-height:300px;touch-action:pan-y;overflow:visible}
.car-item{position:absolute;left:50%;top:50%;transform-origin:center;transition:transform .3s cubic-bezier(.2,.7,.3,1),opacity .3s;cursor:pointer;will-change:transform,opacity}
.car-item .card{margin:0;width:206px;pointer-events:none}
.car-item.is-center .strip[data-effect-help]{pointer-events:auto;cursor:help;touch-action:manipulation}
.car-item .card .txt{max-height:120px;overflow:hidden}   /* под крупнее шрифт — иначе режет 3-ю строку */
.car-item.is-center .card{box-shadow:0 22px 46px rgba(0,0,0,.7)}
.car-dots{display:flex;gap:6px;justify-content:center}
.car-dots .dot{width:8px;height:8px;border-radius:50%;background:rgba(90,61,32,.3);border:1px solid rgba(90,61,32,.5)}
.car-dots .dot.on{background:#9a1f1c;border-color:#9a1f1c}

/* CARD ROWS (колода/награды) */
.card-row{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.card-row .card{margin:0;width:96px;min-height:144px;cursor:pointer}
.card-row .card .t{font-size:13px}
.card-row.wrap{max-height:52vh;overflow-y:auto;padding:6px 2px}
.deck-groups{display:flex;width:100%;min-height:0;flex-direction:column;gap:13px;overflow-y:auto;padding:4px 2px 10px;overscroll-behavior:contain}
.deck-group{display:flex;flex-direction:column;gap:7px}
.deck-group h4{position:sticky;z-index:8;top:-4px;margin:0;padding:6px 10px 5px;border-bottom:1px solid rgba(122,90,48,.55);background:rgba(226,207,164,.96);color:#6a3020;font:15px/1 var(--disp);font-weight:400;letter-spacing:.04em;text-align:left}
.deck-group>p{padding:5px 10px;color:#806a4d;font:13px/1.25 var(--serif);font-style:italic}
.deck-group .card-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;justify-items:center;padding:0 3px}
.deck-card-entry{position:relative;width:100%;max-width:112px}
.deck-card-entry>.card{width:100%;max-width:112px}
.deck-card-entry.disabled{opacity:.46;filter:grayscale(.35);cursor:not-allowed}
.deck-card-entry>small{position:absolute;z-index:9;left:4px;right:4px;bottom:5px;padding:3px 2px;background:rgba(28,20,12,.9);color:#f0dfbd;font:9px/1.1 var(--disp);letter-spacing:.02em;text-align:center;pointer-events:none}
.modal.full .deck-groups{flex:1;max-height:none}
@media (hover:hover){.card-row .card:hover{transform:translateY(-6px) scale(1.04)}}
.reward-fan{display:flex;justify-content:center;align-items:flex-end;min-height:200px;padding:16px 4px 4px}
.scry-sub{text-align:center;font-style:italic;color:#6b4a2a;font-size:13px;margin:-2px 0 0}
.scry-empty{text-align:center;font-style:italic;color:#6b4a2a;padding:26px 8px}
.modal.scry .scry-fan{min-height:168px;padding:14px 0 2px}
.modal.scry .reward-fan .card{width:82px;min-height:124px;margin:0 -13px}
.modal.scry .reward-fan .card.scry-discard{filter:grayscale(.65) brightness(.62);outline:3px solid #7f1f24;transform:translateY(14px) rotate(var(--rot))!important}
.modal.scry .reward-fan .card.scry-pick{filter:brightness(1.12) saturate(1.08);outline:3px solid #2c7f45;box-shadow:0 0 0 2px #e4d5ae,0 14px 26px #0009;transform:translateY(-18px) rotate(var(--rot))!important}
.modal.scry .reward-fan .card .t{font-size:11px}
.reward-fan .card{width:106px;min-height:152px;margin:0 -6px;transform-origin:bottom center;transform:rotate(var(--rot,0deg)) translateY(var(--ty,0px));transition:transform .16s;cursor:pointer}
.reward-fan .card .t{font-size:13px}
@media (hover:hover){.reward-fan .card:hover{transform:translateY(-18px) scale(1.08);z-index:6;box-shadow:0 16px 34px rgba(0,0,0,.7),0 0 16px rgba(201,152,46,.4)}}

/* превью улучшения карты — веером «сейчас → станет» */
.upg-fan{display:flex;justify-content:center;align-items:flex-end;margin:16px 0 12px;min-height:210px}
.upg-card{position:relative;flex:none}
.upg-card .card{width:128px;min-height:190px;margin:0;cursor:default}
.upg-card .card .cart{height:56px;display:block}
.upg-card .card .t{font-size:13px}
.upg-card .card .txt{font-size:11px}
.upg-card .card .strip{height:26px;margin:3px 0 5px}
.upg-card .card .strip b{font-size:15px}
.upg-card .card .cost{width:28px;height:28px;font-size:13px;top:0;left:0;padding:3px 0 0 4px}
.upg-card.cur{transform:rotate(-8deg) translateX(12px);z-index:1}
.upg-card.nxt{transform:rotate(8deg) translateX(-12px);z-index:2}
/* Развилка деревом: исходная карта сверху, от неё две стрелки к веткам. Ветки НЕ подписываем —
   их различает цвет заголовка (зелёный — основная, фиолетовый — альтернативная). */
.upg-tree{display:flex;flex-direction:column;align-items:center;margin:6px 0 8px}
.upg-now{position:relative;flex:none}
/* Стрелки развилки: один сгенерённый силуэт ui_arrow.webp как МАСКА — цвет даёт CSS, правая
   отражена по X. Так две ветки красятся в свои цвета одним ассетом. */
.upg-arr{display:flex;justify-content:center;gap:14%;width:78%;height:44px;margin:2px 0 2px}
.upg-arr i{display:block;width:44px;height:44px;
  -webkit-mask:url('../img/ui_arrow.webp') center/contain no-repeat;
  mask:url('../img/ui_arrow.webp') center/contain no-repeat}
.upg-arr .a-l{background:#2c7f45}
.upg-arr .a-r{background:#7b3fb2;transform:scaleX(-1)}
.upg-arr.one{width:auto;gap:0}
.upg-arr.one .a-l{transform:rotate(45deg)}
.upg-picks{display:flex;gap:10px;justify-content:center;align-items:flex-start}
.upg-card.pick{cursor:pointer;transition:transform .12s,filter .12s}
.upg-card.pick:hover,.upg-card.pick:active{transform:translateY(-6px);filter:brightness(1.08)}
/* в дереве карты мельче — три штуки по вертикали должны влезть в модалку */
.upg-tree .upg-card .card{width:clamp(96px,26vw,112px);height:clamp(142px,38.5vw,166px)}
.upg-lbl{position:absolute;top:-15px;left:50%;transform:translateX(-50%);z-index:6;font-family:var(--disp);font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:#f0e4c8;background:rgba(20,14,8,.92);border:1px solid rgba(201,152,46,.6);border-radius:9px;padding:3px 10px;white-space:nowrap;box-shadow:0 2px 6px rgba(0,0,0,.6)}
.upg-card.nxt .upg-lbl{color:#a6e86a;border-color:rgba(120,190,60,.7)}

/* MODAL / TOAST / BANNER */
.modal-wrap{position:fixed;inset:0;background:rgba(5,6,10,.7);display:flex;align-items:center;justify-content:center;z-index:50;padding:14px;animation:modalVeilIn .24s ease-out both}
.modal{background:transparent;padding:0;max-width:min(400px,94vw);filter:drop-shadow(0 16px 30px rgba(0,0,0,.6));animation:modalPanelIn .32s cubic-bezier(.16,.78,.25,1) both}
.modal-wrap.modal-closing{pointer-events:none;animation:modalVeilOut .2s ease-in both}
.modal-wrap.modal-closing>.modal{animation:modalPanelOut .2s ease-in both}
@keyframes modalVeilIn{from{opacity:0}to{opacity:1}}
@keyframes modalVeilOut{from{opacity:1}to{opacity:0}}
@keyframes modalPanelIn{from{opacity:0;transform:translateY(16px) scale(.975)}to{opacity:1;transform:none}}
@keyframes modalPanelOut{from{opacity:1;transform:none}to{opacity:0;transform:translateY(10px) scale(.985)}}
.modal-in{position:relative;padding:6px 10px;background:transparent;
  border:30px solid transparent;border-image:url('../img/ui_paper_burnt.webp') 132 fill / 30px stretch;
  display:flex;flex-direction:column;gap:12px}
.modal-in>*{position:relative;z-index:1}
.modal.wide{max-width:min(432px,96vw)}
/* Обновление: шкала прогресса + статус. Раньше кнопка молча сносила кэш и перезагружала —
   игрок не знал ни что идёт процесс, ни чем он кончился. */
.upd-state{font-size:15px;color:var(--pbrown);text-align:center;margin:4px 0 8px;min-height:20px}
.upd-state.ok{color:#2c7f45;font-weight:700}
.upd-state.err{color:#9b2d24;font-weight:700}
.upd-bar{height:12px;border-radius:7px;background:rgba(90,61,32,.22);border:1.5px solid var(--pmut);
  overflow:hidden;margin:0 2px 10px}
.upd-bar i{display:block;height:100%;width:0;border-radius:6px;
  background:linear-gradient(90deg,#b9822c,var(--gold-hi));transition:width .3s ease}
/* есть свежая версия — кнопка светится, чтобы её заметили */
.icon-btn.has-upd{border-color:var(--gold);background:rgba(201,152,46,.16);animation:updPulse 1.8s ease-in-out infinite}
.icon-btn.has-upd .ib-lbl{color:#8a4a10;font-weight:700}
@keyframes updPulse{0%,100%{box-shadow:0 0 0 0 rgba(201,152,46,.5)}50%{box-shadow:0 0 0 5px rgba(201,152,46,0)}}
/* выбор карты (улучшение) — на весь экран: в узкой модалке помещалось по две карты в ряд */
.modal.full{max-width:100vw;width:100%;position:absolute;inset:0;filter:none}
.modal.full .modal-in{position:absolute;inset:0;max-height:none;overflow-y:auto;
  padding:calc(10px + var(--sat)) 10px calc(12px + var(--sab));
  background:#e8d7b1;border:20px solid transparent;border-image:url('../img/ui_paper_flush.webp') 20 fill / 20px stretch}
/* три в ряд: сетка, а не flex-wrap — иначе последний ряд разъезжается по центру */
.card-row.cols3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;justify-items:center;
  max-height:none;padding:8px 2px}
.card-row.cols3 .card{width:100%;max-width:112px}
.modal h3{font-family:var(--disp);font-size:18px;color:var(--pbrown);text-align:center;font-weight:400}
.modal p{font-size:15px;line-height:1.5;color:var(--pdark)}
.modal.install{text-align:center}
.modal.install .modal-in{align-items:center}
.modal.install .ins-ico{width:72px;height:72px;border-radius:16px;box-shadow:0 6px 20px rgba(0,0,0,.35);border:1px solid rgba(122,90,48,.5)}
.modal.install h3{font-size:18px}
.modal.install .ins-body{font-size:13px;line-height:1.5;color:var(--pdark)}
.modal.install .row{flex-wrap:wrap}
#toast{position:fixed;left:50%;transform:translateX(-50%);bottom:190px;background:rgba(12,13,20,.92);border:1px solid rgba(217,164,65,.45);color:var(--bone);border-radius:10px;padding:9px 16px;font-size:13px;max-width:88vw;text-align:center;opacity:0;transition:opacity .25s;z-index:60;pointer-events:none;font-style:italic}
#toast.show{opacity:1}
/* реплики Сказительницы на карте — сверху, чтобы не перекрывать узел героя */
/* реплики Сказительницы — строго по центру экрана, кликабельны (скрыть досрочно) */
#toast.center{top:50%;bottom:auto;transform:translate(-50%,-50%);cursor:pointer;width:max-content;max-width:min(620px,calc(100vw - 28px));max-height:min(44vh,320px);overflow-y:auto;font-size:15px;line-height:1.52;padding:16px 22px}
#toast.center.show{pointer-events:auto} /* ловим клик только пока видно, иначе скрытый тост блокирует центр экрана */
#toast.center{left:0;right:0;top:50%;bottom:auto;width:100vw;max-width:none;max-height:min(48vh,340px);box-sizing:border-box;transform:translateY(-50%);overflow-y:auto;border:0;border-radius:0;background:transparent url('../img/ui_narrator_charcoal.png') center/100% 145% no-repeat;padding:27px max(22px,env(safe-area-inset-right,0px)) 28px max(22px,env(safe-area-inset-left,0px));font-size:15px;line-height:1.52;clip-path:none}
#toast.center.map-card{left:var(--toast-map-left);right:auto;top:var(--toast-map-top);width:var(--toast-map-width)}
.tooltip{position:fixed;transform:translateX(-50%);z-index:66;max-width:min(240px,86vw);background:rgba(10,11,18,.97);border:1px solid rgba(217,164,65,.5);border-radius:10px;padding:8px 11px;box-shadow:0 8px 24px rgba(0,0,0,.65);pointer-events:none;display:flex;flex-direction:column;gap:3px;animation:ttIn .12s ease}
.tooltip b{font-size:13px;color:var(--gold-hi)}
.tooltip span{font-size:13px;color:var(--bone);line-height:1.35}
.tooltip.effect-tooltip{width:min(292px,88vw);max-width:none;padding:10px 12px;gap:7px}
.tooltip.reserve-tooltip{width:min(276px,88vw);max-width:none;display:grid;grid-template-columns:58px minmax(0,1fr);gap:10px;align-items:center;padding:10px 12px;text-align:left}
.reserve-tip-avatar{width:58px;height:58px;border:2px solid #d1a84f;border-radius:50%;object-fit:cover;background:#15120f;box-shadow:inset 0 0 0 1px #2a1608,0 3px 8px #000}
.reserve-tip-copy{min-width:0;display:flex;flex-direction:column;gap:3px}
.tooltip .reserve-tip-copy>b{font:15px/1.05 var(--disp);font-weight:400;color:var(--gold-hi)}
.tooltip .reserve-tip-hp{display:flex;align-items:center;gap:5px;font:13px/1.1 var(--disp);color:#f0dfb6}
.reserve-tip-hp img{width:16px;height:16px;object-fit:contain}
.reserve-tip-copy small{font-size:13px;line-height:1.3;color:var(--bone)}
.effect-tip-title{font-family:var(--disp);font-weight:400!important;font-size:15px!important;letter-spacing:.02em}
.effect-tip-list{display:flex;flex-direction:column;gap:7px}
.effect-tip-row{display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px;align-items:center;text-align:left}
.effect-tip-row.no-icon{grid-template-columns:minmax(0,1fr);gap:0}
.effect-tip-row>img,.effect-tip-row>.ecryst{width:22px;height:22px;object-fit:contain;justify-self:center}
.effect-tip-row>.effect-tip-copy{min-width:0;display:flex;flex-direction:column;gap:1px}
.effect-tip-row strong{font-size:13px;color:#f0dfb6;line-height:1.2}
.effect-tip-row small{font-size:11px;color:var(--bone);line-height:1.3}
.ecard-val[data-effect-help],.ef-val[data-effect-help]{cursor:help;touch-action:manipulation}
@keyframes ttIn{from{opacity:0;transform:translateX(-50%) translateY(-4px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
.battle-notice-dim{position:fixed;z-index:890;inset:0;background:radial-gradient(circle at 50% 42%,transparent 0 18%,rgba(4,4,5,.38) 62%,rgba(4,4,5,.68));pointer-events:none;opacity:0;transition:opacity .7s ease-in-out}
.battle-notice-dim.shown{opacity:1}
.battle-notice{--notice-tone:#a9bbc5;position:fixed;z-index:900;left:0;top:var(--notice-top);width:100vw;height:var(--notice-height);box-sizing:border-box;color:#f7ecd2;cursor:pointer;pointer-events:auto;opacity:0;transition:opacity .7s ease-in-out;filter:drop-shadow(0 16px 18px #000)}
.battle-notice.shown{opacity:1}
.battle-notice-phase-layer{position:absolute;z-index:1;inset:0;opacity:1;transition:opacity .28s ease-in-out}
.battle-notice-phase-layer.fresh{opacity:0}
.battle-notice.phase-swap-active .battle-notice-phase-layer.old{opacity:0}
.battle-notice.phase-swap-active .battle-notice-phase-layer.fresh{opacity:1}
.battle-notice:before{content:"";position:absolute;z-index:0;inset:0;background:linear-gradient(90deg,color-mix(in srgb,var(--notice-tone) 42%,#07100e) 0%,rgba(9,9,11,.96) 50%,color-mix(in srgb,var(--notice-tone) 19%,#09090b) 100%);-webkit-mask:url('../img/ui_narrator_charcoal.png') center/100% 138% no-repeat;mask:url('../img/ui_narrator_charcoal.png') center/100% 138% no-repeat}
.battle-notice-copy{position:absolute;z-index:4;inset:0;width:52%;box-sizing:border-box;padding:39px 10px 28px 22px;text-align:left}
.battle-notice-copy:after{content:"";position:absolute;left:22px;right:7%;top:88px;height:2px;background:linear-gradient(90deg,var(--notice-tone),transparent);opacity:.78}
.battle-notice-seal{position:absolute;left:20px;top:39px;width:50px;height:50px;object-fit:contain;filter:drop-shadow(0 4px 10px #000) drop-shadow(0 0 9px color-mix(in srgb,var(--notice-tone) 52%,transparent))}
.battle-notice h2{position:absolute;left:84px;top:50px;width:calc(100% - 94px);margin:0;font:400 27px/1 var(--disp);letter-spacing:.08em;color:var(--notice-tone);text-shadow:0 2px 7px #000,0 0 22px color-mix(in srgb,var(--notice-tone) 48%,transparent)}
.battle-notice-copy>div{position:absolute;left:22px;top:117px;width:calc(100% - 26px);margin:0;color:#f7ecd5;font:700 15px/1.35 var(--body);text-wrap:balance;text-shadow:0 2px 4px #000}
.battle-notice-line{display:block}
.battle-notice-line+.battle-notice-line{margin-top:6px}
.battle-notice-copy .fx-inline{display:inline;vertical-align:baseline;margin:0;white-space:nowrap}
.battle-notice-copy .fx-inline b{vertical-align:baseline;line-height:inherit}
.battle-notice-copy .fx-inline img,.battle-notice-copy .fx-inline .ecryst{display:inline-block;width:23px;height:23px;margin-right:3px;vertical-align:-6px;filter:drop-shadow(0 2px 2px #0008)}
.battle-notice-copy .fx-inline .ecryst{height:25px;width:17px}
.battle-notice-art{position:absolute;z-index:3;left:45%;right:0;top:0;width:55%;height:100%;overflow:hidden;-webkit-mask:url('../img/ui_narrator_charcoal.png') center/180% 138% no-repeat;mask:url('../img/ui_narrator_charcoal.png') center/180% 138% no-repeat}
.battle-notice-art-crop{position:absolute;inset:0;overflow:hidden;background:#09090b;clip-path:url(#battle-notice-torn-edge);-webkit-mask:url(#battle-notice-frayed-mask);mask:url(#battle-notice-frayed-mask)}
.battle-notice-art-crop>img{position:absolute;inset:0 auto auto 0;width:100%;height:100%;object-fit:cover;object-position:center top;filter:saturate(.96) contrast(1.03);transform:translateX(18px)}
.battle-notice.needle{--notice-tone:#d34742}
.battle-notice.needle:before{background:linear-gradient(90deg,#34100f 0%,rgba(12,8,9,.96) 51%,#17090a 100%)}
.battle-notice.needle h2{color:#f0d7ba;font-size:19px;letter-spacing:0;white-space:nowrap}
.battle-notice.needle.no-seal h2{left:22px;top:60px}
.battle-notice.needle.no-seal .battle-notice-copy:after{top:99px}
.battle-notice.needle.no-seal .battle-notice-copy>div{top:124px}
.battle-notice.needle .battle-notice-art-crop{background:radial-gradient(circle at 60% 48%,#4b1517 0,#1b0a0b 58%,#080708 100%)}
.battle-notice.needle .battle-notice-art-crop>img{left:26%;top:12%;width:52%;height:84%;object-fit:contain;filter:drop-shadow(0 8px 12px #000) drop-shadow(0 0 11px #d13b34aa);transform:rotate(7deg)}
.battle-notice.shell .battle-notice-seal{border-radius:50%;object-fit:cover;object-position:center 66%}
.battle-notice.shell .battle-notice-art-crop{background:radial-gradient(circle at 62% 47%,#39521b 0,#18200d 39%,#10090a 73%,#080708 100%)}
.battle-notice.shell .battle-notice-art-crop>img{left:25%;top:0;width:70%;height:100%;object-fit:cover;object-position:center 65%;filter:drop-shadow(0 8px 12px #000) drop-shadow(0 0 13px #a9ce27aa);transform:none}
.battle-notice.compact{filter:drop-shadow(0 7px 9px #000)}
.battle-notice.compact:before{-webkit-mask-size:100% 180%;mask-size:100% 180%}
.battle-notice-compact{position:absolute;z-index:4;inset:0;display:flex;align-items:center;gap:8px;box-sizing:border-box;padding:0 17px 0 13px;white-space:nowrap;text-shadow:0 2px 5px #000}
.battle-notice-compact-art{display:block;flex:0 0 36px;width:36px;height:36px;object-fit:contain;object-position:center;filter:drop-shadow(0 3px 5px #000) drop-shadow(0 0 7px color-mix(in srgb,var(--notice-tone) 54%,transparent))}
.battle-notice.shell.compact .battle-notice-compact-art{border-radius:4px;object-fit:cover;object-position:center 58%;box-shadow:0 0 0 1px color-mix(in srgb,var(--notice-tone) 55%,transparent)}
.battle-notice.needle.no-seal.compact h2{position:static;flex:1 1 auto;min-width:0;width:auto;margin:0;overflow:hidden;text-overflow:ellipsis;color:#f0d7ba;font:400 15px/1 var(--disp);letter-spacing:.02em;white-space:nowrap}
.battle-notice-compact-sep{display:block;flex:0 0 4px;width:4px;height:4px;border-radius:50%;background:var(--notice-tone);box-shadow:0 0 7px color-mix(in srgb,var(--notice-tone) 68%,transparent)}
.battle-notice-compact-energy{display:inline-flex;flex:0 0 auto;align-items:center;gap:3px;height:24px;color:#f7ecd5;font:700 16px/1 var(--body)}
.battle-notice-compact-energy b{line-height:1}
.battle-notice-compact-energy .ecryst{display:block;flex:0 0 13px;width:13px;height:22px;margin:0;filter:drop-shadow(0 2px 3px #000)}
.battle-notice-compact-warning{display:block;flex:0 0 auto;color:#f3dfc4;font:700 14px/1 var(--body)}
.battle-notice.rescue{--notice-tone:#d2a242}
.battle-notice.rescue:before{background:linear-gradient(90deg,#38250d 0%,rgba(13,11,9,.97) 48%,#21130c 100%)}
.battle-notice.rescue .battle-notice-compact{display:grid;grid-template-columns:36px auto;grid-template-rows:17px 22px;align-content:center;justify-content:center;column-gap:10px;row-gap:1px;padding:0 12px}
.battle-notice.rescue .battle-notice-compact-art{grid-column:1;grid-row:1/3;width:36px;height:36px;object-fit:contain;filter:drop-shadow(0 3px 5px #000) drop-shadow(0 0 8px #d2a24288)}
.battle-notice.rescue.no-seal.compact h2{position:static;grid-column:2;grid-row:1;justify-self:center;width:auto;margin:0;color:#e9c56d;font:400 14px/17px var(--disp);letter-spacing:.075em;text-align:center;white-space:nowrap;text-shadow:0 2px 5px #000,0 0 12px #8f5a1c88}
.battle-notice-rescue-details{grid-column:2;grid-row:2;justify-self:center;display:flex;align-items:center;gap:5px;min-width:0;color:#f6e8cc;font:700 13px/20px var(--body);white-space:nowrap}
.battle-notice-rescue-cost{display:inline-flex;align-items:center;gap:3px;color:#f3d47f}
.battle-notice-rescue-cost img{display:block;width:20px;height:20px;object-fit:contain;filter:drop-shadow(0 2px 3px #000)}
.battle-notice-rescue-share{color:#d9bd82;font-size:11px;letter-spacing:.01em}
.battle-notice-rescue-result{overflow:hidden;text-overflow:ellipsis;color:#f4dfc1;font-size:12px;letter-spacing:.01em}
@media(max-width:350px){.battle-notice-rescue-share{display:none}.battle-notice-rescue-result{font-size:12px}}
@media(max-height:699px){
  .battle-notice-copy{padding-top:27px}.battle-notice-seal{top:29px;width:44px;height:44px}.battle-notice h2{left:75px;top:38px;font-size:23px}.battle-notice-copy:after{top:76px}.battle-notice-copy>div{top:91px;font-size:13px;line-height:1.28}.battle-notice.needle h2{font-size:17px}.battle-notice-copy .fx-inline img,.battle-notice-copy .fx-inline .ecryst{width:19px;height:19px}.battle-notice-copy .fx-inline .ecryst{width:14px;height:21px}
}
@media(prefers-reduced-motion:reduce){.battle-notice,.battle-notice-dim{transition-duration:.01ms!important}}
.banner{position:fixed;left:0;right:0;top:34%;text-align:center;z-index:70;pointer-events:none;transition:opacity .6s}
.banner.gone{opacity:0}
.b-title{font-family:var(--disp);font-size:32px;color:var(--blood-hi);text-shadow:0 0 30px rgba(200,40,60,.8),0 2px 8px #000;letter-spacing:.08em}
.b-sub{font-size:15px;color:var(--bone);text-shadow:0 2px 8px #000}
.banner.phase-shift{left:50%;right:auto;top:29%;width:min(520px,calc(100% - 24px));box-sizing:border-box;transform:translateX(-50%);
  padding:15px 18px 17px;border:1px solid rgba(202,151,72,.82);border-radius:13px;
  background:linear-gradient(180deg,rgba(29,18,14,.97),rgba(9,8,9,.96));
  box-shadow:0 14px 42px rgba(0,0,0,.82),inset 0 0 32px rgba(178,55,42,.14)}
.banner.phase-shift .b-title{font-size:27px;line-height:1.08}
.banner.phase-shift .b-sub{margin:8px auto 0;max-width:460px;font:700 16px/1.32 var(--body);color:#f1dfb8}
.banner.phase-shift.p1{border-color:rgba(190,137,74,.82)}
.banner.phase-shift.p2{border-color:rgba(215,61,61,.9);box-shadow:0 14px 42px rgba(0,0,0,.82),inset 0 0 38px rgba(161,20,24,.28)}
.banner.phase-shift.p3{border-color:rgba(185,198,208,.82);box-shadow:0 14px 42px rgba(0,0,0,.82),inset 0 0 38px rgba(99,119,135,.22)}
.banner.phase-shift.p1 .b-title{color:#e7b768}.banner.phase-shift.p2 .b-title{color:#ff6266}.banner.phase-shift.p3 .b-title{color:#dbe5e9}
.banner.last-word{--last-word-tone:#c74b4f;left:0;right:0;top:50%;width:100vw;min-height:132px;box-sizing:border-box;transform:translateY(-50%);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:25px max(22px,env(safe-area-inset-right,0px)) 27px max(22px,env(safe-area-inset-left,0px));
  cursor:pointer;pointer-events:auto;filter:drop-shadow(0 15px 18px #000);transition:opacity .6s,transform .6s;touch-action:manipulation}
.banner.last-word:before{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#321012 0%,rgba(10,8,10,.98) 48%,#1b0a0c 100%);
  -webkit-mask:url('../img/ui_narrator_charcoal.png') center/100% 150% no-repeat;mask:url('../img/ui_narrator_charcoal.png') center/100% 150% no-repeat}
.banner.last-word:after{content:"";position:absolute;left:8%;right:8%;top:52px;height:1px;background:linear-gradient(90deg,transparent,var(--last-word-tone),transparent);opacity:.62}
.banner.last-word .b-title{font:400 18px/1 var(--disp);letter-spacing:.12em;color:#efcbc1;text-shadow:0 2px 7px #000,0 0 18px rgba(199,75,79,.42)}
.banner.last-word .b-sub{max-width:min(620px,calc(100vw - 44px));font:700 16px/1.38 var(--body);color:#f5e6cc;text-align:center;text-wrap:balance;text-shadow:0 2px 5px #000}
.banner.last-word .b-action{font:700 11px/1 var(--body);letter-spacing:.08em;color:#bd9b82;text-transform:uppercase;text-shadow:0 2px 4px #000}
.banner.last-word:focus-visible{outline:2px solid #e0b67a;outline-offset:-5px}
.banner.last-word.gone{opacity:0;transform:translateY(calc(-50% + 6px))}
@media(max-width:360px),(max-height:620px){
  .banner.last-word{min-height:120px;gap:7px;padding-top:21px;padding-bottom:23px}.banner.last-word:after{top:47px}.banner.last-word .b-title{font-size:16px}.banner.last-word .b-sub{font-size:14px;line-height:1.34}.banner.last-word .b-action{font-size:10px}
}
.banner.reinforcement{--reinforce-tone:#d8ad59;left:0;right:0;top:34vh;height:106px;padding:13px 22px;box-sizing:border-box;
  display:grid;grid-template-columns:74px minmax(0,1fr);grid-template-rows:18px 29px 19px;align-content:center;column-gap:14px;text-align:left;
  filter:drop-shadow(0 13px 16px #000);animation:reinforcementStripIn .34s ease-out both}
.banner.reinforcement:before{content:"";position:absolute;z-index:-1;inset:0;
  background:linear-gradient(90deg,#3b2611 0%,rgba(10,9,10,.97) 46%,#1b100b 100%);
  -webkit-mask:url('../img/ui_narrator_charcoal.png') center/100% 172% no-repeat;mask:url('../img/ui_narrator_charcoal.png') center/100% 172% no-repeat}
.banner.reinforcement:after{content:"";position:absolute;left:0;right:0;top:50%;height:1px;
  background:linear-gradient(90deg,transparent,rgba(226,181,90,.8) 18%,rgba(226,181,90,.15) 72%,transparent);opacity:.65}
.banner.reinforcement.gone{opacity:0;transform:translateY(6px)}
.banner.reinforcement .b-title{grid-column:2;grid-row:1;align-self:end;font:700 11px/1.15 var(--body);letter-spacing:.18em;color:#d9bd82;text-transform:uppercase;text-shadow:0 2px 5px #000}
.banner.reinforcement .b-sub{grid-column:2;grid-row:2;align-self:center;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font:400 20px/1.05 var(--disp);color:#f1d28a;letter-spacing:.01em;text-shadow:0 2px 8px #000,0 0 18px rgba(217,164,65,.25)}
.banner.reinforcement .b-action{grid-column:2;grid-row:3;align-self:start;font:700 13px/1.25 var(--body);color:#f3e6cd;text-shadow:0 2px 5px #000}
.banner-avatars{grid-column:1;grid-row:1/4;position:relative;display:block;width:74px;height:68px;margin:0}
.banner-avatar{position:absolute;left:calc(var(--avatar-index,0) * 17px);top:0;width:68px;height:68px;box-sizing:border-box;border:2px solid var(--reinforce-tone);border-radius:50%;object-fit:cover;object-position:center 20%;background:#15120f;box-shadow:inset 0 0 0 1px #2a1608,0 4px 12px #000,0 0 15px rgba(216,173,89,.28);animation:bannerAvatarIn .2s ease-out both}
.banner-avatar:nth-child(2){--avatar-index:1}.banner-avatar:nth-child(3){--avatar-index:2}
.banner.reinforcement.multi{grid-template-columns:86px minmax(0,1fr)}
.banner.reinforcement.multi .banner-avatars{width:86px}
.banner.reinforcement.multi .banner-avatar{top:5px;width:58px;height:58px;left:calc(var(--avatar-index,0) * 14px)}
@keyframes bannerAvatarIn{from{opacity:0;transform:scale(.72)}to{opacity:1;transform:scale(1)}}
@keyframes reinforcementStripIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}

@media(max-width:360px),(max-height:620px){
  .banner.reinforcement{top:33vh;height:92px;padding:10px 16px;grid-template-columns:60px minmax(0,1fr);grid-template-rows:16px 25px 18px;column-gap:10px}
  .banner.reinforcement .b-title{font-size:10px}.banner.reinforcement .b-sub{font-size:17px}.banner.reinforcement .b-action{font-size:12px}
  .banner-avatars{width:60px;height:58px}.banner-avatar{width:58px;height:58px}
  .banner.reinforcement.multi{grid-template-columns:72px minmax(0,1fr)}.banner.reinforcement.multi .banner-avatars{width:72px}.banner.reinforcement.multi .banner-avatar{top:5px;width:48px;height:48px;left:calc(var(--avatar-index,0) * 12px)}
}

/* FX: плавающие числа, тряска, пульс */
#fx{position:fixed;inset:0;pointer-events:none;z-index:80;overflow:hidden}
#fx.burn-blocking{pointer-events:auto;touch-action:none}
.float{position:absolute;transform:translate(-50%,-50%);font-weight:400;font-size:24px;font-family:var(--disp);letter-spacing:.01em;-webkit-text-stroke:.7px #000;paint-order:stroke fill;text-shadow:0 2px 5px #000,0 0 2px #000;white-space:nowrap;animation:floatUp 1.25s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes floatUp{0%{opacity:0;transform:translate(-50%,-40%) scale(.7)}18%{opacity:1;transform:translate(-50%,-70%) scale(1.15)}100%{opacity:0;transform:translate(-50%,-160%) scale(1)}}
.float.dmg{color:#ff5f6f}
.float.self{color:#ff9f6f}
.float.poison{color:#a6e36b}
.float.bleed{color:#ff8390;text-shadow:0 2px 4px #4a0812,0 0 9px rgba(190,24,48,.55)}
.float.burn{color:#ff9a3d;text-shadow:0 2px 4px #4c1304}
.float.chahotka{color:#d6a8ff;text-shadow:0 2px 4px #22062e,0 0 12px #6d278f}
.float.poison,.float.bleed,.float.burn,.float.chahotka{-webkit-text-stroke:0;paint-order:normal;animation-duration:1.45s}
.effect-float .dot-float{display:grid;grid-template-columns:38px auto;align-items:center;column-gap:4px;height:42px;line-height:42px}
.effect-float .dot-float img{display:block;width:34px;height:34px;margin:-4px auto 0;object-fit:contain;filter:drop-shadow(0 2px 2px #000)}
.effect-float .dot-float b{display:block;height:42px;line-height:42px;font:inherit;color:inherit}
.float.block,.float.blocked{color:#8ad9ff;font-size:15px}
.float.heal{color:#7ee0a0}
.float.buff{color:var(--gold-hi);font-size:15px}
.float.debuff{color:#c9a6ff;font-size:15px}
.float.thorns{color:#c8b06b;font-size:15px}
.float.break{color:#ff2d45;font-size:24px;letter-spacing:.06em}
.float.ecard{color:#ffe9c2;font-size:15px;font-style:italic;background:rgba(8,9,14,.9);border:1px solid rgba(255,77,99,.5);border-radius:8px;padding:3px 9px;box-shadow:0 4px 14px rgba(0,0,0,.6);animation:ecardPop 1s ease-out forwards}
@keyframes ecardPop{0%{opacity:0;transform:translate(-50%,-30%) scale(.6)}22%{opacity:1;transform:translate(-50%,-95%) scale(1)}80%{opacity:1;transform:translate(-50%,-105%) scale(1)}100%{opacity:0;transform:translate(-50%,-130%) scale(1)}}
/* Крупное число урона/яда по ЦЕНТРУ экрана — бьёт в центр, держится, всплывает и гаснет */
.float-c{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);pointer-events:none;white-space:nowrap;
  font-family:var(--disp);font-weight:400;font-size:66px;line-height:1;letter-spacing:.02em;
  text-shadow:0 3px 0 rgba(0,0,0,.5),0 0 22px rgba(0,0,0,.9);animation:floatCenter 1.15s cubic-bezier(.16,.8,.3,1) forwards}
.float-c.dmg{color:#ff4d5e;-webkit-text-stroke:2px #5a0d15}
.float-c.poison{color:#b6f05a}
.float-c.burn{color:#ff9a3d}
.float-c.chahotka{color:#d9acff;text-shadow:0 3px 0 #1f0928,0 0 24px #7f37a1}
.float-c.goldloss{color:#f0b84b;text-shadow:0 3px 0 #4d2707,0 0 26px rgba(226,143,39,.8)}
.float-c.poison,.float-c.burn,.float-c.chahotka,.float-c.goldloss{-webkit-text-stroke:0;paint-order:normal;animation-duration:1.35s}
.float-c.effect-float{font-size:52px}
.float-c.effect-float .dot-float{grid-template-columns:50px auto;height:58px;line-height:58px}
.float-c.effect-float .dot-float img{width:46px;height:46px;margin:0 auto}
.float-c.effect-float .dot-float b{height:58px;line-height:58px;transform:translateY(6px)}
.float-c.blocked{color:#9bd8ff;font-size:38px;-webkit-text-stroke:1px #12405a}
@keyframes floatCenter{
  0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}
  16%{opacity:1;transform:translate(-50%,-56%) scale(1.18)}
  30%{transform:translate(-50%,-56%) scale(1)}
  72%{opacity:1;transform:translate(-50%,-70%) scale(1)}
  100%{opacity:0;transform:translate(-50%,-92%) scale(.9)}}
.burn-away-vfx{position:fixed;z-index:84;border-radius:12px;background-size:cover;background-position:center 12%;pointer-events:none;
  overflow:visible;isolation:isolate;animation:burnPortrait 1.5s cubic-bezier(.35,.02,.62,1) forwards}
.burn-away-vfx::after{content:'';position:absolute;inset:-10%;z-index:1;border-radius:16px;mix-blend-mode:screen;pointer-events:none;
  background:radial-gradient(ellipse at 50% 62%,rgba(255,199,92,.34),rgba(191,48,12,.16) 38%,transparent 72%);
  animation:burnGlow 1.5s ease-out forwards}
.burn-away-vfx canvas{position:absolute;z-index:2;left:-18%;top:-18%;width:136%;height:136%;mix-blend-mode:screen;
  filter:drop-shadow(0 0 3px rgba(255,112,20,.75));pointer-events:none}
@keyframes burnPortrait{
  0%{opacity:1;clip-path:inset(0 0 0 0);filter:none;transform:scale(1)}
  18%{filter:brightness(.72) contrast(1.28) sepia(.35) saturate(1.35)}
  42%{filter:brightness(.48) contrast(1.7) sepia(.8) saturate(1.8)}
  78%{opacity:.9;clip-path:inset(0 0 70% 0);filter:brightness(.28) contrast(2) sepia(1) saturate(2.2)}
  100%{opacity:0;clip-path:inset(0 0 100% 0);filter:brightness(.18) contrast(2.2) sepia(1);transform:scale(.96) translateY(-5px)}
}
@keyframes burnGlow{0%,100%{opacity:0}18%{opacity:.3}48%{opacity:.88}76%{opacity:.35}}

/* ===== БОЕВЫЕ АНИМАЦИИ АТАК ===== */
/* контейнер эффекта поверх цели */
.sfx{position:fixed;z-index:86;pointer-events:none;overflow:visible}
/* РАССЕЧЕНИЕ / КОГТИ — 3 диагональные полосы */
.sfx-slash,.sfx-claw{transform:rotate(var(--ang,0deg))}
.sfx-slash span,.sfx-claw span{position:absolute;left:-16%;top:50%;width:132%;height:2px;border-radius:1px;transform-origin:left center;opacity:0}
/* острое РАССЕЧЕНИЕ — тонкие резкие светящиеся полосы (не толстые бруски) */
.sfx-slash span{height:2.5px;background:linear-gradient(90deg,transparent 4%,rgba(200,240,255,.6) 34%,#fff 50%,rgba(200,240,255,.6) 66%,transparent 96%);box-shadow:0 0 3px #fff,0 0 7px #7fd8ff;animation:slashWipe .5s ease-out forwards}
.sfx-slash span:nth-child(2){top:44%;height:1.5px;animation-delay:.04s}
.sfx-slash span:nth-child(3){top:56%;height:1.5px;animation-delay:.08s}
/* когти — полосы с ЗАОСТРЁННЫМИ концами с обеих сторон (эллиптическая маска сужает к остриям) */
.sfx-claw span{background:linear-gradient(90deg,transparent 2%,#ff5a5a 38%,#ffcaca 50%,#ff5a5a 62%,transparent 98%);
  filter:drop-shadow(0 0 4px #ff3a3a);height:9px;border-radius:0;
  -webkit-mask:radial-gradient(ellipse 50% 54% at 50% 50%,#000 46%,transparent 74%);
  mask:radial-gradient(ellipse 50% 54% at 50% 50%,#000 46%,transparent 74%);
  animation:slashWipe .52s ease-out forwards}
.sfx-claw span:nth-child(2){top:40%;left:-10%;width:120%;height:8px;animation-delay:.05s}
.sfx-claw span:nth-child(3){top:60%;left:-10%;width:120%;height:8px;animation-delay:.1s}
@keyframes slashWipe{0%{opacity:0;clip-path:inset(0 100% 0 0)}25%{opacity:1}60%{opacity:1;clip-path:inset(0 0 0 0)}100%{opacity:0;clip-path:inset(0 0 0 0)}}
/* МАГИЯ — вспышка + расходящееся кольцо */
.sfx-magic::before{content:'';position:absolute;inset:22%;border-radius:50%;background:radial-gradient(circle,rgba(180,140,255,.9),rgba(120,90,220,.35) 55%,transparent 72%);animation:magicFlash .68s ease-out forwards}
.sfx-magic::after{content:'';position:absolute;inset:30%;border-radius:50%;border:3px solid #c9a6ff;box-shadow:0 0 14px #b98aff;opacity:0;animation:magicRing .74s ease-out forwards}
@keyframes magicFlash{0%{transform:scale(.4);opacity:0}30%{opacity:1}100%{transform:scale(1.15);opacity:0}}
@keyframes magicRing{0%{transform:scale(.3);opacity:0}30%{opacity:.95}100%{transform:scale(1.7);opacity:0}}
/* ЯД — зелёная вспышка + брызги */
.sfx-poison::before{content:'';position:absolute;inset:20%;border-radius:50%;background:radial-gradient(circle,rgba(120,220,80,.85),rgba(70,160,40,.4) 55%,transparent 72%);animation:magicFlash .68s ease-out forwards}
.sfx-poison::after{content:'';position:absolute;inset:0;border-radius:14px;background:
  radial-gradient(circle at 30% 35%,#8fe04a 0 4%,transparent 5%),
  radial-gradient(circle at 68% 30%,#7ad03a 0 3%,transparent 4%),
  radial-gradient(circle at 40% 70%,#9fe85a 0 3.5%,transparent 4.5%),
  radial-gradient(circle at 72% 66%,#7ad03a 0 3%,transparent 4%),
  radial-gradient(circle at 55% 50%,#8fe04a 0 3%,transparent 4%);
  opacity:0;animation:poisonSplat .8s ease-out forwards}
@keyframes poisonSplat{0%{transform:scale(.5);opacity:0}35%{opacity:1}100%{transform:scale(1.25);opacity:0}}
/* Кровотечение — короткий пульс раны и расходящиеся капли; используется именно на тике. */
.sfx-bleed::before{content:'';position:absolute;inset:20%;border-radius:50%;background:radial-gradient(circle,rgba(255,98,119,.72),rgba(123,10,31,.42) 48%,transparent 72%);animation:bleedPulse .72s ease-out forwards}
.sfx-bleed::after{content:'';position:absolute;inset:4%;background:
  radial-gradient(ellipse at 28% 34%,#ff6b7f 0 2.5%,transparent 3.8%),
  radial-gradient(ellipse at 67% 25%,#cf2747 0 2%,transparent 3.2%),
  radial-gradient(ellipse at 42% 68%,#ee4963 0 2.8%,transparent 4%),
  radial-gradient(ellipse at 74% 65%,#a81734 0 2.3%,transparent 3.5%);
  opacity:0;animation:bleedDrops .82s ease-out forwards}
@keyframes bleedPulse{0%{transform:scale(.42);opacity:0}28%{opacity:1}100%{transform:scale(1.25);opacity:0}}
@keyframes bleedDrops{0%{transform:translateY(-8px) scale(.65);opacity:0}30%{opacity:1}100%{transform:translateY(18px) scale(1.12);opacity:0}}
.shake{animation:shakeAnim .4s ease}
@keyframes shakeAnim{0%,100%{transform:translateX(0)}18%{transform:translateX(-6px)}38%{transform:translateX(5px)}58%{transform:translateX(-4px)}78%{transform:translateX(3px)}}
.pulse{animation:pulseAnim .5s ease}
@keyframes pulseAnim{0%{filter:brightness(1)}45%{filter:brightness(1.6) drop-shadow(0 0 10px rgba(255,120,120,.7))}100%{filter:brightness(1)}}

.pc-fly{position:fixed;transform:translate(-50%,-50%);z-index:86;pointer-events:none;transition:left .28s cubic-bezier(.2,.7,.3,1),top .28s cubic-bezier(.2,.7,.3,1),transform .28s cubic-bezier(.2,.7,.3,1),opacity .3s;filter:drop-shadow(0 12px 26px rgba(0,0,0,.75))}
.pc-fly .card{width:100%!important;height:100%!important;min-height:0!important;margin:0!important;transform:none!important}
.pc-fly.ash-flight{transition:none!important;filter:drop-shadow(0 14px 30px rgba(0,0,0,.9))}
.pc-fly.ash-flight .card-burn{animation:cardAshChar .8s cubic-bezier(.32,.02,.52,1) forwards}
.card-burn-front{position:absolute;z-index:9;left:-18%;top:-18%;width:136%;height:136%;pointer-events:none;
  mix-blend-mode:screen;filter:drop-shadow(0 0 5px #ff741f) saturate(1.45);
  animation:cardBurnFrontFade .8s ease-out forwards}
.card-char-haze{position:absolute;z-index:8;inset:-8%;pointer-events:none;border-radius:18px;
  background:radial-gradient(ellipse at 50% 74%,rgba(255,119,24,.42),rgba(122,28,9,.16) 37%,transparent 69%);
  mix-blend-mode:screen;animation:cardCharHaze .8s ease-out forwards}
.card-char-edge{position:absolute;z-index:10;left:-5%;bottom:-12%;width:110%;height:34px;pointer-events:none;opacity:0;
  background:radial-gradient(ellipse at 7% 58%,rgba(24,14,9,.72) 0 18%,transparent 47%),
    radial-gradient(ellipse at 25% 39%,rgba(86,31,10,.58) 0 16%,transparent 46%),
    radial-gradient(ellipse at 46% 62%,rgba(20,13,9,.76) 0 19%,transparent 49%),
    radial-gradient(ellipse at 68% 37%,rgba(101,38,11,.54) 0 15%,transparent 44%),
    radial-gradient(ellipse at 89% 56%,rgba(25,14,9,.7) 0 18%,transparent 47%);
  filter:blur(5.2px);mix-blend-mode:multiply;animation:cardCharEdge .8s cubic-bezier(.32,.02,.52,1) forwards}
@keyframes cardAshChar{
  0%,18%{filter:none;clip-path:polygon(0 0,100% 0,100% 100%,93% 99%,86% 100%,78% 99%,69% 100%,61% 98%,53% 100%,44% 99%,36% 100%,27% 99%,19% 100%,10% 99%,0 100%);opacity:1}
  38%{filter:brightness(.78) contrast(1.16) sepia(.35) saturate(1.25);clip-path:polygon(0 0,100% 0,100% 92%,93% 94%,86% 91%,78% 93%,69% 90%,61% 92%,53% 89%,44% 94%,36% 91%,27% 93%,19% 90%,10% 92%,0 91%);opacity:1}
  66%{filter:brightness(.58) contrast(1.32) sepia(.62) saturate(1.22);clip-path:polygon(0 0,100% 0,100% 52%,93% 55%,86% 51%,78% 54%,69% 50%,61% 53%,53% 49%,44% 55%,36% 52%,27% 54%,19% 50%,10% 53%,0 51%);opacity:.94}
  88%{filter:brightness(.42) contrast(1.48) sepia(.86) blur(.25px);clip-path:polygon(0 0,100% 0,100% 7%,93% 9%,86% 6%,78% 8%,69% 5%,61% 9%,53% 6%,44% 8%,36% 5%,27% 9%,19% 6%,10% 8%,0 6%);opacity:.88}
  100%{filter:brightness(.38) contrast(1.5) sepia(.9) blur(.35px);clip-path:polygon(0 0,100% 0,100% 0,93% 0,86% 0,78% 0,69% 0,61% 0,53% 0,44% 0,36% 0,27% 0,19% 0,10% 0,0 0);opacity:0}}
@keyframes cardCharHaze{0%,100%{opacity:0;transform:scale(.82)}28%{opacity:.45}57%{opacity:1;transform:scale(1.08)}78%{opacity:.35;transform:scale(1.18)}}
@keyframes cardBurnFrontFade{0%,64%{opacity:1}78%{opacity:.38}88%,100%{opacity:0}}
@keyframes cardCharEdge{
  0%,28%{bottom:-12%;opacity:0;transform:scaleX(.88)}
  43%{bottom:2%;opacity:.52;transform:scaleX(1)}
  68%{bottom:43%;opacity:.66;transform:scaleX(1.03)}
  84%{bottom:90%;opacity:.24;transform:scaleX(.92)}
  100%{bottom:100%;opacity:0;transform:scaleX(.8)}}
.card-char-shard{position:fixed;z-index:87;pointer-events:none;opacity:0;will-change:transform,opacity;
  border-radius:28% 14% 35% 18%;background:linear-gradient(145deg,#8b3b16 0,#3a2116 38%,#17120f 76%);
  box-shadow:inset 0 0 1px rgba(255,151,53,.65),0 0 3px rgba(255,93,24,.2);
  animation:cardCharShardFall var(--shard-time) cubic-bezier(.22,.02,.42,1) var(--delay) both}
@keyframes cardCharShardFall{
  0%{opacity:0;transform:translate3d(0,0,0) rotate(0) scale(.65)}
  10%{opacity:.82}
  30%{opacity:.92;transform:translate3d(var(--kick-x),var(--lift),0) rotate(var(--half-spin)) scale(1)}
  74%{opacity:.7}
  100%{opacity:0;transform:translate3d(var(--dx),var(--dy),0) rotate(var(--spin)) scale(.12)}}
.ash-particle{position:fixed;z-index:88;width:var(--size);height:calc(var(--size) * .72);margin:calc(var(--size) * -.5) 0 0 calc(var(--size) * -.5);
  border-radius:18% 73% 32% 61%;pointer-events:none;background:#171310;box-shadow:0 0 2px rgba(0,0,0,.85);
  animation:ashParticleFall var(--ash-time) cubic-bezier(.25,.08,.44,1) var(--delay) forwards;opacity:0}
.ash-particle.ember{background:#f06b26;box-shadow:0 0 7px rgba(255,111,31,.95)}
@keyframes ashParticleFall{
  0%{opacity:0;transform:translate3d(0,0,0) rotate(0) scale(.7)}
  12%{opacity:1;transform:translate3d(var(--drift),-12px,0) rotate(35deg) scale(1)}
  58%{opacity:.9;transform:translate3d(calc(var(--dx) * .48 + var(--drift)),calc(var(--dy) * .45 - 18px),0) rotate(calc(var(--rot) * .55)) scale(.82)}
  100%{opacity:0;transform:translate3d(var(--dx),var(--dy),0) rotate(var(--rot)) scale(.25)}}
/* затасовка сброса в колоду: пачка карточек летит из правой кучи в левую по дуге */
.shuf-card{position:fixed;z-index:83;width:15px;height:20px;margin:-10px 0 0 -7.5px;border-radius:3px;
  background:#efe1bf;border:1.5px solid #1a120a;box-shadow:0 2px 5px rgba(0,0,0,.5);pointer-events:none;
  opacity:0;animation:shufFly .85s cubic-bezier(.35,.05,.35,1) forwards}
@keyframes shufFly{
  0%{opacity:0;transform:translate(0,0) rotate(0deg) scale(.8)}
  15%{opacity:1}
  50%{transform:translate(calc(var(--dx) * .5),calc(var(--dy) * .5 + var(--arc,-26px))) rotate(-120deg) scale(1)}
  85%{opacity:1}
  100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(-260deg) scale(.7)}}

/* окно-интро локации */
.loc-intro{position:fixed;inset:0;z-index:88;display:flex;align-items:center;justify-content:center;background:rgba(5,6,10,.66);opacity:0;transition:opacity .3s;padding:24px}
.loc-intro.in{opacity:1}
.loc-intro.out{opacity:0}
.li-card{text-align:center;max-width:340px;transform:translateY(12px) scale(.95);transition:transform .38s cubic-bezier(.2,.7,.3,1);background:transparent;padding:0;filter:drop-shadow(0 16px 30px rgba(0,0,0,.6))}
.li-in{padding:4px 8px;background:transparent;border:30px solid transparent;border-image:url('../img/ui_paper_burnt.webp') 132 fill / 30px stretch}
.li-in>*{position:relative;z-index:1}
.loc-intro.in .li-card{transform:translateY(0) scale(1)}
.li-title{font-family:var(--disp);font-size:24px;color:var(--pbrown);letter-spacing:.02em}
.li-desc{margin-top:8px;font-size:13px;font-style:italic;color:var(--pmut);line-height:1.5}

.screenfade{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  overflow:hidden;color:#20160d;background:#dfd0aa url('../img/_parch.webp') center/cover;
  opacity:0;transition:opacity .32s;z-index:90;pointer-events:none}
.screenfade.on{opacity:1}
.defeat-screenfade{position:fixed;z-index:92;inset:0;pointer-events:none;opacity:0;background:radial-gradient(circle at 50% 45%,rgba(122,0,0,.35),rgba(5,5,8,.97) 68%);transition:opacity .48s ease}
.defeat-screenfade:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 45%,rgba(255,45,32,.22),transparent 34%);mix-blend-mode:screen}
.defeat-screenfade.on{opacity:1}
@keyframes panelIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

@media (min-width:700px){
  body::before{content:'';position:fixed;inset:0;background:radial-gradient(ellipse at center,#141726,#05060a);z-index:-1}
}

/* ===== ЗОЛОТО / ИНВЕНТАРЬ / МАГАЗИН (v9) ===== */
.gold-chip{display:inline-flex;align-items:center;gap:3px;background:rgba(74,51,22,.55);border:1px solid rgba(217,164,65,.55);color:var(--gold-hi);border-radius:12px;padding:3px 10px;font-weight:700;font-size:13px;font-family:var(--serif)}
.gold-chip.sm{font-size:13px;padding:2px 8px}
.gold-chip .c{font-size:13px}
/* стилизованные UI-иконки (замена эмодзи) */
.gold-ic{width:13px;height:13px;object-fit:contain;vertical-align:-2px}
.gold-chip.sm .gold-ic{width:12px;height:12px}
.telo-ic{width:13px;height:13px;object-fit:contain;vertical-align:-2px}
.bb-ic{width:11px;height:11px;object-fit:contain}
.hud-ic{width:20px;height:20px;object-fit:contain}
.inv-hint-ic{width:14px;height:14px;object-fit:contain}
.btn-ic{width:17px;height:17px;object-fit:contain;vertical-align:-3px;margin-right:5px}

/* деньги за бой — золото на ТЁМНОЙ плашке (жёлтое по кремовому пергаменту нечитаемо!) */
.rew-hd{display:flex;align-items:center;justify-content:center;gap:9px}
.gold-won{display:inline-flex;align-items:center;gap:3px;line-height:1;color:var(--gold-hi);font-size:13px;font-weight:700;background:rgba(28,17,6,.9);border:1px solid rgba(217,164,65,.55);border-radius:9px;padding:3px 9px;white-space:nowrap}
.gold-won .gld{height:14px;width:auto;object-fit:contain;display:block}
.hud-row2{display:flex;align-items:center;gap:8px;margin-top:5px;flex-wrap:wrap}
.hud-btns{display:flex;flex-direction:column;gap:5px;flex:none}
#btn-inv{font-size:18px;min-width:40px}
.mi-txt{font-size:18px;line-height:1;color:#5a3d20}
.mi-saga{width:30px;height:30px;object-fit:contain}

.item-row{display:flex;gap:9px;justify-content:center;flex-wrap:wrap}
.item-row.wrap{max-height:none}
.treasure-screen{padding-left:8px;padding-right:8px}
.treasure-panel{width:100%;max-width:410px;margin-left:auto;margin-right:auto}
.treasure-panel .panel-in{width:100%;border-width:24px;padding-left:10px;padding-right:10px}
.treasure-panel .item-row{width:100%}
.treasure-panel .item-card{flex:0 0 100%;width:100%;max-width:none;min-width:0}
.item-card{width:286px;max-width:92vw;display:flex;gap:11px;align-items:stretch;background:linear-gradient(160deg,#ede2c2,#d8c298);border:1.5px solid #8a6a3a;border-radius:10px;padding:10px;position:relative;cursor:pointer;text-align:left;transition:transform .12s;box-shadow:0 2px 8px rgba(40,25,12,.35);min-height:94px}
.item-card:active{transform:scale(.97)}
/* кант карточки предмета по редкости — та же лестница, что у карт */
.item-card.ir-c{border-color:rgba(150,150,160,.55)}
.item-card.ir-u{border-color:rgba(96,196,120,.8);box-shadow:0 0 9px rgba(80,190,110,.28)}
.item-card.ir-r{border-color:rgba(90,160,240,.85);box-shadow:0 0 10px rgba(80,150,240,.3)}
.item-card.ir-e{border-color:rgba(190,120,255,.9);box-shadow:0 0 12px rgba(170,90,255,.35)}
.item-card.ir-l{border-color:rgba(255,164,60,.95);box-shadow:0 0 13px rgba(255,140,30,.4)}
.item-card.dim{opacity:.5}
.item-card.on{border-color:#7a5a1f;box-shadow:0 0 0 2px rgba(122,90,48,.5),0 2px 8px rgba(40,25,12,.4)}
.item-card.on::after{content:none}
.it-body{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;padding-right:27px}
.it-top{position:absolute;top:9px;right:9px;display:flex;align-items:center;justify-content:flex-end}
.item-card.selling .it-top{position:absolute;top:7px;right:7px;margin:0}
.it-name{font-weight:400;font-size:15px;line-height:1.08;margin:1px 0 4px;font-family:var(--disp);color:var(--pbrown);padding-right:28px}
.item-card.selling .it-name{padding-right:58px}
.it-eq{font-size:15px;color:#2f7d4a;margin-left:5px;text-transform:uppercase;letter-spacing:.04em}
.it-eff{font-size:15px;line-height:1.28;color:var(--pdark)}
.it-set{display:block;margin-top:4px;font-size:15px;line-height:1.2;color:#8a5a1f;font-style:italic}
.it-cost{flex:none;font-weight:700;color:#8a5a1f;font-size:15px;white-space:nowrap}
.it-cost .c{font-size:15px}
.it-slot-icon{position:absolute;right:9px;bottom:8px;width:25px;height:25px;object-fit:contain;opacity:.78;filter:sepia(.35) drop-shadow(0 1px 1px rgba(40,25,12,.28))}
.item-card.on .it-slot-icon{box-sizing:content-box;padding:3px;right:6px;bottom:5px;border:2px solid #7b1715;border-radius:50%;background:rgba(239,221,178,.72);opacity:1}
.item-card.selling .it-cost{display:inline-flex;align-items:center;gap:3px;padding:4px 7px;border:1px solid #090605;border-radius:9px;background:#241811;color:#f4d58e;box-shadow:0 2px 6px rgba(0,0,0,.52);text-shadow:0 1px 1px #120b07}
.item-card.selling .it-cost .gold-ic{filter:drop-shadow(0 1px 1px #251304)}

.shop-hd{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.shop-hd-r{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.shop-hero-thumb{display:block;padding:0;background-color:#17130f;appearance:none}
.hp-chip{display:inline-flex;align-items:center;gap:3px;font-family:var(--disp);font-size:13px;color:#5a1a1a;background:rgba(154,31,28,.1);border:1px solid #9a1f1c;border-radius:9px;padding:2px 8px}
.hp-chip img{width:14px;height:14px;filter:brightness(0) saturate(1)}
.shop-sec{font-family:var(--disp);font-size:15px;color:#8a1f1c;margin:12px 0 5px;border-bottom:1.5px solid rgba(122,60,30,.45);padding-bottom:3px}
.shop-lead{margin:13px 0 12px;font:15px/1.38 var(--serif);text-align:center;color:#392719}
.shop-tabs{display:grid;grid-template-columns:1fr 1fr;margin:0 0 12px;border-bottom:1.5px solid rgba(122,60,30,.45)}
.shop-tab{min-height:42px;border:0;border-bottom:3px solid transparent;background:transparent;color:#684221;font:15px var(--disp);cursor:pointer}
.shop-tab.on{color:#8a1f1c;border-bottom-color:#8a1f1c;background:linear-gradient(180deg,transparent,rgba(138,31,28,.07))}
.shop-mode-title{margin:0 0 8px;color:#5a321d;font:15px var(--serif);text-align:center}
.shop-empty{padding:28px 12px;color:#705d45;font:15px var(--serif);text-align:center}
.shop-panel .panel-in,.inv-panel .panel-in{max-height:82vh;overflow-y:auto}
/* легендарная карта в лавке */
.legend-buy{display:flex;flex-direction:column;align-items:center;gap:7px;padding:10px;border-radius:12px;background:radial-gradient(circle at 50% 20%,rgba(150,80,220,.16),rgba(12,13,20,.5));border:1.5px solid rgba(170,90,255,.5);cursor:pointer;transition:transform .12s,border-color .15s;width:max-content;margin:0 auto}
.legend-buy .card{margin:0;transform:scale(1.35);transform-origin:top center;margin-bottom:36px;pointer-events:none}
.legend-buy:hover,.legend-buy:active{transform:translateY(-1px);border-color:rgba(200,130,255,.9)}
.legend-buy.dim{opacity:.55;filter:grayscale(.3)}
.legend-price{align-self:center}
.hud-exit{font-size:15px}
.ev-text.sm{font-size:13px}
.eq-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:6px 0}
.eq-slot{background:rgba(10,11,18,.5);border:1px solid rgba(232,226,208,.18);border-radius:8px;padding:6px 8px;min-height:50px}
.eq-slot-hd{font-size:13px;color:var(--bone-dim);margin-bottom:3px}
.slot-item{display:inline-block;font-size:13px;color:var(--teal);cursor:pointer;background:rgba(63,209,196,.12);border-radius:6px;padding:2px 6px;margin:1px 2px 1px 0}
.slot-empty{font-size:13px;color:#6b6350;font-style:italic}
.set-box{background:rgba(210,190,150,.5);border:1px solid #8a6a3a;border-radius:8px;padding:8px 10px;margin:8px 0}
.set-line{font-size:13px;margin:3px 0;color:var(--pdark)}
.set-line b{color:#8a5a1f}
.set-line span{display:block;color:var(--pmut);font-size:11px}

/* ===== ЗОНЫ DRAG-N-DROP (v10): атака=верх/красный, защита=низ/синий, талант=низ/жёлтый ===== */
.dropzone{position:absolute;left:0;right:0;z-index:20;pointer-events:none;opacity:0;transition:opacity .15s;display:flex;justify-content:center}
.dropzone.show{opacity:.62}
.dropzone.active{opacity:.98}
/* высота = --pl, её ставит showDropZone() из PLAY_LINE(); 52% — запасной вариант */
.dropzone.top{top:0;height:var(--pl,52%);align-items:flex-start;padding-top:calc(36vh + var(--sat))}
/* «на себя» — зона строго по HUD, не пол-экрана */
/* нижняя зона — всё, что ниже линии: границы зон обязаны сходиться, между ними не должно быть
   полосы, где не срабатывает ничего (или срабатывает не то, что показано) */
.dropzone.bottom{top:var(--pl,52%);bottom:0;height:auto;align-items:center;padding-bottom:calc(10px + var(--sab))}
.dz-lbl{font-family:var(--disp);font-size:32px;letter-spacing:.05em;line-height:1.05;text-align:center;text-transform:uppercase;opacity:.96;padding:0 14px;text-shadow:0 2px 10px rgba(0,0,0,.9)}
.dropzone.active .dz-lbl{font-size:32px}
.zone-atk{background:linear-gradient(180deg,rgba(200,40,60,.55),rgba(200,40,60,0) 78%);box-shadow:inset 0 3px 0 rgba(255,77,99,.7)}
.zone-atk .dz-lbl{color:#ffc2c8}
.zone-def{background:linear-gradient(0deg,rgba(40,120,210,.55),rgba(40,120,210,0) 78%);box-shadow:inset 0 -3px 0 rgba(90,170,255,.7)}
.zone-def .dz-lbl{color:#bfe0ff}
.zone-talent{background:linear-gradient(0deg,rgba(210,168,40,.55),rgba(210,168,40,0) 78%);box-shadow:inset 0 -3px 0 rgba(243,201,107,.75)}
.zone-talent .dz-lbl{color:#ffe9ad}

/* блокировка непроигрываемой карты: серая маска + замок + причина */
.card.dim .cin{filter:saturate(.25) brightness(.7)}
.lock-ov{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:rgba(14,11,7,.55);border-radius:inherit;z-index:6;pointer-events:none}
.lk-ic{font-size:18px;filter:grayscale(1) drop-shadow(0 1px 2px #000)}
.lk-r{font-size:11px;color:#efe6d4;text-transform:uppercase;letter-spacing:.04em;text-shadow:0 1px 3px #000;text-align:center;line-height:1.1;max-width:92%}
.car-item .lk-ic{font-size:40px}
.car-item .lk-r{font-size:15px}
.lk-ic-img{width:26px;height:26px;object-fit:contain;filter:drop-shadow(0 1px 3px #000)}
/* тап-тултип пилюль статусов */
.stip{position:fixed;z-index:120;max-width:220px;padding:7px 10px;border-radius:9px;font-family:var(--serif);font-size:13px;line-height:1.3;color:#2a1c10;background:linear-gradient(150deg,#f0e4c4,#d8c193);border:1.5px solid #8a6a3a;box-shadow:0 8px 22px rgba(0,0,0,.6);transform:translateX(-50%);pointer-events:none}

/* предпросмотр урона при перетаскивании атаки */
.drag-dmg{position:fixed;transform:translate(-50%,-50%);z-index:88;pointer-events:none;font-family:var(--disp);font-size:32px;font-weight:400;color:#ff5f6f;text-shadow:0 2px 7px #000,0 0 3px #000,0 0 12px rgba(200,40,60,.75);opacity:0;transition:opacity .1s}
.drag-dmg.show{opacity:1}
.drag-dmg.show{opacity:1}
.strip .si.dbf{filter:drop-shadow(0 1px 1px rgba(0,0,0,.5))}

/* ===== ИНВЕНТАРЬ (v40): полноэкранный экран снаряжения по концепту ===== */
.ir-c{--rc:#9aa0ad}.ir-u{--rc:#5fbe6e}.ir-r{--rc:#5aa0f0}.ir-e{--rc:#be78ff}.ir-l{--rc:#ffa43c}
.inv-screen{position:absolute;inset:0;overflow:hidden}
.inv-bg{display:none}
.inv-parch{position:absolute;inset:0;display:flex;flex-direction:column;gap:8px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#9f7840 transparent;
  padding:calc(6px + env(safe-area-inset-top,0)) 10px calc(8px + env(safe-area-inset-bottom,0));
  background:#e8d7b1;
  border:22px solid transparent;border-image:url('../img/ui_paper_flush.webp') 20 fill / 22px stretch}
.inv-parch>*{position:relative;z-index:1}
.inv-hd{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:7px;flex:none}
.inv-title{font-family:var(--disp);font-size:clamp(21px,6vw,26px);letter-spacing:.01em;color:#9a1f1c;text-align:center;margin:0;min-width:0}
.inv-back{flex:none;display:flex;align-items:center;justify-content:center;width:38px;height:34px;padding:0;
  font-family:var(--disp);font-size:24px;line-height:1;color:#4a3316;cursor:pointer;
  background:rgba(60,40,20,.1);border:1.5px solid #b58a3a;border-radius:12px}
.inv-back:active{background:rgba(120,86,40,.28)}
.inv-gold{display:flex;align-items:center;gap:5px;background:rgba(60,40,20,.1);border:1.5px solid #b58a3a;border-radius:20px;padding:3px 11px;font-family:var(--disp);font-size:15px;color:#4a3316}
.inv-gold .gold-ic{width:15px;height:15px}
.inv-loadout{display:flex;flex:none;min-height:0;flex-direction:column;gap:8px;overflow:visible}
.inv-stats{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-height:42px;padding:3px 2px;overflow:visible;flex:none}
.inv-stat{display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:0 0 auto;min-width:51px;height:36px;box-sizing:border-box;padding:4px 8px;border:1px solid rgba(139,91,30,.48);border-radius:11px;background:linear-gradient(180deg,rgba(255,248,224,.8),rgba(195,157,91,.32));box-shadow:inset 0 1px 0 rgba(255,255,255,.48),0 1px 2px rgba(70,43,13,.18);color:#4b2f10;font:inherit;cursor:pointer}
.inv-stat:active{transform:translateY(1px);background:linear-gradient(180deg,rgba(226,199,143,.72),rgba(176,132,65,.38))}
.inv-stat img,.inv-stat .ecryst{width:22px;height:22px;flex:none;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(43,25,7,.35))}
.inv-stat b{font-family:var(--disp);font-size:15px;line-height:1;color:#3a2110;font-weight:400}
.inv-stat-empty{opacity:.58}
.inv-doll{position:relative;flex:none;width:100%;height:auto;aspect-ratio:480/625;border-radius:9px;overflow:hidden;background:#c2b8a2;box-shadow:inset 0 0 0 1.5px #7a5a30,inset 0 0 40px rgba(120,86,40,.32)}
/* Ниша повторяет родные 480×700: арт заполняет её без crop, растяжения и боковых стыков. */
.inv-hero-art{position:absolute;inset:0 auto auto 0;width:100%;height:112%;object-fit:contain;object-position:center top;pointer-events:none;z-index:0;filter:saturate(.96) contrast(1.03)}
/* Все фазовые мастера держим на одной геометрической оси: голова под слотом Шлема,
   нижняя граница фигуры около колена. У Крови/Кости прозрачный верх уже заложен в ассет,
   поэтому прежний top:-12% лишний раз поднимал голову под слот. */
.inv-doll.inv-ph-2 .inv-hero-art,.inv-doll.inv-ph-3 .inv-hero-art{top:0;height:112%}
.inv-doll.inv-ph-2{background:radial-gradient(circle at 50% 18%,#8d1815 0,#450b0b 46%,#130708 100%)}
.inv-doll.inv-ph-3{background:radial-gradient(circle at 50% 18%,#29496e 0,#111c30 48%,#080b12 100%)}
.inv-slot{position:absolute;transform:translateX(-50%);width:clamp(106px,28vw,112px);display:flex;flex-direction:column-reverse;align-items:center;gap:3px;background:none;border:none;padding:0;cursor:pointer;z-index:3}
.isl-box{width:44px;height:44px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:linear-gradient(160deg,#20242e,#0b0d13);box-shadow:inset 0 0 0 2px var(--rc,#c9982e),0 0 8px rgba(201,152,46,.28),0 2px 5px rgba(0,0,0,.5);transition:transform .1s}
.inv-slot.empty .isl-box{background:#17191f;border:1.5px dashed #9f7840;box-shadow:0 2px 5px rgba(0,0,0,.5)}
.inv-slot:active .isl-box{transform:scale(.93)}
.inv-slot.sel .isl-box{outline:2px solid #f3c96b;outline-offset:2px}
.isl-ico{width:100%;height:100%;object-fit:cover;border-radius:7px}
.isl-empty{font-size:18px;opacity:.5}
.isl-ph{width:76%;height:76%;object-fit:contain;opacity:.32;filter:sepia(.25)}
.inv-slot.empty .isl-box{position:relative}
.isl-name{display:flex;align-items:center;justify-content:center;width:max-content;max-width:100%;height:30px;box-sizing:border-box;font-family:var(--disp);font-weight:400;font-size:var(--isl-font,12px);letter-spacing:.01em;line-height:1.08;color:#4a3212;text-align:center;white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none;background:#eedfba;padding:1px 6px;border-radius:7px;box-shadow:0 1px 3px rgba(40,25,10,.55)}
.isl-name>span{display:-webkit-box;max-width:100%;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none}
.isl-amulet .isl-name,.isl-hand_l .isl-name,.isl-torso .isl-name{transform:translateX(clamp(12px,4vw,16px))}
.isl-ring .isl-name,.isl-hand_r .isl-name,.isl-legs .isl-name{transform:translateX(clamp(-16px,-4vw,-12px))}
.inv-slot.empty .isl-name{color:#7a5a2e}
.isl-head{left:50%;top:2.24%;flex-direction:column}
.isl-amulet{left:14%;top:28%}
.isl-ring{left:86%;top:28%}
.isl-hand_l{left:12%;top:53.76%}
.isl-hand_r{left:88%;top:53.76%}
.isl-torso{left:16%;top:80.64%}
.isl-legs{left:84%;top:80.64%}
.inv-detail{display:flex;align-items:center;gap:10px;flex:none;background:rgba(26,18,10,.92);border:1px solid var(--rc,rgba(201,152,46,.45));border-radius:11px;padding:8px 10px}
.inv-detail.empty{justify-content:center;color:#6b4a2a;font-family:var(--serif);font-style:italic;font-size:13px;border-color:rgba(122,90,48,.4)}
.ind-ico{width:40px;height:40px;flex:none;border-radius:9px;background:linear-gradient(160deg,#20242e,#0b0d13);display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 2px var(--rc,#c9982e),0 2px 5px rgba(0,0,0,.5)}
.ind-ico img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.ind-body{flex:1;min-width:0}
.ind-kick{display:flex;align-items:center;gap:5px;font-size:11px;letter-spacing:.11em;text-transform:uppercase;color:#c9982e}
.ind-name{font-family:var(--disp);font-weight:400;font-size:15px;letter-spacing:.02em;line-height:1.05;color:#f3c96b}
.ind-text{font-family:var(--serif);font-size:11px;line-height:1.25;color:#cdbfa2;margin-top:2px}
/* сравнение с надетым предметом того же типа (тап → тултип) */
.ind-cmp{display:inline-block;margin-top:4px;font-family:var(--serif);font-size:11px;color:#c9982e;background:rgba(201,152,46,.12);border:1px solid rgba(201,152,46,.4);border-radius:7px;padding:2px 7px;cursor:pointer}
.ind-cmp:active{transform:scale(.97)}
/* Плавающая карточка-описание предмета у слота/ячейки */
.item-tip{position:fixed;box-sizing:border-box;width:clamp(224px,66vw,286px);max-width:calc(100vw - 16px);z-index:40;background:linear-gradient(180deg,rgba(32,23,13,.98),rgba(18,12,7,.98));
  max-height:calc(100vh - 16px);overflow-y:auto;border:1.5px solid var(--rc,rgba(201,152,46,.65));border-radius:12px;padding:12px 14px 13px;box-shadow:0 14px 34px rgba(0,0,0,.78);color:var(--bone)}
.item-tip .tip-hd{display:flex;align-items:center;gap:8px;margin-bottom:5px}
.item-tip .tip-ico{width:38px;height:38px;flex:none;border-radius:8px;background:linear-gradient(160deg,#20242e,#0b0d13);box-shadow:inset 0 0 0 2px var(--rc,#c9982e),0 2px 5px rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center}
.item-tip .tip-ico img{width:100%;height:100%;object-fit:cover;border-radius:6px}
.item-tip .tip-hb{min-width:0;padding-right:16px}
.item-tip .tip-meta{display:flex;align-items:center;gap:5px;min-width:0;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#c9982e}
.item-tip .tip-meta span:last-child{min-width:0;white-space:normal;overflow-wrap:anywhere}
.tip-rarity-gem{width:15px;height:15px;flex:none;filter:drop-shadow(0 1px 2px #000)}
.tip-rarity-gem svg{display:block;width:100%;height:100%}
.item-tip .tip-name{font-family:var(--disp);font-weight:400;font-size:clamp(17px,4.8vw,20px);line-height:1.08;color:#f3c96b;overflow-wrap:anywhere}
.item-tip .tip-text{font-family:var(--serif);font-size:13px;line-height:1.38;color:#cdbfa2;margin:7px 0 10px}
.item-tip .ind-cmp{margin:0 0 8px}
.item-set-ladder{margin:0 0 9px;padding:7px 8px;border:1px solid #8d672b;border-radius:9px;background:linear-gradient(180deg,#25190f,#130d08)}
.set-ladder-title{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:5px;color:#e9c36f}
.set-ladder-title>b{font:13px/1.08 var(--disp);font-weight:400}
.set-ladder-title>span{display:flex;gap:3px;white-space:nowrap}
.set-ladder-title em{padding:2px 4px;border-radius:7px;background:#17110b;color:#bfae8b;font:11px/1.1 var(--serif);font-style:normal}
.set-ladder-title em:last-child{color:#f0c868;border:1px solid #8d672b}
.set-tier{display:grid;grid-template-columns:16px 25px 1fr;gap:4px;align-items:center;min-height:27px;padding:2px 5px;margin:2px 0;border:1px solid #49351f;border-radius:6px;background:#0e0b08;font:11px/1.16 var(--serif)}
.set-tier i{display:flex;align-items:center;justify-content:center;width:15px;height:15px;border:1px solid #80623a;border-radius:50%;font-style:normal;font-size:11px;font-weight:700}
.set-tier strong{color:#d6bb82}.set-tier.on{border-color:#4c9255;background:#102016}.set-tier.on i{border-color:#3b8147;background:#3b8147;color:#fff}
.set-tier.next{border-color:#c9982e;background:#2b210f}.set-tier.next i{border-color:#c9982e;background:#c9982e;color:#231707}
.set-tier.lost{border-color:#8e3b38;background:#27100f}.set-tier.lost i{border-color:#a54843;background:#74302d;color:#f4d1c8}
.set-tier.off{opacity:.52}
.item-tip .tip-btn{display:block;width:100%;font-family:var(--disp);font-size:13px;color:#231a08;background:linear-gradient(180deg,var(--gold-hi),var(--gold));border:none;border-radius:8px;padding:6px 0;cursor:pointer;box-shadow:0 3px 8px rgba(201,152,46,.35)}
.item-tip .tip-arrow{position:absolute;width:0;height:0;border:9px solid transparent}
.item-tip[data-arrow=left] .tip-arrow{left:-9px;top:var(--ay,26px);margin-top:-9px;border-right-color:var(--rc,rgba(201,152,46,.65))}
.item-tip[data-arrow=right] .tip-arrow{right:-9px;top:var(--ay,26px);margin-top:-9px;border-left-color:var(--rc,rgba(201,152,46,.65))}
.item-tip[data-arrow=down] .tip-arrow{bottom:-9px;left:var(--ax,50%);margin-left:-9px;border-top-color:var(--rc,rgba(201,152,46,.65))}
.item-tip[data-arrow=up] .tip-arrow{top:-9px;left:var(--ax,50%);margin-left:-9px;border-bottom-color:var(--rc,rgba(201,152,46,.65))}
.inv-act{flex:none;font-family:var(--serif);font-weight:700;font-size:13px;color:#e8dcc0;background:rgba(60,40,20,.3);border:1px solid rgba(201,152,46,.5);border-radius:8px;padding:7px 13px;cursor:pointer}
.inv-act:active{transform:scale(.96)}
.inv-bag-hd{display:flex;align-items:center;gap:8px;flex:none;margin-top:2px}
.inv-bag-title{font-family:var(--disp);font-size:13px;color:#9a1f1c;text-transform:uppercase;letter-spacing:.03em}
.inv-bag-cnt{font-family:var(--serif);font-size:11px;color:#8a6a3a}
.inv-bag-line{flex:1;height:1px;background:rgba(122,90,48,.45)}
.inv-bag-hint{font-family:var(--serif);font-style:italic;font-size:11px;color:#6b4a2a}
.inv-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;flex:none}
.inv-cell{aspect-ratio:1;border-radius:8px;display:flex;align-items:center;justify-content:center;padding:0;border:none}
.inv-cell.filled{background:linear-gradient(160deg,#20242e,#0b0d13);box-shadow:inset 0 0 0 1.5px var(--rc,rgba(201,152,46,.55)),0 1px 4px rgba(0,0,0,.4);cursor:pointer}
.inv-cell.empty{background:rgba(12,14,20,.55);box-shadow:inset 0 0 0 1.5px rgba(122,90,48,.4)}
.inv-cell.filled:active{transform:scale(.94)}
.inv-cell.sel{outline:2px solid #f3c96b;outline-offset:-1px}
.inv-cell img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}
.inv-done{display:block;width:100%;flex:none;margin-top:2px}
@media (max-height:620px){
  .inv-parch{gap:5px;padding-top:calc(4px + env(safe-area-inset-top,0));padding-bottom:calc(5px + env(safe-area-inset-bottom,0))}
  .inv-stats{min-height:38px;padding-block:1px}
  .inv-stat{height:34px;min-width:48px;padding-inline:7px}
  .inv-stat img,.inv-stat .ecryst{width:20px;height:20px}
  .inv-done{min-height:36px;padding-block:6px}
}
@media (max-width:340px){
  .inv-hd{grid-template-columns:38px minmax(0,1fr) auto;gap:4px}
  .inv-title{font-size:17px;letter-spacing:0;overflow:hidden}
  .inv-gold{padding-inline:7px}
  .inv-slot{width:86px;gap:2px}
  .isl-box{width:35px;height:35px;border-radius:7px}
  .isl-ico{border-radius:6px}
  .isl-name{height:24px;padding:1px 4px;border-radius:6px;font-size:var(--isl-font,10px);line-height:1.08}
}
.h-portrait{cursor:pointer}

/* ==== МЕТА-ПРОГРЕССИЯ: панель XP в концовке + летопись ==== */
.xp-panel{margin:12px 0 4px;padding:11px 13px;border-radius:10px;background:rgba(20,13,6,.78);border:1px solid rgba(160,120,60,.6)}
.xp-hd{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px}
.xp-cls{font-family:var(--disp);font-size:15px;color:#efe0c2}
.xp-gain{font-family:var(--disp);color:#8ff0aa;font-size:18px;font-weight:400;text-shadow:0 1px 3px #000}
.xp-bar{position:relative;height:16px;border-radius:8px;background:#2a1d10;overflow:hidden;box-shadow:inset 0 1px 3px rgba(0,0,0,.5)}
.xp-bar i{display:block;height:100%;background:linear-gradient(90deg,#3f6b28,#6aa544);transition:width .8s ease}
.xp-bar .xp-gained{position:absolute;top:0;height:100%;background:linear-gradient(90deg,#9fe86a,#e0ff90);box-shadow:0 0 9px rgba(180,255,120,.7);transition:left .8s ease,width .8s ease}
.xp-bar .xp-lv{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--disp);font-size:12px;color:#fff;text-shadow:0 1px 2px #000;z-index:2}
.xp-need{margin-top:5px;font-family:var(--disp);font-size:12px;color:#cab890;text-align:center;letter-spacing:.02em}
.xp-bar.sm{height:13px}
.xp-levelup{margin-top:7px;font-family:var(--disp);font-size:15px;color:var(--gold-hi);text-align:center;text-shadow:0 0 10px rgba(243,201,107,.5)}
/* Новый уровень — отдельный компактный экран: без текста концовки, все открытия настоящими артами. */
.level-up-screen{padding:12px}
.level-up-screen>.panel{width:100%;max-width:366px;margin:auto}
.level-up-screen .panel-in{gap:8px;padding:6px 10px}
.level-up-screen .panel-in>h1{font-size:24px}
.level-up-screen .xp-panel{width:100%;margin:0;padding:8px 10px}
.level-up-screen .xp-hd{margin-bottom:4px}
.level-up-screen .xp-need{margin-top:3px}
.level-up-screen .xp-levelup{margin-top:4px}
.level-up-screen .xp-cls,.level-up-screen .xp-lv,.level-up-screen .xp-need,.level-up-screen .xp-levelup{font-size:13px}
.level-up-screen .xp-gain{font-size:18px}
.level-up-screen .panel-in>.btn{width:100%;padding:10px 16px;font-size:15px}
.xp-unlocks{margin-top:8px}
.unl-hd{font-family:var(--disp);font-size:15px;color:var(--pbrown);text-align:center;letter-spacing:.02em;margin-bottom:8px}
.xp-unlock-grid{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
.unl-it{position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;border:0;background:transparent;overflow:hidden;animation:unlPop .4s ease both}
.xp-unlock-grid>.unl-it:nth-child(odd):not(.unl-story){justify-self:start}
.xp-unlock-grid>.unl-it:nth-child(even):not(.unl-story){justify-self:end}
.unl-it:nth-child(2){animation-delay:.08s}.unl-it:nth-child(3){animation-delay:.16s}
.unl-it:nth-child(4){animation-delay:.24s}.unl-it:nth-child(5){animation-delay:.32s}
@keyframes unlPop{from{opacity:0;transform:scale(.7) translateY(6px)}to{opacity:1;transform:none}}
.unl-card-item,.unl-gear{width:108px;height:166px}
.unl-card .card{width:108px!important;height:166px!important;margin:0!important}
.unl-card .card .cin{padding-top:27%!important;overflow:hidden}
.unl-card .card .t{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;
  white-space:normal!important;overflow:hidden!important;transform:none!important;font-size:13px!important;line-height:1!important;
  min-height:26px!important;margin:0 1px 1px!important}
.unl-card .card .cart{display:block!important;height:36px!important;margin:1px 0 2px!important;flex:none}
.unl-card .card .strip{height:22px!important;margin:1px 0 2px!important;padding:0!important;justify-content:center!important;flex:none}
.unl-card .card .strip-inner{justify-content:center!important;margin:auto!important}
.unl-card .card .strip b{font-size:13px!important}
.unl-card .card .strip .si{width:12px!important;height:12px!important}
.unl-card .card svg text{font-size:13px!important}
.unl-card .card .txt{display:none!important}
.unl-card .card .txt:not(:empty){display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;font-size:13px!important;line-height:1.05!important;min-height:27px;margin:0 2px}
.unl-gear{overflow:visible}
.unl-gear-card{position:relative;width:108px;height:166px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:19px 5px 5px;overflow:visible;
  border:1px solid rgba(74,51,22,.48);background:url('../img/_parch.webp') center/cover,#dcca9f}
.unl-gear-card>img{width:82px;height:78px;object-fit:contain;filter:drop-shadow(0 3px 5px rgba(0,0,0,.45))}
.unl-gear-gem{position:absolute;z-index:2;top:-11px;left:50%;width:22px;height:22px;transform:translateX(-50%);filter:drop-shadow(0 1px 2px #000)}
.unl-gear-gem svg{display:block;width:100%;height:100%}
.unl-nm{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;min-height:28px;max-width:124px;font-family:var(--disp);font-size:13px;font-weight:400;color:var(--pbrown);text-align:center;line-height:1.08}
.unl-desc{width:100%;min-height:29px;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  color:var(--pmut);font-family:var(--serif);font-size:13px;line-height:1.08;text-align:center}
.unl-desc .fx-inline{font-size:13px}
.unl-desc .fx-inline img,.unl-desc .fx-inline svg{width:13px;height:13px}
.unl-card-item,.unl-gear,.unl-story{cursor:pointer}
.unl-story{grid-column:1/-1;width:100%;height:104px;display:grid;grid-template-columns:96px 1fr;gap:10px;padding:0;text-align:left}
.unl-story-art{width:96px;height:96px;border:0;background:url('../img/_parch.webp') center/cover;
  display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box;box-shadow:none}
.unl-story-art img{width:100%;height:100%;object-fit:contain;filter:saturate(.82) contrast(1.06)}
.unl-story-ph{width:54px;height:72px;display:flex;align-items:center;justify-content:center;border:1px solid #7a5a30;
  color:#8f2020;font:32px var(--disp);background:rgba(93,61,25,.12)}
.unl-story-copy{min-width:0;align-self:center}
.unl-story-copy .unl-nm{max-width:none;min-height:0;justify-content:flex-start;text-align:left;font-size:15px}
.unl-story-copy p{margin-top:6px;color:var(--pmut);font-size:13px;line-height:1.25;text-align:left}
.prog-list{display:flex;flex-direction:column;gap:9px;max-height:56vh;overflow-y:auto;padding:2px}
.prog-row{padding:9px 11px;border-radius:10px;background:rgba(60,40,20,.3);border:1px solid rgba(122,90,48,.5)}
.prog-row.locked{opacity:.6}
.prog-top{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:5px}
.prog-top b{font-family:var(--disp);font-weight:400;font-size:15px;color:var(--pbrown)}
.prog-lv{font-family:var(--disp);font-size:13px;color:var(--gold-hi)}
.prog-lock{font-size:13px}
.prog-cond{font-size:13px;color:var(--pmut);font-style:italic}
.prog-next{margin-top:5px;font-size:13px;color:var(--pmut)}

/* ===== Склеп Кощеев: мобильный лорбук и коллекции ===== */
.screen.crypt{background:#08090d;color:#2a1a0d;overflow:hidden;isolation:isolate}
.cr-vault{position:absolute;inset:0;background:
  radial-gradient(ellipse at 50% 20%,rgba(112,92,61,.2),transparent 48%),
  linear-gradient(180deg,rgba(4,5,8,.25),rgba(4,5,8,.88)),url('../img/bg_menu.webp') center/cover;
  filter:saturate(.45) brightness(.55);z-index:-1}
.cr-top{height:58px;flex:none;display:flex;align-items:center;gap:9px;padding:6px 10px;color:#ead8b4;background:linear-gradient(180deg,rgba(5,6,10,.96),rgba(7,8,12,.72));border-bottom:1px solid rgba(201,152,46,.28)}
.cr-top>button{width:36px;height:36px;border:1px solid rgba(224,194,133,.45);border-radius:50%;background:rgba(0,0,0,.28);color:#efddb8;font-size:32px;line-height:28px}
.cr-top>div{min-width:0;flex:1}.cr-top h1{font-size:24px;line-height:1;margin:0;color:#f0dfbd}.cr-top p{font-family:var(--script);font-size:16px;color:#a9936d;margin:1px 0 0}
.cr-preview{font-family:var(--disp);font-size:12px;text-transform:uppercase;color:#d6b66f;border:1px solid rgba(214,182,111,.45);border-radius:8px;padding:3px 6px;white-space:nowrap}
.cr-heroes{height:74px;flex:none;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:5px 7px;background:rgba(4,5,8,.76)}
.cr-hero{position:relative;overflow:hidden;border:1px solid rgba(218,190,137,.22);border-radius:7px;background:#111015;color:#d9c8a5;padding:0;opacity:.58;transition:.18s}
.cr-hero.on{opacity:1;border-color:#c9982e;box-shadow:inset 0 0 18px rgba(201,152,46,.2),0 0 9px rgba(201,152,46,.18)}
.cr-hero img{position:absolute;inset:-22% 0 auto;width:100%;height:145%;object-fit:cover;object-position:50% 15%;filter:grayscale(.22) brightness(.55)}
.cr-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(transparent 20%,rgba(7,7,10,.94) 88%)}
.cr-hero span,.cr-hero i{position:absolute;z-index:2;bottom:4px;font-family:var(--disp);font-style:normal;font-size:12px}.cr-hero span{left:5px}.cr-hero i{right:5px;color:#c99c49;font-size:11px}
.cr-identity{height:24px;display:flex;justify-content:center;gap:8px;align-items:center;color:#b8a17a;background:rgba(4,5,8,.84);font-size:11px}.cr-identity b{font-family:var(--disp);font-weight:400;color:#d45147}
.cr-tabs{height:39px;flex:none;display:grid;grid-template-columns:repeat(3,1fr);padding:3px 12px 4px;background:rgba(4,5,8,.84);gap:5px}
.cr-tabs button{border:0;border-bottom:1px solid rgba(217,190,136,.25);background:transparent;color:#97866b;font-family:var(--disp);font-size:13px}.cr-tabs button.on{color:#f0dba8;border-color:#d5a440;text-shadow:0 0 10px rgba(220,172,68,.5)}
.cr-main{position:relative;flex:1;min-height:0;overflow-y:auto;padding:7px 8px 10px;perspective:1100px}
.cr-book{position:relative;min-height:calc(100% - 34px);padding:13px 23px 12px;border-radius:3px 12px 12px 3px;overflow:hidden;transform-origin:left center;background:
  linear-gradient(90deg,rgba(72,45,19,.12),transparent 8%,transparent 94%,rgba(84,54,23,.09)),
  url('../img/crypt/book_paper_ivory.webp') center/cover,#f0e3c2;
  font-family:var(--serif);
  box-shadow:inset 7px 0 12px rgba(70,42,17,.28),inset 0 0 36px rgba(100,67,30,.16),0 8px 25px rgba(0,0,0,.58);display:flex;flex-direction:column}
.cr-paper-edge{position:absolute;inset:4px -3px 4px auto;width:8px;border-radius:0 6px 6px 0;background:repeating-linear-gradient(180deg,#d8c294 0 2px,#bba476 2px 3px);box-shadow:2px 2px 4px #0008}
.cr-page-head{display:flex;justify-content:space-between;border-bottom:1px solid rgba(91,60,27,.35);padding-bottom:5px;color:#695032;font-family:var(--serif);font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase}
.cr-page-head b{font-weight:400;color:#8e251e}.cr-watermark{position:absolute;right:-10%;top:13%;width:62%;height:55%;opacity:.075;mix-blend-mode:multiply;pointer-events:none}.cr-watermark img{width:100%;height:100%;object-fit:contain;filter:grayscale(1) contrast(1.4)}
.cr-page-body{position:relative;z-index:1;padding:10px 3px 6px;flex:1}.cr-level{font-family:var(--serif);font-style:italic;font-size:13px;color:#8d2a20;text-align:center}.cr-page-body h2{font-family:var(--serif);font-size:clamp(21px,7vw,29px);font-weight:700;line-height:1.02;margin:2px 0 10px;color:#3b2412;text-align:center}.cr-writing{font-family:var(--serif);font-size:clamp(14px,4.05vw,16.5px);line-height:1.5;color:#362719;margin:0;text-align:left;text-wrap:pretty;min-height:9em}.cr-writing:after{content:"";display:inline-block;width:1px;height:1em;background:#6e241c;margin-left:2px;vertical-align:-2px;animation:crCaret .8s steps(2) infinite}
@keyframes crCaret{50%{opacity:0}}
.cr-rewards{position:relative;z-index:1;border-top:1px solid rgba(91,60,27,.35);padding-top:6px}.cr-rewards>em{display:block;font-family:var(--script);font-size:16px;color:#775d3b;text-align:center;margin-bottom:4px}.cr-card-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.cr-card{position:relative;min-height:39px;padding:5px 5px 4px 14px;background:rgba(78,48,19,.07);border:1px solid rgba(83,51,21,.34);border-left:3px solid #82735d;border-radius:4px;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.cr-card.r-u{border-left-color:#47844d}.cr-card.r-r{border-left-color:#3e66a1}.cr-card.r-e{border-left-color:#704b9c}.cr-card.r-l{border-left-color:#c17623}.cr-card.r-k{border-left-color:#171116}.cr-card b{font-family:var(--disp);font-weight:400;font-size:12px;line-height:1.05;color:#4c2d14}.cr-card small{font-size:11px;line-height:1.08;color:#796042;margin-top:2px}.cr-gem{position:absolute;left:4px;top:50%;width:5px;height:5px;background:#705a3d;transform:translateY(-50%) rotate(45deg)}
.cr-set-reward{margin-top:5px;padding:4px 7px;background:rgba(91,36,26,.08);border:1px solid rgba(113,42,28,.25);display:grid;grid-template-columns:auto 1fr;gap:0 6px;align-items:center}.cr-set-reward span{grid-row:1/3;font-family:var(--disp);font-size:12px;color:#8b261d;text-transform:uppercase}.cr-set-reward b{font-family:var(--disp);font-weight:400;font-size:12px}.cr-set-reward small{font-size:11px;color:#745c3c}
.cr-turn{position:absolute;top:46%;width:30px;height:58px;border:0;background:linear-gradient(90deg,rgba(61,37,17,.16),transparent);color:#6f4b27;font-family:Georgia;font-size:38px;z-index:4}.cr-turn.prev{left:0}.cr-turn.next{right:0;transform:scaleX(-1)}.cr-turn:disabled{opacity:.15}
.cr-dots{height:31px;display:flex;justify-content:center;gap:3px;padding-top:6px}.cr-dots button{width:23px;height:20px;padding:0;border:1px solid rgba(219,188,126,.28);border-radius:4px;background:rgba(9,9,12,.8);color:#8f8066;font-family:var(--disp);font-size:12px}.cr-dots button.on{color:#21170c;background:#d1ac60;border-color:#efd48e}
.cr-book.turn-next{animation:crTurnOut .24s ease-in forwards}.cr-book.turn-prev{animation:crTurnBackOut .24s ease-in forwards}.from-next .cr-book{animation:crTurnIn .34s ease-out}.from-prev .cr-book{animation:crTurnBackIn .34s ease-out}
@keyframes crTurnOut{to{transform:rotateY(-76deg) scale(.97);opacity:.25;filter:brightness(.55)}}
@keyframes crTurnIn{from{transform:rotateY(72deg) scale(.97);opacity:.2;filter:brightness(.5)}to{transform:none;opacity:1;filter:none}}
@keyframes crTurnBackOut{to{transform:rotateY(65deg);opacity:.2;filter:brightness(.55)}}
@keyframes crTurnBackIn{from{transform:rotateY(-70deg);opacity:.2;filter:brightness(.5)}to{transform:none;opacity:1;filter:none}}
.cr-catalog-head{text-align:center;color:#e4d1aa;padding:4px 10px 9px}.cr-catalog-head h2{color:#f0dbad;font-size:24px;margin:0}.cr-catalog-head p{font-size:13px;line-height:1.35;color:#a99472;margin:4px 0}
.cr-grid.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.cr-collect{position:relative}.cr-collect>.cr-card{min-height:62px;background:#dfcda6;box-shadow:0 3px 8px #0007}.cr-collect>.cr-card b{font-size:13px}.cr-collect>.cr-card small{font-size:11px}.cr-collect>i{position:absolute;right:4px;top:3px;font-style:normal;font-family:var(--disp);font-size:12px;color:#8f251c}
.cr-sets{display:flex;flex-direction:column;gap:10px}.cr-set{background:#dfcca2;color:#3c2918;padding:9px;border:1px solid #806033;border-radius:5px;box-shadow:0 5px 15px #0008}.cr-set.danger{background:linear-gradient(135deg,#d7c292,#c3a97a);border-color:#8e3027}.cr-set header span{font-family:var(--disp);font-size:12px;text-transform:uppercase;color:#8c251e}.cr-set h3{font-family:var(--disp);font-weight:400;font-size:18px;margin:1px 0}.cr-set header p{font-size:11px;line-height:1.3;margin:0 0 7px;color:#614a31}.cr-item-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}.cr-item{min-width:0;text-align:center}.cr-item-art{height:43px;border:1px solid rgba(88,54,25,.4);background:rgba(68,39,15,.1);display:flex;align-items:center;justify-content:center}.cr-item-art img{width:100%;height:100%;object-fit:contain}.cr-item-art span{font-family:var(--disp);font-size:18px;color:#896c46}.cr-item b{display:block;font-family:var(--disp);font-weight:400;font-size:12px;line-height:1.05;margin-top:3px;overflow-wrap:anywhere}.cr-item small{display:none}
@media (min-width:560px){.cr-main{padding-left:max(8px,calc((100% - 520px)/2));padding-right:max(8px,calc((100% - 520px)/2))}.cr-heroes,.cr-tabs{padding-left:max(7px,calc((100% - 540px)/2));padding-right:max(7px,calc((100% - 540px)/2))}}
@media (prefers-reduced-motion:reduce){.cr-book,.cr-writing:after{animation:none!important}.cr-hero{transition:none}}

/* Лорбук v2: читаем сцену, а не приборную панель. В Склепе нет кеглей меньше 12px. */
.cr-top{height:64px}.cr-top h1{font-size:24px}.cr-top p{font-size:15px}
.cr-heroes{height:78px;gap:6px}.cr-hero span{font-size:13px;left:7px;bottom:6px}.cr-hero i,.cr-preview{display:none}
.cr-identity{height:29px;font-size:13px;gap:10px}.cr-tabs{height:43px}.cr-tabs button{font-size:13px}
.cr-main{padding-top:9px}.cr-book{min-height:calc(100% - 48px);padding:16px 27px 20px;overflow-y:auto}
.cr-page-head{font-size:13px;padding-bottom:7px}.cr-page-body{padding:14px 5px 18px}.cr-page-body h2{font-size:clamp(25px,7.5vw,32px);margin:0 0 17px;line-height:1.08}
.cr-writing{font-size:clamp(17px,4.65vw,19px);line-height:1.58;min-height:0;text-wrap:pretty}
.cr-writing p{margin:0 0 1em}.cr-writing p:last-child{margin-bottom:0}.cr-writing:after{display:none}
.cr-writing.ink-flow{animation:inkOnParchment 2.6s ease-out both;will-change:mask-position,opacity}
@keyframes inkOnParchment{
  0%{opacity:.08;filter:blur(.7px);-webkit-mask-image:linear-gradient(to bottom,#000 0 8%,transparent 18% 100%);mask-image:linear-gradient(to bottom,#000 0 8%,transparent 18% 100%);-webkit-mask-size:100% 520%;mask-size:100% 520%;-webkit-mask-position:0 100%;mask-position:0 100%}
  35%{opacity:.72;filter:blur(.25px)}
  100%{opacity:1;filter:none;-webkit-mask-position:0 0;mask-position:0 0}
}
.cr-pager{height:42px;display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center;padding:7px 2px 0;color:#d9c49d}
.cr-pager button{height:34px;border:1px solid rgba(217,190,136,.35);border-radius:7px;background:rgba(6,7,10,.8);color:#e7d2a8;font-family:var(--disp);font-size:13px}.cr-pager button:disabled{opacity:.25}.cr-pager b{font-family:var(--disp);font-size:13px;font-weight:400;min-width:48px;text-align:center}
.cr-dots{display:none}.cr-turn{font-size:40px}.cr-catalog-head h2{font-size:24px}.cr-catalog-head p{font-size:13px;line-height:1.45}
.cr-grid.cards{grid-template-columns:1fr;gap:9px}.cr-collect>.cr-card{min-height:72px;padding:9px 8px 8px 18px}.cr-card b,.cr-collect>.cr-card b{font-size:15px}.cr-card small,.cr-collect>.cr-card small{font-size:13px;line-height:1.3}.cr-collect>i{font-size:13px;right:8px;top:6px}
.cr-set header span{font-size:13px}.cr-set h3{font-size:24px}.cr-set header p{font-size:13px;line-height:1.4}.cr-item-grid{grid-template-columns:repeat(2,1fr);gap:8px}.cr-item-art{height:68px}.cr-item b{font-size:13px;line-height:1.2}.cr-item small{display:block;font-size:13px;line-height:1.25;color:#6b5338;margin-top:3px}
@media (prefers-reduced-motion:reduce){.cr-writing.ink-flow{animation:none!important}}

/* Склеп v8: каталоги как страницы книги; навигация историй только постоянными кнопками. */
.cr-catalog-book{min-height:100%;padding:14px 12px 18px;border-radius:3px 12px 12px 3px;color:#392617;background:
  linear-gradient(90deg,rgba(65,36,12,.18),transparent 7%,transparent 95%,rgba(79,48,18,.1)),
  url('../img/_parch.webp') center/cover,#e8d7ad;box-shadow:inset 7px 0 12px rgba(70,42,17,.24),0 8px 25px #0009}
.cr-catalog-title{margin:0 3px 7px;color:#695032}.cr-catalog-title b{font-size:18px}.cr-catalog-sub{margin:0 3px 12px;text-align:center;font-size:15px;line-height:1.4;color:#60472e}
.cr-catalog-book .cr-filters{padding:2px 2px 8px}.cr-catalog-book .cr-filters button{border-color:rgba(91,58,27,.4);background:rgba(88,59,28,.09);color:#5b432b;font-size:13px}.cr-catalog-book .cr-filters button.on{background:#5d3920;color:#f0ddb4;border-color:#8d5a2c}
.cr-card-groups{display:flex;flex-direction:column;gap:14px}.cr-type-group>h3{margin:0 0 7px;padding-bottom:4px;border-bottom:1px solid rgba(91,58,27,.32);font-family:var(--disp);font-size:18px;font-weight:400;color:#9b2a21}
.cr-branch-count{position:absolute;left:5px;top:5px;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#322113;color:#eed7a6;font:13px var(--disp);box-shadow:0 1px 4px #0008}
.cr-mini-card.r-x{border-color:#48413b}.cr-mini-card.r-x i{color:#78251f}
.cr-card-detail{display:block;padding:10px 7px 12px}.cr-card-detail>h3{text-align:center;margin:3px 0 9px}.cr-card-detail>small{display:block;text-align:center}
.cr-upgrade-trio{display:flex;gap:5px;align-items:flex-start;justify-content:flex-start;overflow-x:auto;padding:3px 2px 8px;scroll-snap-type:x mandatory}
.cr-preview-card{flex:0 0 96px;scroll-snap-align:start}.cr-preview-card>.card{margin:0;transform:none;width:96px;height:188px;pointer-events:none}.cr-preview-card .card .t{font-size:13px}.cr-preview-card .card .txt{font-size:13px;line-height:1.18}
.cr-mini-grid.items{grid-template-columns:repeat(3,minmax(0,1fr))}.cr-mini-item{height:154px}.cr-mini-item i{font-size:11px;line-height:1.15;text-align:center;min-height:23px}
.cr-edge-turn{position:fixed;z-index:40;top:54%;width:38px;height:68px;border:1px solid rgba(91,58,27,.48);background:rgba(226,207,164,.94);color:#502f18;font-family:var(--disp);font-size:24px;line-height:1;box-shadow:0 4px 13px #0009;touch-action:manipulation}.cr-edge-turn.prev{left:2px;border-radius:0 8px 8px 0}.cr-edge-turn.next{right:2px;border-radius:8px 0 0 8px}.cr-edge-turn:disabled{opacity:.22;box-shadow:none}
.cr-main.history .cr-book{touch-action:pan-y}.cr-main.history .cr-pager{pointer-events:none}
@media (min-width:720px){.cr-preview-card{flex-basis:96px}.cr-preview-card>.card{width:96px;height:188px}.cr-edge-turn.prev{left:calc(50% - 278px)}.cr-edge-turn.next{right:calc(50% - 278px)}}

/* Склеп v3: три самостоятельных раздела, настоящее чернильное письмо, уровневые замки. */
.cr-main.home{display:flex;align-items:center;padding:18px 13px 24px}
.cr-entry{width:100%;display:flex;flex-direction:column;gap:14px}
.cr-entry button{min-height:132px;position:relative;overflow:hidden;display:grid;grid-template-columns:68px 1fr;grid-template-rows:auto auto;align-content:center;gap:2px 12px;text-align:left;padding:18px;border:1px solid rgba(216,181,111,.55);border-radius:10px;background:linear-gradient(135deg,rgba(30,24,18,.94),rgba(9,10,14,.95));color:#ecd9b2;box-shadow:0 8px 24px #0009,inset 0 0 28px rgba(177,128,47,.08)}
.cr-entry button:after{content:"";position:absolute;inset:5px;border:1px solid rgba(216,181,111,.15);border-radius:7px;pointer-events:none}
.cr-door-icon{grid-row:1/3;align-self:center;justify-self:center;width:52px;height:52px;object-fit:contain;filter:sepia(.45) saturate(1.3) drop-shadow(0 2px 5px #000)}
.cr-entry b{font-family:var(--disp);font-size:24px;font-weight:400;color:#f0ddb4}.cr-entry p{font-size:15px;line-height:1.35;color:#aa9672;margin:0}
.cr-main.history{padding-top:8px}.cr-main.cards,.cr-main.items{padding-top:12px}
.cr-turn{font-family:var(--disp);font-size:24px;line-height:1}.cr-turn.prev{background:linear-gradient(90deg,rgba(61,37,17,.2),transparent)}.cr-turn.next{transform:none;background:linear-gradient(270deg,rgba(61,37,17,.2),transparent)}
.cr-writing .ink-word{display:inline;opacity:0;filter:blur(1.2px);clip-path:inset(0 100% 0 0);animation:inkWriteWord .3s cubic-bezier(.2,.65,.25,1) forwards;animation-delay:var(--ink-delay)}
.cr-writing.ink-done .ink-word{opacity:1!important;filter:none!important;clip-path:none!important;animation:none!important}
@keyframes inkWriteWord{0%{opacity:.08;filter:blur(1.2px);clip-path:inset(0 100% 0 0)}45%{opacity:.65;filter:blur(.35px)}100%{opacity:1;filter:none;clip-path:inset(0 0 0 0)}}
.cr-locked{align-items:center;justify-content:center;overflow:hidden}.cr-lock-mark{position:relative;z-index:2;max-width:290px;text-align:center;padding:30px 22px}.cr-lock-mark img{width:48px;height:48px;filter:sepia(1) saturate(.7);opacity:.72}.cr-lock-mark h2{font-family:var(--disp);font-size:24px;font-weight:400;color:#4a2d16;margin:12px 0 9px}.cr-lock-mark p{font-size:15px;line-height:1.5;color:#5e482f;margin:0}.cr-locked .cr-paper-edge{display:block}
.cr-pager span{display:block}.cr-all-items{display:grid;grid-template-columns:1fr;gap:9px}.cr-item-wide{min-height:92px;display:grid;grid-template-columns:78px 1fr;gap:11px;align-items:center;padding:8px;background:#decba1;border:1px solid #866537;border-radius:6px;color:#392617;box-shadow:0 4px 12px #0007}.cr-item-wide>img{width:72px;height:72px;object-fit:contain}.cr-item-wide b{display:block;font-family:var(--disp);font-size:15px;font-weight:400}.cr-item-wide span{display:block;font-size:13px;color:#8b2b21;margin-top:2px}.cr-item-wide p{font-size:13px;line-height:1.35;margin:5px 0 0;color:#654b31}
@media (prefers-reduced-motion:reduce){.cr-writing .ink-word{opacity:1;filter:none;clip-path:none;animation:none}}
#btn-progress{margin-top:0}

/* Склеп v4: пергаментное оглавление, миниатюры коллекций и письмо по строкам. */
.cr-top>button{width:42px;height:34px;flex:none;padding:0;border:1px solid rgba(224,194,133,.42);border-radius:9px;background:rgba(8,8,10,.42);color:#e8d6b1;font-family:var(--disp);font-size:18px;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer}
.cr-hero{opacity:.84;background:#29241f}.cr-hero img{filter:grayscale(1) sepia(.22) saturate(.45) brightness(.82) contrast(1.1)}
.cr-hero:after{background:linear-gradient(transparent 48%,rgba(7,7,10,.66) 100%)}
.cr-hero.on img{filter:saturate(1.08) brightness(1.06) contrast(1.03)}.cr-hero.on:after{background:linear-gradient(transparent 55%,rgba(7,7,10,.53) 100%)}
.cr-hero span{color:#d45147;text-shadow:0 1px 3px #000,0 0 8px #000}
.cr-hero.locked{opacity:.48}.cr-hero.locked .cr-hero-fl{display:none}.cr-hero .cr-book-lock{z-index:4;inset:7px 7px auto auto;width:18px;height:22px;object-fit:contain;filter:sepia(.3) brightness(.9)!important}
.cr-hero.demo-locked{opacity:.72;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(177,48,38,.72)}.cr-hero.demo-locked img{filter:grayscale(1) brightness(.42)!important}.cr-hero.demo-locked .access-mini-label{left:3px;right:auto;top:3px}
.crypt-home .panel,.crypt-home .panel-in,.crypt-home .diff-pick,.crypt-home .diff,.crypt-home .di,.crypt-home .d-name,.crypt-home .d-sub{box-sizing:border-box}
.cr-main.home{align-items:center;justify-content:center;padding:18px 14px 24px}.cr-entry{position:relative;justify-content:center;max-width:390px;padding:10px 13px 14px;background:transparent;border:20px solid transparent;border-image:url('../img/ui_paper_flush.webp') 20 fill / 20px stretch;box-shadow:0 12px 34px #000b;color:#3e2916;gap:9px}
.cr-entry>.kick{font-size:13px;color:#8a6a3a;text-align:center;margin-bottom:-6px}.cr-entry>h2{font-family:var(--disp);font-size:24px;font-weight:400;color:#4b2b14;text-align:center;margin:0 0 2px}
.cr-entry button{min-height:86px;border:1.5px solid #8b6840;border-radius:10px;background:transparent;color:#402914;box-shadow:none;grid-template-columns:54px 1fr;padding:9px 13px}
.cr-entry button:after{border-color:rgba(91,58,27,.18)}.cr-entry b{color:#4b2b14}.cr-entry p{color:#765b3b}.cr-door-icon{width:42px;height:42px;filter:sepia(1) saturate(.4) brightness(.55) contrast(1.55);mix-blend-mode:multiply}
.cr-page-head{font-size:13px}.cr-page-head b{font-size:18px;line-height:1}.cr-pager b{font-size:18px;min-width:76px}
.cr-main.history:before{content:"";position:absolute;inset:8px 8px 50px;background:#d8c396;border-radius:4px 12px 12px 3px;box-shadow:0 8px 25px #0008;z-index:-1}
.cr-page-body h2{transition:opacity .14s ease,filter .14s ease}.cr-page-body h2.cr-title-out{opacity:0;filter:blur(2px)}
.cr-page-fade .cr-page-body h2{animation:crTitleIn .22s ease both}
@keyframes crTitleIn{from{opacity:0;filter:blur(2px)}to{opacity:1;filter:none}}
.cr-writing:not(.ink-ready){visibility:hidden}.cr-writing .ink-line{display:block;min-height:1.58em;white-space:nowrap}.cr-writing .ink-line>span{display:inline-block;opacity:0;filter:blur(.7px);clip-path:inset(0 100% 0 0);animation:inkWriteLine .66s linear forwards;animation-delay:var(--ink-delay)}
.cr-writing.ink-done .ink-line>span{opacity:1!important;filter:none!important;clip-path:none!important;animation:none!important}
@keyframes inkWriteLine{0%{opacity:.12;clip-path:inset(0 100% 0 0)}18%{opacity:.75}100%{opacity:1;filter:none;clip-path:inset(0 0 0 0)}}
.cr-filters{display:flex;gap:6px;overflow-x:auto;padding:1px 3px 8px;scrollbar-width:none}.cr-filters::-webkit-scrollbar{display:none}.cr-filters button{flex:none;min-height:34px;padding:5px 10px;border:1px solid rgba(221,190,132,.38);border-radius:16px;background:rgba(7,8,11,.72);color:#bca986;font-family:var(--serif);font-size:13px}.cr-filters button.on{background:#ddc797;color:#402916;border-color:#f1d48d;box-shadow:0 2px 8px #0008}
.cr-catalog-layout{display:flex;flex-direction:column;gap:10px}.cr-mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.cr-mini-card,.cr-mini-item{position:relative;min-width:0;height:142px;padding:5px;border:2px solid #79736a;background:url('../img/_parch.webp') center/cover,#dcca9f;color:#402916;display:flex;flex-direction:column;align-items:center;overflow:hidden;box-shadow:0 3px 8px #0008}.cr-mini-card.on,.cr-mini-item.on{outline:2px solid #f0d27f;outline-offset:1px}.cr-mini-art{width:100%;height:82px;flex:none;background-position:center;background-size:contain;background-repeat:no-repeat}.cr-mini-card b,.cr-mini-item b{font-family:var(--disp);font-weight:400;font-size:13px;line-height:1.05;margin:auto 0 2px}.cr-mini-card i,.cr-mini-item i{font-style:normal;font-size:11px;color:#765b3e}.cr-mini-item img{width:72px;height:76px;object-fit:contain}.cr-mini-card.r-u,.cr-mini-item.r-u{border-color:#47844d}.cr-mini-card.r-r,.cr-mini-item.r-r{border-color:#3e66a1}.cr-mini-card.r-e,.cr-mini-item.r-e{border-color:#704b9c}.cr-mini-card.r-l,.cr-mini-item.r-l{border-color:#c17623}.cr-mini-card.r-k{border-color:#171116}
.cr-detail{order:-1;display:grid;grid-template-columns:96px 1fr;gap:12px;min-height:116px;padding:10px;background:url('../img/_parch.webp') center/cover,#e1cfa4;border:1.5px solid #8c693b;color:#3b2716;box-shadow:0 5px 15px #0009}.cr-detail>img{width:96px;height:96px;object-fit:contain}.cr-detail small{font-size:13px;color:#8d2b22}.cr-detail h3{font-family:var(--disp);font-size:18px;font-weight:400;line-height:1.05;margin:3px 0 6px}.cr-detail p{font-size:13px;line-height:1.35;margin:0}.cr-detail em{display:block;font-size:13px;color:#795d39;margin-top:6px}.cr-empty{margin:18px 4px;padding:18px 12px;border:1px dashed rgba(92,59,28,.45);background:rgba(91,58,27,.06);color:#4b321e;text-align:center;font-family:var(--disp);font-size:15px;line-height:1.35;text-shadow:0 1px #f1dfb9}
@media (min-width:720px){.cr-catalog-layout{display:grid;grid-template-columns:1fr 210px;align-items:start}.cr-detail{order:0;position:sticky;top:0;grid-template-columns:1fr}.cr-detail>img{width:100%;height:145px}}
@media (prefers-reduced-motion:reduce){.cr-writing:not(.ink-ready){visibility:visible}.cr-writing .ink-line>span{opacity:1;filter:none;clip-path:none;animation:none}}

/* Книжные сцены используют фактический широкий формат артов, без пустого портретного контейнера. */
.cr-story-art{position:relative;margin:3px -3px 10px;overflow:hidden;background-image:var(--scene-sheet);background-repeat:no-repeat;background-size:contain;background-position:center;filter:sepia(.06) saturate(.72) brightness(1.025);opacity:0;
  -webkit-mask-image:radial-gradient(circle,#000 0 54%,transparent 59%),radial-gradient(circle,#000 0 52%,transparent 58%),radial-gradient(circle,#000 0 55%,transparent 60%),radial-gradient(circle,#000 0 52%,transparent 58%),radial-gradient(circle,#000 0 54%,transparent 59%);mask-image:radial-gradient(circle,#000 0 54%,transparent 59%),radial-gradient(circle,#000 0 52%,transparent 58%),radial-gradient(circle,#000 0 55%,transparent 60%),radial-gradient(circle,#000 0 52%,transparent 58%),radial-gradient(circle,#000 0 54%,transparent 59%);
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:12% 18%,83% 24%,46% 55%,15% 86%,86% 82%;mask-position:12% 18%,83% 24%,46% 55%,15% 86%,86% 82%;animation:crSketchDraw 2.1s steps(9,end) var(--sketch-delay,0s) both}
.cr-story-art.single{height:auto;aspect-ratio:3/2}.cr-story-art.opening{margin-top:-4px;margin-bottom:10px}.cr-story-art.single.inline{margin-top:9px;margin-bottom:10px}
.cr-story-art.pride{width:100%;aspect-ratio:4/5;margin-left:0;margin-right:0;background-size:contain;background-position:center;filter:saturate(1.04) contrast(1.03) brightness(.99);-webkit-mask:none!important;mask:none!important}
.cr-writing.ink-done .cr-story-art.pride{-webkit-mask:none!important;mask:none!important}
.cr-story-art.doubt{width:100%;aspect-ratio:4/5;margin:4px 0 12px;background-size:contain;background-position:center;filter:saturate(1.12) contrast(1.04) brightness(.98);-webkit-mask:none!important;mask:none!important}
.cr-writing.ink-done .cr-story-art.doubt{-webkit-mask:none!important;mask:none!important}
.cr-story-art.greed{width:100%;aspect-ratio:4/5;margin:10px 0 12px;background-size:contain;background-position:center;filter:saturate(.9) contrast(1.08) brightness(.98);-webkit-mask:none!important;mask:none!important}
.cr-writing.ink-done .cr-story-art.greed{-webkit-mask:none!important;mask:none!important}
.cr-story-art.fear{aspect-ratio:3/2;margin:10px 0 12px;background-size:contain;background-position:center;filter:saturate(.96) contrast(1.04) brightness(.99);-webkit-mask:none!important;mask:none!important}
.cr-writing.ink-done .cr-story-art.fear{-webkit-mask:none!important;mask:none!important}
@keyframes crSketchDraw{0%{opacity:0;-webkit-mask-size:0 0,0 0,0 0,0 0,0 0;mask-size:0 0,0 0,0 0,0 0,0 0}12%{opacity:.45;-webkit-mask-size:58% 74%,0 0,0 0,0 0,0 0;mask-size:58% 74%,0 0,0 0,0 0,0 0}30%{-webkit-mask-size:80% 96%,62% 78%,0 0,0 0,0 0;mask-size:80% 96%,62% 78%,0 0,0 0,0 0}50%{opacity:.85;-webkit-mask-size:105% 120%,88% 100%,70% 82%,0 0,0 0;mask-size:105% 120%,88% 100%,70% 82%,0 0,0 0}72%{-webkit-mask-size:135% 145%,120% 135%,110% 125%,78% 92%,65% 82%;mask-size:135% 145%,120% 135%,110% 125%,78% 92%,65% 82%}100%{opacity:1;-webkit-mask-size:210% 230%,210% 230%,210% 230%,210% 230%,210% 230%;mask-size:210% 230%,210% 230%,210% 230%,210% 230%,210% 230%}}
.cr-writing.ink-done .cr-story-art{opacity:1!important;animation:none!important;-webkit-mask:none!important;mask:none!important}
@media (prefers-reduced-motion:reduce){.cr-story-art{opacity:1;animation:none;-webkit-mask:none;mask:none}}
.cr-book{touch-action:pan-y}.cr-book.cr-dragging{transition:none!important;will-change:transform;box-shadow:inset 7px 0 12px rgba(70,42,17,.28),inset 0 0 36px rgba(100,67,30,.16),0 14px 34px rgba(0,0,0,.72)}.cr-book.cr-snap{transition:transform .28s cubic-bezier(.2,.8,.25,1)!important}

/* Новые открытия Склепа: сигнал идёт от главного меню до конкретной книги/карты/вещи. */
.has-crypt-new,.cr-menu-pick .diff{position:relative}.cr-menu-pick{isolation:isolate}.crypt-new{position:absolute!important;z-index:12!important;top:5px;right:6px;width:19px;height:19px;display:block!important;padding:0!important;background:radial-gradient(circle at 38% 32%,#a9e374,#418a49 52%,#153d2d 100%);border:1.5px solid #c7f08b;color:#f5ffd6;box-shadow:0 2px 7px #0009,0 0 11px rgba(88,209,111,.55);transform:rotate(45deg);pointer-events:none;animation:cryptNewPulse 1.8s ease-in-out infinite}.crypt-new i{position:absolute;left:50%;top:50%;display:block;font-family:var(--disp);font-size:15px;font-style:normal;line-height:1;transform:translate(-50%,-50%) rotate(-45deg);text-shadow:0 1px 2px #15351d}.menu-badge{top:5px;right:9px}.cr-hero .crypt-new,.cr-mini-card .crypt-new,.cr-mini-item .crypt-new{top:5px;right:5px;width:17px;height:17px}.cr-hero .crypt-new i,.cr-mini-card .crypt-new i,.cr-mini-item .crypt-new i{font-size:13px}
@keyframes cryptNewPulse{50%{transform:rotate(45deg) scale(1.12);box-shadow:0 2px 7px #0009,0 0 16px rgba(102,231,126,.8)}}
@media (prefers-reduced-motion:reduce){.crypt-new{animation:none}}

/* Ненаписанная история — неподвижная запечатанная обложка, а не доступная для листания страница. */
.cr-sealed-cover{padding:0;min-height:100%;background:#251b13;border:2px solid #6f4827;box-shadow:inset 0 0 0 5px #b28a52,inset 0 0 0 7px #3f2918,0 12px 30px #000c;isolation:isolate}.cr-cover-art{position:absolute;inset:10px;overflow:hidden}.cr-cover-art img{width:100%;height:100%;object-fit:cover;object-position:center top;filter:sepia(.55) saturate(.55) contrast(1.08) brightness(.76)}.cr-cover-veil{position:absolute;inset:0;background:linear-gradient(180deg,rgba(26,16,9,.08),rgba(26,16,9,.36) 55%,rgba(26,16,9,.92));box-shadow:inset 0 0 45px #1b1009}.cr-cover-copy{position:absolute;z-index:2;left:22px;right:22px;bottom:35px;text-align:center;color:#edd8a8}.cr-cover-copy>span{font-family:var(--script);font-size:16px}.cr-cover-copy h2{font-family:var(--disp);font-size:clamp(25px,8vw,34px);font-weight:400;line-height:1.12;margin:8px 0 14px;text-shadow:0 2px 5px #000}.cr-cover-copy img{width:42px;height:42px;filter:sepia(1) brightness(1.55);opacity:.9}

/* Красный акцент из выбранной сложности — единый для заголовков Склепа. */
.crypt-home .diff-h,.crypt-home .d-name,.cr-catalog-head h2,.cr-page-body h2{color:#9a1f1c}.crypt-home .diff{opacity:1}.crypt-home .d-sub{color:#9a1f1c}
.crypt-home .cr-menu-pick .d-name,.crypt-home .cr-menu-pick .d-sub{width:100%;text-align:left}

/* Финальные переопределения v8 стоят после прежних каталогов. */
.cr-card-detail{display:block;grid-template-columns:none;padding:10px 7px 12px}.cr-card-detail>h3{text-align:center;margin:3px 0 9px}.cr-card-detail>small{display:block;text-align:center}
.cr-mini-grid.items{grid-template-columns:repeat(3,minmax(0,1fr))}.cr-mini-item{height:154px}.cr-mini-item i{font-size:11px;line-height:1.15;text-align:center;min-height:23px}
@media (min-width:720px){.cr-card-detail{display:block}.cr-card-detail>img{width:auto;height:auto}}

/* Склеп: мобильные каталоги используют тот же визуальный язык, что История. */
.cr-catalog-v2{padding:10px 9px 22px}.cr-catalog-v2 .cr-catalog-sub{font-size:13px;line-height:1.3;margin:5px 3px 9px}
.cr-catalog-heroes{height:72px!important;margin:0 -2px 9px;padding:4px!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;background:rgba(59,38,20,.12)!important;border:1px solid rgba(102,70,35,.25);border-radius:7px}
.cr-catalog-heroes .cr-hero{min-width:0}.cr-catalog-heroes .cr-hero span{left:2px;right:2px;bottom:2px;padding:3px 1px 2px;border-radius:2px;background:rgba(17,10,7,.76);font-size:11px;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:none}.cr-catalog-heroes .cr-all img{object-fit:contain;padding:11px;filter:sepia(.2) saturate(.8) brightness(.8)!important;background:radial-gradient(circle,#d6bd83,#5f3d20)}
.cr-catalog-tabs{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(78px,1fr);gap:5px;overflow-x:auto;margin:0 0 12px;padding:1px 1px 5px;scrollbar-width:none}.cr-catalog-tabs::-webkit-scrollbar{display:none}.cr-catalog-tabs button{min-height:36px;padding:6px 9px;border:1px solid #85633a;border-radius:5px;background:rgba(92,57,25,.08);color:#56381e;font-family:var(--disp);font-size:13px;white-space:nowrap}.cr-catalog-tabs button.on{background:#4c2c19;color:#efddb5;border-color:#a47b43;box-shadow:0 3px 8px #0006}
.cr-catalog-v2 .cr-mini-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.cr-catalog-v2 .cr-mini-card,.cr-catalog-v2 .cr-mini-item{height:140px;padding:5px 5px 7px;border:2px solid #82633d;border-radius:2px;background:url('../img/_parch.webp') center/cover,#dcca9f;color:#402916;box-shadow:inset 0 0 0 1px #eadbb8,0 4px 9px #0007}.cr-catalog-v2 .cr-mini-art{height:91px;background-size:cover;border:1px solid #896b43;border-radius:1px;box-shadow:inset 0 0 8px #3c250f55}.cr-catalog-v2 .cr-mini-card b,.cr-catalog-v2 .cr-mini-item b{width:100%;min-height:25px;margin:auto 0 0;font-size:13px;line-height:1.12;color:#4a2c18;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-align:center;text-shadow:0 1px #f4e5c3}.cr-catalog-v2 .cr-mini-card.r-u,.cr-catalog-v2 .cr-mini-item.r-u{border-color:#47844d}.cr-catalog-v2 .cr-mini-card.r-r,.cr-catalog-v2 .cr-mini-item.r-r{border-color:#3e66a1}.cr-catalog-v2 .cr-mini-card.r-e,.cr-catalog-v2 .cr-mini-item.r-e{border-color:#704b9c}.cr-catalog-v2 .cr-mini-card.r-l,.cr-catalog-v2 .cr-mini-item.r-l{border-color:#c17623}.cr-catalog-v2 .cr-mini-card.r-k{border-color:#171116}.cr-catalog-v2 .cr-mini-item{height:140px}.cr-item-art-v2{width:82px!important;height:87px!important;object-fit:contain!important}.cr-rarity-gem{position:absolute!important;z-index:5!important;top:3px!important;right:3px!important;width:22px!important;height:22px!important;display:block!important;filter:drop-shadow(0 2px 3px #000)!important}.cr-rarity-gem svg{display:block;width:100%;height:100%}.cr-catalog-v2 .unknown{border-color:#75654d!important;filter:saturate(.35)}.cr-catalog-v2 .unknown .cr-mini-art,.cr-unknown-art{display:flex!important;align-items:center;justify-content:center;background:rgba(67,47,28,.14)!important;color:#6b5135;font-family:var(--disp);font-size:48px;text-shadow:0 1px #f3e2bc}.cr-catalog-v2 .unknown b{color:#715b40}.cr-catalog-v2 .cr-type-group{margin:0 0 15px}.cr-catalog-v2 .cr-type-group>h3{font-size:18px;margin:1px 0 7px}.cr-item-groups{display:flex;flex-direction:column;gap:3px}
.cr-card-modal .modal-in{max-width:390px}.cr-compare-tree .upg-picks{gap:7px}.cr-compare-tree .upg-card{transform:none}.cr-compare-tree .upg-card .card{width:clamp(102px,28vw,118px)!important}.cr-card-modal .upg-now .card{width:clamp(105px,29vw,122px);height:174px}.cr-item-modal-head{position:relative;display:grid;grid-template-columns:92px 1fr;gap:12px;align-items:center}.cr-item-modal-head>img:not(.cr-rarity-gem){width:92px;height:92px;object-fit:contain;background:rgba(64,39,18,.12);border:1px solid #84643c}.cr-item-modal-head small{font-size:13px;color:#8d2b22}.cr-item-modal-head h3{font-family:var(--disp);font-size:24px;font-weight:400;margin:3px 0}.cr-item-modal p{font-size:15px;line-height:1.4}.cr-item-modal em{display:block;color:#805d34;margin:7px 0;font-style:normal}
.cr-catalog-v2 .cr-mini-card.demo-locked,.cr-catalog-v2 .cr-mini-item.demo-locked{cursor:pointer;border-color:#8d2b22!important;background:#81786a;filter:grayscale(.82) brightness(.68)}.cr-catalog-v2 .demo-locked .cr-mini-art,.cr-catalog-v2 .demo-locked .cr-item-art-v2{opacity:.25}.cr-catalog-v2 .demo-locked b{position:absolute;z-index:4;left:5px;right:5px;top:53%;min-height:0!important;margin:0!important;color:#f3d9a4!important;font-size:12px!important;text-shadow:0 1px 3px #000!important}.cr-catalog-v2 .demo-locked .access-mini-label{filter:none}
.cr-type-select{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;margin:10px 1px 14px;padding:8px 10px;border:1px solid #8b693e;background:rgba(91,58,27,.08);font:13px var(--disp);color:#6b4526}.cr-type-select select{min-width:0;height:36px;padding:0 30px 0 10px;border:1px solid #7d5c35;border-radius:3px;background:#ead9b2;color:#472c18;font:14px var(--disp)}.cr-item-groups{gap:13px}.cr-set-zone{padding:9px 8px 10px;border:2px solid #806039;background:rgba(94,58,25,.06);box-shadow:inset 0 0 0 1px rgba(239,218,174,.8),0 3px 8px #3b250f35}.cr-set-zone>header{margin:0 1px 9px;padding-bottom:6px;border-bottom:1px solid rgba(91,58,27,.34)}.cr-set-zone>header h3{margin:0;font:18px var(--disp);color:#92261e}.cr-set-zone>header small{display:block;margin-top:3px;font-size:11px;line-height:1.25;color:#745638}.cr-set-zone.rset-none{border-style:dashed;background:rgba(65,47,29,.035)}
/* Склеп: герой проявляется как раскрашенный эскиз; содержимое входит в порядке чтения сетки. */
.cr-hero .cr-hero-esk{z-index:0!important;filter:grayscale(1) sepia(.22) saturate(.45) brightness(.82) contrast(1.1)!important}.cr-hero .cr-hero-fl{z-index:1!important;opacity:0;filter:saturate(1.08) brightness(1.06) contrast(1.03)!important}.cr-hero.on .cr-hero-fl{opacity:1}.cr-hero.on.coloring .cr-hero-fl{animation:crHeroColorIn .5s ease-in-out both}.cr-hero span,.cr-hero .crypt-new{z-index:3!important}@keyframes crHeroColorIn{from{opacity:0}to{opacity:1}}
.cr-catalog-v2 .cr-mini-card,.cr-catalog-v2 .cr-mini-item{opacity:0;animation:crTileAppear .24s ease-out both;animation-delay:var(--delay,0ms)}@keyframes crTileAppear{from{opacity:0}to{opacity:1}}.cr-catalog-v2 .cr-mini-card b,.cr-catalog-v2 .cr-mini-item b{color:#9a1f1c!important;text-shadow:0 1px #f4e5c3}
@media (prefers-reduced-motion:reduce){.cr-hero.on .cr-hero-fl,.cr-catalog-v2 .cr-mini-card,.cr-catalog-v2 .cr-mini-item{animation:none!important;opacity:1}}

/* Улучшение карт: на этом экране ни один текст не мельче 12.5px. Пространство отдаём картам. */
.upg-modal{width:min(440px,100vw);max-width:min(440px,100vw)}.upg-modal .modal-in{padding:8px 12px;gap:10px}.upg-modal .upg-tree{width:100%;margin:2px 0 5px}.upg-modal .upg-now .card,.upg-modal .upg-card .card{width:clamp(132px,36vw,154px)!important;height:clamp(205px,55vw,235px)!important}.upg-modal .upg-picks{width:100%;gap:12px}.upg-modal .card .cart{height:68px!important}.upg-modal .card .t{font-size:clamp(14px,4vw,17px)!important;line-height:1.08!important}.upg-modal .card .txt{font-size:13px!important;line-height:1.25!important}.upg-modal .card .strip b{font-size:15px!important}.upg-modal .upg-lbl{font-size:13px}.upg-modal .btn{font-size:13px}
.modal.full .card-row.cols3{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.modal.full .card-row.cols3 .card{width:100%;max-width:150px;height:220px!important}.modal.full .card-row .card .cart{height:64px!important}.modal.full .card-row .card .t{font-size:15px!important;line-height:1.08!important}.modal.full .card-row .card .txt{font-size:13px!important;line-height:1.25!important}.modal.full .card-row .card .strip b{font-size:15px!important}

/* Та же развилка внутри Склепа раньше жила на legacy-кеглях 8–12px. */
.cr-card-modal{width:min(440px,100vw)!important;max-width:min(440px,100vw)!important}.cr-card-modal .modal-in{padding:8px 12px;gap:10px}.cr-card-modal .cr-compare-tree{width:100%;margin:2px 0 5px}.cr-card-modal .upg-now .card,.cr-card-modal .upg-card .card{width:clamp(132px,36vw,154px)!important;height:clamp(205px,55vw,235px)!important}.cr-card-modal .upg-picks{width:100%;gap:12px}.cr-card-modal .card .cart{height:68px!important}.cr-card-modal .card .t,.cr-card-modal .card .t span{font-size:clamp(14px,4vw,17px)!important;line-height:1.08!important}.cr-card-modal .card .txt{font-size:13px!important;line-height:1.25!important}.cr-card-modal .card .strip b{font-size:15px!important}.cr-card-modal .btn{font-size:13px}

/* В Истории неподвижны шапка Склепа, выбор ипостаси, книжная шапка и стрелки.
   Единственный вертикальный scroller — содержимое текущей страницы. */
.cr-main.history{overflow:hidden;display:flex;flex-direction:column;padding-bottom:8px}
.cr-main.history .cr-book{flex:1;min-height:0;height:auto;overflow:hidden}
.cr-main.history .cr-page-head{flex:none}
.cr-main.history .cr-page-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-right:7px}
.cr-main.history .cr-pager{flex:none}
.cr-watermark{display:none!important}

/* Пергаментные иллюстрации не обрываются прямоугольником: край каждой виньетки
   навсегда растворяется в бумаге, в том числе после завершения анимации. */
.cr-writing.ink-done .cr-story-art{
  -webkit-mask:radial-gradient(ellipse 100% 92% at center,#000 52%,rgba(0,0,0,.88) 67%,rgba(0,0,0,.34) 82%,transparent 100%)!important;
  mask:radial-gradient(ellipse 100% 92% at center,#000 52%,rgba(0,0,0,.88) 67%,rgba(0,0,0,.34) 82%,transparent 100%)!important;
}

/* ==== ВЕСЫ ЖИЗНИ/СМЕРТИ (Колдун) ==== */
/* Весы Жизнь/Смерть Колдуна: сегментная шкала на пергаменте, заливка ОТ ЦЕНТРА
   (Жизнь слева=зелёный, Смерть справа=фиолет), под полосой Тела, поуже здоровья. */
.dvsc{display:flex;align-items:center;gap:6px;margin-top:4px;justify-content:center}
.dvsc-lbl{font-family:var(--disp);font-size:12px;font-weight:400;letter-spacing:.02em;white-space:nowrap}
.dvsc-lbl.l{color:#2f9e52}
.dvsc-lbl.d{color:#8a3fc0}
.wscale{display:flex;align-items:center;height:11px;width:58%;border:1.5px solid #1a120a;border-radius:4px;overflow:hidden;background:#e2d2a8;box-shadow:inset 0 1px 2px rgba(90,60,20,.3)}
.wscale .cell{flex:1;height:100%;border-right:1px solid rgba(26,18,10,.4);transition:background .28s}
.wscale .cell.mid{border-right:2px solid #1a120a}
.wscale .cell:last-child{border-right:none}
.wscale .cell.df1{background:#b892d6}.wscale .cell.df2{background:#9160c0}.wscale .cell.df3{background:#6e3ba0}
.wscale .cell.lf1{background:#8fd3a3}.wscale .cell.lf2{background:#54bd75}.wscale .cell.lf3{background:#2ba552}
.wscale.flash{animation:wsFlash .5s ease}
@keyframes wsFlash{0%{box-shadow:inset 0 1px 2px rgba(90,60,20,.3)}45%{box-shadow:0 0 10px 2px rgba(201,152,46,.95),inset 0 1px 2px rgba(90,60,20,.3)}100%{box-shadow:inset 0 1px 2px rgba(90,60,20,.3)}}

/* иконки предметов-картинки */
/* предмет — цветной вырез на прозрачном, лежит на пергаменте (без тёмной подложки) */
.it-ico{width:66px;align-self:stretch;object-fit:contain;flex:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.4))}
.ds-ico-img{width:22px;height:22px;object-fit:contain;filter:drop-shadow(0 1px 2px #000)}

/* подписи под иконками меню */
.menu-icons{width:100%;gap:6px}
.menu-icons .icon-btn{display:flex;flex:1 1 0;flex-direction:column;align-items:center;gap:3px;width:0;min-width:0;height:auto;padding:7px 6px 5px}
.menu-icons .icon-btn .mi{width:28px;height:28px}
.audio-settings .icon-btn .mi{width:25px;height:25px}
.ib-lbl{font-family:var(--script);font-size:16px;color:var(--pmut);line-height:1;white-space:nowrap}

/* магазин: ряд карт по редкости */
.card-shop{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-bottom:4px}
.card-buy{display:flex;flex-direction:column;align-items:center;gap:5px;cursor:pointer;transition:transform .12s}
.card-buy:hover{transform:translateY(-3px)}
/* Не хватает золота — карта не полупрозрачная, а ЗАПЕРТАЯ: цвет полный, поверх затемнение и замок.
   Прозрачность читалась как «лот неактивен/сломан», а не как «не по карману». */
.card-buy.dim{opacity:1;filter:none;cursor:default}
/* тень лёгкая: говорит замок, а не затемнение — иначе лот снова читается как «погашенный» */
.card-buy.dim .card::after{content:'';position:absolute;inset:0;z-index:9;pointer-events:none;
  background:rgba(20,14,8,.26) url('../img/ic_lock.webp') center/40% auto no-repeat;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.7))}
.card-buy.dim .card-price{border-color:#9a1f1c;color:#9a1f1c}
.card-buy.dim:hover{transform:none}
.card-buy .card{cursor:pointer}
.card-price{font-size:13px}
.shop-lot-modal{width:min(390px,94vw)}
.shop-lot-modal .modal-in{align-items:center;max-height:92vh;overflow-y:auto}
.shop-lot-card{display:flex;justify-content:center;width:100%}
.shop-lot-card .card{width:190px!important;height:292px!important;min-height:0!important}
.shop-lot-card .card .cin{padding-top:48px!important;overflow:hidden}
.shop-lot-card .card .cart{height:86px!important}
.shop-lot-card .card .t{font-size:18px!important;line-height:1.08!important}
.shop-lot-card .card .txt{font-size:13px!important;line-height:1.28!important}
.shop-lot-card .card .strip{height:32px;margin:5px 0 7px}
.shop-lot-card .card .strip b{font-size:18px}
.shop-lot-card .card .cband-z{display:block}
.shop-lot-card .card .cband-m{display:none}
.shop-lot-card .card .cband{left:4px;width:calc(100% - 8px)}
.shop-lot-card .card .ph-seal-c{width:18%;top:3px;right:4px}
.shop-lot-item{width:100%;display:flex;justify-content:center}
.shop-lot-item .item-card{width:min(310px,100%);cursor:default}
.shop-lot-price{display:flex;align-items:center;justify-content:center;gap:5px;color:#6f1d18;font:20px var(--disp)}
.shop-lot-price small{font:13px var(--serif);color:#8b2b23;margin-left:8px}
.shop-lot-actions{width:100%;justify-content:center;gap:10px}
.shop-lot-actions .btn{min-width:126px}
.shop-lot-actions .btn.disabled{opacity:.48}

/* ==================== НОВОЕ ОФОРМЛЕНИЕ КАРТ (шов · самоцвет · пергамент) ==================== */
.card{background:url('../img/_parch.webp') center/cover no-repeat!important;border:2px solid #1a120a;border-radius:0!important;overflow:visible}
.card.needle,.card.needle-pull{border-color:#a9202b!important;box-shadow:inset 0 0 0 1px rgba(54,5,10,.72),0 0 7px rgba(190,30,48,.42)}
.card .cost,.card .ph,.card .rgem,.card .embers{display:none!important}
.cband{position:absolute;top:0;left:0;width:100%;z-index:5;pointer-events:none;overflow:visible;display:block}
/* Какая лента видна — задаём ОТ ОБРАТНОГО. Раньше мини-лента включалась перечислением контейнеров
   (.hand/.card-buy/.card-row/.reward-fan/.upg-card), и любой не внесённый в список контейнер молча
   получал ЗУМОВУЮ ленту. Так и вышло с .pc-fly (клон летящей карты): зумовая лента с viewBox 228×46
   рендерилась 221×45 внутри 135px-клона, а из-за overflow:visible цифра цены вылезала наружу тонкой
   красной палкой — те самые «полоски отдельно от карты» во всех анимациях розыгрыша.
   Теперь по умолчанию мини, а зумовая — только там, где карта действительно большая. */
.cband-z{display:none}
.cband-m{display:block}
.zoomwrap .card .cband-z,.car-item .card .cband-z{display:block}
.zoomwrap .card .cband-m,.car-item .card .cband-m{display:none}
.card .cin{padding-top:20%!important;background:transparent!important;border-radius:0}
.card .t{color:#8f2020!important}
/* Улучшение видно цветом названия, а не только плюсом. Правило «.card.upgraded .t{color:#2f7d38}»
   выше было мёртвым — его перебивал !important этой строки.
   Цвета берём из палитры игры: Жизнь #2c7f45 — основная, консервативная ветка «сильнее»;
   Смерть #7b3fb2 — альтернативная «иначе» (без условия / дешевле / не сгорает). */
.card.upgraded .t{color:#2c7f45!important}
.card.upgraded.alt .t{color:#7b3fb2!important}
/* мини (рука) */
.hand .card .cin{padding-top:32%!important;overflow:hidden}
.hand .card .cart{display:block;height:44px;margin:0 0 1px}
.hand .card .t{font-size:11px;line-height:1.14;letter-spacing:-.04em;min-height:0;margin:0 0 1px;transform:scaleX(.76)}
.hand .card .t{height:24px!important;min-height:24px!important;max-height:24px!important}
/* фикс-высота (пропорция как в бою) вместо min-height, чтобы контент не растягивал карту */
.card-buy .card{width:80px!important;height:122px!important;min-height:0!important}
.card-row .card{height:146px!important;min-height:0!important}
.reward-fan .card{height:158px!important;min-height:0!important}
.upg-card .card{height:196px!important;min-height:0!important}
.card-buy .card .cin,.card-row .card .cin,.reward-fan .card .cin,.upg-card .card .cin{padding-top:32%!important;overflow:hidden}
.card-buy .card .cart{display:block;height:28px}
.card-buy .card .t{font-size:11px;line-height:1.05;min-height:0;margin:0 4px 1px}
/* печать-замок по требованию */
.lock-ov.seal-ov{background:rgba(12,9,5,.5)}
.lock-ov.seal-ov .lk-seal{width:56%;filter:drop-shadow(0 4px 9px rgba(0,0,0,.85))}
.hand .card .lock-ov.seal-ov .lk-seal{width:62%;margin-top:12px}
.lock-ov.soft{background:rgba(12,9,5,.34)}
/* Боевые Отзвуки и снаряжение: боковая вкладка раскрывает только ленту иконок.
   Текст не конкурирует с рукой; подробности каждой иконки живут в общем тултипе. */
.battle-aux-tabs{position:absolute;z-index:19;left:0;right:0;bottom:calc(150px + var(--sab));height:60px;pointer-events:none}
.battle-aux-tab{position:absolute;bottom:0;width:45px;height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px 4px;border:1.5px solid #1a120a;background:url('../img/_parch.webp') center/cover,#d8c396;color:#27190d;box-shadow:0 4px 12px #000a;pointer-events:auto;transition:transform .2s ease,filter .2s ease}
.battle-aux-tab.echoes{left:0;border-left:0;border-radius:0 10px 10px 0}.battle-aux-tab.gear{right:0;border-right:0;border-radius:10px 0 0 10px}
.battle-aux-tab img{width:25px;height:25px;object-fit:contain;border-radius:50%}.battle-aux-tab.echoes img{object-fit:cover;border:1px solid #1a120a}
.battle-aux-tab b{position:absolute;right:2px;top:2px;min-width:17px;height:17px;display:flex;align-items:center;justify-content:center;padding:0 3px;border:1px solid #1a120a;border-radius:9px;background:#17100c;color:#f4dfb2;font:12px/1 var(--disp)}
.battle-aux-tab.gear b{right:auto;left:2px}.battle-aux-tab span{font:12px/1 var(--disp)}.battle-aux-tab.on{filter:brightness(1.12);transform:translateY(-3px)}
.battle-aux-scrim{position:absolute;z-index:17;inset:52px 0 0;border:0;background:transparent;visibility:hidden;pointer-events:none}.battle-aux-scrim.shown{visibility:visible;pointer-events:auto}
.battle-aux-sheet{position:absolute;z-index:20;bottom:calc(213px + var(--sab));width:51px;max-height:calc(100% - 226px - var(--sat));display:flex;align-items:center;overflow:hidden;padding:5px;border:1.5px solid #1a120a;background:rgba(12,12,13,.96);box-shadow:0 -5px 18px #000c;color:#ead9b6;opacity:0;visibility:hidden;transform:translateY(12px) scaleY(.2);transform-origin:bottom;pointer-events:none;transition:opacity .2s ease,transform .22s ease,visibility 0s linear .22s}
.battle-aux-sheet.echoes{left:0;border-left:0;border-radius:0 10px 10px 0}.battle-aux-sheet.gear{right:0;border-right:0;border-radius:10px 0 0 10px}
.battle-aux-sheet.shown{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition-delay:0s}
.battle-aux-ribbon{display:flex;width:100%;min-height:0;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;overflow-x:hidden;overflow-y:auto;padding:1px;overscroll-behavior-y:contain;scrollbar-width:none}.battle-aux-ribbon::-webkit-scrollbar{display:none}
.battle-aux-icon{position:relative;display:flex;flex:0 0 40px;width:40px;height:40px;align-items:center;justify-content:center;padding:4px;border:1.5px solid #1a120a;border-radius:8px;background:url('../img/_parch.webp') center/cover,#d8c396;box-shadow:0 2px 5px #0008}
.battle-aux-icon:active{filter:brightness(1.17);transform:translateY(-1px)}
.battle-aux-icon>img{display:block;width:31px;height:31px;object-fit:contain}
/* У предметов редкость живёт в квадратной раме, у Отзвуков уровень — в круглой
   металлической оправе портрета. Так два независимых ранга не путаются между собой. */
.battle-aux-item{--item-rim:#746552;border-width:3px;border-color:var(--item-rim);box-shadow:0 2px 5px #0009,inset 0 0 0 1px color-mix(in srgb,var(--item-rim) 34%,#f8e5bd)}
.battle-aux-item.ir-u{--item-rim:#3e9849}.battle-aux-item.ir-r{--item-rim:#327ec6}.battle-aux-item.ir-e{--item-rim:#8b4eb6}.battle-aux-item.ir-l{--item-rim:#d08318}.battle-aux-item.ir-t{--item-rim:#b63430}.battle-aux-item.ir-k{--item-rim:#55425d}
.battle-aux-echo{--echo-metal:conic-gradient(from 215deg,#160a06,#4b1e14,#a55336,#32120d,#71301f,#c17555,#25100a,#160a06);--echo-glow:#74301f}
.battle-aux-echo.echo-rank-2{--echo-metal:conic-gradient(from 215deg,#20262c,#68747f,#e9eef1,#4b5660,#aeb8c0,#f7f8f8,#353e46,#20262c);--echo-glow:#84919c}
.battle-aux-echo.echo-rank-3{--echo-metal:conic-gradient(from 215deg,#302000,#795300,#eedb8a,#624000,#b78616,#f7e8a6,#493000,#302000);--echo-glow:#ab811d}
.battle-aux-echo::before{content:"";position:absolute;width:32px;height:32px;border-radius:50%;background:var(--echo-metal);box-shadow:0 0 0 1px #0c0704,0 0 4px color-mix(in srgb,var(--echo-glow) 42%,transparent)}
.battle-aux-echo>img{position:relative;z-index:1;width:27px;height:27px;border:0;border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px #1a120a}
.battle-aux-echo-progress{position:absolute;z-index:2;left:50%;bottom:1px;transform:translateX(-50%);display:flex;width:32px;height:14px;align-items:center;justify-content:center;border:1px solid #d3a84f;border-radius:8px;background:#17100cee;color:#ffe6ad;box-shadow:0 1px 4px #000c;font:10px/1 var(--disp);letter-spacing:.02em;pointer-events:none}
.battle-aux-echo.trigger{animation:echoPassiveFlare 2.6s ease-out}
@media(max-width:350px){
  .battle-aux-tabs{bottom:calc(126px + var(--sab));height:55px}.battle-aux-tab{width:41px;height:55px}.battle-aux-tab img{width:23px;height:23px}
  .battle-aux-sheet{bottom:calc(184px + var(--sab));width:47px;max-height:calc(100% - 194px - var(--sat));padding:4px}.battle-aux-ribbon{gap:5px}
  .battle-aux-icon{flex-basis:38px;width:38px;height:38px}.battle-aux-icon>img{width:28px;height:28px}.battle-aux-echo::before{width:29px;height:29px}.battle-aux-echo>img{width:24px;height:24px}.battle-aux-echo-progress{width:30px;height:13px;font-size:9px}
}
/* Иконка «сгорает» — СПРАВА от кружка цены. Не в правом углу: там печать требования (у 8 карт есть
   и то, и другое), да и веер накрывает карты слева направо — справа огонь был виден 26/52/0/0/100%
   по картам веера, слева 100% на всех пяти. И не под ценой: туда наезжало название карты.
   Кружок цены задан в SVG-ленте (viewBox 82×26, cx=10 r=10), т.е. его геометрия считается от ШИРИНЫ
   карты. padding-top 34.2% = 2×0.171W ставит вертикальный центр слота ровно в центр кружка —
   проценты padding резолвятся от ширины, поэтому привязка держится на любых пропорциях карты.
   Ниша огня — 21..33 в единицах viewBox = 25.6%..40.2% ширины. Стежок там не рисуется (stitchBand),
   поэтому иконка стоит в чистом промежутке между ценой и самоцветом, а не поверх орнамента. */
.card{
  --top-effect-first-left:25.6%;--top-effect-first-width:14.6%;--top-effect-band-height:34.2%;
  --top-effect-second-left:40.7%;--top-effect-second-width:14.1%
}
.card .burn-slot{position:absolute;left:var(--top-effect-first-left);top:0;width:var(--top-effect-first-width);padding-top:var(--top-effect-band-height);pointer-events:none;z-index:7}
.card .ic-burn{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:100%;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.7))}
.card .needle-pull-slot{position:absolute;left:var(--top-effect-first-left);top:0;width:var(--top-effect-first-width);padding-top:var(--top-effect-band-height);pointer-events:none;z-index:8}
.card .needle-pull-slot img{position:absolute;left:50%;top:50%;width:100%;transform:translate(-50%,-50%) rotate(-4deg);
  box-sizing:border-box;padding:2px;border:1px solid #1a120a;border-radius:50%;background:rgba(25,12,10,.92);
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.8))}
.card .needle-pull-slot.alongside-burn{left:var(--top-effect-first-left);width:var(--top-effect-first-width)}
.card .burn-slot.alongside-needle{left:var(--top-effect-second-left);width:var(--top-effect-second-width)}
/* Зум/карусель — крупная лента (228×46): кружок энергии заканчивается на x=32.
   Служебные знаки занимают следующие чистые слоты 34..56 и 57..79; stitchBand()
   начинает орнамент лишь после последнего занятого слота. */
.zoomwrap .card,.car-item .card,.pc-fly.playzoom .card{
  --top-effect-first-left:14.9%;--top-effect-first-width:9.7%;--top-effect-band-height:15.8%;
  --top-effect-second-left:25%;--top-effect-second-width:9.7%
}
/* В карточке магазина крупная лента имеет боковой отступ 4px: сохраняем привязку
   маркеров к тем же двум разрывам SVG, а не к внешнему краю карты. */
.shop-lot-card .card{
  --top-effect-first-left:calc(14.9% + 2.8px);--top-effect-first-width:calc(9.7% - .8px);--top-effect-band-height:15.8%;
  --top-effect-second-left:calc(25% + 2px);--top-effect-second-width:calc(9.7% - .8px)
}
/* печать требуемой фазы/шкалы — постоянная, в правом верхнем углу (симметрично цене), поверх шва */
.card .ph-seal-c{position:absolute;top:3px;right:4px;width:14%;z-index:6;pointer-events:none;filter:drop-shadow(0 1px 2px rgba(0,0,0,.55))}
.hand .card .ph-seal-c,.card-buy .card .ph-seal-c,.card-row .card .ph-seal-c,.reward-fan .card .ph-seal-c,.upg-card .card .ph-seal-c{width:22%;top:1px;right:2px}
/* Цель «зверь» — одна лапа без стрелки, зеркально кружку энергии. Это адрес эффекта,
   поэтому знак живёт в верхней ленте и не занимает место среди чисел результата. */
.card .pet-target-slot{position:absolute;top:3px;right:4px;width:14%;aspect-ratio:1;z-index:7;pointer-events:none}
.card .pet-target-slot img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1px 2px rgba(0,0,0,.65))}
.hand .card .pet-target-slot,.card-buy .card .pet-target-slot,.card-row .card .pet-target-slot,.reward-fan .card .pet-target-slot,.upg-card .card .pet-target-slot{width:22%;top:1px;right:2px}
/* Печать принадлежности — портрет конкретного зверя. В отличие от лапы-адресата
   она сообщает, кто именно может разыграть карту. */
.card .pet-owner-slot{position:absolute;top:3px;right:4px;width:14%;aspect-ratio:1;z-index:8;overflow:hidden;border:2px solid var(--pet-owner-tone);border-radius:50%;background:#100d0d;box-shadow:0 1px 3px #000,inset 0 0 0 1px rgba(244,226,190,.34);pointer-events:none}
.card .pet-owner-slot img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;filter:saturate(.9) contrast(1.08)}
.card .pet-owner-raven{--pet-owner-tone:#548ab5}.card .pet-owner-wolf{--pet-owner-tone:#9299a1}.card .pet-owner-bear{--pet-owner-tone:#b99232}
.hand .card .pet-owner-slot,.card-buy .card .pet-owner-slot,.card-row .card .pet-owner-slot,.reward-fan .card .pet-owner-slot,.upg-card .card .pet-owner-slot{width:22%;top:1px;right:2px;border-width:1px}
/* Если будущая карта совместит цель-зверя с печатью требования, лапа сохраняет зеркальный
   слот цены, а печать отступает влево. В текущей палитре Пастыря таких карт нет. */
.card .pet-target-slot+.ph-seal-c{right:calc(14% + 8px)}
.hand .card .pet-target-slot+.ph-seal-c,.card-buy .card .pet-target-slot+.ph-seal-c,.card-row .card .pet-target-slot+.ph-seal-c,.reward-fan .card .pet-target-slot+.ph-seal-c,.upg-card .card .pet-target-slot+.ph-seal-c{right:calc(22% + 5px)}
.card .pet-owner-slot+.ph-seal-c{right:calc(14% + 8px)}
.hand .card .pet-owner-slot+.ph-seal-c,.card-buy .card .pet-owner-slot+.ph-seal-c,.card-row .card .pet-owner-slot+.ph-seal-c,.reward-fan .card .pet-owner-slot+.ph-seal-c,.upg-card .card .pet-owner-slot+.ph-seal-c{right:calc(22% + 5px)}
/* HUD энергия — красные кристаллы */
.energy-pips .ecryst{width:24px;height:30px;margin:0 -1px}
/* печать фазы на портрете */
.h-portrait .ph-seal{position:absolute;bottom:-9px;right:-9px;width:34px;height:34px;z-index:5;filter:drop-shadow(0 2px 5px rgba(0,0,0,.7))}
.hud-portrait .ph-seal{position:absolute;bottom:-5px;right:-5px;width:26px;height:26px}
/* кнопка «Конец хода» — просто: красная на чёрном, без свечения */
.btn.gold.end{background:url('../img/_parch.webp') center/cover!important;border:1.5px solid #7a1616!important;color:#8f1414!important;
  box-shadow:0 3px 8px rgba(0,0,0,.4)!important;text-shadow:0 1px 0 rgba(255,255,255,.3);font-family:'Ruslan Display',var(--disp)}
.btn.gold.end small{color:#8f1414!important}
/* крестик закрытия тултипа предмета */
.item-tip .tip-close{position:absolute;top:2px;right:4px;width:20px;height:20px;line-height:18px;text-align:center;font-size:13px;color:#b7a888;background:transparent;border:none;cursor:pointer;padding:0;z-index:1}
.item-tip .tip-close:hover{color:#f3c96b}

/* предметы: пергамент + ink-кант + самоцвет редкости в углу (как у карт) */
.item-card{background:url('../img/_parch.webp') center/cover no-repeat!important;border:1.5px solid #1a120a!important}
.item-card.ir-c,.item-card.ir-u,.item-card.ir-r,.item-card.ir-e,.item-card.ir-l,.item-card.ir-k{box-shadow:0 3px 9px rgba(40,25,12,.4)!important}
.item-card .it-gem{position:absolute;top:-9px;right:10px;z-index:3;line-height:0;filter:drop-shadow(0 1px 2px rgba(0,0,0,.55))}
.item-card .it-name{color:#5a1010}
.item-card .it-eff{color:#3a2a18}
.item-card .it-slot{color:#8a6a3a}
/* меню на весь экран: магазин — full-screen пергамент, как снаряжение */
.screen.shop .veil{display:none}
.screen.shop .panel.shop-panel{position:absolute;inset:0;z-index:2;filter:none;margin:0;padding:0}
.screen.shop .shop-panel .panel-in{position:absolute;inset:0;max-height:none;background:#e8d7b1;
  border:22px solid transparent;border-image:url('../img/ui_paper_flush.webp') 20 fill / 22px stretch;
  overflow-y:auto;padding:calc(8px + env(safe-area-inset-top,0)) 12px calc(10px + env(safe-area-inset-bottom,0))}

/* === надёжная вёрстка карт фикс-высоты: описание клипается, название ≤2 строк === */
.hand .card .txt,.card-buy .card .txt,.card-row .card .txt,.reward-fan .card .txt,.upg-card .card .txt{
  flex:1;min-height:0;overflow:hidden;-webkit-mask-image:linear-gradient(180deg,#000 90%,transparent);mask-image:linear-gradient(180deg,#000 90%,transparent)}
.hand .card .t,.card-buy .card .t,.card-row .card .t,.reward-fan .card .t,.upg-card .card .t{
  display:flex;flex-direction:column;-webkit-line-clamp:unset;-webkit-box-orient:initial;overflow:hidden;
  height:2.16em;min-height:2.16em;max-height:2.16em;
  overflow-wrap:break-word}
/* предмет: самоцвет — В ЛЕВЫЙ угол (не мешает цене справа) */
.item-card .it-gem{left:8px;right:auto;top:-9px}
/* Древние карты в магазине — крупнее, веером */
.card-shop{gap:2px;align-items:flex-end;padding-top:8px}
.card-buy .card{width:104px!important;height:158px!important;min-height:0!important}
.card-buy .card .t{font-size:13px!important}
.card-buy .card .cart{height:44px!important}
.card-shop .card-buy{transition:transform .12s}
.card-shop .card-buy:first-child{transform:rotate(-6deg) translateY(6px)}
.card-shop .card-buy:last-child{transform:rotate(6deg) translateY(6px)}
.card-shop .card-buy:only-child{transform:none}
.card-shop .card-buy:hover{transform:translateY(-6px) scale(1.05);z-index:3}

/* === КАРТЫ ВРАГОВ (интенты): пергамент + кроваво-красный шов угрозы === */
.ecard{position:relative;width:56px;height:82px;background:url('../img/_parch.webp') center/cover;border:1.5px solid #9a1414;box-sizing:border-box;
  cursor:pointer;box-shadow:0 3px 8px rgba(0,0,0,.55);transition:transform .12s;overflow:hidden}
.ecard-face{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;padding:13px 2px 3px;box-sizing:border-box}
.ecard .eband{position:absolute;top:0;left:0;width:100%;height:13px;z-index:2}
.ecard-pic{flex:1;display:flex;align-items:center;justify-content:center;min-height:0}
.ecard-pic .ii{width:26px;height:26px}
.ecard-pic .ea{width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(40,4,4,.35))}
/* вариант A: чёрная полоса-лента от края до края + белый текст (как на картах героя) */
.ecard-pic{margin-bottom:3px}
.ecard-val{font-family:'Kalam',var(--disp);font-weight:700;font-size:15px;line-height:1;color:#f0e6d6;display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;white-space:nowrap;gap:1px;background:#0c0a10;border-radius:0;padding:1px 4px;margin:0 -2px 2px;align-self:stretch}
.ecard-val .vnum{color:#f0e6d6}
.ecard-val .ii-sm{width:11px;height:11px}.ecard-val .i-rider{font-size:13px}
.ecard-val .eu{width:13px;height:13px;object-fit:contain;margin-right:1px;vertical-align:middle}
.ecard-nm{font-family:var(--disp);font-weight:400;font-size:12px;letter-spacing:-.02em;line-height:1.02;color:#6a3020;max-width:54px;height:2.04em;flex:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow:hidden;margin-top:1px;transform:scaleX(.9)}
/* белый текст на полосе для всех типов (небольшой оттенок под тип) */
.ecard-face.i-blk .ecard-val .vnum{color:#dff4ff}
.ecard-face.i-heal .ecard-val .vnum{color:#8fe6ab}
.ecard-face.i-poi .ecard-val .vnum{color:#b6e87a}
.ecard-face.i-burn .ecard-val .vnum{color:#ffad55}
.ecard-face.i-dbf .ecard-val .vnum{color:#d8c1ff}.ecard-face.i-buff .ecard-val .vnum{color:#f0d9a6}
.intents.fan .ecard:not(:only-child){margin:0 -4px}
.intents.fan .ecard:first-child{transform:rotate(-6deg)}
.intents.fan .ecard:last-child:not(:only-child){transform:rotate(6deg)}
.intents.fan .ecard{transform-origin:bottom center}
.intents.fan.echo-petrified .ecard{animation:echoPetrifiedIntent .72s ease-out}
@keyframes echoPetrifiedIntent{0%{filter:none}32%{filter:brightness(1.7) sepia(.8) drop-shadow(0 0 10px #d7ca70)}100%{filter:none}}
.intents.fan{position:relative;width:102px;height:132px;margin:5px auto 0;display:block;overflow:visible}.intents.fan .ecard{position:absolute!important;z-index:3;left:10px;top:0;width:82px!important;height:128px!important;margin:0!important;transform:none!important;opacity:1;pointer-events:auto}.intents.fan .ecard-face{padding:13px 3px 4px}.intents.fan .ecard-pic .ea{width:58px!important;height:58px!important}.intents.fan .ecard-nm{font-size:11px!important}.intent-corner{position:absolute;z-index:2;left:10px;right:auto;top:-2px;width:82px;height:118px!important;box-sizing:border-box;border:1.5px solid #9a1414;border-radius:0;background:url('../img/_parch.webp') center/cover;box-shadow:0 3px 8px rgba(0,0,0,.55);transform:rotate(-6deg);transform-origin:50% 100%;pointer-events:none}.intents.fan .ecard-face.swap-out{animation:intentContentOut .32s ease-in-out forwards}.intents.fan .ecard-face.swap-in{animation:intentContentIn .32s ease-in-out both}@keyframes intentContentOut{from{opacity:1}to{opacity:0}}@keyframes intentContentIn{from{opacity:0}to{opacity:1}}.intent-page{position:absolute;z-index:5;left:50%;top:2px;bottom:auto;transform:translateX(-50%);min-width:27px;padding:1px 5px;border-radius:8px;background:#100c0a;color:#f0dfbd;font:12px/1.25 var(--disp);text-align:center;box-shadow:0 1px 4px #0009}.enemy-plan-in{width:min(350px,94vw);max-height:88vh;overflow:hidden;padding:18px 0 14px;border:2px solid #9a1414;border-radius:12px;background:url('../img/_parch.webp') center/cover;text-align:center}.enemy-plan-in h3{margin:0 12px 10px;color:#6a3020}.enemy-plan-track{display:flex;gap:18px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;padding:2px calc((100% - 206px)/2) 8px;touch-action:pan-x}.enemy-plan-track::-webkit-scrollbar{display:none}.enemy-plan-page{flex:0 0 206px;scroll-snap-align:center;display:flex;flex-direction:column;align-items:center;gap:4px}.enemy-plan-page .ecard-full{box-shadow:0 8px 22px rgba(0,0,0,.5)}.enemy-plan-page small{font-family:var(--disp);color:#6a3020}.enemy-plan-hint{margin:0 0 9px!important;font:16px var(--script)!important;color:#6a4a2a!important}.enemy-plan-in>.btn{margin:0 12px}.egg-reward-art{display:block;width:132px;height:132px;object-fit:contain;margin:2px auto 10px;filter:drop-shadow(0 6px 7px #0008)}
.enemies.e3 .intents.fan{width:76px}
.enemies.e3 .intents.fan .ecard{left:8px;width:60px!important}
.enemies.e3 .intent-corner{left:8px;right:auto;width:60px;height:118px!important}
@media (prefers-reduced-motion:reduce){.intents.fan .ecard{transition:none!important}.intents.fan .ecard-face.swap-in,.intents.fan .ecard-face.swap-out{animation:none!important}.intents.fan .ecard-face.swap-out{display:none}}

/* Компактнее по вертикали: убираем пустое поле над артом, сохраняя его размер и читаемость полосы. */
.intents.fan{height:122px}
.intents.fan .ecard{height:118px!important}

/* Единый контракт карт героев: описание не выше трёх строк. Смысл длинной карты
   сокращается в данных, а не прячется бесконечным блоком текста. */
.card .txt:not(:empty){
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  max-height:3.75em;
  overflow:hidden;
  -webkit-mask-image:none;
  mask-image:none;
}

/* Бегущая полоса — только измеренное JS-переполнение конкретной карты.
   Обычные полосы остаются неподвижными. */
.strip.marquee .strip-inner{
  left:0;
  max-width:none;
  justify-content:flex-start;
  gap:14px!important;
  transform:translateY(-50%);
  animation:cardStripMarquee var(--marquee-d,7s) linear infinite;
}
.strip.marquee .strip-run{display:flex;align-items:center;gap:3px;flex:none}
.strip.marquee.dense .strip-run{gap:0}
.strip.marquee:hover .strip-inner,.strip.marquee:active .strip-inner{animation-play-state:paused}
@keyframes cardStripMarquee{
  to{transform:translate(calc(-50% - 7px),-50%)}
}
@media (prefers-reduced-motion:reduce){
  .strip.marquee .strip-inner{animation-duration:18s}
}

/* перенос прогресса между адресами */
.modal-in.xfer{max-height:82vh;overflow:auto;text-align:left}
.xfer-hint{font-size:13px;color:#4a3826;margin:2px 0 10px;font-style:italic}
.xfer-sec{margin:8px 0}
.xfer-lbl{font-size:13px;color:#5a472e;margin:6px 0 4px}
.xfer-lbl b{color:#7a1a1a}
.xfer-ta{width:100%;box-sizing:border-box;min-height:60px;max-height:120px;resize:vertical;background:#100d0a;border:1px solid #4a3a26;border-radius:6px;color:#d8c9ac;font:13px/1.3 monospace;padding:7px;word-break:break-all;margin-bottom:4px}
.modal-in.xfer .btn{margin-top:4px}

/* === АДАПТИВ БОЯ: карты и шрифты тянутся с шириной экрана (iPhone 16/Plus/Pro Max и крупнее) === */
/* база была фиксированной (80×150, текст 8–9.5px) → мелко на больших дисплеях. */
/* Высота: контент двухстрочного заголовка + арт + полоса + 3 строки текста не влезал в 158px —
   колонка переполнялась, флекс сплющивал .t, и текст выливался на арт (98 карт из 143).
   Резать описание до 2 строк — это урезать 68 карт; высота в веере почти бесплатна: она съедает
   ширину как 2H·sinθ, при ±15° прибавка 16px отнимает ~2px видимой полосы из 67.
   Ещё 16px высоты целиком отдаём арту (28→44px), размеры текста не меняем. */
.hand .card{width:clamp(84px,22vw,98px);height:clamp(184px,48.5vw,204px);margin:0 clamp(-20px,-4.6vw,-15px)}
/* .t не должен сжиматься флексом: с overflow:visible (нужен для scaleX) сжатый бокс выпускает
   вторую строку наружу — она и ложилась на арт. */
.hand .card .t{flex:none}
/* В руке карты сложены ВЕЕРОМ и перекрывают друг друга — видна только левая часть каждой.
   Полоса эффектов центрирована, поэтому правые чипы (добор, вторые эффекты) уезжали под
   соседнюю карту и «пропадали». В руке прижимаем содержимое полосы влево, в видимую зону. */
.hand .strip{justify-content:center;padding-left:0}
/* Заголовок: полный кегль по высоте, а по ширине — сжатие ТОЛЬКО тем именам, что не влезли (fitTitles()).
   Ключ — white-space:nowrap. Прежний scaleX(.86) без него не вмещал ничего: строка переносилась ещё
   до трансформа, и «Нетленность» рвалась мид-словом даже сжатая. Ставим nowrap → перенос только по
   <br> из cardTitle(), а scaleX честно ужимает глифы. Высота букв важнее ширины для читаемости.
   overflow:hidden (из line-clamp выше) тоже снимаем: он режет строку ДО трансформа, и сжималась бы
   уже обрезанная («НЕТЛЕННО»). Перенос даёт <br> из cardTitle(), line-clamp не нужен. */
.hand .card .t{font-size:clamp(12px,3.4vw,14px);letter-spacing:-.01em;line-height:1.1}
/* Та же подгонка — везде, где карта показывается целиком: магазин, награды, просмотр колоды.
   Иначе там остаётся старый разрыв мид-словом («НЕТЛЕННОСТ / Ь» в магазине). */
.hand .card .t,.card-buy .card .t,.reward-fan .card .t,.card-row .card .t,.upg-card .card .t{
  display:block;white-space:nowrap;overflow:visible;-webkit-line-clamp:none;
  transform:scaleX(var(--tsx,1));transform-origin:center}
/* описание: фикс. 3 строки с многоточием, дальше — зум по тапу. Именно flex:1 (выше) растягивал блок
   и глушил line-clamp, поэтому раньше стояла маска-затухание вместо честного «…». */
.hand .card .txt{font-size:clamp(11px,3.05vw,12.5px);line-height:1.25;flex:none;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  -webkit-mask-image:none;mask-image:none}
.b-hero .bar-txt,.b-hero .bar.body .bar-txt{font-size:clamp(11px,3.1vw,13px)}
.e-name{font-size:clamp(13px,3.5vw,15.5px)}
.phase-lbl{font-size:clamp(11px,3vw,12.5px)}
.energy-pips .ecryst{width:clamp(24px,6.4vw,28px);height:clamp(30px,8vw,35px)}
/* Карты врага. Раньше: .ecard был шире блока врага, флекс сплющивал его с 82 до 57px, очередь из
   3 карт вылезала за врага на 31px (у соседних врагов — наезжали друг на друга). Отсюда и имя
   7-м кеглем со сжатием — оно просто не влезало.
   Теперь: блок врага шире (места хватает — двое по 118 занимали 250 из 412), карта не сжимается
   флексом, а веер плотнее — перекрытие больше, и очередь укладывается внутрь врага. */
.enemy{width:clamp(132px,40vw,168px)}
.enemies.e3 .enemy{width:clamp(104px,26.5vw,112px)}
/* min-width:0 обязателен: у флекс-элемента min-width:auto = не уже своего содержимого, и длинное
   имя приёма распирало карту шире заданной (64 → 73px). */
.ecard{flex:none;min-width:0;width:clamp(54px,14.5vw,60px);height:clamp(78px,21vw,88px);padding:12px 2px 3px}
.enemies.e3 .ecard{width:clamp(42px,11.5vw,48px);height:clamp(62px,17vw,70px);padding:10px 2px 3px}
.ecard-pic .ea{width:clamp(34px,9.5vw,40px);height:clamp(34px,9.5vw,40px)}
.enemies.e3 .ecard-pic .ea{width:clamp(26px,7.5vw,31px);height:clamp(26px,7.5vw,31px)}
.ecard-val{font-size:clamp(14px,3.9vw,16px)}
.enemies.e3 .ecard-val{font-size:clamp(12px,3.3vw,13.5px)}
/* имя вернулось: полный кегль, без scaleX-сжатия */
.ecard-nm{font-size:clamp(9.5px,2.6vw,11px);transform:none;letter-spacing:-.01em;max-width:100%;line-height:1.08;overflow-wrap:anywhere}
.enemies.e3 .ecard-nm{font-size:clamp(8.5px,2.3vw,9.5px)}
/* веер плотнее */
.intents{gap:0}
.intents.fan .ecard:not(:only-child){margin:0 -9px}
/* при трёх врагах места вдвое меньше — перекрытие сильнее. Помним: карта повёрнута на ±6°,
   и её AABB шире самой карты (47.4 → 54.4px), поэтому запас считаем по факту, а не по width. */
.enemies.e3 .intents.fan .ecard:not(:only-child){margin:0 -13px}
/* Остаток исходного плана по кеглю. Описание подросло ещё раз: требования и сдвиг весов ушли
   в печать и в полосу, средняя длина текста 27.7 → 20.0 символов — освободившееся место отдаём кеглю. */
.hand .card .txt{font-size:clamp(11.5px,3.25vw,13.5px)}
.h-name{font-size:clamp(14px,3.8vw,16px)}
.b-hero .btn.end{font-size:clamp(13px,3.6vw,15px);padding:8px 14px}
.pile{font-size:clamp(12px,3.25vw,13px)}
.st,.st b{font-size:clamp(11.5px,3.1vw,12.5px)}
.st-ic{width:15px;height:15px}
/* Аудит живых кеглей (вычисленных, а не по CSS: из 109 правил <13px живых оказалось 16).
   Ниже — то, что реально видит игрок и что осталось мелким.
   HP ВРАГА был 10px: раньше подняли только .b-hero .bar-txt, а вражеский .bar-txt пропустили. */
.enemy .bar{height:17px;border-radius:9px}
.enemy .bar-txt{font-size:clamp(11.5px,3.1vw,13px)}
.strip .dmod{font-size:clamp(12px,3.2vw,13px)}          /* модификатор урона «+6» был 11px */
/* HUD НЕ-боевых экранов (карта/событие/торг) — его вообще не касались: «Тело» 9px, «60/60» 10px */
.hud .bar-txt,.hud .bar.body .bar-txt{font-size:clamp(11.5px,3.1vw,13px)}
.telo-lbl,.bar.body .telo-lbl{font-size:clamp(11px,2.9vw,12px)}
.hud-portrait .ph-badge{font-size:13px}
.gold-chip .c,.gold-chip.sm{font-size:13px}
/* Три длинные подписи под иконками должны помещаться в свои кнопки даже на узком экране. */
.menu-icons .ib-lbl{font-size:11px}
.kick{font-size:13px}
/* .b-hero центрировал контент в min-height:130px → 24px пустоты над именем героя.
   Полосу статусов (46px, резерв под 2 строки бейджей) НЕ трогаем — иначе панель прыгает при дебафах. */
.b-hero{min-height:0}

/* Низкие телефоны (320×568): бой обязан целиком оставаться интерактивным.
   Уплотняем только вертикальную геометрию; очередь слота, Зарок, намерение и нижний HUD
   остаются видимыми одновременно. */
@media (max-height:720px){
  .b-top{padding-top:calc(4px + var(--sat))}
  .b-chapter{top:calc(23px + var(--sat))}
  .b-top .b-exit,.b-top .b-gold{min-height:38px;padding-top:5px;padding-bottom:5px}
  .vow-warning-slot{top:clamp(168px,31vh,184px)}
  .vow-warning{top:1px;left:8px;width:calc(100% - 16px);height:60px}
  .vow-warning-open{grid-template-columns:92px minmax(0,1fr);gap:7px;padding:6px 9px}
  .vow-warning-heading{padding-right:7px}.vow-warning-heading span{font-size:12px}
  .vow-warning-copy{font-size:11px;line-height:1.14}.vow-warning-copy i{font-size:12px}.vow-warning-fx img{width:18px;height:18px}.vow-warning-fx b{font-size:12px}
  .vow-warning-slot.collapsed .vow-warning{left:calc(100% - 116px);width:117px;height:40px}
  .enemies{padding-top:0;gap:3px}
  .enemies.e3{gap:2px;padding-left:2px;padding-right:2px;flex-wrap:nowrap}
  .enemies.e3 .enemy{width:calc((100vw - 8px)/3)}
  .slot-reserve{height:20px;margin-bottom:1px}
  .slot-reserve span{font-size:11px}
  .slot-reserve img{width:19px;height:19px}
  .enemies.e3 .e-img{width:60px;height:60px}
  .e-plate{margin-top:2px}
  .e-name{font-size:13px;line-height:1.02}
  .enemy .bar-txt{font-size:11px}
  .intents.fan{height:72px;margin-top:2px}
  .enemies.e3 .intents.fan{width:70px}
  .enemies.e3 .intents.fan .ecard{left:7px;width:56px!important;height:87px!important;padding-top:8px}
  .enemies.e3 .intent-corner{left:7px;right:auto;top:-1px;width:56px;height:87px!important;transform:rotate(-8deg)}
  .enemies.e3 .intents.fan .ecard-pic .ea{width:25px!important;height:25px!important}
  .enemies.e3 .ecard-val{font-size:13px}
  .enemies.e3 .ecard-nm{font-size:11px}
  .intent-page{font-size:11px}
  .hand{padding-top:0}
  .hand .card{width:66px;height:112px;margin-left:-12px;margin-right:-12px}
  .hand .card .cin{padding:8px 4px 4px}
  .hand .card .t{font-size:11px;min-height:22px}
  .hand .card .strip{height:18px;margin:1px -6px 2px}
  .hand .card .strip b{font-size:13px}
  .hand .card .strip .si{width:12px;height:12px;flex-basis:12px}
  .hand .card .txt{font-size:11px;line-height:1.12;-webkit-line-clamp:2}
  .b-hero{grid-template-columns:58px minmax(0,1fr) 70px;gap:6px;padding:3px 7px}
  .b-hero .h-portrait{width:56px;height:56px}
  .b-hero .h-name{font-size:13px}
  .hero-right{width:70px;gap:2px}
  .b-hero .btn.end{font-size:13px;padding:5px 9px}
  .energy-pips .ecryst{width:20px;height:25px}
  .b-bottom{gap:6px;padding:3px 7px calc(5px + var(--sab))}
  .pile{height:34px;gap:3px;padding:3px 5px;font-size:11.5px;border-radius:8px}
  .pile .pi-ic{width:15px;height:15px;flex-basis:15px}
  .pile b{font-size:14px}
}

/* ==== ЭКРАН ВЫБОРА КОЩЕЯ ==== */
/* 2×2 эскиза, выбранный кроссфейдом переходит эскиз → Плоть, описание на пергаменте внизу. */
.screen.heroes{display:flex;flex-direction:column;height:100%;overflow:hidden}
.hs-hd{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:calc(8px + var(--sat)) 12px 6px;flex:none}
.hs-hd h2{font-family:var(--disp);font-size:clamp(16px,4.6vw,19px);color:var(--cream);font-weight:400;margin:0}
.hs-hd .hs-sp{width:44px}                                  /* уравновешивает кнопку «назад» — заголовок по центру */

.hs-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:2px 12px 10px;flex:none}
.hs-card{position:relative;border-radius:12px;overflow:hidden;height:min(232px,27vh);
  border:1.5px solid rgba(138,106,58,.55);background:#171310;cursor:pointer;
  transition:border-color .2s,box-shadow .2s}
.hs-art{position:absolute;inset:0;background-size:cover;background-position:top center}
.hs-art.fl{opacity:0;transition:opacity .45s ease}          /* кроссфейд эскиз → Плоть */
.hs-card[data-hero="pastyr"] .hs-art.fl{
  /* Контрольные точки: глаза, застёжка плаща и навершие посоха. Цветной арт
     увеличен на 2% и сдвинут на 4×5 px — при кроссфейде точки остаются на месте. */
  background-size:auto 102%;background-position:calc(50% + 4px) 5px;
  background-repeat:no-repeat;background-color:#d8c9a8}
.hs-card.sel .hs-art.fl{opacity:1}
.hs-card.sel{border-color:var(--gold);border-width:3px;box-shadow:0 0 0 2px rgba(243,201,107,.45),0 6px 18px rgba(0,0,0,.6)}
/* .lock — только у непроработанных (Царь, Пастырь): не выбираются вовсе. У Колдуна механика
   готова, он закрыт прогрессом — его карточка живая, замок висит на кнопке «В путь». */
.hs-card.lock{cursor:default}
.hs-card.lock .hs-art{filter:grayscale(1) brightness(.5)}   /* закрытый — глухой эскиз */
.hs-card.lock.sel .hs-art.fl{opacity:0}                     /* закрытого в Плоть не показываем */
.hs-veil{position:absolute;inset:0;background:linear-gradient(180deg,rgba(12,13,20,0) 40%,rgba(12,13,20,.9) 88%)}
.hs-lk{position:absolute;top:7px;right:8px;width:17px;height:17px;opacity:.85;filter:drop-shadow(0 1px 2px #000)}
.hs-demo-lock{position:absolute;z-index:5;left:7px;right:7px;top:8px;padding:5px 4px;border:1px solid rgba(236,194,105,.72);border-radius:5px;background:rgba(77,17,17,.88);color:#f2d18d;font:12px/1.15 var(--disp);text-align:center;text-shadow:0 1px 2px #000}
.hs-cap{position:absolute;left:0;right:0;bottom:0;padding:6px 8px 7px;text-align:center}
.hs-nm{font-family:var(--disp);font-size:clamp(17px,4.8vw,19px);color:var(--cream);letter-spacing:.3px;text-shadow:0 2px 6px rgba(0,0,0,.75)}
.hs-card.sel .hs-nm{color:var(--gold-hi)}
.hs-card.lock .hs-nm{color:var(--bone-dim)}
.hs-vc{font-family:var(--disp);font-size:13px;color:#e0473f;margin-top:2px;letter-spacing:.3px;text-shadow:0 1px 4px rgba(0,0,0,.7)}  /* порок — красным, шрифтом имени. ЭТО МИНИМАЛЬНЫЙ кегль экрана */
.hs-lvl{display:flex;align-items:center;gap:5px;margin-top:5px;justify-content:center}
.hs-b{flex:1;max-width:74px;height:4px;border-radius:3px;background:rgba(232,226,208,.18);overflow:hidden}
.hs-b i{display:block;height:100%;background:linear-gradient(90deg,var(--gold),var(--gold-hi))}
.hs-n{font-size:13px;color:var(--seal);letter-spacing:.4px}   /* было 10px — мельче порока, не по правилу */

.hs-desc{position:relative;flex:1;min-height:0;overflow:auto;margin:0 12px calc(10px + var(--sab));border-radius:12px;padding:13px 15px 12px;
  color:#2a1d0e;background:url('../img/_parch.webp') center/cover,#e6d9b6;border:1.5px solid var(--pmut);
  box-shadow:0 8px 22px rgba(0,0,0,.55);display:flex;flex-direction:column}
.hs-top{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
/* Текста на экране мало (порок строкой + тезисы) — за счёт этого кегль поднят */
.hs-desc h2{font-family:var(--disp);font-size:24px;font-weight:400;color:#20160a;margin:0}
.hs-vice{font-family:var(--disp);font-size:24px;color:#a81c1c}
.hs-pas{font-size:15px;line-height:1.45;margin-top:11px;color:#3a2205;background:rgba(168,28,28,.09);
  border-left:3px solid #a81c1c;border-radius:0 6px 6px 0;padding:9px 11px}
.hs-pas b{color:#8a1f1c}
.hs-txt{font-size:15px;line-height:1.5;margin:10px 0 0;color:#33240f}
.hs-echo-strip{display:flex;align-items:center;justify-content:space-between;gap:0;width:100%;margin-top:13px;padding:2px 0 4px}
.hs-echo-slot{position:relative;width:60px;height:60px;flex:0 0 60px;padding:3px;border:2px solid var(--echo-tone);border-radius:50%;background:#18130e;box-shadow:inset 0 0 0 1px #eed9ad,0 3px 8px #0007;color:#6e5232}
.hs-echo-slot.filled{box-shadow:inset 0 0 0 1px #eed9ad,0 3px 8px #0008,0 0 10px color-mix(in srgb,var(--echo-tone) 45%,transparent)}
.hs-echo-slot.open{transform:translateY(-2px);box-shadow:inset 0 0 0 1px #fff0c8,0 4px 10px #0009,0 0 13px color-mix(in srgb,var(--echo-tone) 60%,transparent)}
.hs-echo-slot>img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.hs-echo-slot>small{position:absolute;z-index:4;left:-2px;top:-5px;min-width:19px;height:19px;padding:0 2px;box-sizing:border-box;border:1px solid #806444;border-radius:10px;background:#e5d4ae;color:#5b3d20;font:12px/18px var(--disp);text-align:center;box-shadow:0 2px 4px #0007}
.hs-echo-slot>span{position:absolute;right:-5px;bottom:-5px}.hs-echo-slot>span .cr-hunt-seal{display:block;width:23px;height:23px;padding:2px}
.hs-echo-slot.empty{border-style:dashed;background:rgba(73,53,31,.08);box-shadow:inset 0 0 0 1px rgba(111,82,49,.18)}
.hs-echo-slot.empty>i{position:absolute;inset:13px;border:1px solid rgba(111,82,49,.35);border-radius:50%}
.hs-echo-slot.locked{border-color:#756348;background:rgba(50,42,32,.18);box-shadow:inset 0 0 0 1px rgba(238,217,173,.38);opacity:.78;cursor:default}
.hs-echo-slot>.hs-echo-lock{position:absolute;left:50%;top:50%;width:40px;height:40px;transform:translate(-50%,-50%);object-fit:contain;filter:grayscale(1) sepia(.72) contrast(1.55) brightness(.62);opacity:.96}
.hs-echo-popover{position:fixed;z-index:80;box-sizing:border-box;padding:10px 11px 9px;border:2px solid #76552e;border-radius:10px;background:url('../img/_parch.webp') center/cover,#e2d0a8;box-shadow:0 12px 28px #000b,0 0 0 1px #f0dfb9;color:#3c2917;overflow-y:auto;animation:hsEchoPop .16s ease-out}
.hs-echo-popover>header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding-bottom:7px;border-bottom:1px solid rgba(92,60,29,.3)}
.hs-echo-popover>header b{font:16px/1.1 var(--disp);font-weight:400;color:#8d2b22}.hs-echo-popover>header small{font:13px var(--serif);color:#6c5135}
.hs-echo-pop-options{display:flex;flex-direction:column;gap:7px;margin-top:9px}
.hs-echo-pop-choice{display:grid;grid-template-columns:50px minmax(0,1fr);gap:8px;align-items:start;min-width:0;padding:7px;border:2px solid rgba(120,92,55,.45);border-radius:8px;background:rgba(255,247,220,.23);color:#3c2917;text-align:left}
.hs-echo-pop-choice.on{border-color:var(--echo-tone);background:#ead9b2;box-shadow:0 0 8px color-mix(in srgb,var(--echo-tone) 50%,transparent)}
.hs-echo-pop-face{position:relative;display:block;width:48px;height:48px}.hs-echo-pop-face>img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}.hs-echo-pop-choice .cr-hunt-seal{position:absolute;right:-5px;bottom:-4px;width:22px;height:22px;padding:2px}
.hs-echo-pop-copy{display:flex;min-width:0;flex-direction:column;gap:4px}.hs-echo-pop-copy>b{font:15px/1.1 var(--disp);font-weight:400;color:#4b2f18}
.hs-echo-pop-rule{display:grid;grid-template-columns:57px minmax(0,1fr);gap:5px;align-items:start}.hs-echo-pop-rule>em{font:12px/1.3 var(--disp);font-style:normal;letter-spacing:.03em;color:#8d2b22}.hs-echo-pop-rule>span{min-width:0;font:12px/1.28 var(--serif);color:#412b18}.hs-echo-pop-rule .hunt-echo-fx{vertical-align:-3px}.hs-echo-pop-rule .hunt-echo-fx img,.hs-echo-pop-rule .hunt-echo-fx .ecryst{width:15px;height:15px}.hs-echo-pop-rule .hunt-echo-fx .ecryst{width:11px}.hs-echo-pop-rule .hunt-echo-fx b{font-size:13px}
.hs-echo-pop-clear{display:block;margin:7px auto 0;padding:2px 6px;border:0;border-bottom:1px dashed #8d2b22;background:transparent;color:#8d2b22;font:12px var(--serif)}
.hs-echo-popover>p{margin:9px 0 2px;font:14px/1.35 var(--serif);text-align:center}
@keyframes hsEchoPop{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.hs-soon{font-size:15px;line-height:1.45;margin-top:14px;color:#5a4326;text-align:center;
  padding:16px 10px;border:1px dashed rgba(90,67,38,.45);border-radius:10px}
.hs-go{margin-top:12px;display:flex}
.hs-go .btn{flex:1}
.hs-go .btn[disabled]{opacity:.5;cursor:default;filter:grayscale(.5);box-shadow:none}
.hs-hint{margin-top:9px;text-align:center;font-size:13px;color:#5a4326;padding:9px;border:1px dashed rgba(90,67,38,.5);border-radius:10px}

@media (prefers-reduced-motion:reduce){
  .spl-stage img:first-child{opacity:1}.spl-line i{animation:none;width:100%}
}
@media(max-width:350px){.hs-echo-slot{width:54px;height:54px;flex-basis:54px}.hs-echo-slot>.hs-echo-lock{width:36px;height:36px}.hs-echo-popover{padding-left:7px;padding-right:7px}.hs-echo-pop-options{gap:5px}.hs-echo-pop-choice{grid-template-columns:44px minmax(0,1fr);gap:6px;padding:6px 5px}.hs-echo-pop-face{width:42px;height:42px}.hs-echo-pop-copy>b{font-size:14px}.hs-echo-pop-rule{grid-template-columns:54px minmax(0,1fr);gap:3px}.hs-echo-pop-rule>span{font-size:11px}}


/* ---- Питомцы ---- */
.pet-wrap { display:flex; flex:none; flex-flow:row nowrap; align-items:flex-start; justify-content:center;
  gap:14px; width:100%; padding:2px 8px 0; margin:0; position:relative; z-index:2; pointer-events:none; }
.pet-slot { width:118px; min-width:0; display:flex; flex-direction:column; align-items:center;
  background:none; border:0; border-radius:0; padding:0; box-shadow:none; }
.pet-slot.dead { opacity: .45; filter: grayscale(1); }
.pet-img { width:86px; height:86px; border-radius:12px; background-size:cover; background-position:center 12%;
  flex:0 0 auto; border:2px solid rgba(201,152,46,.45); box-shadow:0 6px 18px rgba(0,0,0,.6); }
.pet-plate { width:100%; min-width:0; margin-top:3px; }
.pet-plate .bar-wrap { margin: 0; }
.pet-name { font-family:var(--disp); font-size:clamp(14px,3.8vw,17px); font-weight:400;
  color:#d84a43; margin-top:4px; text-align:center; letter-spacing:.025em; line-height:1.05;
  text-shadow:0 1px 3px #000,0 0 8px rgba(173,30,28,.28); }
.pet-str { color: #e0a94a; }

/* Пастырь: зверь живёт в одной строке со своей укороченной шкалой. Так два
   портрета не наслаиваются, а поле и рука по-прежнему не теряют высоту. */
.b-hero.has-pet .h-portrait .ph-seal{left:-5px;right:auto}
.primary-health-row{min-width:0}
.primary-health-row.with-pet{display:grid;grid-template-columns:44px minmax(0,1fr);gap:7px;align-items:center}
.primary-health-copy{min-width:0}
.primary-health-row.with-pet .h-name{gap:4px}
.pet-primary-avatar{position:relative;display:block;width:44px;min-width:44px;padding:0;background:none;border:0;box-shadow:none;pointer-events:auto;cursor:help}
.pet-primary-avatar .pet-img{width:42px;height:42px;border-radius:50%;border-width:2px;box-shadow:0 3px 9px #000c}
.pet-primary-avatar .stats-row{position:absolute;z-index:2;top:-4px;right:-5px;margin:0;max-width:38px;height:auto;justify-content:flex-end;gap:1px;overflow:visible}
.pet-primary-avatar .st{padding:1px 2px;font-size:9px}
.pet-primary-avatar .st-ic{width:11px;height:11px}
/* Пока зверь жив, большая шкала принадлежит ему. Красный — Тело зверя,
   зелёный на портрете — собственное Тело Пастыря. */
.b-hero .bar.body.pet-primary{border-color:#3a1116;background:#3b1a1d;box-shadow:inset 0 1px 2px #130609aa}
.b-hero .bar.body.pet-primary i{background:linear-gradient(90deg,#8d1726,#e34a51)}
.b-hero .bar.body.pet-primary .bar-txt{color:#fff4e3;text-shadow:0 1px 2px #210307}
/* Собственное Тело Пастыря остаётся прямо на его портрете. Заполнение видно
   под цифрой, а отдельный щит сохраняет важный боевой Блок героя. */
.pastyr-portrait-hp{position:absolute;z-index:6;left:4px;right:4px;bottom:3px;height:15px;overflow:hidden;border:1px solid #194b31;border-radius:8px;background:#0d271be8;box-shadow:0 1px 4px #000a,0 0 0 1px #7fc79555;color:#f2ffe9;font:12px/1 var(--disp);text-shadow:0 1px 2px #001b0b}
.pastyr-portrait-hp>i{position:absolute;inset:0 auto 0 0;background:linear-gradient(90deg,#26754a,#72c77d);opacity:.96}
.pastyr-portrait-hp>span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:2px;white-space:nowrap}
.pastyr-portrait-hp img{width:10px;height:10px;object-fit:contain;filter:drop-shadow(0 1px 1px #000)}
.pastyr-portrait-block{position:absolute;z-index:7;right:-5px;top:-6px;min-width:23px;height:18px;padding:0 3px;display:flex;align-items:center;justify-content:center;gap:1px;border:1px solid #d9edf4;border-radius:9px;background:linear-gradient(180deg,#b9dce8,#54889d);box-shadow:0 2px 5px #0009;color:#102731;font:12px/1 var(--disp)}
.pastyr-portrait-block img{width:11px;height:11px;object-fit:contain}
@media (max-height:720px){
  .primary-health-row.with-pet{grid-template-columns:38px minmax(0,1fr);gap:5px}
  .pet-primary-avatar{width:38px;min-width:38px}
  .pet-primary-avatar .pet-img{width:36px;height:36px}
  .primary-health-row.with-pet .h-name{font-size:12px}
  .primary-health-row.with-pet .h-phase-inl{font-size:12px}
  .pastyr-portrait-hp{left:3px;right:3px;bottom:2px;height:14px;font-size:12px}
  .pastyr-portrait-hp img{width:9px;height:9px}
  .pastyr-portrait-block{right:-4px;top:-5px;height:17px;font-size:12px}
}


/* ---- Мёртвое стадо: слот мертвеца-щита ---- */
.pet-slot.ghoul { background:none; border:0; }
.pet-slot.ghoul .pet-img, .ghoul-img { background: repeating-linear-gradient(45deg,#2a2730,#2a2730 4px,#332f3a 4px,#332f3a 8px) !important; }

/* ==================== ВСТУПИТЕЛЬНАЯ ЗАСТАВКА ==================== */
.game-intro{--progress:0%;--caption-space:calc(112px + env(safe-area-inset-bottom,0));position:fixed;inset:0;z-index:99990;overflow:hidden;
  background:url('../img/_parch.webp') center/cover #d8c9a5;
  opacity:0;transition:opacity .5s;color:#f3ead5;isolation:isolate;user-select:none;-webkit-user-select:none}
.game-intro.in{opacity:1}.game-intro.out{opacity:0;pointer-events:none}
.intro-stage{position:absolute;inset:0 0 var(--caption-space);overflow:hidden;background:url('../img/_parch.webp') center/cover #d8c9a5}
.intro-stage::after{content:'';position:absolute;inset:0;z-index:4;pointer-events:none;
  background:linear-gradient(180deg,rgba(16,12,8,.10),transparent 24%,transparent 72%,rgba(10,8,6,.22) 100%),
    radial-gradient(ellipse at center,transparent 58%,rgba(20,14,9,.24) 118%);mix-blend-mode:multiply}
.intro-scene-layer{position:absolute;inset:0;opacity:0;overflow:hidden;will-change:opacity,filter;pointer-events:none}
.intro-scene-layer.fx-rift::after{content:'';position:absolute;z-index:11;inset:0;background:url('../img/_parch.webp') center/cover #d8c9a5;
  opacity:0;clip-path:inset(43% 0);transition:opacity 1.25s ease-out,clip-path 1.8s cubic-bezier(.2,.68,.22,1);pointer-events:none}
.game-intro.intro-end-logo .intro-scene-layer.fx-rift::after{opacity:.82;clip-path:inset(0)}
.intro-scene-layer.active{z-index:2;animation:introSceneDraw 2.1s ease-in-out forwards}
.intro-scene-layer.leaving{z-index:1;animation:introSceneFade 2.1s ease-in-out forwards}
@keyframes introSceneDraw{0%{opacity:0;filter:sepia(.28) contrast(.68) blur(1.8px)}28%{opacity:.18;filter:sepia(.22) contrast(.76) blur(1.25px)}58%{opacity:.62;filter:sepia(.1) contrast(.9) blur(.45px)}100%{opacity:1;filter:none}}
@keyframes introSceneFade{0%{opacity:1;filter:none}42%{opacity:.72;filter:sepia(.08) contrast(.92) blur(.35px)}72%{opacity:.24;filter:sepia(.28) contrast(.7) blur(1.15px)}100%{opacity:0;filter:sepia(.4) contrast(.58) blur(1.8px)}}
.intro-art{position:absolute;inset:-2%;width:104%;height:104%;object-fit:contain;object-position:center;will-change:transform;
  animation:introPan var(--scene-d,12s) linear both}
.pan-down{--x0:0%;--y0:-2%;--s0:1.05;--x1:0%;--y1:2%;--s1:1.09}
.pan-in{--x0:0%;--y0:0%;--s0:1.03;--x1:0%;--y1:-1%;--s1:1.12}
.pan-out{--x0:0%;--y0:0%;--s0:1.13;--x1:0%;--y1:0%;--s1:1.03}
.pan-across{--x0:-2%;--y0:0%;--s0:1.08;--x1:2%;--y1:-1%;--s1:1.1}
@keyframes introPan{from{transform:translate(var(--x0),var(--y0)) scale(var(--s0))}to{transform:translate(var(--x1),var(--y1)) scale(var(--s1))}}
.game-intro.paused *{animation-play-state:paused!important}
.intro-progress{position:absolute;z-index:20;top:0;left:0;right:0;height:3px;background:rgba(35,20,10,.25)}
.intro-progress i{display:block;width:var(--progress);height:100%;background:#8b1918;box-shadow:0 0 8px rgba(139,25,24,.55)}
.intro-controls{position:absolute;z-index:30;right:12px;bottom:calc(var(--caption-space) + 10px);
  display:flex;justify-content:flex-end;pointer-events:none}
.intro-controls button{pointer-events:auto;border:1px solid rgba(234,218,183,.5);border-radius:999px;
  min-height:44px;background:rgba(18,13,10,.72);color:#f0e4c8;font-family:var(--serif);font-size:13px;line-height:1;padding:10px 15px;
  text-shadow:0 1px 2px #000;box-shadow:0 2px 8px rgba(0,0,0,.3);backdrop-filter:blur(3px)}
.intro-tap{position:absolute;z-index:8;inset:48px 0 var(--caption-space);border:0;background:transparent;padding:0}
.intro-caption{position:absolute;z-index:25;left:0;right:0;bottom:0;
  height:var(--caption-space);display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;
  background:url('../img/_parch.webp') center/cover;
  padding:10px 18px calc(10px + env(safe-area-inset-bottom,0));box-shadow:0 -5px 16px rgba(38,24,13,.16);
  transition:opacity .65s,transform .65s}
.game-intro.intro-end-logo .intro-caption{opacity:0;transform:translateY(16px)}
.intro-sub{width:100%;max-width:720px;height:55px;display:grid;grid-template-rows:repeat(2,1.25em);align-content:center;justify-items:center;text-align:center;
  font-family:var(--disp);font-size:clamp(18px,4.9vw,22px);font-weight:400;line-height:1.18;color:#21160d;
  text-shadow:none;padding:0 4px;text-wrap:balance;position:relative;z-index:1}
.intro-sub-line{--ink-front:-18px;display:block;max-width:100%;white-space:nowrap;
  -webkit-mask-image:linear-gradient(90deg,#000 0,#000 var(--ink-front),rgba(0,0,0,.78) calc(var(--ink-front) + 5px),rgba(0,0,0,.24) calc(var(--ink-front) + 12px),transparent calc(var(--ink-front) + 18px));
  mask-image:linear-gradient(90deg,#000 0,#000 var(--ink-front),rgba(0,0,0,.78) calc(var(--ink-front) + 5px),rgba(0,0,0,.24) calc(var(--ink-front) + 12px),transparent calc(var(--ink-front) + 18px));
  animation:introWrite var(--write) cubic-bezier(.24,.62,.3,1) var(--write-delay) forwards}
.intro-sub-line.empty{animation:none;clip-path:none}
@property --ink-front{syntax:'<length-percentage>';inherits:false;initial-value:-18px}
@keyframes introWrite{0%{--ink-front:-18px;filter:blur(.18px)}65%{filter:blur(.08px)}100%{--ink-front:100%;filter:none}}
.intro-paused-overlay{position:absolute;z-index:40;left:50%;top:50%;transform:translate(-50%,-50%) scale(.94);
  width:min(82vw,360px);padding:25px 20px;background:url('../img/_parch.webp') center/cover;border:3px solid #24170d;
  box-shadow:0 0 0 100vmax rgba(8,7,6,.64),0 8px 28px rgba(0,0,0,.7);display:flex;flex-direction:column;
  align-items:center;gap:8px;color:#21160d;opacity:0;visibility:hidden;transition:opacity .18s,transform .18s;pointer-events:none}
.intro-paused-overlay b{font-family:var(--disp);font-size:clamp(34px,10vw,48px);letter-spacing:.08em}
.intro-paused-overlay span{font-family:var(--disp);font-size:15px;color:#711714;text-align:center}
.game-intro.paused .intro-paused-overlay{opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)}
.intro-particles{position:absolute;inset:0;z-index:5;overflow:hidden;pointer-events:none}
.intro-particles i{position:absolute;left:var(--x);bottom:-4%;width:3px;height:3px;border-radius:50%;
  animation:introRise var(--speed) linear var(--delay) infinite;background:#5d3b28;opacity:.65}
.intro-particles.snow i{background:#eee5d3;width:4px;height:4px;animation-name:introSnow}
.intro-particles.rain i{background:rgba(28,24,22,.65);width:1px;height:18px;border-radius:0;animation:introRain 1.1s linear var(--delay) infinite}
.intro-particles.gold i{background:#b48125;box-shadow:0 0 4px #d4a547}
.intro-particles.ash i{width:2px;height:5px;border-radius:55% 45% 60% 40%;background:#c34a21;
  box-shadow:0 0 5px 1px rgba(226,91,32,.72);opacity:.72}
@keyframes introRise{0%{transform:translate(0,0) scale(.4);opacity:0}18%{opacity:.7}100%{transform:translate(28px,-108vh) scale(1.25);opacity:0}}
@keyframes introSnow{0%{transform:translate(0,-105vh);opacity:0}12%{opacity:.75}100%{transform:translate(-35px,10vh);opacity:.15}}
@keyframes introRain{from{transform:translate(24px,-15vh);opacity:0}15%{opacity:.62}to{transform:translate(-35px,115vh);opacity:.12}}
.intro-thread{position:absolute;z-index:6;inset:0;width:100%;height:100%;pointer-events:none;filter:drop-shadow(0 1px 1px rgba(20,0,0,.4))}
.intro-thread path{fill:none;stroke:#8d1d1b;stroke-width:.75;stroke-linecap:round;stroke-dasharray:260;stroke-dashoffset:260;animation:introSew 5.5s ease-in-out forwards}
@keyframes introSew{to{stroke-dashoffset:0}}
.intro-rip{position:absolute;z-index:7;left:49.4%;top:-8%;width:1.2%;height:0;background:#fffdf0;
  box-shadow:0 0 14px 5px rgba(205,238,192,.65);clip-path:polygon(45% 0,100% 8%,55% 17%,91% 29%,48% 40%,100% 53%,52% 67%,82% 82%,44% 100%,0 88%,35% 72%,4% 55%,42% 41%,0 27%,36% 13%,0 4%);
  animation:introRip 5.2s 1s cubic-bezier(.18,.72,.2,1) forwards}
.fx-rift .intro-rip{width:2%;left:49%;animation-duration:7s}
@keyframes introRip{to{height:118%}}
.intro-logo{position:absolute;z-index:12;left:50%;top:52%;transform:translate(-50%,-50%);width:min(88%,430px);opacity:0;
  text-align:center;animation:introLogoAppear .25s 15.2s linear forwards}
.intro-logo::before{content:none}
.intro-logo-needle{position:absolute;left:50%;top:-142px;transform:translateX(-50%);width:42px;height:192px;object-fit:contain;
  z-index:1;filter:sepia(.2) contrast(1.35) drop-shadow(0 3px 5px rgba(0,0,0,.28));clip-path:inset(0 0 100% 0);
  animation:introNeedleDraw 2.2s 15.2s cubic-bezier(.18,.7,.24,1) forwards}
.intro-logo .logo-thread{position:absolute;z-index:1;left:50%;top:50%;width:min(100%,430px);height:auto;transform:translate(-50%,-50%);pointer-events:none}
.intro-logo svg{position:relative;z-index:2;display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 4px 8px rgba(0,0,0,.26))}
.intro-logo text{font-family:var(--disp);font-size:92px;font-weight:400;letter-spacing:3px;fill:transparent;stroke:#2a1c10;stroke-width:1.8;
  stroke-linejoin:round;stroke-dasharray:900;stroke-dashoffset:900;paint-order:stroke fill;
  animation:introLogoSketch 3.1s 15.2s cubic-bezier(.2,.68,.22,1) forwards,introLogoFill 1s 17.7s ease-out forwards}
.intro-logo .logo-red{fill:transparent;stroke:#8f1717;animation:introLogoRed 1s 17.7s ease-out forwards}
.intro-logo small{position:relative;z-index:1;display:block;margin:0 auto;font-family:var(--serif);font-size:clamp(17px,4.5vw,21px);opacity:0;
  letter-spacing:.02em;font-weight:600;width:min(82vw,420px);color:#3a2817;text-shadow:0 1px 0 #efe1bf;animation:introLogoTag .8s 18.4s ease-out forwards}
.heritage-change-list{display:grid;gap:7px;margin:8px 0 14px}
.heritage-change{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);align-items:center;gap:5px;
  padding:8px 9px;border:1px solid rgba(75,49,24,.45);background:rgba(235,215,172,.72);
  font-family:var(--serif);font-size:15px;line-height:1.12;color:#2d1c10}
.heritage-change span:last-child{font-weight:700;color:#7d1717}
.heritage-change b{text-align:center;color:#8e1d1b}
@keyframes introLogoAppear{to{opacity:1}}
@keyframes introLogoParch{to{opacity:.92;transform:scale(1)}}
@keyframes introLogoParchFade{from{opacity:.92}to{opacity:0;transform:scale(1.12)}}
@keyframes introNeedleDraw{to{clip-path:inset(0)}}
@keyframes introLogoSketch{to{stroke-dashoffset:0}}
@keyframes introLogoFill{to{fill:#2a1c10;stroke-width:.5}}
@keyframes introLogoRed{to{fill:#8f1717;stroke-width:.5}}
@keyframes introLogoTag{to{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){
  .intro-art{animation:none;transform:scale(1.01)}
  .intro-particles,.intro-thread,.intro-rip{display:none}
}
@media (max-height:650px){.game-intro{--caption-space:calc(102px + env(safe-area-inset-bottom,0))}.intro-sub{font-size:18px;height:50px}}

/* Разыгрываемая карта принимает геометрию zoom-карты, а не растянутой миниатюры руки. */
.pc-fly.playzoom{width:206px;height:342px}
.pc-fly.playzoom .card{width:100%!important;height:100%!important;min-height:342px!important;filter:none}
.pc-fly.playzoom .cin{border-radius:6px;padding:36px 10px 8px!important;background:transparent}
.pc-fly.playzoom .card .t{font-size:22px;min-height:0;margin-bottom:2px;line-height:1}
.pc-fly.playzoom .strip{height:36px;border-radius:4px;margin:3px 0 4px}
.pc-fly.playzoom .strip b{font-size:18px}
.pc-fly.playzoom .si{width:22px;height:22px}
.pc-fly.playzoom .cart{height:120px;margin:2px 0;background-size:contain}
.pc-fly.playzoom .card .txt:not(:empty){
  display:-webkit-box;flex:0 0 3.75em;min-height:3.75em;max-height:3.75em;
  -webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  font-size:18px;line-height:1.25
}

.pc-fly.playzoom .card .cband-z{display:block}
.pc-fly.playzoom .card .cband-m{display:none}

/* Отражение: карта, диалог и production-safe тень из утверждённой Плоти. */
.mnode.t-reflection{border-color:#75639a;background:radial-gradient(circle,#e6ddce,#afa0bf);box-shadow:0 0 0 3px rgba(95,68,135,.2),0 2px 8px #342442}
.mnode.t-reflection.far{animation:mirrorHint 2.8s ease-in-out infinite}
.mi-ref-q{color:#3d2a55;text-shadow:0 0 6px #b9a1dc}
.mi-mirror{position:relative;width:23px;height:29px;border:2px solid #3a294d;border-radius:48% 48% 42% 42%;background:linear-gradient(135deg,#403250,#d5c8de 47%,#655172 51%,#2b2135);box-shadow:inset 0 0 0 2px rgba(238,225,244,.38)}
.mi-mirror:before,.mi-mirror:after,.mi-mirror i{content:"";position:absolute;left:10px;top:1px;width:1.5px;height:25px;background:#24182d;transform:rotate(24deg);transform-origin:center}
.mi-mirror:after{transform:rotate(-32deg);height:17px;top:7px}.mi-mirror i{transform:rotate(68deg);height:14px;top:8px}
@keyframes mirrorHint{50%{filter:brightness(1.3);box-shadow:0 0 0 4px rgba(135,101,177,.28),0 0 15px #7d5ca0}}
.reflection-intro{overflow:hidden;background:#09090d;color:#2b1b10}
.reflection-scene{position:absolute;z-index:1;inset:0 0 44%;background-repeat:no-repeat;background-size:cover;background-position:center;box-shadow:0 8px 28px rgba(0,0,0,.75)}
.reflection-kicker{position:absolute;z-index:4;top:max(13px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);padding:5px 14px;border-radius:20px;background:rgba(12,9,8,.84);border:1px solid rgba(225,195,133,.62);font-family:var(--disp);font-size:15px;letter-spacing:.06em;color:#ead6a6;text-shadow:0 2px 4px #000;white-space:nowrap}
.reflection-dialogue{position:absolute;z-index:3;left:0;right:0;bottom:0;min-height:49%;padding:25px 22px calc(14px + env(safe-area-inset-bottom));background:url('../img/_parch.webp') center/cover;color:#332010;box-shadow:0 -8px 25px rgba(0,0,0,.75);clip-path:polygon(0 3%,5% 1%,10% 2.5%,16% .5%,22% 2%,29% .7%,37% 2.3%,44% .5%,52% 2%,59% .6%,68% 2.5%,77% .4%,85% 2.1%,92% .8%,100% 2.7%,100% 100%,0 100%)}
.reflection-dialogue h2{font-family:var(--disp);font-size:32px;line-height:1;margin:0;text-align:center;color:#8f2020;text-shadow:0 1px 0 rgba(255,255,255,.35)}
.reflection-rule{height:16px;display:flex;align-items:center;gap:8px;color:#7c552c;font-size:11px}.reflection-rule:before,.reflection-rule:after{content:'';height:1px;background:#8b673c;flex:1;opacity:.7}
.reflection-lines{display:grid;gap:7px}.reflection-lines p{margin:0;font-family:var(--serif);font-size:15px;line-height:1.24}.reflection-lines i{font-family:var(--disp);font-style:normal;font-weight:400;color:#861f1d;margin-right:4px}.reflection-lines .narrator{font-style:italic;text-align:center;color:#594021}
.reflection-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}.reflection-actions.saga-actions{grid-template-columns:1fr}.reflection-actions .btn{height:44px;margin:0;font-family:var(--disp);font-size:15px;color:#17100a;text-shadow:none}.saga-actions .btn{display:flex;align-items:center;justify-content:center;gap:8px;text-align:center}.saga-actions .btn:has(small){height:54px;padding:5px 12px}.saga-actions .btn>span{display:flex;min-width:0;flex-direction:column;align-items:center}.saga-actions .btn b{font:15px/1.05 var(--disp);font-weight:400}.saga-actions .btn small{margin-top:3px;font:13px/1.05 var(--serif);color:#684b2f}.saga-action-icon{width:30px;height:30px;flex:0 0 30px;object-fit:contain}.saga-action-icon[src*="en-vow-keeper"]{border-radius:50%;object-fit:cover}.saga-break{border-color:#8f512f!important;background:linear-gradient(#e0cba1,#c9a771)!important}.saga-leave{color:#74231f!important;border-color:#8a4b3f!important}.reflection-fight{background:linear-gradient(#cf5049,#a62522);border-color:#771713}.reflection-leave{background:linear-gradient(#aaa69e,#7d7972);border-color:#4c4944}
.enemy.reflection-enemy .e-img::before{filter:grayscale(.48) sepia(.12) hue-rotate(225deg) saturate(1.6) brightness(.62) contrast(1.32)}
.reflection-card{width:clamp(180px,53vw,206px);height:clamp(281px,83vw,322px);margin:5px auto 8px;transform:none}
.reflection-card .card{width:100%!important;height:100%!important;min-height:0!important;margin:0!important}
.reflection-card .card .cin{padding-top:32%!important;overflow:hidden}.reflection-card .card .cart{height:clamp(105px,30vw,128px)!important}.reflection-card .card .t{font-size:clamp(20px,5.8vw,24px)!important}.reflection-card .card .txt{font-size:clamp(13px,3.8vw,15px)!important;line-height:1.32!important}.reflection-card .card .strip b{font-size:18px!important}
.reflection-unlock{text-align:center;font-size:15px;color:#3a2617}
.reflection-enemy .ecard.reflection-intent{height:clamp(102px,27vw,112px);padding-bottom:4px}
.reflection-enemy .ecard.reflection-intent .ecard-nm{min-height:40px;-webkit-line-clamp:3;font-size:13px;line-height:1.05}
.reflection-enemy .ecard.reflection-intent .ecard-pic .ea{width:clamp(36px,10vw,43px);height:clamp(36px,10vw,43px)}
.enemy.reflection-enemy.guarded>.e-img::before{opacity:.56;filter:grayscale(.7) brightness(.48)}
.enemies.reflection-pair{flex-wrap:nowrap;gap:8px;padding-inline:8px}
.enemies.reflection-pair>.enemy{width:clamp(140px,40vw,160px)}
.reflection-pet-enemy{position:relative;z-index:3;color:#eadfc5}
.reflection-pet-enemy.targetable{cursor:pointer;animation:tgt 1s infinite}
.reflection-pet-enemy.pet-dead{opacity:.66}
.reflection-pet-enemy .shadow-pet-img::before{background-size:108%;background-position:center}
.reflection-pet-enemy .e-plate{width:100%}
.shadow-pet-state{min-height:1.05em;margin-top:2px;color:#d2c5aa;font:12px/1.05 var(--disp)}
.reflection-pet-enemy .bar{height:17px}.reflection-pet-enemy .bar-txt{font-size:clamp(11.5px,3.1vw,13px)}
@media(max-height:680px){.reflection-scene{inset:0 0 48%}.reflection-dialogue{padding:20px 18px calc(10px + env(safe-area-inset-bottom))}.reflection-dialogue h2{font-size:24px}.reflection-lines{gap:4px}.reflection-lines p{font-size:13px;line-height:1.16}.reflection-actions{margin-top:8px}.reflection-actions .btn{height:39px}}

/* Улучшение: исходник — компактная памятка, обе ветки — полноценные карты одновременно.
   Этот блок стоит после legacy-геометрии, чтобы прежние 196px больше не обрезали описание. */
.upg-modal{width:min(440px,100vw);max-width:min(440px,100vw);max-height:100dvh;overflow-y:auto}
.upg-modal .modal-in{padding:7px 10px 8px;gap:7px}
.upg-modal h3{margin:0;text-align:center;font-size:clamp(21px,6vw,27px)}
.upg-modal .upg-tree{width:100%;margin:0}
.upg-base{display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center;gap:10px;width:100%;padding:6px 8px;border:1px solid rgba(103,70,35,.44);background:rgba(100,65,30,.08);box-shadow:inset 0 0 0 1px rgba(241,222,181,.5)}
.upg-modal .upg-base .upg-now .card{width:72px!important;height:106px!important;min-height:0!important}
.upg-modal .upg-base .card .cin{padding-top:31%!important}
.upg-modal .upg-base .card .cart{height:45px!important;margin:0!important}
.upg-modal .upg-base .card .t,.upg-modal .upg-base .card .txt{display:none!important}
.upg-modal .upg-base .card .strip{display:flex!important;height:18px!important;margin:1px -10px 0!important}
.upg-modal .upg-base .card .strip-inner{gap:1px;transform:translate(-50%,-50%) scale(.78)}
.upg-base-copy{min-width:0;color:#3c2818}
.upg-base-copy small{display:block;margin-bottom:2px;font-family:var(--disp);font-size:13px;color:#8b2d25}
.upg-base-copy>b{display:block;font-family:var(--disp);font-size:clamp(18px,5vw,22px);line-height:1.05}
.upg-base-copy p{margin:5px 0 0;font-size:13px;line-height:1.25}
.upg-modal .upg-arr{height:29px;margin:1px 0;width:72%}
.upg-modal .upg-arr i{width:31px;height:31px}
.upg-modal .upg-picks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;align-items:stretch}
.upg-modal .upg-picks .upg-card{min-width:0}
.upg-modal .upg-picks .upg-card.pick:hover,.upg-modal .upg-picks .upg-card.pick:active{transform:none}
.upg-modal .upg-picks .card{width:100%!important;height:clamp(245px,68vw,282px)!important;min-height:245px!important;margin:0!important}
.upg-modal .upg-picks .card .cin{padding-top:31%!important;overflow:hidden}
.upg-modal .upg-picks .card .cart{height:clamp(68px,19vw,82px)!important;margin:2px 0 4px!important}
.upg-modal .upg-picks .card .t{font-size:clamp(14px,4vw,17px)!important;line-height:1.06!important}
.upg-modal .upg-picks .card .txt{font-size:13px!important;line-height:1.22!important}
.upg-modal .upg-picks .card .strip{height:28px!important;margin:3px 0 5px!important}
.upg-modal .upg-picks .card .strip b{font-size:15px!important}
.upg-modal .row{margin-top:0}
.upg-modal .btn{min-height:38px;font-size:13px}
@media(max-height:650px){
  .upg-modal .upg-picks .card{height:238px!important;min-height:238px!important}
  .upg-modal .upg-base{grid-template-columns:60px minmax(0,1fr);padding:4px 7px}
  .upg-modal .upg-base .upg-now .card{width:56px!important;height:82px!important}
  .upg-modal .upg-base .card .cart{height:30px!important}
  .upg-modal .upg-base .card .strip{height:15px!important}
  .upg-modal .upg-arr{height:22px}.upg-modal .upg-arr i{width:23px;height:23px}
}

/* Охота: матрица трофеев на основе пергаментных книг Склепа. */
.crypt-home .cr-hunt-menu-icon{object-fit:contain!important;padding:0;filter:sepia(.35) saturate(.85) brightness(.72) contrast(1.25)!important}
.crypt-home .cr-saga-menu-icon{object-fit:contain!important;padding:1px;filter:none!important}

/* Сказы живут в Склепе как журнал: сначала оглавление начатых нитей, затем полная запись. */
.cr-main.sagas{padding-top:9px}
.cr-saga-book{min-height:100%;padding:15px 16px 20px;border-radius:3px 12px 12px 3px;color:#3b2818;background:
  linear-gradient(90deg,rgba(65,36,12,.16),transparent 8%,transparent 94%,rgba(79,48,18,.1)),url('../img/_parch.webp') center/cover,#e2cfa4;
  box-shadow:inset 7px 0 12px rgba(70,42,17,.22),0 8px 25px #0009}
.cr-saga-intro{margin:10px 2px 15px;text-align:center;font:16px/1.4 var(--script);color:#6d5132}
.cr-saga-act-tabs{height:70px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:0 0 12px;padding:5px 6px;background:rgba(4,5,8,.82)}
.cr-saga-act-tabs button{position:relative;overflow:hidden;border:1px solid rgba(218,190,137,.22);border-radius:7px;background:linear-gradient(145deg,#29251f,#111015);color:#a79677;font:15px var(--disp);text-transform:uppercase;opacity:.58}
.cr-saga-act-tabs button:after{content:"";position:absolute;inset:0;background:linear-gradient(transparent,rgba(7,7,10,.75))}
.cr-saga-act-tabs button span,.cr-saga-act-tabs button i{position:relative;z-index:1}.cr-saga-act-tabs button i{display:block;margin-top:2px;color:#756b59;font:12px var(--disp);font-style:normal}
.cr-saga-act-tabs button.on{opacity:1;color:#f0dba8;border-color:#c9982e;box-shadow:inset 0 0 18px rgba(201,152,46,.2),0 0 9px rgba(201,152,46,.18)}
.cr-saga-act-tabs button:disabled{opacity:.32}.cr-saga-acts{display:flex;flex-direction:column;gap:18px}
.cr-saga-act-tabs button.demo-locked{opacity:.78;cursor:pointer;border-color:rgba(197,59,48,.72)}.cr-saga-act-tabs button.demo-locked i{color:#e1a05b}
.cr-saga-list{display:flex;flex-direction:column;gap:8px}.cr-saga-list button{min-height:80px;display:grid;grid-template-columns:34px 1fr 18px;gap:8px;align-items:center;padding:9px 8px;border:1px solid #89663b;border-radius:3px;background:rgba(112,75,36,.07);color:#402a18;text-align:left;box-shadow:inset 0 0 0 1px rgba(246,226,184,.55)}
.cr-saga-list button.demo-locked{cursor:pointer;border-color:#8d2b22;background:rgba(141,43,34,.08);filter:grayscale(.45)}
.cr-saga-mark{display:grid;place-items:center;width:30px;height:30px;color:#8d2b22;font:17px var(--disp)}.cr-saga-mark img{width:28px;height:28px;object-fit:contain}.cr-saga-mark.done{border:1px solid #8d2b22;transform:rotate(45deg)}.cr-saga-mark.done::first-letter{transform:rotate(-45deg)}
.cr-saga-list button>span:nth-child(2){min-width:0;display:flex;flex-direction:column}.cr-saga-list small{font:13px var(--disp);text-transform:uppercase;letter-spacing:.08em;color:#775b38}.cr-saga-list b{font:18px/1.05 var(--disp);font-weight:400;color:#92261e;margin:2px 0 4px}.cr-saga-list em{font:13px/1.25 var(--serif);font-style:normal;color:#61472e}.cr-saga-list button>i{font:24px var(--disp);font-style:normal;color:#8d2b22}
.cr-saga-head{display:grid;grid-template-columns:42px 1fr auto;gap:9px;align-items:center;padding-bottom:10px;border-bottom:1px solid #8d6b40}.cr-saga-head>button{width:38px;height:34px;border:1px solid #856239;border-radius:5px;background:rgba(90,57,28,.08);color:#6e4223;font:21px var(--disp)}.cr-saga-head small{font:13px var(--disp);text-transform:uppercase;color:#735536}.cr-saga-head h2{margin:1px 0 0;font:24px/1 var(--disp);font-weight:400;color:#92261e}.cr-saga-head>span{padding:5px 7px;border:1px solid #987344;border-radius:12px;font:12px var(--disp);color:#735536}.cr-saga-head>span.done{border-color:#4c7548;color:#38613b}
.cr-saga-entries{position:relative;margin:15px 0 14px;padding-left:4px}.cr-saga-entries:before{content:"";position:absolute;left:16px;top:13px;bottom:13px;width:1px;background:#a98859}.cr-saga-entries article{position:relative;display:grid;grid-template-columns:27px 1fr;gap:9px;margin-bottom:16px}.cr-saga-entries article>i{z-index:1;display:grid;place-items:center;width:25px;height:25px;border:1px solid #8d2b22;border-radius:50%;background:#e8d7ad;color:#8d2b22;font:13px var(--disp);font-style:normal}.cr-saga-entries h3{margin:0 0 4px;font:18px/1.1 var(--disp);font-weight:400;color:#512f18}.cr-saga-entries p{margin:0;font:15px/1.42 var(--serif);color:#493421}
.cr-saga-current{margin-top:auto;padding:10px 12px;border:1px solid #8b683d;background:rgba(112,74,35,.08)}.cr-saga-current small{display:block;font:12px var(--disp);text-transform:uppercase;color:#8d2b22}.cr-saga-current b{display:block;margin-top:3px;font:15px/1.25 var(--disp);font-weight:400;color:#4d301b}
.cr-saga-empty{min-height:65vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.cr-saga-empty img{width:88px;height:88px;opacity:.82}.cr-saga-empty h2{margin:12px 0 5px;font:24px var(--disp);font-weight:400;color:#92261e}.cr-saga-empty p{max-width:260px;margin:0;font:15px/1.4 var(--serif);color:#60482f}
@media (min-width:560px){.cr-saga-book{padding-left:24px;padding-right:24px}}

/* Меню путешествия: бургер заменяет прямой выход и не выталкивает игрока из текущего экрана. */
.run-menu-ic{width:28px;height:28px;display:block;fill:none;stroke:#3d2715;stroke-width:3;stroke-linecap:round}
.hud-exit .run-menu-ic,.b-exit .run-menu-ic{color:#3d2715;stroke:#3d2715}
.run-menu-wrap{align-items:flex-start;padding-top:max(66px,env(safe-area-inset-top))}
.run-menu{width:min(360px,calc(100vw - 24px));background:#dfcca0;border-color:#8a6336;color:#3e2917;box-shadow:0 14px 40px #000d,inset 0 0 32px #76501c22}
.run-menu .modal-in{padding:12px}.run-menu header{display:flex;align-items:center;gap:9px;padding:2px 3px 10px;border-bottom:1px solid #987344}.run-menu header>span{display:grid;place-items:center;width:34px;height:34px;border:1px solid #825d35;border-radius:5px;color:#5b351c}.run-menu header h3{margin:0;font:24px var(--disp);font-weight:400;color:#8f241d}
.run-menu-actions{display:flex;flex-direction:column;gap:7px;margin:10px 0}.run-menu-actions>button{min-height:68px;display:grid;grid-template-columns:48px 1fr;gap:10px;align-items:center;padding:7px 10px;border:1px solid #89653b;border-radius:4px;background:rgba(92,57,25,.07);color:#442b18;text-align:left;box-shadow:inset 0 0 0 1px #f3deb277}.run-action-icon{width:44px;height:44px;display:grid;place-items:center;color:#583720;font-style:normal}.run-action-icon img{width:36px;height:36px;display:block;object-fit:contain;filter:none;mix-blend-mode:multiply}.run-action-icon img[src*="sagas_thread_quill"]{width:42px;height:42px}.run-menu-actions span{display:flex;flex-direction:column}.run-menu-actions b{font:18px var(--disp);font-weight:400;color:#85241d}.run-menu-actions small{margin-top:2px;font:13px var(--serif);color:#735536}

/* Браузерная адресная строка часто опускает visual viewport до 620–720px.
   Это не настоящий низкий экран: сохраняем обычный масштаб меню и разрешаем
   вертикальный скролл. Жёсткий compact нужен только узким или совсем низким экранам. */
@media(min-width:341px) and (min-height:601px) and (max-height:720px){
  .screen.menu{justify-content:flex-start}
  .screen.menu .menu-inner{margin:calc(7px + var(--sat,0px)) 14px calc(10px + var(--sab))}
}
@media(max-width:340px), (max-height:600px){
  .screen.menu{justify-content:flex-start}.screen.menu .menu-inner{margin:4px 8px}.screen.menu .panel-in{gap:3px;padding-top:1px;padding-bottom:1px;border-width:24px;border-image-width:24px}
  .screen.menu .kick{font-size:11px}.screen.menu .menu-logo{height:46px}.screen.menu h1{font-size:43px;margin:0}.screen.menu .tag{font-size:15px;margin-bottom:3px}
  .screen.menu .panel-in>.btn{padding-top:6px;padding-bottom:6px}.screen.menu .panel-in>.btn.big{font-size:16px}.screen.menu .panel-in>.btn.sm{padding-top:5px;padding-bottom:5px}
  .screen.menu .menu-icons{gap:3px;margin-top:0}.screen.menu .menu-icons .icon-btn{min-width:0;padding:2px 3px}.screen.menu .menu-icons .icon-btn .mi{width:21px;height:21px}
  .screen.menu .menu-icons .ib-lbl{letter-spacing:-.1px}
  .screen.menu .audio-settings{gap:4px}.screen.menu .audio-settings .icon-btn{height:27px;padding:2px 7px}.screen.menu .audio-settings .icon-btn .mi{width:20px;height:20px}.screen.menu .audio-settings .ib-lbl{font-size:13px}.screen.menu .foot{margin-top:2px;font-size:10px}
  .modal-wrap.run-menu-wrap{padding-top:max(40px,env(safe-area-inset-top))}.run-menu.run-menu .modal-in{padding:8px}.run-menu.run-menu header{padding-bottom:6px}.run-menu.run-menu header>span{width:30px;height:30px}.run-menu.run-menu header h3{font-size:21px}
  .run-menu .run-menu-actions{gap:4px;margin:6px 0}.run-menu .run-menu-actions>button{min-height:50px;grid-template-columns:36px minmax(0,1fr);gap:7px;padding:3px 7px}.run-menu .run-action-icon{width:34px;height:34px}.run-menu .run-action-icon img{width:30px;height:30px}.run-menu .run-action-icon img[src*="sagas_thread_quill"]{width:34px;height:34px}.run-menu .run-menu-actions b{font-size:15px}.run-menu .run-menu-actions small{font-size:11px}.run-menu #run-menu-close{padding-top:6px;padding-bottom:6px}
}

/* Журнал в забеге — полноэкранный слой поверх карты/боя; закрытие возвращает ровно туда же. */
.run-saga-overlay{position:fixed;z-index:120;inset:0;padding:8px;background:rgba(3,4,6,.88);backdrop-filter:blur(3px);overflow-y:auto}.run-saga-shell{position:relative;width:min(520px,100%);min-height:100%;margin:0 auto}.run-saga-shell>.cr-saga-book{min-height:calc(100vh - 16px)}.run-saga-close{position:fixed;z-index:5;top:14px;right:max(14px,calc(50vw - 246px));width:38px;height:38px;border:1px solid #8a6336;border-radius:50%;background:#dfcca0;color:#612f1d;font:24px/1 var(--disp);box-shadow:0 3px 10px #0009}
.run-saga-overlay .cr-saga-head>span{margin-right:44px}

/* Подробная запись: утверждённая сцена превращается в чернильную зарисовку, поля — в голос Кощея. */
.cr-saga-sketch{height:190px;margin:5px -5px 12px;background-position:center;background-size:contain;background-repeat:no-repeat;filter:grayscale(1) sepia(.65) saturate(.7) contrast(1.22) brightness(1.03);opacity:.9;mix-blend-mode:multiply;
  -webkit-mask-image:radial-gradient(ellipse 55% 48% at center,#000 30%,rgba(0,0,0,.9) 48%,rgba(0,0,0,.48) 66%,transparent 88%);
  mask-image:radial-gradient(ellipse 55% 48% at center,#000 30%,rgba(0,0,0,.9) 48%,rgba(0,0,0,.48) 66%,transparent 88%)}
.cr-saga-sketch.alpha-art{filter:grayscale(.82) sepia(.48) saturate(.8) contrast(1.08) brightness(1.16);opacity:.96;mix-blend-mode:multiply;-webkit-mask-image:none;mask-image:none}
.promise-reward-mark{position:absolute;z-index:12;left:50%;right:auto;top:0;width:clamp(28px,34%,42px);height:auto;aspect-ratio:1;padding:2px;border:2px solid #9b772d;border-radius:50%;background:#dbc28e;box-shadow:0 2px 5px #0008,inset 0 0 0 1px #f1deb3;transform:translate(-50%,-72%);pointer-events:none}.promise-reward-mark img{display:block;width:100%;height:100%;object-fit:contain}.card.promise-reward{border-color:#c89b3b!important;box-shadow:inset 0 0 0 1px #f2d784,0 0 0 3px #9b6c18,0 0 14px rgba(217,176,79,.78)!important}
.cr-saga-reflection{position:relative;margin:8px 3px 15px 24px;padding:8px 10px 8px 15px;border:0;border-left:2px solid rgba(117,48,30,.58);color:#553522;transform:rotate(-.45deg)}.cr-saga-reflection:before{content:"↳";position:absolute;left:-23px;top:1px;font:25px var(--script);color:#8d2b22}.cr-saga-reflection small{display:block;font:16px var(--script);color:#8d2b22}.cr-saga-reflection p{margin:2px 0 0;font:16px/1.38 var(--script)}
.cr-saga-book.detail{background:
  repeating-linear-gradient(0deg,transparent 0 31px,rgba(99,72,40,.075) 31px 32px),
  linear-gradient(90deg,rgba(65,36,12,.2),transparent 8%,transparent 94%,rgba(79,48,18,.12)),#e8d7ad}
.cr-saga-book.detail .cr-saga-entries article:nth-child(even){transform:rotate(.15deg)}.cr-saga-book.detail .cr-saga-entries article:nth-child(odd){transform:rotate(-.12deg)}
@media (max-height:620px){.cr-saga-sketch{height:118px}}
.cr-main.hunt{padding:0 8px 8px;overflow-y:auto}.cr-hunt-book{min-height:100%;padding:12px 10px 20px;color:#402916;background:linear-gradient(90deg,rgba(65,36,12,.16),transparent 8%,transparent 94%,rgba(79,48,18,.1)),url('../img/_parch.webp') center/cover,#e2cfa4;box-shadow:inset 7px 0 12px rgba(70,42,17,.22),0 8px 25px #0009}
.cr-hunt-title{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-bottom:1px solid rgba(91,60,27,.38);padding:0 3px 8px}.cr-hunt-title h2{grid-column:2;margin:0;font:32px var(--disp);color:#9a1f1c;text-transform:uppercase}.cr-hunt-title span{font:13px var(--disp);color:#765332}.cr-hunt-title i{display:block}
.cr-hunt-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px 2px 14px;border-bottom:1px solid rgba(91,60,27,.32)}
.cr-hunt-slot{position:relative;min-width:0;padding:0;border:0;background:transparent;color:#4a2c18;font:13px var(--disp)}.cr-hunt-slot-face{position:relative;display:block;width:58px;max-width:100%;aspect-ratio:1;margin:0 auto 5px;border:3px solid #896238;border-radius:50%;overflow:hidden;background:#2a211a;box-shadow:inset 0 0 0 2px #d9bd81,0 3px 7px #0007}.cr-hunt-slot-face img{width:100%;height:100%;object-fit:cover}.cr-hunt-slot.locked{opacity:.48}.cr-hunt-slot.locked .cr-hunt-slot-face img{width:28px;height:28px;object-fit:contain;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);filter:sepia(1)}.cr-hunt-slot b{display:block;white-space:nowrap;font-weight:400}
.cr-hunt-slot.demo-locked{opacity:.78;cursor:pointer}.cr-hunt-slot.demo-locked .access-mini-label{left:50%;right:auto;top:36px;transform:translateX(-50%)}
.cr-hunt-seal{position:relative;width:34px;height:34px;padding:3px;border:1px solid #84643c;border-radius:50%;background:url('../img/_parch.webp') center/cover,#dfcca2;box-shadow:inset 0 0 0 1px #f1dfb8,0 2px 4px #0007;vertical-align:middle}.cr-hunt-seal img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1px 1px #0006)}.cr-hunt-seal.slot-seal{position:absolute;z-index:3;right:0;top:31px;width:29px;height:29px}.cr-hunt-seal.boss-seal{position:absolute;z-index:4;right:-4px;top:-5px;width:34px;height:34px}.cr-hunt-seal.on:after{content:"";position:absolute;inset:2px;border-radius:50%;box-shadow:0 0 0 2px #9a1f1c,0 0 8px #9a1f1c88}
.cr-hunt-matrix{display:flex;flex-direction:column;gap:15px;padding-top:13px}.cr-hunt-act{padding:9px 8px 10px;border:1px solid rgba(104,70,35,.48);background:rgba(92,58,25,.045)}.cr-hunt-act>header{display:flex;justify-content:center;align-items:baseline;margin-bottom:8px;text-align:center}.cr-hunt-act>header b{font:18px var(--disp);color:#92261e}
.cr-hunt-act.demo-locked{background:rgba(83,76,66,.12);border-color:#746e63}.cr-hunt-boss.demo-locked{cursor:pointer}.cr-hunt-boss.demo-locked .access-mini-label{left:4px;right:auto;top:4px}.cr-hunt-boss.demo-locked b{min-height:38px;color:#efe0c2;text-shadow:0 1px 2px #000}
.cr-hunt-bosses{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.cr-hunt-boss{position:relative;min-width:0;padding:0 0 5px;border:3px solid #756348;background:#d2bd91;color:#402916;box-shadow:inset 0 0 0 1px #f0ddb5,0 3px 7px #0006;overflow:visible}.cr-hunt-boss:disabled{opacity:1;cursor:not-allowed}.cr-hunt-boss.defeated{border-color:#9a1f1c}.cr-hunt-boss-art{position:relative;display:block;width:100%;aspect-ratio:1;overflow:hidden;background:#2b241d}.cr-hunt-boss-art img{width:100%;height:100%;object-fit:cover}.cr-hunt-boss-art i{position:absolute;z-index:2;inset:0;display:flex;align-items:center;justify-content:center;color:#6d4c2d;font:42px var(--disp);font-style:normal;text-shadow:0 1px #f2dfb5}.cr-hunt-boss b{display:-webkit-box;min-height:31px;padding:5px 3px 0;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font:13px/1.05 var(--disp);font-weight:400}.cr-hunt-boss.secret .cr-hunt-boss-art{background:url('../img/_parch.webp') center/cover,#d8c499}.cr-hunt-secret-sketch{position:absolute;inset:0;opacity:.12;filter:grayscale(1) sepia(.75) contrast(1.15);mix-blend-mode:multiply}.cr-hunt-boss.seen .cr-hunt-boss-art{background:#d9c8a2}.cr-hunt-boss.seen .cr-hunt-sketch{filter:sepia(.2) contrast(1.05)}.cr-hunt-boss.blocked{border-color:#6f6a61;background:#77736b;color:#d7cdbc;box-shadow:inset 0 0 0 1px #989188,0 3px 7px #0006}.cr-hunt-boss.blocked .cr-hunt-boss-art{display:flex;align-items:center;justify-content:center;background:#565651}.cr-hunt-boss.blocked .cr-hunt-lock{width:34px;height:34px;object-fit:contain;filter:grayscale(1) brightness(.92);opacity:.72}
.cr-hunt-reward{position:relative;display:grid;grid-template-columns:62px 1fr;gap:8px;align-items:center;margin-top:9px;padding:7px 34px 7px 7px;border:2px solid #7d684b;background:rgba(60,44,27,.1);filter:grayscale(.65)}.cr-hunt-reward.open{border-color:#c17623;filter:none;box-shadow:inset 0 0 0 1px #efd7a1}.cr-hunt-reward-art{width:58px;height:58px;display:flex;align-items:center;justify-content:center;background:#241e18;border:1px solid #8b693e}.cr-hunt-reward-art img{width:100%;height:100%;object-fit:contain}.cr-hunt-reward-art span{font-size:32px;color:#c17623}.cr-hunt-reward small{display:block;font:13px var(--disp);color:#92261e}.cr-hunt-reward b{display:block;margin-top:2px;font:15px var(--disp);font-weight:400}.cr-hunt-reward p{margin:2px 0 0;font-size:13px;line-height:1.22}.cr-hunt-reward>.cr-rarity-gem{right:5px!important;top:5px!important;width:28px!important;height:28px!important}
.cr-hunt-modal{width:min(440px,98vw);max-width:min(440px,98vw)}.cr-hunt-modal .modal-in{width:100%;max-width:440px;max-height:calc(100dvh - 20px);overflow-y:auto;box-sizing:border-box}.cr-echo-wrap{padding:6px}.cr-echo-modal{width:min(390px,calc(100vw - 12px));max-width:min(390px,calc(100vw - 12px))}.cr-echo-modal .modal-in{width:100%;max-width:none;max-height:calc(100dvh - 12px);box-sizing:border-box;overflow-y:auto;border-width:24px;border-image-width:24px}.cr-hunt-modal header{position:relative;display:grid;grid-template-columns:76px minmax(0,1fr) 38px;gap:10px;align-items:center}.cr-hunt-modal-face{width:76px;height:76px;overflow:hidden;border:3px solid #8d2b22;background:#241d17}.cr-hunt-modal-face.secret{display:flex;align-items:center;justify-content:center;background:url('../img/_parch.webp') center/cover,#d8c499;color:#6d4c2d;font:42px var(--disp)}.cr-hunt-modal-face img{width:100%;height:100%;object-fit:cover}.cr-hunt-modal-face .cr-hunt-sketch{filter:sepia(.2) contrast(1.05)}.cr-hunt-modal header small{font:13px var(--disp);color:#8d2b22}.cr-hunt-modal header h3,.cr-echo-modal h3{margin:3px 0;font:24px var(--disp);font-weight:400}.cr-hunt-modal-body{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:12px 0 10px}.cr-hunt-card-preview{height:238px;display:flex;align-items:center;justify-content:center;overflow:visible}.cr-hunt-card-preview .card{width:148px!important;height:230px!important;min-height:230px!important;margin:0!important;transform:none!important}.cr-hunt-card-preview .card .cin{padding-top:31%!important;overflow:hidden}.cr-hunt-card-preview .card .cart{display:block!important;height:68px!important;margin:2px 0 4px!important}.cr-hunt-card-preview .card .t{font-size:15px!important;line-height:1.06!important}.cr-hunt-card-preview .card .txt{font-size:13px!important;line-height:1.24!important}.cr-hunt-card-preview .card .strip{height:28px!important;margin:3px 0 5px!important}.cr-hunt-card-preview .card .strip b{font-size:15px!important}.cr-hunt-card-locked{height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:1px solid #84643c;background:rgba(64,39,18,.12);color:#684a2c;font-size:13px;text-align:center}.cr-hunt-card-locked img{width:38px;height:38px}.cr-hunt-echo-copy{min-width:0;text-align:left}.cr-hunt-echo-copy>small{display:block;margin-bottom:3px;color:#78532c;font:13px var(--disp)}.cr-hunt-echo-copy>b{font:18px var(--disp);font-weight:400;color:#92261e}.cr-hunt-echo-copy>p{margin:4px 0 6px;color:#4b321d;font-size:15px;line-height:1.35}.cr-hunt-install{display:block;width:100%;margin:0 0 10px}.cr-hunt-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0 4px}.cr-hunt-level{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;height:76px;padding:4px;border:1px solid #987343;background:#d8c292;color:#3d2a18;text-align:center}.cr-hunt-level .cr-hunt-seal{width:30px;height:30px}.cr-hunt-level>b{width:100%;overflow:hidden;font:15px var(--disp);font-weight:400;white-space:nowrap;text-overflow:ellipsis}.cr-hunt-level>small{width:100%;overflow:hidden;font-size:13px;color:#775b3c;white-space:nowrap;text-overflow:ellipsis}.cr-hunt-level.passed{background:#e5d2a8;border-color:#765126}.cr-hunt-level.on{border:2px solid #9a1f1c;background:#f0dfb8;box-shadow:0 0 7px #9a1f1c55}.cr-hunt-level.locked{filter:grayscale(.8);opacity:.58}.cr-hunt-level.locked.on{filter:grayscale(.35);opacity:.82}.cr-hunt-level:disabled{cursor:not-allowed}.cr-hunt-difference{margin-top:9px;padding:8px;background:#3b2c1d;color:#ead8ae}.cr-hunt-difference small{font:13px var(--disp);color:#d7a94d}.cr-hunt-difference p{margin:4px 0 0;font-size:13px;line-height:1.3}.cr-hunt-difference p>b{color:#d7a94d}
/* Согласованный компактный вариант C: краткая карта слева, Отзвук справа,
   полная карточка открывается по тапу, общая кнопка остаётся снизу. */
.cr-hunt-modal-body{display:grid;grid-template-columns:118px minmax(0,1fr);align-items:center;gap:12px}
.cr-hunt-modal-body.no-card{grid-template-columns:minmax(0,1fr)}
.cr-hunt-card-preview{display:flex;width:118px;height:194px;padding:0;border:0;background:transparent;align-items:center;justify-content:center}
.cr-hunt-card-preview .card{width:116px!important;height:180px!important;min-height:180px!important}
.cr-hunt-card-preview .card .cart{height:52px!important;margin:1px 0 3px!important}
.cr-hunt-card-preview .card .t{font-size:15px!important;line-height:1.04!important}
.cr-hunt-card-preview .card .txt{display:none!important}
.cr-hunt-card-preview .txt{display:none!important}
.cr-hunt-class-gate{min-height:270px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;margin:14px 0;color:#5a3b23;text-align:center}
.cr-hunt-class-gate img{width:46px;height:46px;object-fit:contain;filter:sepia(.35) saturate(.8)}
.cr-hunt-class-gate b{font:24px/1.25 var(--disp);font-weight:400;color:#92261e}
.cr-hunt-modal header.locked{grid-template-columns:76px minmax(0,1fr)}
.cr-hunt-modal header.locked .cr-hunt-modal-title{transform:translateX(-5px)}
.cr-hunt-modal-title{min-width:0;text-align:center}
.cr-hunt-modal-title h3{max-width:100%;overflow-wrap:normal;word-break:normal;text-wrap:balance}
.cr-hunt-difference p{color:#f0dfb8!important}
.cr-hunt-difference small{color:#f3c96d!important}
.cr-hunt-card-preview .card .strip{height:25px!important;margin:2px 0 4px!important}
.cr-hunt-card-preview .card .strip b{font-size:15px!important}
.cr-hunt-card-locked{height:180px}
.cr-hunt-echo-copy>b{display:block;line-height:1.15}
@media(max-width:420px){.cr-hunt-modal .modal-in{padding-left:16px;padding-right:16px}.cr-hunt-modal-body{grid-template-columns:112px minmax(0,1fr);gap:10px}.cr-hunt-card-preview{width:112px}.cr-hunt-card-preview .card{width:110px!important}.cr-hunt-level>b{font-size:13px}.cr-hunt-level>small{font-size:13px}}
.cr-echo-slot{color:#8d2b22;font:12px var(--disp);letter-spacing:.12em}.cr-echo-list{display:flex;flex-direction:column;gap:8px;margin:8px 0 13px}.cr-echo-choice{display:grid;grid-template-columns:54px minmax(0,1fr) 38px;grid-template-rows:auto auto;column-gap:9px;row-gap:7px;align-items:center;width:100%;padding:8px;border:2px solid #85633a;background:#decca2;color:#402916;text-align:left}.cr-echo-choice.on{border-color:#9a1f1c;background:#ead9b2}.cr-echo-choice>.cr-echo-portrait{grid-column:1;grid-row:1;width:54px;height:54px;overflow:hidden;border-radius:50%;background:#241d17}.cr-echo-choice>.cr-echo-portrait img{width:100%;height:100%;object-fit:cover}.cr-echo-choice>div{display:contents}.cr-echo-choice b{grid-column:2;grid-row:1;display:block;font:14px/1.16 var(--disp);font-weight:400;text-wrap:balance}.cr-echo-choice p{grid-column:1/-1;grid-row:2;min-width:0;margin:0 2px;font-size:13px;line-height:1.34;text-wrap:pretty;overflow-wrap:normal}.cr-echo-rank{grid-column:3;grid-row:1;display:flex;align-items:center;justify-content:center;color:#6b4b2f}.cr-echo-choice .cr-hunt-seal{width:38px;height:38px;background:url('../img/_parch.webp') center/cover,#dfcca2}.hunt-echo-fx{display:inline-flex;align-items:center;gap:2px;white-space:nowrap;vertical-align:-3px}.hunt-echo-fx img,.hunt-echo-fx .ecryst{width:17px;height:17px;object-fit:contain}.hunt-echo-fx .ecryst{display:block;width:12px}.hunt-echo-fx b{font:400 15px 'Kalam',var(--disp)}
.cr-hunt-power{display:grid;grid-template-columns:42px minmax(0,1fr);gap:9px;align-items:center;margin:10px 0 8px;padding:7px 9px;border:1px solid #85633a;background:rgba(109,75,39,.08)}.cr-hunt-power .cr-hunt-seal{width:38px;height:38px}.cr-hunt-power span{display:grid;grid-template-columns:auto 1fr;gap:1px 7px;align-items:baseline;min-width:0}.cr-hunt-power small{font:12px var(--disp);color:#8d2b22}.cr-hunt-power b{font:17px var(--disp);font-weight:400;color:#402916}.cr-hunt-power em{grid-column:1/-1;font:12px/1.25 var(--serif);font-style:normal;color:#6c5135}.cr-hunt-echo-panel{margin:0 0 8px;padding:9px 10px 10px;border:2px solid var(--echo-tone);background:linear-gradient(110deg,color-mix(in srgb,var(--echo-tone) 30%,#111) 0%,#101013 42%,#171515 100%);box-shadow:inset 0 0 0 1px #000,0 5px 11px #0007;color:#ead9bd}.cr-hunt-echo-panel>header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding-bottom:6px;border-bottom:1px solid color-mix(in srgb,var(--echo-tone) 50%,transparent)}.cr-hunt-echo-panel>header span{font:13px/1.15 var(--disp);color:color-mix(in srgb,var(--echo-tone) 75%,#f3dab5)}.cr-hunt-echo-panel>header b{font:11px var(--serif);font-weight:400;color:#a99d8a;white-space:nowrap}.cr-hunt-rule{display:grid;grid-template-columns:62px minmax(0,1fr);gap:7px;padding-top:7px}.cr-hunt-rule small{font:12px var(--disp);letter-spacing:.08em;color:color-mix(in srgb,var(--echo-tone) 75%,#e7c985)}.cr-hunt-rule p{min-width:0;margin:0!important;color:#ead9bd!important;font:13px/1.34 var(--serif)!important}.cr-hunt-card-link{display:grid;grid-template-columns:54px minmax(0,1fr);gap:9px;align-items:center;width:100%;margin-bottom:8px;padding:6px 8px;border:1px solid #85633a;background:#dbc79a;color:#402916;text-align:left}.cr-hunt-card-link-art{width:52px;height:52px;border:1px solid #6e4b2b;background-position:center;background-size:cover}.cr-hunt-card-link>span:last-child{display:flex;flex-direction:column;min-width:0}.cr-hunt-card-link small{font:12px var(--disp);color:#8d2b22}.cr-hunt-card-link b{font:15px var(--disp);font-weight:400}.cr-hunt-card-link em{font:12px var(--serif);font-style:normal;color:#6b5034}.cr-hunt-next-power{display:grid;grid-template-columns:1fr auto;gap:2px 7px;width:100%;margin-bottom:8px;padding:7px 9px;border:1px dashed #8b693e;background:rgba(91,58,27,.06);color:#5c4229;text-align:left}.cr-hunt-next-power span{font:12px var(--disp)}.cr-hunt-next-power b{font:14px var(--disp);font-weight:400;color:#8d2b22}.cr-hunt-next-power small{grid-column:1/-1;font-size:12px}.cr-hunt-install:disabled{opacity:.7;filter:saturate(.55);cursor:default}.cr-hunt-modal .modal-in{gap:9px}
.hs-echoes{position:absolute;z-index:4;left:6px;top:6px;display:flex;gap:4px;pointer-events:none}.hs-echoes span{width:27px;height:27px;padding:2px;border:1.5px solid var(--echo-tone);border-radius:50%;background:#0b0c0f;box-shadow:0 2px 5px #000b,0 0 7px color-mix(in srgb,var(--echo-tone) 55%,transparent)}.hs-echoes img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}.hs-go{gap:8px}.hs-go .btn{min-width:0;padding-left:10px;padding-right:10px}.hs-go .btn.ghost{border-color:#85633a;color:#51371f;background:rgba(95,62,30,.08)}.hs-echo-wrap{padding:6px}.hs-echo-modal{width:min(390px,calc(100vw - 12px));max-width:min(390px,calc(100vw - 12px))}.hs-echo-modal .modal-in{width:100%;max-height:calc(100dvh - 12px);box-sizing:border-box;overflow-y:auto;border-width:24px;border-image-width:24px;gap:9px}.hs-echo-kicker{font:12px var(--disp);color:#8d2b22;letter-spacing:.1em}.hs-echo-modal h3{margin:0;font:22px/1.1 var(--disp);font-weight:400;text-align:left}.hs-echo-lead{margin:0!important;font-size:13px!important;line-height:1.34!important;color:#5f452c!important}.hs-echo-act{padding:8px;border:1px solid #85633a;background:rgba(102,68,34,.07)}.hs-echo-act>header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:7px}.hs-echo-act>header span{font:14px var(--disp);color:#8d2b22}.hs-echo-act>header small{font-size:11px;color:#70563b;text-align:right}.hs-echo-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.hs-echo-option{position:relative;min-width:0;padding:5px 3px 6px;border:2px solid #806444;background:#d2bd91;color:#412b18}.hs-echo-option.on{border-color:var(--echo-tone);background:#ead9b2;box-shadow:0 0 0 1px #f0ddb5,0 0 9px color-mix(in srgb,var(--echo-tone) 50%,transparent)}.hs-echo-option>span{position:relative;display:block;width:48px;height:48px;margin:0 auto 4px}.hs-echo-option>span>img{width:100%;height:100%;border-radius:50%;object-fit:cover}.hs-echo-option .cr-hunt-seal{position:absolute;right:-5px;bottom:-3px;width:23px;height:23px;padding:2px}.hs-echo-option b{display:-webkit-box;min-height:26px;overflow:hidden;font:12px/1.08 var(--disp);font-weight:400;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}.hs-echo-option>small{font-size:11px;color:#6c5135}.hs-echo-clear{display:block;margin:7px auto 0;padding:2px 6px;border:0;border-bottom:1px dashed #8d2b22;background:transparent;color:#8d2b22;font:12px var(--serif)}.hs-echo-empty{margin:4px 0!important;padding:11px;border:1px dashed #85633a;font-size:13px!important;text-align:center}
@media(max-width:350px){.cr-hunt-power{grid-template-columns:38px minmax(0,1fr);padding-left:6px;padding-right:6px}.cr-hunt-rule{grid-template-columns:55px minmax(0,1fr);gap:5px}.cr-hunt-echo-panel{padding-left:7px;padding-right:7px}.cr-hunt-echo-panel>header b{display:none}.hs-echo-modal .modal-in{padding-left:7px;padding-right:7px}.hs-echo-option>span{width:44px;height:44px}.hs-echo-option b{font-size:11px}.hs-go{flex-direction:column}.hs-go .btn{width:100%}}
@media(max-width:359px){.cr-hunt-book{padding-left:6px;padding-right:6px}.cr-hunt-slots,.cr-hunt-bosses{gap:5px}.cr-hunt-slot-face{width:51px}.cr-hunt-slot b,.cr-hunt-boss b{font-size:13px}.cr-hunt-modal header{grid-template-columns:64px minmax(0,1fr) 34px;gap:6px}.cr-hunt-modal header.locked{grid-template-columns:64px minmax(0,1fr)}.cr-hunt-modal header.locked .cr-hunt-modal-title{transform:translateX(-3px)}.cr-hunt-modal-face{width:64px;height:64px}.cr-hunt-modal header h3{font-size:20px}.cr-hunt-modal-body,.cr-hunt-modal-body.no-card{grid-template-columns:minmax(0,1fr)}.cr-hunt-card-preview{width:100%;height:184px}.cr-hunt-echo-copy{overflow-wrap:anywhere}}
.cr-hunt-modal-face.secret{position:relative}.cr-hunt-modal-face.secret span{position:relative;z-index:2;text-shadow:0 1px #f2dfb5}
.cr-mini-card.r-t,.cr-catalog-v2 .cr-mini-card.r-t{border-color:#9a1f1c}

/* QA 2026-07: version numbers, enemy cards, portraits and pile readability. */
.menu .foot{line-height:1.45}.menu .foot>span{display:inline-block;margin:0 5px}.menu .foot .ready{color:#a92720;font-weight:700}
.upd-versions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;font:15px var(--disp);color:#5b3922}

.e-img{border:0;background:none!important;isolation:isolate;overflow:visible}
.e-img::before{content:"";position:absolute;z-index:1;inset:-2px;border-radius:13px;background-image:var(--enemy-img);background-repeat:no-repeat;background-position:center;background-size:108%;clip-path:inset(0 round 13px)}
.e-img::after{content:"";position:absolute;z-index:3;inset:-3px;border:3px solid rgba(201,152,46,.72);border-radius:14px;box-shadow:inset 0 0 0 1px rgba(30,17,8,.7),0 6px 18px rgba(0,0,0,.6);pointer-events:none}
.e-img.boss::after{border-color:#a9202b;box-shadow:inset 0 0 0 1px rgba(54,5,10,.9),0 6px 18px rgba(0,0,0,.6),0 0 10px rgba(190,30,48,.55)}
.e-img .slot-reserve{position:absolute;z-index:7;right:-17px;top:-14px;width:34px;height:34px;margin:0;padding:0;border:0;display:block;background:none;filter:drop-shadow(0 3px 5px #000c);pointer-events:auto;cursor:pointer;touch-action:manipulation}
.e-img .slot-reserve img{position:absolute;inset:0;width:32px;height:32px;margin:0;border:2px solid #d1a84f;border-radius:50%;object-fit:cover;background:#15120f;box-shadow:inset 0 0 0 1px #2a1608}
.e-img .slot-reserve b{position:absolute;right:-4px;bottom:-3px;min-width:16px;height:16px;padding:1px 3px;border-radius:8px;background:#130c0a;color:#f6dfae;font:12px/14px var(--disp);box-shadow:0 1px 4px #000}
.enemy.reinforcement-dying{pointer-events:none}
.enemy.reinforcement-dying .e-img::before{opacity:.28;filter:grayscale(.7) brightness(.5)}
.reinforcement-wait{height:88px;padding-top:28px;color:#d7bd88;font:12px/1.15 var(--disp);letter-spacing:.03em;text-shadow:0 1px 3px #000}
.enemy.reinforcement-enter .e-img::before{animation:reinforcementSwapIn .72s cubic-bezier(.18,.84,.32,1) both}
.enemy.reinforcement-enter .e-img::after{animation:reinforcementBorderIn .72s ease-out both}
@keyframes reinforcementSwapIn{
  0%{opacity:.25;transform:translate(28px,-28px) scale(.32);filter:brightness(1.35)}
  62%{opacity:1;transform:translate(-2px,2px) scale(1.06);filter:brightness(1.12)}
  100%{opacity:1;transform:none;filter:none}}
@keyframes reinforcementBorderIn{0%{opacity:0;transform:scale(.45)}55%{opacity:1;transform:scale(1.08)}100%{opacity:1;transform:none}}
@media (max-height:720px){
  .e-img .slot-reserve{right:-13px;top:-11px;width:29px;height:29px}
  .e-img .slot-reserve img{width:27px;height:27px}
  .reinforcement-wait{height:58px;padding-top:20px;font-size:11px}
}
@media (max-width:340px){
  .b-chapter{width:180px}
  .b-chapter b:last-child{transform:translateX(-40px)}
}
.e-img.firebird-crop::before{background-size:116%;background-position:center 58%}
.e-img.bestennik-crop::before{background-size:115%;background-position:center 54%}
.e-img.mezhevik-crop::before{inset:-4px;background-size:118%;background-position:center 48%}
.e-badge{z-index:5}.enemy-atk-total{z-index:5}

.ecard-full{grid-template-rows:148px 39px 31px minmax(0,1fr) 18px}
.ecard-full.no-desc{grid-template-rows:148px 45px 40px minmax(0,1fr);padding-bottom:17px}
.ecard-full.no-desc .ef-art{width:148px;height:148px}
.ecard-full .ef-val{font-size:32px;gap:6px}
.ecard-full .ef-val img,.ecard-full .ef-val .ii-sm{width:30px;height:30px}
.ecard-full .ef-val .i-rider{display:inline-flex;align-items:center;font-size:24px;gap:3px}
.ecard-full .ef-who{font-size:13px}
.enemy-plan-hint{font-size:15px!important;line-height:1.3!important}

.modal.pile-view{width:min(430px,96vw)}
.pile-view .modal-in{max-height:86vh;overflow-y:auto;background:url('../img/_parch.webp') center/cover!important;border:2px solid #6f4d2c;border-image:none!important;border-radius:12px;box-shadow:inset 0 0 0 2px rgba(239,216,170,.55),0 12px 30px #0009;padding:24px 18px}
.pile-view .card-row{gap:9px;background:transparent!important;box-shadow:none!important}
.pile-view .card-row.wrap{max-height:none;overflow:visible;padding:0}
/* В прикупе и сбросе используем выверенную геометрию миниатюры из руки (≈1:2),
   а не расширяем карту ради текста. */
.pile-view .card-row .card{width:clamp(84px,22vw,98px);height:clamp(184px,48.5vw,204px)!important;min-height:0!important}
.pile-view .card-row .card .t{font-size:clamp(12px,3.4vw,14px)}
.pile-view .card-row .card .txt{display:block;min-height:2.5em;overflow:visible;-webkit-line-clamp:unset;-webkit-box-orient:initial;-webkit-mask-image:none;mask-image:none;font-size:clamp(11px,3.05vw,12.5px);line-height:1.25}
@media(max-width:380px){.pile-view .card-row{gap:7px}}

/* Акт II · Деревня */
.old-outpost{background-size:cover;background-position:center;overflow:hidden}
.outpost-spirit{position:absolute;inset:25% 0 43%;display:flex;justify-content:center;align-items:flex-end;pointer-events:none}
.outpost-spirit img{height:100%;max-width:92%;object-fit:contain;filter:drop-shadow(0 12px 18px #000b)}
.outpost-dialogue{position:absolute;z-index:3;left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));padding:14px 13px;background:url('../img/_parch.webp') center/cover,#e1cda1;border:2px solid #72502d;box-shadow:inset 0 0 0 1px #f2dfb8,0 8px 28px #000b}
.outpost-dialogue h2{margin:2px 0 5px;font:24px var(--disp);color:#8f201c}
.outpost-dialogue .ev-text{margin:0 0 8px;font-size:13px;line-height:1.25}
.outpost-choices{gap:6px}.heritage-choice{display:grid!important;grid-template-columns:42px 1fr;gap:9px;align-items:center;text-align:left!important;padding:7px 9px!important}
.heritage-choice>img{width:42px;height:42px;object-fit:contain;border-radius:50%;background:#d4bd8d;border:1px solid #80603a}
.heritage-choice b{display:block;font:15px var(--disp);font-weight:400}.heritage-choice small{display:block;margin-top:2px;font:13px/1.18 var(--serif);color:#5d452d}
.battle-memory{position:absolute;z-index:8;left:7px;top:63px;width:37px;height:37px;padding:3px;border:1.5px solid #8b6b3e;border-radius:50%;background:url('../img/_parch.webp') center/cover,#d8c396;box-shadow:0 2px 6px #0008,inset 0 0 0 1px #eed9ad}
.battle-memory img{width:100%;height:100%;object-fit:contain;border-radius:50%}.battle-memory.spent{filter:grayscale(1);opacity:.45}
.battle-notice.echo{filter:drop-shadow(0 9px 13px #000c)}
.battle-notice.echo:before{background:linear-gradient(92deg,color-mix(in srgb,var(--notice-tone) 38%,#0b0d0d) 0%,rgba(9,9,12,.98) 46%,color-mix(in srgb,var(--notice-tone) 14%,#08090b) 100%)}
.battle-notice.echo .battle-notice-compact{display:grid;grid-template-columns:50px minmax(0,1fr);grid-template-rows:auto 1fr;align-content:center;column-gap:10px;row-gap:3px;padding:8px 14px 8px 12px;white-space:normal}
.battle-notice.echo .battle-notice-compact-art{grid-column:1;grid-row:1/3;width:48px;height:48px;border:2px solid var(--notice-tone);border-radius:50%;object-fit:cover;background:#090a0b;box-shadow:0 0 0 2px #08090b,0 0 12px color-mix(in srgb,var(--notice-tone) 58%,transparent)}
.battle-notice.echo.no-seal.compact h2{position:static;grid-column:2;grid-row:1;width:auto;margin:0;color:color-mix(in srgb,var(--notice-tone) 78%,#f3dab5);font:400 12px/1.16 var(--disp);letter-spacing:.045em;text-align:left;white-space:normal;text-wrap:balance}
.battle-notice-echo-copy{grid-column:2;grid-row:2;min-width:0;margin:0;color:#ead9bd;font:700 12px/1.3 var(--body);text-align:left;text-wrap:pretty}
.battle-notice-echo-copy .hunt-echo-fx{display:inline-flex;align-items:center;gap:2px;vertical-align:-3px;white-space:nowrap}
.battle-notice-echo-copy .hunt-echo-fx img,.battle-notice-echo-copy .hunt-echo-fx .ecryst{display:block;width:16px;height:16px;object-fit:contain;filter:drop-shadow(0 2px 2px #000)}
.battle-notice-echo-copy .hunt-echo-fx .ecryst{width:12px;height:18px}
.battle-notice-echo-copy .hunt-echo-fx b,.battle-notice-echo-copy>b{color:#fff0cf;font-size:13px}
@media(max-width:350px){.battle-notice.echo .battle-notice-compact{grid-template-columns:44px minmax(0,1fr);column-gap:8px;padding-left:9px;padding-right:10px}.battle-notice.echo .battle-notice-compact-art{width:42px;height:42px}.battle-notice.echo.no-seal.compact h2{font-size:12px;letter-spacing:.025em}.battle-notice-echo-copy{font-size:11px;line-height:1.25}.battle-notice-echo-copy .hunt-echo-fx img{width:15px;height:15px}}
@keyframes echoPassiveFlare{0%,100%{filter:none;box-shadow:0 2px 6px #0008}25%{filter:brightness(1.7) saturate(1.5);box-shadow:0 0 0 4px #f2c85a99,0 0 18px 8px #c5241d}}
.event-gain-modal{width:min(360px,94vw);max-height:min(720px,92dvh);overflow:hidden}.event-gain-modal .modal-in{align-items:center;text-align:center;max-height:inherit;overflow-y:auto;overscroll-behavior:contain}.event-gain-modal .modal-in>small{color:#8d2b22;font:13px var(--disp)}.event-gain-modal h3{max-width:100%;margin:0;font:clamp(18px,5.8vw,22px) var(--disp);font-weight:400;line-height:1.05;text-wrap:balance}.event-gain-art{display:flex;justify-content:center;width:100%;min-height:190px}.event-gain-art>.card{width:142px!important;height:220px!important;min-height:220px!important;margin:0!important;transform:none!important}.event-gain-art>.item-card{width:min(286px,100%);max-width:100%;box-sizing:border-box;cursor:default}.event-gain-art>.item-card:active{transform:none}.event-gain-art>.item-card .it-body{min-width:0}.event-gain-art>.item-card .it-name,.event-gain-art>.item-card .it-eff{overflow-wrap:anywhere}.event-gain-modal .btn{width:100%;flex:none}
.card-loss-overlay{position:fixed;z-index:96;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;overflow:hidden;background:rgba(5,6,10,.84);backdrop-filter:blur(3px);opacity:0;pointer-events:auto;transition:opacity .12s}
.card-loss-overlay.play{opacity:1}
.card-loss-kicker{color:#d2a74e;font:14px var(--disp);letter-spacing:.16em;text-shadow:0 2px 5px #000}
.card-loss-name{max-width:min(340px,88vw);min-height:28px;color:var(--cream);font:24px/1.08 var(--disp);text-align:center;text-wrap:balance;text-shadow:0 2px 6px #000}
.card-loss-stage{position:relative;width:142px;height:220px;margin:6px 0 2px;filter:drop-shadow(0 16px 25px #000c)}
.card-loss-piece{position:absolute;inset:0;will-change:transform,opacity;animation-duration:.92s;animation-delay:.18s;animation-timing-function:cubic-bezier(.34,.02,.54,1);animation-fill-mode:forwards}
.card-loss-piece.upper{clip-path:polygon(-8% -8%,108% -8%,108% 38%,52% 50%,0 62%)}
.card-loss-piece.lower{clip-path:polygon(0 62%,52% 50%,108% 38%,108% 108%,-8% 108%)}
.card-loss-overlay.play .card-loss-piece.upper{animation-name:cardLossUpper}
.card-loss-overlay.play .card-loss-piece.lower{animation-name:cardLossLower}
.card-loss-piece>.card{width:142px!important;height:220px!important;min-height:220px!important;margin:0!important;transform:none!important;pointer-events:none}
.card-loss-cut{position:absolute;z-index:4;left:-14%;top:50%;width:128%;height:4px;border-radius:50%;background:#fff4cf;box-shadow:0 0 5px #fff,0 0 12px #ef2a20,0 0 24px #a20e0a;opacity:0;transform:rotate(-10deg) scaleX(0);transform-origin:left center}
.card-loss-overlay.play .card-loss-cut{animation:cardLossCut .38s .13s ease-out forwards}
.card-loss-count{min-height:18px;color:#bba98b;font:13px var(--serif);letter-spacing:.04em}
@keyframes cardLossCut{0%{opacity:0;transform:rotate(-10deg) scaleX(0)}24%{opacity:1}72%{opacity:1;transform:rotate(-10deg) scaleX(1)}100%{opacity:0;transform:rotate(-10deg) scaleX(1)}}
@keyframes cardLossUpper{0%,24%{transform:none;opacity:1}100%{transform:translate(-46px,-66px) rotate(-11deg);opacity:0}}
@keyframes cardLossLower{0%,24%{transform:none;opacity:1}100%{transform:translate(44px,72px) rotate(10deg);opacity:0}}
@media(prefers-reduced-motion:reduce){.card-loss-piece,.card-loss-cut{animation-duration:.2s!important;animation-delay:.05s!important}}
.battle-bark{position:fixed;z-index:90;box-sizing:border-box;max-width:calc(100vw - 20px);padding:10px 13px 12px;border:1px solid rgba(190,145,75,.58);border-radius:9px;background:linear-gradient(110deg,rgba(19,17,16,.97),rgba(8,9,11,.98)),url('../img/ui_narrator_charcoal.png') center/145% 190% no-repeat;box-shadow:0 7px 18px #000c,inset 0 0 16px rgba(183,132,61,.08);color:var(--bone);text-align:center;transform:translateX(-50%);transition:opacity .22s ease,transform .22s ease;cursor:pointer}
.battle-bark:after{content:"";position:absolute;left:50%;width:10px;height:10px;background:#0d0d0e;border-right:1px solid rgba(190,145,75,.58);border-bottom:1px solid rgba(190,145,75,.58);transform:translateX(-50%) rotate(45deg)}
.battle-bark.above:after{bottom:-6px}.battle-bark.below:after{top:-6px;transform:translateX(-50%) rotate(225deg)}
.battle-bark b{display:block;color:#d49c43;font:12px/1.1 var(--disp);font-weight:400;letter-spacing:.04em}.battle-bark span{display:block;margin-top:3px;font:13px/1.28 var(--serif);font-style:italic;text-wrap:balance}.battle-bark.gone{opacity:0;transform:translate(-50%,-6px)}
.white-duck-reward{object-fit:contain!important}
@media(max-height:720px){.outpost-spirit{inset:23% 0 48%}.outpost-dialogue{padding:10px}.heritage-choice{padding:5px 7px!important}.heritage-choice>img{width:36px;height:36px}.heritage-choice small{font-size:11px}}

/* v560: эффекты должны читаться без зума во всех штатных представлениях.
   Dense уменьшает только длинный набор, но больше не превращает его в микрозначки. */
.card .fx-inline img,.card .fx-inline .ecryst{width:1.16em;height:1.16em}
.strip{height:24px}
.strip .si{width:18px;height:18px;flex-basis:18px}
.strip .si[src*="ic_shield"],.strip .si[src*="ic_dodge"],.strip .si[src*="ic_ghost"]{width:17px;height:17px;flex-basis:17px}
.strip.dense .si{width:14px;height:14px;flex-basis:14px}
.card .strip .ecryst{width:17px;height:23px}

.hand .card .strip{height:21px}
.hand .card .strip .si{width:18px;height:18px;flex-basis:18px}
.hand .card .strip.dense .si{width:16px;height:16px;flex-basis:16px}

.card-buy .card .strip{height:24px}
.card-buy .card .strip .si{width:20px;height:20px;flex-basis:20px}
.card-buy .card .strip.dense .si{width:17px;height:17px;flex-basis:17px}

.zoomwrap .strip,.pc-fly.playzoom .strip{height:38px}
.zoomwrap .strip .si,.pc-fly.playzoom .strip .si{width:28px;height:28px;flex-basis:28px}
.zoomwrap .strip.dense .si,.pc-fly.playzoom .strip.dense .si{width:25px;height:25px;flex-basis:25px}
.zoomwrap .card .strip .ecryst,.pc-fly.playzoom .card .strip .ecryst{width:25px;height:34px}

.shop-lot-card .card .strip{height:36px}
.shop-lot-card .card .strip .si{width:26px;height:26px;flex-basis:26px}
.shop-lot-card .card .strip.dense .si{width:20px;height:20px;flex-basis:20px}

.upg-modal .card .strip,.cr-card-modal .card .strip{height:29px!important}
.upg-modal .card .strip .si,.cr-card-modal .card .strip .si{width:21px;height:21px;flex-basis:21px}
.upg-modal .card .strip.dense .si,.cr-card-modal .card .strip.dense .si{width:17px;height:17px;flex-basis:17px}

/* v561: описание не должно становиться мельче при переходе из боя в Торг. */
.card-buy .card{width:112px!important;height:180px!important}
.card-buy .card .txt{
  font-size:clamp(11.5px,3.25vw,13.5px)!important;
  line-height:1.2!important;
}
.shop-lot-card .card .txt{font-size:15px!important;line-height:1.3!important}
.zoomwrap .card{min-height:430px}
.zoomwrap .card:has(.phase-mod){min-height:540px}
.zoomwrap .card .txt{font-size:18px;line-height:1.32}
.pc-fly.playzoom .card .txt{font-size:18px;line-height:1.25}
.card.echo-free{filter:drop-shadow(0 0 8px rgba(183,65,43,.9)) drop-shadow(0 0 2px #d9c49a)}
.card.echo-free .cost,.card.echo-free .c-cost{animation:echoFreePulse 1.1s ease-in-out infinite alternate}
@keyframes echoFreePulse{from{transform:scale(1)}to{transform:scale(1.12)}}

/* v594: утверждённый контракт карточных слотов.
   Описание занимает всю доступную высоту; JS даёт полный текст по тапу лишь при реальном клипе. */
.card .txt:not(:empty),
.hand .card .txt,.card-buy .card .txt,.card-row .card .txt,.reward-fan .card .txt,.upg-card .card .txt{
  display:block;flex:1;min-height:0;max-height:none;overflow:hidden;
  -webkit-line-clamp:unset;-webkit-box-orient:initial;
  -webkit-mask-image:none;mask-image:none
}
.card .txt.card-copy-clipped{cursor:help;touch-action:manipulation}

/* Зум героя остаётся крупным, но фазовая строка больше не растягивает его до 540px. */
.zoomwrap>.card,.zoomwrap>.card:has(.phase-mod){
  box-sizing:border-box;width:206px!important;height:430px!important;
  min-height:430px!important;max-height:430px!important
}
.zoomwrap>.card .cart{height:150px}
.zoomwrap>.card .txt{font-size:16px;line-height:1.22}

/* Боевые карты врагов сохраняют короткую утверждённую геометрию. */
.intents.fan .ecard{width:82px!important;height:118px!important}
.zoomwrap>.ecard-full,.enemy-plan-page .ecard-full{width:206px;height:322px}

/* Торг сохраняет текущие, уже читаемые слоты. */
.card-buy .card{width:112px!important;height:180px!important}
.shop-lot-card>.card{width:190px!important;height:292px!important;min-height:0!important}

/* В Добыче описание читается крупно и всегда получает место минимум под три строки.
   Карта чуть выше прежней, поэтому арт 150px и двухстрочный заголовок не ужимаются. */
.car-stage .card{height:376px!important;min-height:376px!important;max-height:376px!important}
.car-stage .card .cin{padding:28px 10px 8px!important}
.car-stage .card .strip{height:38px;margin:3px 0 4px}
.car-stage .card .txt:not(:empty){
  flex:1 0 3.84em;min-height:3.84em;max-height:none;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;
  font-size:18px;line-height:1.28;overflow:hidden
}

/* Получение карты: прежний внешний размер, вдвое больше места под арт. */
.event-gain-art>.card{width:142px!important;height:220px!important;min-height:220px!important}
.event-gain-art>.card .cin{padding-top:28px!important}
.event-gain-art>.card .cart{display:block;height:68px!important;margin:1px 0 3px}
.event-gain-art>.card .txt{font-size:11.5px;line-height:1.16}

/* После выбора показываем ровно ту же карту, что стояла в центре Добычи:
   те же car-stage/car-item правила и тот же scale(.66), без смены пропорций. */
.event-gain-art.card-gain{
  position:relative;left:auto;top:auto;display:block;width:100%;height:248.16px;min-height:248.16px;
  padding:0;overflow:visible;transform:none;opacity:1;cursor:default;will-change:auto
}
.event-gain-art.card-gain>.card{
  position:absolute;left:50%;top:0;width:206px!important;height:376px!important;
  min-height:376px!important;max-height:376px!important;
  transform:translateX(-50%) scale(.66)!important;
  transform-origin:top center;pointer-events:none
}
.event-gain-art.card-gain>.card .cart{height:150px!important;margin:2px 0 4px!important}
.event-gain-art.card-gain>.card .txt:not(:empty){font-size:18px!important;line-height:1.28!important}

/* Прикуп/сброс: три более широкие карты в строке. */
.pile-view .card-row{gap:7px}
.pile-view .card-row .card{width:102px!important;height:212px!important;min-height:0!important}
.pile-view .card-row .card .txt{max-height:none!important}
@media(max-width:380px){.pile-view .card-row .card{width:92px!important}}

/* Прозрение — короткая широкая сцена в том же тёмном языке, что выбор зверя.
   Карты остаются светлыми игровыми объектами, а не сливаются с пергаментом модалки. */
.modal.scry{box-sizing:border-box;width:100vw;max-width:100vw;filter:drop-shadow(0 18px 42px #000)}
.modal-wrap:has(.modal.scry){padding:0;background:rgba(3,4,7,.82)}
.modal.scry .modal-in{box-sizing:border-box;width:100%;min-height:360px;height:auto;padding:24px 8px 25px;align-items:center;gap:5px;border:0;border-radius:0;background:radial-gradient(circle at 50% 0,#45351f 0,rgba(31,25,18,.98) 32%,rgba(8,9,10,.99) 78%),#09090a;box-shadow:0 18px 42px #000,0 0 28px rgba(199,151,58,.24);-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%);text-align:center;overflow:hidden}
.scry-kicker{font:12px var(--disp);letter-spacing:.18em;color:#d3a94e;text-shadow:0 2px 5px #000,0 0 12px #9b272688}
.modal.scry h3{margin:0;color:#f0dfbd;font:clamp(21px,6.2vw,27px)/1.08 var(--disp);font-weight:400;text-shadow:0 2px 7px #000,0 0 18px rgba(214,160,74,.22);text-wrap:balance}
.modal.scry .scry-sub{z-index:4;min-height:0;margin:1px auto 0;max-width:340px;color:#cdbd9f;font:14px/1.3 var(--serif);text-shadow:0 2px 4px #000}
.modal.scry .scry-fan{width:100%;min-height:190px;margin:0;padding:31px 0 2px;flex:none;align-items:flex-end}
.modal.scry .reward-fan .card{width:88px;height:166px!important;min-height:0!important;margin:0 -12px;filter:drop-shadow(0 7px 7px #000)}
.modal.scry .reward-fan .card.scry-pick{box-shadow:0 0 0 2px #e4d5ae,0 14px 26px #000;filter:brightness(1.12) saturate(1.08) drop-shadow(0 0 8px rgba(84,138,181,.7))}
.modal.scry .row{margin-top:8px}
.modal.scry #m-close{min-width:154px;margin:0;font-weight:400}
@media(max-width:350px),(max-height:620px){
  .modal.scry .modal-in{min-height:326px;padding:21px 5px 22px;gap:3px}
  .modal.scry h3{font-size:19px}
  .modal.scry .scry-sub{max-width:286px;font-size:12px;line-height:1.22}
  .modal.scry .scry-fan{min-height:169px;padding-top:24px}
  .modal.scry .reward-fan .card{width:72px;height:146px!important;margin:0 -11px}
  .modal.scry #m-close{padding:8px 20px}
}

/* Единый ритм боевых оверлеев: рамка входит первой, игровые объекты — следом.
   translate/scale заданы отдельными свойствами, чтобы не перебить веер карт. */
.pet-picker-grid{animation:modalContentIn .3s .05s ease-out both}
.pet-picker-choice{animation:modalItemIn .34s cubic-bezier(.16,.78,.25,1) both;animation-delay:calc(.08s + var(--enter-i,0) * .045s)}
.modal.scry .scry-fan .card{animation:modalCardIn .34s cubic-bezier(.16,.78,.25,1) both;animation-delay:calc(.07s + var(--enter-i,0) * .04s)}
.event-gain-art{animation:modalGainIn .38s .06s cubic-bezier(.16,.78,.25,1) both}
.reward-screen .car-stage{animation:rewardStageIn .42s .06s cubic-bezier(.16,.78,.25,1) both}
.reward-screen .car-dots,.reward-screen #car-take,.reward-screen #skip{animation:rewardControlsIn .3s .18s ease-out both}
.screen-reveal.reward-screen .panel{animation:rewardPanelReveal .4s cubic-bezier(.16,.78,.25,1) both}
.screen-reveal.reward-screen .car-stage{animation:rewardStageReveal .46s .05s cubic-bezier(.16,.78,.25,1) both}
@keyframes modalContentIn{from{opacity:0}to{opacity:1}}
@keyframes modalItemIn{from{translate:0 14px;scale:.985}to{translate:0 0;scale:1}}
@keyframes modalCardIn{from{opacity:0;translate:0 18px;scale:.96}to{opacity:1;translate:0 0;scale:1}}
@keyframes modalGainIn{from{opacity:0;translate:0 14px;scale:.97}to{opacity:1;translate:0 0;scale:1}}
@keyframes rewardStageIn{from{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}
@keyframes rewardControlsIn{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}
@keyframes rewardPanelReveal{from{opacity:0;translate:0 12px;scale:.985}to{opacity:1;translate:0 0;scale:1}}
@keyframes rewardStageReveal{from{opacity:0;translate:0 20px;scale:.975}to{opacity:1;translate:0 0;scale:1}}
@media(prefers-reduced-motion:reduce){
  .modal-wrap,.modal-wrap>.modal,.pet-picker-grid,.pet-picker-choice,.modal.scry .scry-fan .card,.event-gain-art,
  .reward-screen .car-stage,.reward-screen .car-dots,.reward-screen #car-take,.reward-screen #skip,
  .screen-reveal.reward-screen .panel,.screen-reveal.reward-screen .car-stage{animation:none!important;translate:none!important;scale:none!important}
}

/* Боевой вылет: обычная структура карты без отдельной плашки заголовка.
   Уменьшаем только арт и вертикальные зазоры, освобождая ровно три строки описания. */
.pc-fly.playzoom .cin{padding:38px 10px 8px!important}
.pc-fly.playzoom .card .t{font-size:22px;line-height:1;margin-bottom:2px}
.pc-fly.playzoom .cart{height:105px;margin:2px 0;background-size:contain}
.pc-fly.playzoom .strip{height:36px;margin:3px 0 4px}
.pc-fly.playzoom .card .txt:not(:empty){
  display:-webkit-box;flex:0 0 3.75em;min-height:3.75em;max-height:3.75em;
  -webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  font-size:18px;line-height:1.25
}

/* Финальные адаптивные правила сборки и боковой рейки Отзвуков. */
.hs-echo-modal h3{font-size:25px}
.hs-echo-lead{font-size:15px!important;line-height:1.4!important}
.hs-echo-act{padding:10px 9px}
.hs-echo-act>header{margin-bottom:9px}
.hs-echo-act>header span{font-size:16px}
.hs-echo-act>header small{max-width:160px;font-size:13px;line-height:1.2}
.hs-echo-options{display:flex;grid-template-columns:none;flex-direction:column;gap:8px}
.hs-echo-option{display:grid;grid-template-columns:58px minmax(0,1fr);gap:10px;align-items:start;width:100%;padding:9px;border:2px solid #806444;text-align:left}
.hs-echo-option.on{box-shadow:inset 0 0 0 1px #f0ddb5,0 0 9px color-mix(in srgb,var(--echo-tone) 50%,transparent)}
.hs-echo-option-face{position:relative;display:block!important;width:56px!important;height:56px!important;margin:0!important}
.hs-echo-option-face>img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.hs-echo-option-face .cr-hunt-seal{position:absolute;right:-5px;bottom:-4px;width:27px;height:27px;padding:2px}
.hs-echo-option>.hs-echo-option-copy{display:flex;width:auto;height:auto;min-width:0;margin:0;flex-direction:column;gap:5px}
.hs-echo-option-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding-bottom:4px;border-bottom:1px solid rgba(96,62,30,.28)}
.hs-echo-option-head b{display:block;min-height:0;overflow:visible;font:18px/1.1 var(--disp);font-weight:400;white-space:normal}
.hs-echo-option-head small{font:13px var(--serif);color:#6c5135;white-space:nowrap}
.hs-echo-option-rule{display:grid;grid-template-columns:56px minmax(0,1fr);gap:6px;align-items:start}
.hs-echo-option-rule em{font:12px/1.25 var(--disp);font-style:normal;letter-spacing:.04em;color:#8d2b22}
.hs-echo-option-rule>span{min-width:0;font:14px/1.32 var(--serif);color:#412b18}
.hs-echo-equipped{position:absolute;right:7px;top:-8px;padding:1px 5px;border:1px solid var(--echo-tone);background:#ead9b2;color:#8d2b22;font:12px var(--disp);font-style:normal;letter-spacing:.04em}
.hs-echo-clear{margin-top:9px;font-size:14px}
.hs-echoes{left:5px;top:34px;flex-direction:column;gap:6px;pointer-events:auto}
.hs-echoes button{width:39px;height:39px;padding:3px;border:2px solid var(--echo-tone);border-radius:50%;overflow:hidden;background:url('../img/_parch.webp') center/cover,#d8c396;box-shadow:0 2px 6px #000b,inset 0 0 0 1px #eed9ad}
.hs-echoes button img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
@media(max-width:350px){
  .hs-echo-modal h3{font-size:22px}
  .hs-echo-lead{font-size:14px!important}
  .hs-echo-act{padding-left:6px;padding-right:6px}
  .hs-echo-act>header{align-items:flex-start}
  .hs-echo-act>header span{font-size:14px}
  .hs-echo-act>header small{max-width:125px;font-size:12px}
  .hs-echo-option{grid-template-columns:48px minmax(0,1fr);gap:8px;padding:8px 6px}
  .hs-echo-option-face{width:46px!important;height:46px!important}
  .hs-echo-option-head b{font-size:16px}
  .hs-echo-option-head small{font-size:12px}
  .hs-echo-option-rule{grid-template-columns:51px minmax(0,1fr);gap:4px}
  .hs-echo-option-rule em{font-size:12px}
  .hs-echo-option-rule>span{font-size:13px}
  .hs-echoes{left:4px;top:30px;gap:5px}
  .hs-echoes button{width:35px;height:35px}
}

/* Подробности Отзвука используют геометрию и типографику боевого UI. */
.cr-hunt-modal .modal-in{min-height:min(600px,calc(100dvh - 20px));gap:11px}
.cr-hunt-modal header.locked{grid-template-columns:92px minmax(0,1fr);gap:13px}
.cr-hunt-modal header.locked .cr-hunt-modal-title{transform:none}
.cr-hunt-modal-face{width:92px;height:92px;border-radius:50%}
.cr-hunt-modal-title{text-align:center}
.cr-hunt-modal header .cr-hunt-modal-title>small{font:12px/1.2 var(--disp);letter-spacing:.08em}
.cr-hunt-modal-title h3{margin:0!important;font:24px/1.1 var(--disp)!important;text-wrap:balance}
.cr-hunt-title-rank{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:7px;color:#8d2b22;font:17px/1 var(--disp)}
.cr-hunt-title-rank img{width:26px;height:26px;object-fit:contain}
.cr-hunt-echo-panel{padding:11px 12px}
.cr-hunt-echo-panel h4,.cr-hunt-shell h4{margin:0 0 9px;padding-bottom:7px;border-bottom:1px solid color-mix(in srgb,var(--echo-tone,#85633a) 55%,transparent);font:14px/1.1 var(--disp);font-weight:400;letter-spacing:.08em}
.cr-hunt-echo-panel h4{color:#f4ead5}
.cr-hunt-shell h4{border-bottom-color:rgba(96,62,30,.32);color:#8d2b22}
.cr-hunt-rule{grid-template-columns:66px minmax(0,1fr);gap:8px;align-items:baseline;padding-top:0}
.cr-hunt-rule+.cr-hunt-rule{margin-top:9px}
.cr-hunt-rule small{font:12px/1.35 var(--disp);letter-spacing:.06em;color:#f4ead5}
.cr-hunt-rule p{font:15px/1.35 var(--serif)!important}
.cr-hunt-shell{display:block;margin-bottom:8px;padding:9px 10px 10px;border:1px solid #85633a;background:#dbc79a;color:#402916}
.cr-hunt-shell-body{display:grid;grid-template-columns:86px minmax(0,1fr);gap:11px;align-items:center}
.cr-hunt-shell-art{display:block;width:84px;height:84px;border:0;background-position:center;background-size:contain;background-repeat:no-repeat}
.cr-hunt-shell-body>span:last-child{display:flex;min-width:0;flex-direction:column}
.cr-hunt-shell b{font:15px/1.2 var(--serif);font-weight:700;color:#402916}
.cr-hunt-shell p{margin:5px 0 0;font:15px/1.35 var(--serif);color:#5a4028}
.cr-hunt-install{margin:0}
.effect-tip-title:has(.effect-tip-rank){display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.effect-tip-rank{display:inline-flex;align-items:center;gap:4px;color:#e0b85f}
.effect-tip-rank img{box-sizing:content-box;width:19px;height:19px;padding:2px;border:1px solid #8b6b3e;border-radius:50%;background:#d8c396;object-fit:contain}
@media(max-width:350px){
  .cr-hunt-modal header.locked{grid-template-columns:74px minmax(0,1fr);gap:9px}
  .cr-hunt-modal-face{width:74px;height:74px}
  .cr-hunt-modal-title h3{font-size:21px!important}
  .cr-hunt-title-rank{font-size:16px}
  .cr-hunt-title-rank img{width:23px;height:23px}
  .cr-hunt-rule{grid-template-columns:58px minmax(0,1fr);gap:5px}
  .cr-hunt-rule small{font-size:12px}
  .cr-hunt-rule p{font-size:14px!important}
  .cr-hunt-shell{padding-left:7px;padding-right:7px}
  .cr-hunt-shell-body{grid-template-columns:74px minmax(0,1fr);gap:8px}
  .cr-hunt-shell-art{width:72px;height:72px}
  .cr-hunt-shell b{font-size:13px}
  .cr-hunt-shell p{font-size:14px}
}
.intent-target{display:block;margin-top:1px;color:#ecd27d;font-size:.72em;line-height:1.05;text-shadow:0 1px 2px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
