/* Keeper's chamber (room.js), fourth take (13.11.2026): the profile is its own full-screen room that
   fades in over the city. There is no balcony beside it any more, so there is no join to hide; the
   companion stands inside the room (.rm-hero). */
.hub-pan{position:absolute;inset:0;z-index:0}
.hub.no-pan,.hub.no-pan *{transition:none!important}
/* The HUD dissolves while the room is open. */
.hub .hud,.hub .dock,.hub .fight,.hub .wall-act,.hub .swap-mascot{transition:opacity .3s}
.hub.in-room :is(.hud,.dock,.fight,.wall-act,.swap-mascot){opacity:0;pointer-events:none}
.hub.in-room .speech{visibility:hidden}
.hub.in-room .cb{pointer-events:none}
/* «Назад» in the top-right corner, the same round button as on the other screens; the arrow points right,
   toward the balcony the camera returns to. Appears once the camera has arrived. */
.hub button.round.room-back{position:absolute;right:22px;top:14px;left:auto;z-index:5;opacity:0;pointer-events:none;transition:opacity .25s}
.room-back img{transform:scaleX(-1)}
.hub.in-room button.round.room-back{opacity:1;pointer-events:auto;transition-delay:.45s}

/* --- the room layer: between the city and the curtain, hidden unless shown --- */
.room{position:absolute;left:0;top:0;width:1280px;height:720px;z-index:4;overflow:hidden;opacity:0;transition:opacity .45s ease;
  background:radial-gradient(38% 48% at 11% 74%,rgba(255,140,60,.3),transparent 70%),radial-gradient(55% 45% at 62% 36%,rgba(170,50,100,.28),transparent 75%),
    repeating-linear-gradient(90deg,transparent 0 62px,rgba(201,160,78,.09) 62px 64px,transparent 64px 70px,rgba(201,160,78,.05) 70px 71px),
    url(art/velvet.webp) 0 0/320px,linear-gradient(90deg,#240a1e,#4a1236 38%,#3e1030 78%,#170612);
  background-blend-mode:normal,normal,normal,soft-light,normal}
.hub:not(.room-on) .room{visibility:hidden}
.hub.in-room .room{opacity:1}
.room.painted{background:var(--velvet-0) 0 0/1280px 720px no-repeat}
.room.painted .rm-glow{left:-20px;top:240px;width:340px;height:340px}
.room.painted .rm-table::before{display:none}
.rm-decor,.rm-decor *{position:absolute;pointer-events:none}
.rm-decor{inset:0}
/* Gold filigree frieze under the ceiling and a gold rail over the wainscot. */
.rm-frieze{left:0;right:0;top:0;height:40px;background:url(art/divider.webp) 0 50%/260px 22px repeat-x,linear-gradient(#12050e,#2a0a22);border-bottom:2px solid var(--gold-deep);box-shadow:0 2px 0 rgba(240,213,140,.25),0 10px 24px rgba(0,0,0,.6)}
.rm-wainscot{left:0;right:0;top:566px;height:82px;background:repeating-linear-gradient(90deg,transparent 0 8px,rgba(201,160,78,.35) 8px 9px,rgba(0,0,0,.35) 9px 112px,rgba(201,160,78,.35) 112px 113px,transparent 113px 120px),linear-gradient(#3a1626,#1d0a14);
  border-top:4px solid var(--gold);box-shadow:inset 0 2px 0 var(--gold-hi),0 -6px 14px rgba(0,0,0,.45)}
.rm-floor{left:0;right:0;top:648px;bottom:0;background:linear-gradient(rgba(255,150,80,.08),transparent 40%),repeating-linear-gradient(100deg,#1c0b14 0 90px,#160811 90px 92px),#140610;box-shadow:inset 0 10px 18px rgba(0,0,0,.7)}
.rm-rug{left:230px;top:640px;width:620px;height:130px;border-radius:50%;background:radial-gradient(closest-side,#7a1430 0 52%,#c9a04e 53% 55%,#5a0e24 56% 83%,#c9a04e 84% 86%,#3a0a1a 87% 95%,transparent 96%);opacity:.92}
/* Mirror over the fireplace. */
.rm-mirror{left:34px;top:120px;width:132px;height:200px;border-radius:50%;border:8px solid var(--gold);background:radial-gradient(70% 60% at 35% 30%,rgba(255,235,250,.22),transparent 60%),linear-gradient(160deg,#3d2a4a,#150a1c 70%);
  box-shadow:0 0 0 3px var(--gold-deep),inset 0 0 0 2px var(--gold-hi),inset 0 0 24px rgba(0,0,0,.8),0 12px 24px rgba(0,0,0,.6)}
.rm-mirror::after{content:"";position:absolute;left:50%;top:-30px;width:60px;height:24px;transform:translateX(-50%);background:url(art/divider.webp) center/contain no-repeat}
/* Fireplace: stone surround, gold-edged mantel shelf, arched firebox with logs; the flames are a canvas. */
.rm-hearth{left:0;top:418px;width:200px;height:230px;background:repeating-linear-gradient(0deg,transparent 0 37px,rgba(0,0,0,.35) 37px 39px),linear-gradient(90deg,#6b5866,#4c3a4a 50%,#3a2a38);box-shadow:inset -6px 0 12px rgba(0,0,0,.5),8px 0 20px rgba(0,0,0,.5)}
.rm-mantel{left:-10px;top:-14px;width:220px;height:18px;background:linear-gradient(#8a7484,#4a3848);border-top:3px solid var(--gold);border-bottom:2px solid var(--gold-deep);box-shadow:0 6px 10px rgba(0,0,0,.6)}
.rm-firebox{left:40px;top:74px;width:110px;height:104px;border-radius:55px 55px 0 0;background:radial-gradient(70% 60% at 50% 100%,#ff8a3a,#8a2a10 40%,#1a0606 80%);box-shadow:inset 0 0 0 3px #2a1a26,inset 0 8px 20px #000,0 0 0 6px #5a4656;animation:rmEmber 2.4s ease-in-out infinite alternate}
.rm-logs{left:12px;right:12px;bottom:4px;height:16px;border-radius:8px;background:linear-gradient(#5a2e18,#2a1208);box-shadow:0 -8px 0 -2px #3a1a0c,0 0 10px rgba(255,120,40,.8)}
@keyframes rmEmber{to{filter:brightness(1.25)}}
.rm-wax{width:9px;border-radius:2px 2px 1px 1px;background:linear-gradient(90deg,#d8c8b0,#fff6e4 40%,#b8a48c);box-shadow:0 2px 3px rgba(0,0,0,.6)}
/* Shade of the arch jamb next to the curtain. */
.rm-arch{right:0;top:0;bottom:0;width:150px;background:linear-gradient(90deg,transparent,rgba(10,3,10,.55) 60%,rgba(10,3,10,.8))}
/* Stone jamb of the arch: the curtain hangs in front of it, so the room ends on architecture, not on a seam. */
.rm-jamb{left:834px;top:40px;width:48px;height:608px;background:linear-gradient(90deg,#2a1a26,#6b5866 30%,#8a7484 45%,#4c3a4a 75%,#1e121c);border-left:3px solid var(--gold-deep);box-shadow:-10px 0 18px rgba(0,0,0,.6)}
.rm-jamb::before{content:"";position:absolute;left:-10px;right:-14px;top:0;height:26px;background:linear-gradient(#8a7484,#4a3848);border-top:3px solid var(--gold);border-bottom:2px solid var(--gold-deep)}
.rm-jamb::after{content:"";position:absolute;left:-10px;right:-14px;bottom:0;height:34px;background:linear-gradient(#5a4656,#2a1a26);border-top:2px solid var(--gold-deep)}
.rm-glow{position:absolute;left:-60px;top:300px;width:460px;height:420px;border-radius:50%;background:radial-gradient(closest-side,rgba(255,150,70,.26),transparent);mix-blend-mode:screen;pointer-events:none;animation:rmGlow 1.6s ease-in-out infinite alternate}
@keyframes rmGlow{to{opacity:.7;transform:scale(1.04)}}
.rm-fire{position:absolute;pointer-events:none;z-index:1}

/* --- the frame on the back wall: identity on the left, league or avatars on the right --- */
.rm-frame{position:absolute;left:196px;top:52px;width:628px;height:440px;box-sizing:border-box;display:grid;grid-template-columns:236px 1fr;gap:12px;padding:6px 10px 8px;
  background:url(art/velvet.webp) 0 0/320px,radial-gradient(90% 80% at 50% 20%,#4a1a44,var(--velvet-2) 60%,var(--velvet-1));background-blend-mode:soft-light,normal;
  border:22px solid transparent;border-image:url(art/panel-frame.webp) 40 / 22px stretch;background-clip:padding-box;box-shadow:0 0 0 2px rgba(14,7,16,.6),0 18px 34px rgba(0,0,0,.7)}
.rm-frame .pf-gear{position:absolute;right:-30px;top:-30px;z-index:2;width:48px;height:48px}
.rm-id{display:grid;justify-items:center;align-content:start;gap:6px;min-width:0;padding-top:4px;border-right:1px solid rgba(201,160,78,.35)}
.rm-id .pf-ava{width:150px;height:150px}
.rm-id .pf-ava .ava .portrait{inset:17px}
.rm-id .pf-swap{left:auto;right:4px;bottom:10px;transform:none;width:36px;height:36px;padding:7px}
.rm-id .lvl{position:absolute;left:6px;bottom:8px;z-index:3;width:34px;height:34px;box-sizing:border-box;border-radius:50%;border:2px solid #3a2208;background:radial-gradient(circle at 35% 30%,var(--gold-hi),var(--gold) 55%,var(--gold-deep));box-shadow:0 2px 6px rgba(0,0,0,.7);font:800 16px/30px var(--font-num);font-style:normal;color:#2a1606;text-align:center}
.rm-id .pf-name{max-width:224px}
.rm-id .pf-name b{font-size:25px}
.rm-id .pf-code{height:34px}
.rm-id .pf-code b{font-size:18px}
.rm-id .divider{width:80%;height:14px}
.rm-power{display:grid;justify-items:center;gap:2px}
.rm-power small{font:700 15px/1 var(--font-label);color:var(--gold);letter-spacing:.04em}
.rm-power b{display:flex;align-items:center;gap:8px;font:800 30px/1.1 var(--font-num);color:var(--gold-hi);text-shadow:var(--num)}
.rm-power .pw-ic,.rm-stat .pw-ic{width:30px;height:30px;object-fit:contain}
.rm-side{position:relative;display:grid;justify-items:center;align-content:start;gap:4px;min-width:0;min-height:0}
.rm-side .pf-title{font-size:28px;text-align:center}
.rm-side>.divider{width:60%;height:14px}
.rm-side .pf-emblem{width:160px;height:160px}
.rm-side .pf-emblem img{width:124px;height:124px}
.rm-side .pf-rate b{font-size:24px}
.rm-side .pf-ladder{margin-top:4px;gap:14px}
.rm-side .pf-ladder li{width:auto}
.rm-side .pf-ladder span{display:none}
.rm-side .pf-top{position:static;margin-top:10px;min-height:46px}
.pf-pick{grid-template-rows:auto auto 1fr auto;height:100%}
.pf-pick .pf-head{gap:12px}
.pf-pick .pf-title{font-size:25px;white-space:nowrap}
.pf-pick .pf-grid{position:relative;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px 8px 4px 2px}
.pf-pick .pf-cell .ava{width:92px;height:92px}
.pf-pick .pf-cell.cur::after{right:8px}
.pf-pick .pf-use{min-width:220px;min-height:54px;margin-top:4px}

/* --- the table in front: statistics on brass plaques --- */
.rm-table{position:absolute;left:220px;top:516px;width:580px;height:140px}
.rm-table::before{content:"";position:absolute;left:30px;right:30px;top:120px;height:84px;background:linear-gradient(90deg,#1a0a10,#3a1c20 15%,transparent 16% 84%,#3a1c20 85%,#1a0a10);pointer-events:none}
.rm-top{position:absolute;inset:0;box-sizing:border-box;padding:12px 14px;border-radius:12px;background:linear-gradient(rgba(255,200,140,.10),transparent 30%),linear-gradient(90deg,#2a1218,#4a2228 50%,#2a1218);
  border:2px solid var(--gold);box-shadow:inset 0 1px 0 var(--gold-hi),0 0 0 3px rgba(14,7,16,.8),0 14px 26px rgba(0,0,0,.75)}
.rm-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.rm-stat{display:grid;grid-template-columns:32px 1fr auto;align-items:center;gap:8px;height:50px;padding:0 12px 0 8px;background:rgba(14,7,16,.6);border:1px solid var(--gold-deep);border-radius:8px}
.rm-stat img{width:30px;height:30px;object-fit:contain}
.rm-stat span{font:700 15px/1.05 var(--font-label);color:var(--ink-2)}
.rm-stat b{font:800 19px var(--font-num);color:var(--gold-hi)}
/* A candle on the table's right end (CSS flame). */
.rm-candle{position:absolute;right:-10px;top:-58px;width:14px;height:58px;pointer-events:none;background:linear-gradient(90deg,#d8c8b0,#fff6e4 40%,#b8a48c);border-radius:3px 3px 0 0;box-shadow:0 0 0 2px var(--gold-deep)}
.rm-candle::after{content:"";position:absolute;left:-10px;right:-10px;bottom:-6px;height:8px;border-radius:50%;background:var(--gold);box-shadow:0 2px 4px #000}
.rm-candle i{position:absolute;left:50%;bottom:100%;width:12px;height:24px;margin-left:-6px;border-radius:50% 50% 50% 50%/62% 62% 38% 38%;background:radial-gradient(60% 50% at 50% 70%,#fff8e0,#ffd070 45%,rgba(255,120,30,.8) 75%,transparent);transform-origin:50% 100%;filter:drop-shadow(0 0 8px rgba(255,170,70,.9));animation:rmFlick .9s ease-in-out infinite alternate}
.rm-candle i::after{content:"";position:absolute;left:50%;top:50%;width:90px;height:90px;margin:-45px;border-radius:50%;background:radial-gradient(closest-side,rgba(255,180,90,.3),transparent);pointer-events:none}
@keyframes rmFlick{0%{transform:scale(1,1) skewX(0)}30%{transform:scale(.92,1.08) skewX(3deg)}60%{transform:scale(1.04,.94) skewX(-2deg)}100%{transform:scale(.96,1.05) skewX(1deg)}}

/* The balcony foreground keeps a narrow dark edge: its outer 8 px are transparent and the city showed
   through there as a thin light line along the screen's left edge. */
.fg-layer::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to left,#12030b 0,#12030b 10px,transparent 44px) right top/44px 100% no-repeat;
  -webkit-mask:url(art/city/foreground.webp) 0 0/100% 100% no-repeat,linear-gradient(to left,#000 24px,transparent 24px);
  mask:url(art/city/foreground.webp) 0 0/100% 100% no-repeat,linear-gradient(to left,#000 24px,transparent 24px)}
/* The companion inside the room, on the right in front of the trophy cabinet. */
.rm-hero{position:absolute;right:26px;bottom:0;width:440px;height:660px;cursor:pointer;-webkit-tap-highlight-color:transparent;
  /* Only the sides fade (Гарра's mantle runs to the picture's edge). The legs end at the bottom edge of the screen, as on the balcony: no fade there. */
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.rm-hero .portrait{position:absolute;inset:0;background:none}
.rm-hero .ph{width:100%;height:100%;object-fit:cover;object-position:50% 0}

