/* Тронный зал (js/screens/hall.js): сцена-холст, HUD поверх, окно зала, слава, «пока вас не было».
   Классы — с приставкой hl-; размеры — в пикселях сцены (лёжа 1280×720, стоя 720×1280). */

.screen.hall .viewport.hl-view { background: #16120e; cursor: pointer; }
.hl-canvas { position: absolute; left: 0; top: 0; display: block; }

/* верх: название, слава, ресурсы приёма (сколько зал проработает без лорда — в зале не пишем: аудит 07.11 zal-24) */
.hl-top { position: absolute; left: calc(14px + var(--sal)); top: calc(10px + var(--sat)); display: flex; align-items: center; gap: 10px; }
.hl-title { display: flex; flex-direction: column; padding: 6px 14px; background: var(--plate); border: 1px solid var(--bronze); border-radius: 8px; }
.hl-title b { font-family: var(--title); font-size: 22px; color: var(--w-accent, var(--bronze-l)); line-height: 1.1; }
/* слава (владелец 09.11: «97 / 90» — больше предела): число до порога и полоса от прошлого порога до следующего; порог
   достигнут — «90 / 90», полоса полная и светится, справа подарок «готово» (касание — окно славы); всё взято — max */
.pill.hl-glory { height: 44px; cursor: pointer; color: var(--text); font-size: 18px; gap: 6px; }
.pill.hl-glory b { color: var(--w-gold, #f0c040); }
.pill.hl-glory .hl-next { color: var(--muted); font-size: 14px; }
.hl-gv { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 64px; }
.hl-gn { display: flex; align-items: baseline; justify-content: center; gap: 3px; line-height: 1; white-space: nowrap; }
.hl-gbar { position: relative; display: block; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6); }
.hl-gbar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: linear-gradient(#ffe07a, #d8961c);
  transition: width 0.5s ease; }
.hl-gok { display: none; width: 30px; height: 30px; margin: -4px -4px -4px 0; align-items: center; justify-content: center; }
.hl-gok > img, .hl-gok > svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); }
.pill.hl-glory.ready { border-color: #f0c040; box-shadow: 0 0 0 2px rgba(240, 192, 64, 0.35), 0 0 14px rgba(240, 192, 64, 0.6); }
.pill.hl-glory.ready .hl-gok { display: flex; }
.pill.hl-glory.ready .hl-gbar > i, .pill.hl-glory.max .hl-gbar > i { background: linear-gradient(#fff2a8, #f0b830); box-shadow: 0 0 6px rgba(255, 220, 110, 0.9); }
.pill.hl-glory.ready .hl-next { color: var(--w-gold, #f0c040); }
.pill.hl-glory.max .hl-next { display: none; }
html:not(.kod-still) .pill.hl-glory.ready .hl-gok > * { animation: hlGok 1.8s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes hlGok { 0%, 55%, 100% { transform: rotate(0) scale(1); } 65% { transform: rotate(-10deg) scale(1.12); } 75% { transform: rotate(8deg) scale(1.12); } 85% { transform: rotate(0) scale(1); } }
/* шапка ресурсов — та же, что у замка (js/respills.js, css/kod.css .res, стоя — css/hud.css); лёжа — справа сверху. В зале
   серебро — его деньги: видно и стоя (в замке стоя серебро — в окне «Ресурсы») */
body:not(.vertical) .screen.hall .res { right: calc(14px + var(--sar)); top: calc(10px + var(--sat)); }
body.vertical .screen.hall .res .r.silver.xr { display: flex; }

/* очередь у Ворот и кассы */
.hl-queue {
  position: absolute; left: calc(14px + var(--sal)); bottom: calc(76px + var(--sab));
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--plate); border: 1px solid var(--w-line, var(--bronze-d)); border-radius: 8px; font-size: 15px;
}
.hl-queue .s { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 15px; }
.hl-queue > svg, .hl-queue > img { width: 26px; height: 26px; }
.hl-queue .s > svg, .hl-queue .s > img { width: 0.95em; height: 0.95em; }
/* «Собрать кассы» — стопка монет и «+N», без слов (владелец 09.11); стопка выступает над кнопкой */
.btn.hl-tills { position: absolute; right: calc(14px + var(--sar)); bottom: calc(80px + var(--sab)); gap: 4px; padding-left: 8px; }
.btn.hl-tills .ti { display: flex; height: 36px; align-items: flex-end; margin: -14px 0 -4px; }
.btn.hl-tills .ti > img, .btn.hl-tills .ti > svg { height: 46px; width: auto; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55)); }
.btn.hl-tills b { font-size: 1.15em; letter-spacing: 0.3px; }

/* «Выйти из замка» (круг 5, владелец: «ещё ниже, узкую и по ширине экрана»): полоса у самого низа во всю ширину, под
   ней — только системная полоса жестов (--sab); значок замка, надпись, стрелка; касание — светлеет и чуть сжимается */
.hl-exit {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; box-sizing: content-box; height: 60px;
  padding: 0 calc(18px + var(--sar)) var(--sab) calc(18px + var(--sal)); margin: 0; border: 0; border-top: 2px solid #b98b3d;
  display: flex; align-items: center; justify-content: center; gap: 14px; cursor: pointer;
  background: linear-gradient(180deg, rgba(74, 46, 22, 0.97) 0%, rgba(44, 26, 12, 0.98) 55%, rgba(26, 15, 7, 0.99) 100%);
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 226, 150, 0.35);
  color: #ffe8b0; font: 700 24px/1 var(--title); letter-spacing: 0.4px; text-shadow: 0 2px 2px rgba(0, 0, 0, 0.8);
  transition: filter 0.12s ease, transform 0.12s ease;
}
.hl-exit .ic { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; }
.hl-exit .ic > img, .hl-exit .ic > svg { width: 40px; height: 40px; }
.hl-exit .tx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hl-exit .ar { display: flex; opacity: 0.85; }
.hl-exit:active { filter: brightness(1.25); transform: scaleY(0.96); }
.hl-exit:focus { outline: none; }
.hl-exit:focus-visible { outline: 2px solid #ffe39a; outline-offset: -4px; }

/* «Дела зала» (круг 5): столбец медальонов слева — картинка дела, кольцо хода, «1/2»; готово — светится и подпрыгивает;
   взято — галочка, бледнее; внизу сундук за все дела (готов — качается и светится). Касание — js/screens/hall.js tapTask */
.hl-tasks {
  position: absolute; left: calc(12px + var(--sal)); top: calc(132px + var(--sat)); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 6px 10px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(20, 14, 10, 0.72), rgba(20, 14, 10, 0.5)); border: 1px solid rgba(185, 139, 61, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.hl-tk-head { font: 700 15px/1.1 var(--title); color: #ffd47a; text-shadow: 0 1px 2px #000; max-width: 92px; text-align: center; }
.hl-tk, .hl-chest {
  position: relative; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0;
  background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.hl-tk { width: 78px; height: 78px; border-radius: 50%; }
.hl-tk::before { /* медальон */
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #4d3a26 0, #2a1c10 70%, #1c120a 100%);
  box-shadow: inset 0 2px 4px rgba(255, 226, 150, 0.25), 0 3px 8px rgba(0, 0, 0, 0.55);
}
.hl-tk .rg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hl-tk .rg circle { fill: none; stroke: rgba(0, 0, 0, 0.55); stroke-width: 6; }
.hl-tk .rg circle.v { stroke: #ffc94a; stroke-linecap: round; transition: stroke-dasharray 0.5s ease; }
.hl-tk .pic { position: relative; display: flex; width: 46px; height: 46px; align-items: center; justify-content: center; }
.hl-tk .pic img, .hl-tk .pic svg { width: 46px; height: 46px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); }
.hl-tk .pl { position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #2f8a3a; border: 2px solid #b6f0a8; box-shadow: 0 1px 3px #000; }
.hl-tk .pl::after { content: ''; position: absolute; left: 7px; top: 4px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; }
.hl-tk .n {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); min-width: 34px; padding: 1px 7px; border-radius: 10px;
  background: #1b1209; border: 1.5px solid #b98b3d; color: #fff; font: 700 15px/18px var(--sans); text-align: center; white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
}
.hl-tk.ready .rg circle.v { stroke: #7fe08e; }
.hl-tk.ready::after { /* сияние готового */
  content: ''; position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 3px rgba(127, 224, 142, 0.85), 0 0 18px 4px rgba(127, 224, 142, 0.6);
}
.hl-tk.ready .n { background: #2f8a3a; border-color: #b6f0a8; }
.hl-tk.done { opacity: 0.55; }
.hl-tk.done .rg circle.v { stroke: #7fe08e; }
.hl-tk.done .n { background: #1b2a1b; border-color: #4f7a4a; padding: 1px 4px; }
.hl-chest { width: 84px; height: 84px; margin-top: 2px; }
.hl-chest img { width: 76px; height: 76px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.7)); }
.hl-chest b {
  position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); padding: 1px 8px; border-radius: 10px;
  background: #1b1209; border: 1.5px solid #b98b3d; color: #ffe8b0; font: 700 15px/18px var(--sans); display: flex; align-items: center;
}
.hl-chest.c1 img { filter: grayscale(0.35) brightness(0.85) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.7)); }
.hl-chest.c2::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 214, 110, 0.55) 0, rgba(255, 214, 110, 0) 70%);
}
.hl-chest.c3 { opacity: 0.6; }
html:not(.kod-still) .hl-tk.ready { animation: hlTkHop 1.6s ease-in-out infinite; }
html:not(.kod-still) .hl-chest.c2 img { animation: hlChest 1.2s ease-in-out infinite; transform-origin: 50% 85%; }
html:not(.kod-still) .hl-tk:active, html:not(.kod-still) .hl-chest:active { transform: scale(0.92); }
@keyframes hlTkHop { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-7px); } 80% { transform: translateY(0); } 88% { transform: translateY(-3px); } }
@keyframes hlChest { 0%, 100% { transform: rotate(0deg) scale(1); } 25% { transform: rotate(-6deg) scale(1.05); } 75% { transform: rotate(6deg) scale(1.05); } }
.hl-game img { flex: none; }

/* окно зала (аудит 07.11 zal-04, js/screens/hall.js openRoom): картинка зала во всю ширину (ремонт сменит вид — справа
   «после» со стрелкой), на ней уровень; крупные числа со значками; одна строка; плитки-картинки (касса, слуга, игра,
   летопись); большая кнопка ремонта с ценой значками. Описание и таблица — под «!» (roomRules: .hl-rules) */
.hl-pic { position: relative; display: flex; gap: 8px; height: 190px; margin: 0 0 12px; }
.hl-pic > .hl-pic-img { flex: 1 1 auto; min-width: 0; height: 100%; object-fit: cover; border-radius: 12px;
  box-shadow: 0 0 0 3px #b98b3d, 0 8px 18px rgba(0, 0, 0, 0.5); }
.hl-pic-ic { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, #6a4a2a, #1a120c); box-shadow: 0 0 0 3px #b98b3d; }
.hl-pic-next { position: relative; flex: 0 0 36%; display: flex; }
.hl-pic-next .hl-pic-img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 3px #5fcf72, 0 6px 14px rgba(0, 0, 0, 0.5); }
.hl-pic-next .ar { position: absolute; left: -26px; top: 50%; z-index: 1; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: #2f8a3a; border: 3px solid #b6f0a8; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6); }
.hl-pic-lv { position: absolute; left: 12px; bottom: 10px; display: flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 12px;
  background: rgba(20, 12, 6, 0.84); border: 2px solid #e5bd62; color: #ffe8b0; font: 700 24px/1.15 var(--title); text-shadow: 0 2px 2px #000; }
.hl-pic-lv.ruin { color: #ff9f7c; border-color: #a0563a; }
.hl-pic-lv.lock { color: #e2dcd0; border-color: #7a7468; }
.hl-nums { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 8px; }
.hl-num { display: flex; align-items: center; gap: 6px; padding: 6px 14px 6px 8px; border-radius: 16px;
  background: var(--w-well, rgba(16, 20, 28, 0.55)); border: 1px solid var(--w-line, var(--bronze-d));
  font: 700 22px/1 var(--sans); color: var(--w-hi, var(--text)); }
.hl-num > img, .hl-num > svg { width: 40px; height: 40px; flex: none; }
.hl-num .ar { display: flex; }
.hl-num .up { color: var(--good, #7fd08e); }
.hl-line { margin: 0 0 10px; text-align: center; color: var(--w-muted, var(--muted)); font-size: 15px; }
.hl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 12px; }
.hl-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; padding: 10px 8px;
  border-radius: 14px; border: 2px solid var(--w-line, var(--bronze-d)); background: var(--w-well, rgba(16, 20, 28, 0.45)); }
.hl-tile .tp { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 96px; }
.hl-tile .tp > img { max-width: 100%; max-height: 96px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45)); }
.hl-tile.game .tp > img, .hl-tile.chr .tp > img { border-radius: 50%; box-shadow: 0 0 0 3px #b98b3d; filter: none; object-fit: cover; }
.hl-tile .tn { max-width: 100%; text-align: center; font: 700 17px/1.15 var(--sans); color: var(--w-hi, var(--text)); overflow-wrap: anywhere; }
.hl-tile .btn { width: 100%; min-width: 0; gap: 4px; }
.hl-tile .ok { display: flex; height: 40px; align-items: center; }
.hl-tile.sv.on { border-color: #4f7a4a; background: rgba(79, 122, 74, 0.18); }
.hl-tile .dots { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); display: flex; gap: 4px; }
.hl-tile .dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); border: 1.5px solid #2a1808; }
.hl-tile .dots i.on { background: #ffd47a; }
.btn.hl-upbtn { display: flex; width: 100%; min-height: 84px; }
.btn.hl-upbtn .sub.hl-price { flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.hl-price .c img, .hl-price .c svg { width: 32px; height: 32px; }
.hl-price .c.short { color: #ffb4a8; }
.hl-why { margin: 8px 0 0; text-align: center; color: var(--w-muted, var(--muted)); font-size: 15px; }
.hl-rules .hl-stats div { grid-template-columns: 1fr auto 22px auto; }
.hl-rl { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 15px; line-height: 1.35; }
.hl-rl > svg, .hl-rl > img { flex: none; width: 30px; height: 30px; }

/* слава замка (zal-03): звезда и число крупно, полоса до следующего порога, «Забрать все (N)»; достигнутые — золотые */
.hl-gl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: 0 0 12px; }
.hl-gl-head > svg, .hl-gl-head > img { width: 56px; height: 56px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45)); }
.hl-gl-n { font: 700 40px/1 var(--sans); color: var(--w-gold, #f0c040); text-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); }
.hl-gl-bar { position: relative; flex: 1 1 100%; height: 30px; border-radius: 15px; overflow: hidden; background: rgba(0, 0, 0, 0.45);
  border: 2px solid #8a6a2a; }
.hl-gl-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 13px; background: linear-gradient(#ffe07a, #e0a020); }
.hl-gl-bar > span { position: relative; display: flex; height: 100%; align-items: center; justify-content: center; font: 700 17px/1 var(--sans);
  color: #fff; text-shadow: 0 1px 2px #000; }
.btn.hl-gl-all { flex: 1 1 100%; gap: 8px; font-size: 24px; }
.btn.hl-gl-all > img, .btn.hl-gl-all > svg { width: 36px; height: 36px; }
.btn.hl-gl-take { min-width: 64px; }
.btn.hl-gl-take > img, .btn.hl-gl-take > svg { width: 32px; height: 32px; }
.hl-gl-row .st { display: flex; align-items: center; }
.hl-gl-row b { display: flex; align-items: center; gap: 4px; }
.hl-gl-row b > svg, .hl-gl-row b > img { width: 24px; height: 24px; }

/* плавающий джойстик (как у образца): появляется под пальцем в любом месте сцены, отпустил — гаснет. Центр кольца —
   transform у .hl-joy из hall.js, размеры — JOY там же (r 80, ход ручки 62). Тёмное прозрачное кольцо со светлым
   ободом и стрелками (светятся по ходу), ручка — светлое «стекло» */
.hud > .hl-joy { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 5; pointer-events: none; }
.hl-joy-base {
  position: absolute; left: -80px; top: -80px; width: 160px; height: 160px; box-sizing: border-box; border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 10, 14, 0.14) 0, rgba(8, 10, 14, 0.3) 60%, rgba(8, 10, 14, 0.44) 97%);
  border: 2px solid rgba(255, 246, 226, 0.36); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), inset 0 0 26px rgba(255, 240, 210, 0.08);
  opacity: 0; transform: scale(0.82); transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.hl-joy.on .hl-joy-base, .hl-joy.demo .hl-joy-base { opacity: 1; transform: scale(1); }
.hl-joy-ar { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hl-joy-ar path { fill: #fff3d6; opacity: 0.3; transition: opacity 0.12s linear; }
.hl-joy-knob {
  position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; box-sizing: border-box; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.88) 0, rgba(255, 255, 255, 0.44) 32%, rgba(226, 232, 240, 0.26) 66%, rgba(255, 255, 255, 0.16) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.62); box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4), inset 0 -5px 10px rgba(0, 0, 0, 0.12);
  will-change: transform;
}
.hl-joy-knob.back { transition: transform 0.22s cubic-bezier(0.3, 1.6, 0.5, 1); }
/* подсказка при первых заходах: ручка сама ходит по кругу, под кольцом — «Ведите пальцем…» */
.hl-joy.demo .hl-joy-base { animation: hlJoyPulse 2.4s ease-in-out infinite; }
.hl-joy.demo .hl-joy-knob { animation: hlJoyDemo 2.4s linear infinite; }
.hl-joy-tip {
  position: absolute; left: 0; top: 98px; transform: translateX(-50%); padding: 6px 14px; border-radius: 8px; white-space: nowrap;
  background: rgba(16, 20, 28, 0.86); border: 1px solid var(--w-line, var(--bronze-d)); color: var(--w-accent, var(--bronze-l)); font-size: 16px;
  opacity: 0; transition: opacity 0.3s;
}
.hl-joy.demo .hl-joy-tip { opacity: 1; }
@keyframes hlJoyDemo {
  from { transform: rotate(0deg) translateY(-44px) rotate(0deg); }
  to { transform: rotate(360deg) translateY(-44px) rotate(-360deg); }
}
@keyframes hlJoyPulse { 50% { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 0 22px rgba(255, 226, 160, 0.35), inset 0 0 26px rgba(255, 240, 210, 0.12); } }

/* подсказка над сценой */
.hl-hint {
  position: absolute; left: 50%; top: calc(80px + var(--sat)); transform: translateX(-50%); max-width: 80%; padding: 8px 16px; border-radius: 8px;
  background: rgba(16, 20, 28, 0.88); border: 1px solid var(--bronze); color: var(--gold); font-size: 16px; text-align: center;
  opacity: 0; transition: opacity 0.25s; pointer-events: none;
}
.hl-hint.on { opacity: 1; }

/* окно зала */
.hl-modal .hl-des { margin: 0 0 10px; color: var(--w-hi, #e2d6bd); font-size: 15px; line-height: 1.45; font-style: italic; }
.hl-lv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; font-family: var(--title); font-size: 22px; color: var(--w-accent, var(--bronze-l)); }
.hl-lv .ruin { color: var(--bad); }
.hl-lv .s { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.hl-stats { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; margin-bottom: 10px; background: var(--w-well, rgba(16, 20, 28, 0.55)); border-radius: 8px; }
.hl-stats div { display: grid; grid-template-columns: 1fr auto 20px auto; align-items: center; gap: 8px; font-size: 15px; }
.hl-stats .up { color: var(--good); }
.hl-till, .hl-sv { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 10px; border: 1px solid var(--w-line, var(--bronze-d)); border-radius: 8px; background: var(--w-well, rgba(16, 20, 28, 0.45)); font-size: 14px; }
.hl-till span, .hl-sv span { flex: 1; min-width: 0; line-height: 1.35; }
.hl-sv.on { border-color: #4f7a4a; }
.hl-cost { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.hl-cost .c { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; background: var(--w-well, rgba(16, 20, 28, 0.55)); }
.hl-cost .c.lack b { color: var(--bad); }
.hl-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.hl-foot .why { flex: 1; color: var(--muted); font-size: 14px; }
/* цена ремонта на синей кнопке (hall.js openRoom, §2.3): значок и число вплотную, ресурсы — через промежуток */
.btn.two .sub.hl-price { gap: 12px; }
.hl-price .c { display: inline-flex; align-items: center; gap: 3px; }

/* слава замка */
.hl-gl-now { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 12px; font-size: 30px; font-weight: 700; color: var(--w-gold, #f0c040); }
.hl-gl { display: flex; flex-direction: column; gap: 6px; }
.hl-gl-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--w-well, rgba(16, 20, 28, 0.5)); border: 1px solid var(--w-line, #3a4658); font-size: 14px; }
.hl-gl-row b { font-size: 17px; color: var(--w-gold, #f0c040); }
.hl-gl-row.done { opacity: 0.6; }
.hl-gl-row.ready { border-color: #f0c040; background: rgba(240, 192, 64, 0.12); }
.hl-gl-row .s { color: var(--muted); font-size: 13px; }

/* пока вас не было */
.hl-away { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.hl-away p { margin: 0; font-size: 16px; }
.hl-away .s { color: var(--muted); font-size: 14px; }
/* «Пока вас не было» картинками (владелец 09.11): слуга → полная касса, «+N» серебра крупно, часы и «8 ч», кнопка — монеты
   и «+N»; слова — под «!» */
.hl-aw { gap: 10px; padding: 4px 0 2px; }
.hl-aw-pic { display: flex; align-items: flex-end; justify-content: center; gap: 10px; min-height: 112px; }
.hl-aw-pic .who > img, .hl-aw-pic .who > svg { display: block; height: 108px; width: auto; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.55)); }
.hl-aw-pic .till > img, .hl-aw-pic .till > svg { display: block; height: 112px; width: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6)); }
.hl-aw-pic .ar { display: flex; align-self: center; opacity: 0.9; }
.hl-aw-n { display: flex; align-items: center; gap: 8px; font: 700 40px/1 var(--sans); color: var(--w-hi, #eef4fa); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3); }
.hl-aw-n > img, .hl-aw-n > svg { width: 44px; height: 44px; }
.hl-aw-h { display: flex; align-items: center; gap: 6px; color: var(--w-hi, #e2d6bd); }
.hl-aw-h b { font-size: 20px; }
.btn.hl-aw-take { min-width: 180px; gap: 8px; font-size: 24px; }
.btn.hl-aw-take > img, .btn.hl-aw-take > svg { width: 34px; height: 34px; }
body.vertical .hl-aw-pic { min-height: 150px; }
body.vertical .hl-aw-pic .who > img, body.vertical .hl-aw-pic .who > svg { height: 146px; }
body.vertical .hl-aw-pic .till > img, body.vertical .hl-aw-pic .till > svg { height: 150px; }
body.vertical .hl-aw-n { font-size: 56px; }
body.vertical .hl-aw-n > img, body.vertical .hl-aw-n > svg { width: 58px; height: 58px; }
body.vertical .hl-aw-h b { font-size: var(--fs-num); }
body.vertical .btn.hl-aw-take { min-height: 88px; min-width: 300px; font-size: var(--fs-num); }
body.vertical .btn.hl-aw-take > img, body.vertical .btn.hl-aw-take > svg { width: 44px; height: 44px; }
html:not(.kod-still) .hl-aw-pic .till { animation: hlAwTill 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) 0.15s both; }
@keyframes hlAwTill { from { transform: translateY(18px) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* стоя: ресурсы полосой сверху (как в замке), название и слава под ней; дела зала — столбцом слева; очередь и кассы —
   над полосой «Выйти из замка» */
body.vertical .hl-top { flex-direction: column; align-items: flex-start; top: calc(64px + var(--sat)); }
/* очередь у Ворот — короткой плашкой значками посередине над «Выйти из замка» (zal-09: «👤 1/9 · ⏱ 03:32») */
body.vertical .hl-queue { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(88px + var(--sab)); justify-content: center; gap: 10px; padding: 6px 18px; border-radius: 26px; }
body.vertical .btn.hl-tills { right: calc(10px + var(--sar)); bottom: calc(150px + var(--sab)); }
body.vertical .hl-hint { top: calc(200px + var(--sat)); max-width: 88%; padding: 10px 18px; font-size: var(--fs-sub); }
body.vertical .hl-joy-tip { font-size: var(--fs-sub); padding: 8px 16px; }
body.vertical .hl-title b { font-size: 26px; }
/* стоя дела зала — рядом справа от названия (столбец слева закрыл бы таблички над дверями галереи — она во всю ширину) */
body.vertical .hl-tasks { top: calc(62px + var(--sat)); left: auto; right: calc(6px + var(--sar)); flex-direction: row; align-items: flex-start; gap: 6px; padding: 6px 6px 12px; }
body.vertical .hl-tk-head { display: none; }
body.vertical .hl-tk { width: 80px; height: 80px; }
body.vertical .hl-tk .pic, body.vertical .hl-tk .pic img, body.vertical .hl-tk .pic svg { width: 48px; height: 48px; }
body.vertical .hl-tk .n, body.vertical .hl-chest b { font-size: var(--fs-min); line-height: 26px; padding: 0 8px; } /* zal-09: было 18 — 10 px экрана */
body.vertical .hl-chest { width: 84px; height: 80px; margin-top: 0; }
body.vertical .hl-chest img { width: 78px; height: 78px; }
body.vertical .hl-exit { height: 76px; font-size: 32px; }
body.vertical .hl-exit .ic, body.vertical .hl-exit .ic > img, body.vertical .hl-exit .ic > svg { width: 50px; height: 50px; }
/* стоя не мельче --fs-min (22 сцены, 12,6 px экрана; аудит 07.11 zal-09): «/ 10» у славы, очередь у Ворот — крупно */
body.vertical .pill.hl-glory { height: 56px; font-size: var(--fs-num); }
body.vertical .pill.hl-glory .hl-next { font-size: var(--fs-sub); }
body.vertical .hl-queue { font-size: var(--fs-num); }
body.vertical .hl-queue .s { display: flex; align-items: center; gap: 4px; font-size: var(--fs-body); color: var(--w-hi, var(--text)); }
body.vertical .hl-queue > svg, body.vertical .hl-queue > img { width: 34px; height: 34px; }
/* окна зала, славы и «Пока вас не было» стоя: текст 24, пояснения не мельче 22 */
body.vertical .hl-modal .hl-des, body.vertical .hl-stats div, body.vertical .hl-till, body.vertical .hl-sv, body.vertical .hl-foot .why,
body.vertical .hl-gl-row, body.vertical .hl-away p, body.vertical .hl-rl { font-size: var(--fs-sub); }
body.vertical .hl-lv .s, body.vertical .hl-gl-row .s, body.vertical .hl-away .s, body.vertical .hl-line, body.vertical .hl-why { font-size: var(--fs-min); }
body.vertical .hl-gl-row b { font-size: var(--fs-list); }
/* окно зала стоя: картинка выше, числа и подписи плиток крупно, кнопка ремонта во всю ширину */
body.vertical .hl-pic { height: 300px; }
body.vertical .hl-pic-lv { font-size: 32px; padding: 6px 18px; }
body.vertical .hl-num { font-size: var(--fs-num); padding: 8px 16px 8px 10px; }
body.vertical .hl-num > img, body.vertical .hl-num > svg { width: 48px; height: 48px; }
body.vertical .hl-tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
body.vertical .hl-tile .tp { height: 128px; }
body.vertical .hl-tile .tp > img { max-height: 128px; }
body.vertical .hl-tile .tn { font-size: var(--fs-sub); }
body.vertical .btn.hl-upbtn { min-height: 110px; font-size: var(--fs-btn); }
body.vertical .btn.hl-upbtn .sub.hl-price { font-size: var(--fs-num); }
body.vertical .hl-price .c img, body.vertical .hl-price .c svg { width: 44px; height: 44px; }
/* слава стоя: число крупно, полоса выше */
body.vertical .hl-gl-n { font-size: 56px; }
body.vertical .hl-gl-bar { height: 40px; border-radius: 20px; }
body.vertical .hl-gl-bar > span { font-size: var(--fs-sub); }
body.vertical .hl-gl-row { grid-template-columns: 110px 1fr auto; }
body.vertical .hl-gl-row b > svg, body.vertical .hl-gl-row b > img { width: 32px; height: 32px; }

/* лёжа на телефоне (body.phone-land, js/ui.js fitStage: сцена мельче 3/4): подписи HUD и окон зала были прибиты в px —
   12–15 (7–9 css px), кнопка славы — 44. Как стоя: срок работы, «/ 10», очередь у Ворот и пояснения не мельче 16, текст
   окон 17, пороги славы 20, слава — кнопка 52; на планшете и ПК лёжа и стоя — как было */
body.phone-land .pill.hl-glory .hl-next { font-size: var(--fs-min); }
body.phone-land .hl-queue { font-size: var(--fs-num); gap: 10px; }
body.phone-land .hl-queue .s { display: flex; align-items: center; gap: 4px; font-size: var(--fs-body); color: var(--w-hi, var(--text)); }
body.phone-land .hl-hint, body.phone-land .hl-joy-tip { font-size: var(--fs-sub); }
body.phone-land .hl-pic { height: 230px; }
body.phone-land .hl-num { font-size: var(--fs-num); }
body.phone-land .hl-tile .tn, body.phone-land .hl-rl { font-size: var(--fs-sub); }
body.phone-land .hl-line, body.phone-land .hl-why { font-size: var(--fs-min); }
body.phone-land .btn.hl-upbtn .sub.hl-price { font-size: var(--fs-num); }
body.phone-land .hl-price .c img, body.phone-land .hl-price .c svg { width: 40px; height: 40px; }
body.phone-land .hl-gl-n { font-size: 48px; }
body.phone-land .hl-gl-bar > span { font-size: var(--fs-sub); }
body.phone-land .hl-exit { height: 64px; font-size: 28px; }
body.phone-land .hl-tasks { top: calc(118px + var(--sat)); gap: 8px; }
body.phone-land .hl-tk .n, body.phone-land .hl-chest b { font-size: 18px; line-height: 22px; }
body.phone-land .hl-tk-head { font-size: 18px; }
body.phone-land .pill.hl-glory { height: var(--h-btn-s); font-size: 20px; }
body.phone-land .hl-modal .hl-des, body.phone-land .hl-stats div, body.phone-land .hl-till, body.phone-land .hl-sv, body.phone-land .hl-foot .why,
body.phone-land .hl-gl-row, body.phone-land .hl-away .s { font-size: var(--fs-sub); }
body.phone-land .hl-lv .s, body.phone-land .hl-gl-row .s { font-size: var(--fs-min); }
body.phone-land .hl-gl-row b { font-size: var(--fs-list); }
/* окно славы шире (900): награды порогов — ячейки 80 (число и ярлык от --ic, css/itemcell.css: при 80 ярлык 16) в ряд */
body.phone-land .modal.hl-glory-win { width: 900px; }
body.phone-land .hl-gl-row { grid-template-columns: 64px 1fr auto; }
body.phone-land .hl-gl-row .ic-cell { --ic: 80px; }
body.phone-land .hl-away p { font-size: var(--fs-body); }
body.phone-land .hl-modal .btn.two .sub { font-size: var(--fs-btn-s); }

/* ——— игры залов (js/hallgames.js, круг 5): окно — фон зала размыто, правила, звёзды наград, партия, итог ——— */
.modal.hg-modal { width: 780px; max-width: calc(100% - 24px); }
.hg-modal .modal-body { padding: 0; }
.hg { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 520px; padding: 14px 12px 18px; overflow: hidden; }
.hg-bg { position: absolute; inset: -12px; background-size: cover; background-position: center; filter: blur(3px) brightness(0.42) saturate(1.15); z-index: 0; }
.hg > :not(.hg-bg) { position: relative; z-index: 1; }
.hg.hg-wait { pointer-events: none; filter: brightness(0.85); }
.hg-svg { display: block; overflow: visible; }
/* правила и награды */
.hg-hero { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 8px; }
.hg-host { width: 110px; height: 110px; border-radius: 50%; border: 3px solid #b98b3d; background: #2a1c10; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7); object-fit: cover; }
.hg-big { display: flex; width: 150px; height: 150px; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 120, 0.5) 0, rgba(255, 214, 120, 0) 70%); }
.hg-big img, .hg-big svg { width: 120px; height: 120px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7)); }
.hg-rules { max-width: 600px; margin: 0; text-align: center; font-size: 19px; line-height: 1.4; color: #f2e6cc; text-shadow: 0 1px 2px #000; }
.hg-rew { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hg-rw { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 120px; padding: 8px 14px; border-radius: 12px; background: rgba(20, 14, 10, 0.75); border: 1px solid rgba(185, 139, 61, 0.65); }
.hg-rw b { display: flex; align-items: center; gap: 5px; font: 700 21px/1 var(--sans); color: #fff; }
.hg-sm { display: flex; gap: 3px; }
.hg-sm i { width: 20px; height: 20px; background: #4a4a52; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.hg-sm i.on { background: #ffd23a; }
.hg-acts { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hg-left { color: #ffe8b0; font-size: 18px; text-shadow: 0 1px 2px #000; }
.hg-go { min-width: 220px; font-size: 24px; }
.hg-note { margin: 0; color: #c9bfae; font-size: 15px; text-shadow: 0 1px 2px #000; }
/* строка сверху партии: счёт, раунд */
.hg-top { align-self: stretch; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 4px; }
.hg-top > span { display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 16px; background: rgba(16, 12, 8, 0.78); border: 1px solid rgba(185, 139, 61, 0.65); color: #fff; font: 700 20px/1.2 var(--sans); }
.hg-top > span:empty { visibility: hidden; }
.hg-stage { position: relative; width: 100%; height: 320px; }
/* Трапезная: голодный у стола, над ним — блюдо и терпение; блюда — тарелками на столе */
.hg-line { position: absolute; right: 8px; bottom: 4px; display: flex; gap: 6px; }
.hg-next .hg-fig { width: 72px; height: 90px; filter: brightness(0.6) saturate(0.8); }
.hg-guest { position: absolute; left: 50%; bottom: 0; width: 0; height: 100%; }
.hg-g { position: absolute; left: -95px; bottom: 0; width: 190px; display: flex; flex-direction: column; align-items: center; transition: transform 0.4s ease-in, opacity 0.35s; }
.hg-g .hg-fig { width: 128px; height: 160px; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.6)); }
.hg-fig0 { display: flex; align-items: flex-end; justify-content: center; }
.hg-want { position: relative; display: flex; flex-direction: column; align-items: center; padding: 10px 14px 12px; margin-bottom: 14px; border-radius: 46px; background: #fffaf0; border: 4px solid #a07c3c; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); transition: border-color 0.2s, filter 0.2s; }
.hg-want::after { content: ''; position: absolute; left: 50%; bottom: -16px; margin-left: -10px; border: 10px solid transparent; border-top: 12px solid #a07c3c; }
.hg-want img, .hg-want svg { width: 84px; height: 84px; }
.hg-pat { width: 84px; height: 10px; margin-top: 6px; border-radius: 5px; background: rgba(0, 0, 0, 0.22); overflow: hidden; }
.hg-pat i { display: block; width: 100%; height: 100%; background: #46b04f; transform-origin: left center; }
.hg-pat i.low { background: #e0584a; }
.hg-g.ok .hg-want { border-color: #46b04f; }
.hg-g.no .hg-want, .hg-g.late .hg-want { border-color: #e0584a; filter: grayscale(0.7); }
.hg-g.no .hg-fig, .hg-g.late .hg-fig { filter: grayscale(0.7) brightness(0.75); }
.hg-g.out { transform: translateX(-300px); opacity: 0; }
.hg-table { display: flex; gap: 12px; justify-content: center; padding: 14px 16px; border-radius: 18px; background: linear-gradient(#7a5028, #4a2c12); border: 3px solid #2a1808; box-shadow: inset 0 2px 0 rgba(255, 220, 160, 0.3), 0 6px 14px rgba(0, 0, 0, 0.5); }
.hg-dish { display: flex; width: 132px; height: 132px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: radial-gradient(circle at 50% 40%, #fffaf0 0, #ded0b2 66%, #a89878 100%); box-shadow: 0 5px 0 #6a5030, 0 9px 14px rgba(0, 0, 0, 0.45); -webkit-tap-highlight-color: transparent; }
.hg-dish img, .hg-dish svg { width: 96px; height: 96px; pointer-events: none; }
.hg-dish:active { transform: translateY(4px) scale(0.96); box-shadow: 0 1px 0 #6a5030, 0 3px 6px rgba(0, 0, 0, 0.45); }
/* Лазарет: лекарь и котёл, банки трав */
.hg-brew .hg-stage { display: flex; align-items: flex-end; justify-content: center; }
.hg-healer, .hg-smith { position: absolute; left: 8px; top: 0; display: flex; align-items: center; gap: 10px; }
.hg-healer .hg-host, .hg-smith .hg-host { width: 96px; height: 96px; }
.hg-say { padding: 8px 14px; border-radius: 16px; background: #fffaf0; border: 3px solid #a07c3c; color: #3a2a14; font: 700 21px/1.1 var(--sans); white-space: nowrap; }
.hg-say:empty { display: none; }
.hg-pot { position: relative; }
.hg-pot::after { content: ''; position: absolute; inset: -20px; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(140, 255, 150, 0.55) 0, rgba(140, 255, 150, 0) 70%); transition: opacity 0.25s; }
.hg-pot.good::after { opacity: 1; }
.hg-puff { position: absolute; left: 50%; top: -10px; width: 170px; height: 170px; margin-left: -85px; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(36, 36, 40, 0.95) 0, rgba(36, 36, 40, 0) 70%); }
.hg-pot.smoke .hg-puff { opacity: 0.95; transform: translateY(-30px) scale(1.2); transition: transform 1s ease-out, opacity 0.3s; }
.hg-jars { display: flex; gap: 14px; justify-content: center; }
.hg-jar { display: flex; width: 126px; height: 156px; align-items: center; justify-content: center; padding: 0; cursor: pointer; border-radius: 18px; border: 2px solid rgba(185, 139, 61, 0.6); background: rgba(20, 14, 10, 0.6); transition: transform 0.12s ease-out, box-shadow 0.12s, background 0.12s; -webkit-tap-highlight-color: transparent; }
.hg-jar img, .hg-jar svg { pointer-events: none; }
.hg-jar:disabled { cursor: default; }
.hg-jar.lit { transform: scale(1.12); background: rgba(255, 240, 200, 0.28); box-shadow: 0 0 0 4px #ffe39a, 0 0 28px 8px rgba(255, 227, 154, 0.8); }
/* Кузня: наковальня, клинок, молот; полоса жара с зелёной зоной и золотой серединой, бегущая метка */
.hg-forge .hg-stage { display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.hg-anvil { position: relative; width: 320px; height: 290px; display: flex; align-items: flex-end; justify-content: center; }
.hg-anvil-img { width: 190px; height: 190px; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.6)); }
.hg-sword { position: absolute; left: 10px; bottom: 150px; width: 300px; filter: brightness(0.75); transition: filter 0.4s; }
.hg-hammer { position: absolute; right: -24px; bottom: 166px; transform-origin: 70% 92%; transform: rotate(38deg); }
.hg-word { position: absolute; left: 50%; top: 0; opacity: 0; transform: translate(-50%, 12px) scale(0.6); font: 700 36px/1 var(--title); white-space: nowrap; text-shadow: 0 3px 4px #000; }
.hg-word.on { opacity: 1; transform: translate(-50%, 0) scale(1); transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.15s; }
.hg-word.q2 { color: #ffd23a; }
.hg-word.q1 { color: #b6f0a8; }
.hg-word.q0 { color: #c9bfae; }
.hg-gauge { width: 92%; }
.hg-track { position: relative; height: 38px; border-radius: 19px; background: linear-gradient(90deg, #2e0a04, #8a2a0a 50%, #2e0a04); border: 3px solid #1a0a04; box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6); }
.hg-zone { position: absolute; top: 0; bottom: 0; background: rgba(90, 220, 110, 0.8); }
.hg-core { position: absolute; top: 0; bottom: 0; background: rgba(255, 220, 80, 0.95); box-shadow: 0 0 12px #ffd23a; }
.hg-mark { position: absolute; left: -4px; top: -8px; bottom: -8px; width: 8px; border-radius: 4px; background: #fff; box-shadow: 0 0 12px #fff, 0 0 3px #000; will-change: transform; }
.hg-hits { display: flex; gap: 6px; }
.hg-hits i { width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); border: 2px solid rgba(255, 255, 255, 0.35); }
.hg-hits i.q2 { background: #ffd23a; }
.hg-hits i.q1 { background: #7fe08e; }
.hg-hits i.q0 { background: #7a7a7a; }
.hg-strike { min-width: 280px; font-size: 28px; gap: 10px; }
/* итог: лента, звёзды, счёт, награда */
.hg-result { justify-content: center; gap: 18px; }
.hg-ribbon { position: relative; min-width: 340px; padding: 14px 54px; text-align: center; background: linear-gradient(#d0463c, #8e1e1a); clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%); }
.hg-ribbon b { font: 700 34px/1 var(--title); color: #ffe8b0; text-shadow: 0 2px 2px #3a0808; }
.hg-result.t0 .hg-ribbon { background: linear-gradient(#6f7b88, #3e4652); }
/* лента итога нарисованная (js/hallgames.js ribbonHtml, аудит 07.11 zal-21): ui.ribbon_victory | draw 3-slice, как у боя */
.hg-ribbon.art, .hg-result.t0 .hg-ribbon.art { --rib-h: 92px; --rib-end: var(--rib-h); display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; height: var(--rib-h); min-width: min(460px, 100%); max-width: 100%; padding: 0 0 calc(var(--rib-h) * 0.1);
  background: none; clip-path: none; border-style: solid; border-color: transparent; border-width: 0 var(--rib-h);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.hg-ribbon.art b { font: 700 40px/1 var(--title); letter-spacing: 1px; color: #fff; white-space: nowrap;
  text-shadow: 0 3px 0 rgba(60, 10, 6, 0.75), 0 0 8px rgba(0, 0, 0, 0.6); }
.hg-result.t0 .hg-ribbon.art b { color: #eef2f7; text-shadow: 0 3px 0 rgba(20, 28, 40, 0.8), 0 0 8px rgba(0, 0, 0, 0.6); }
html:not(.kod-still) .hg-ribbon { animation: hgUnfurl 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.18) both; }
@keyframes hgUnfurl { from { transform: scaleX(0.15); opacity: 0; } 60% { opacity: 1; } to { transform: scaleX(1); opacity: 1; } }
.hg-stars { display: flex; gap: 10px; align-items: flex-end; }
.hg-star img, .hg-star svg { width: 76px; height: 76px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6)); }
.hg-star:nth-child(2) img, .hg-star:nth-child(2) svg { width: 92px; height: 92px; }
.hg-star:not(.on) img { filter: grayscale(1) brightness(0.42) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6)); }
.hg-score { margin: 0; font-size: 22px; color: #fff; text-shadow: 0 1px 2px #000; text-align: center; }
.hg-prize { display: flex; align-items: center; gap: 10px; padding: 8px 24px; border-radius: 26px; background: rgba(20, 14, 10, 0.78); border: 2px solid #b98b3d; }
.hg-prize b { font: 700 34px/1 var(--sans); color: #fff; }
html:not(.kod-still) .hg-big { animation: hgFloat 2.4s ease-in-out infinite; }
html:not(.kod-still) .hg-g { animation: hgIn 0.45s cubic-bezier(0.3, 1.25, 0.5, 1) both; }
html:not(.kod-still) .hg-g.ok .hg-fig { animation: hgHop 0.45s ease-out; }
html:not(.kod-still) .hg-dish.bad { animation: hgShake 0.4s; }
html:not(.kod-still) .hg-pot.drop .hg-svg { animation: hgSplash 0.35s ease-out; }
html:not(.kod-still) .hg-bub { animation: hgBub 1.6s ease-in infinite; }
html:not(.kod-still) .hg-bub.b2 { animation-delay: 0.5s; }
html:not(.kod-still) .hg-bub.b3 { animation-delay: 1s; }
html:not(.kod-still) .hg-hammer.hit { animation: hgHit 0.32s ease-in; }
html:not(.kod-still) .hg-star { animation: hgStar 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: calc(var(--i) * 0.18s + 0.1s); }
@keyframes hgFloat { 50% { transform: translateY(-8px); } }
@keyframes hgIn { from { transform: translateX(260px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes hgHop { 40% { transform: translateY(-18px) scale(1.05); } }
@keyframes hgShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes hgSplash { 40% { transform: scale(1.06, 0.94); } }
@keyframes hgBub { from { transform: translateY(0); opacity: 0.9; } to { transform: translateY(-26px); opacity: 0; } }
@keyframes hgHit { 0% { transform: rotate(38deg); } 55% { transform: rotate(-24deg); } 100% { transform: rotate(38deg); } }
@keyframes hgStar { from { transform: scale(0.2) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
/* стоя: окно во всю ширину, блюда и банки — по два в ряд, если не влезают. Правила (аудит 07.11 zal-07: портрет 63 px,
   пустой низ 45 %) — портрет хозяина и картинка игры крупно, награды крупнее, «Играть» — внизу, под большим пальцем;
   в партии фигура посетителя в 1,4 раза больше */
body.vertical .modal.hg-modal { width: calc(100% - 16px); }
body.vertical .hg { min-height: 760px; }
body.vertical .hg-stage { height: 400px; }
body.vertical .hg-rules { font-size: var(--fs-sub); }
body.vertical .hg-hero { gap: 26px; margin-top: 4px; }
body.vertical .hg-hero .hg-host { width: 220px; height: 220px; border-width: 4px; }
body.vertical .hg-big { width: 200px; height: 200px; }
body.vertical .hg-big img, body.vertical .hg-big svg { width: 160px; height: 160px; }
body.vertical .hg-rew { gap: 14px; }
body.vertical .hg-rw { min-width: 168px; padding: 12px 14px; gap: 8px; }
body.vertical .hg-rw b { font-size: var(--fs-num); gap: 8px; }
body.vertical .hg-rw b > svg, body.vertical .hg-rw b > img { width: 34px; height: 34px; }
body.vertical .hg-sm { gap: 4px; }
body.vertical .hg-sm i { width: 32px; height: 32px; }
body.vertical .hg-intro .hg-acts { margin-top: auto; flex-direction: column; gap: 10px; }
body.vertical .hg-go { min-width: 420px; min-height: 100px; font-size: 34px; }
body.vertical .hg-left, body.vertical .hg-note { font-size: var(--fs-min); }
body.vertical .hg-g { left: -120px; width: 240px; }
body.vertical .hg-g .hg-fig { width: 180px; height: 225px; }
body.vertical .hg-want img, body.vertical .hg-want svg { width: 104px; height: 104px; }
body.vertical .hg-pat { width: 104px; height: 12px; }
body.vertical .hg-next .hg-fig { width: 92px; height: 115px; }
body.vertical .hg-merchant .hg-fig { width: 180px; height: 225px; }
body.vertical .hg-top > span { font-size: var(--fs-num); padding: 6px 16px; }
body.vertical .hg-score { font-size: var(--fs-body); }
body.vertical .hg-star img, body.vertical .hg-star svg { width: 96px; height: 96px; }
body.vertical .hg-star:nth-child(2) img, body.vertical .hg-star:nth-child(2) svg { width: 116px; height: 116px; }
body.vertical .hg-result .hg-acts .btn { min-height: 88px; font-size: 28px; min-width: 240px; }
body.vertical .hg-table { flex-wrap: wrap; max-width: 600px; }
body.vertical .hg-dish { width: 140px; height: 140px; }
body.vertical .hg-jars { flex-wrap: wrap; max-width: 600px; }
/* лёжа на телефоне — окно во всю ширину и почти во всю высоту (аудит 08.11: игры шли в половину ширины — 780 из 1599,
   подписи дверей «Разведи по залам» и примечание — 15, это 8,5 px экрана): сцена и фигуры крупнее, подписи — не мельче
   --fs-min (20 сцены, 11,4 px экрана), правила — --fs-sub в две строки */
body.phone-land .modal.hg-modal { width: min(1240px, calc(100% - 32px)); max-height: calc(100% - 16px); }
body.phone-land .hg { min-height: 0; gap: 10px; padding-top: 8px; }
body.phone-land .hg-stage { height: 320px; }
body.phone-land .hg-g .hg-fig { width: 136px; height: 170px; }
body.phone-land .hg-dish { width: 120px; height: 120px; }
body.phone-land .hg-rules { max-width: 1000px; font-size: var(--fs-sub); }
body.phone-land .hg-left, body.phone-land .hg-note { font-size: var(--fs-min); }
body.phone-land .hg-hero .hg-host { width: 150px; height: 150px; }
body.phone-land .hg-big { width: 170px; height: 170px; }
body.phone-land .hg-big img, body.phone-land .hg-big svg { width: 136px; height: 136px; }
body.phone-land .hg-door { width: 180px; }
body.phone-land .hg-door .hg-arch { width: 96px; height: 96px; }
body.phone-land .hg-door .hg-arch img, body.phone-land .hg-door .hg-arch svg { width: 74px; height: 74px; }
body.phone-land .hg-door b { font-size: var(--fs-min); }
body.phone-land .hg-cards { grid-template-columns: repeat(4, 128px); }
body.phone-land .hg-card { width: 128px; height: 128px; }
body.phone-land .hg-card .hg-cb img, body.phone-land .hg-card .hg-cb svg { width: 100px; height: 100px; }
body.phone-land .hg-card .hg-cf img, body.phone-land .hg-card .hg-cf svg { width: 88px; height: 88px; }
body.phone-land .hg-anvil { height: 240px; transform: scale(0.85); transform-origin: 50% 100%; }
body.vertical .hg-anvil { transform: scale(1.22); transform-origin: 50% 100%; }
body.vertical .hg-pot { transform: scale(1.3); transform-origin: 50% 100%; }

/* хозяин зала (js/hallkeep.js, круг 7): окно сюжета (css/story.css .dlg) с большим портретом, наградой и кнопкой
   поручения; люди сюжета (npc.*) — портрет по пояс, ремёсла (residents.*) — в круге */
.hk .dlg-face { width: 168px; height: 168px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #6a4a2a, #1a120c); }
.hk .dlg-face .hk-pic { width: 100%; height: 100%; object-fit: cover; display: block; }
.hk.tall .dlg-face { width: 180px; height: 240px; border-radius: 14px; }
.hk-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 10px; }
.hk-r { display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px 3px 6px; border-radius: 14px; background: rgba(40, 28, 14, 0.85); color: #fff; font-weight: 700; font-size: 18px; }
.hk-bonus { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: #6a4a10; font-style: italic; }
body.vertical .hk .dlg-face { width: 136px; height: 136px; margin-bottom: -18px; }
body.vertical .hk.tall .dlg-face { width: 156px; height: 208px; margin-bottom: -18px; border-radius: 14px; }
body.vertical .hk-bonus { font-size: var(--fs-min); }
/* стоя рамка разговора — во всю ширину (аудит 07.11 zal-10: сжималась по короткой фразе, «Забрать награду» ломалась в две
   строки); текст хозяина и награда крупнее, кнопки в одну строку */
body.vertical .hk .dlg-box { align-self: stretch; width: 100%; box-sizing: border-box; }
body.vertical .hk .dlg-text { font-size: var(--fs-body); }
body.vertical .hk .dlg-who b { font-size: 30px; }
body.vertical .hk-r { font-size: var(--fs-num); padding: 4px 14px 4px 8px; }
body.vertical .hk-r > svg, body.vertical .hk-r > img { width: 36px; height: 36px; }
body.vertical .hk .dlg-btns .btn { white-space: nowrap; min-width: 150px; min-height: 72px; font-size: var(--fs-sub); }
body.phone-land .hk .dlg-text { font-size: var(--fs-body); }
body.phone-land .hk .dlg-btns .btn { white-space: nowrap; min-width: 140px; }

/* игры залов круга 7 (js/hallgames.js): двери Ворот, свитки, мишень, свечи, монеты; анимации — transform и opacity */
.hg-host { object-fit: cover; object-position: 50% 18%; }
.hg-doors { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 18px; background: linear-gradient(#5a4632, #3a2c1e); border: 3px solid #8a6a3a; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5); }
.hg-door { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 132px; padding: 8px 6px 10px; border: 0; border-radius: 60px 60px 12px 12px; background: linear-gradient(#7a4a22, #4a2a10); box-shadow: inset 0 0 0 3px #b98b3d, 0 4px 0 #2a180a; cursor: pointer; color: #ffe8b0; }
.hg-door .hg-arch { display: flex; width: 84px; height: 84px; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(#fff6dc, #d9c08a); }
.hg-door .hg-arch img, .hg-door .hg-arch svg { width: 64px; height: 64px; pointer-events: none; }
.hg-door b { font: 700 15px/1.1 var(--sans); text-align: center; pointer-events: none; }
.hg-door.open { animation: hgDoor 0.45s ease-out; }
.hg-door.bad { animation: hgShake 0.35s; }
.hg-g.gone { transform: translateY(40px) scale(0.85); opacity: 0; transition: transform 0.45s, opacity 0.45s; }
@keyframes hgDoor { 0% { transform: scale(1); } 40% { transform: scale(1.1); box-shadow: inset 0 0 0 3px #7fe08e, 0 0 24px 6px rgba(127, 224, 142, 0.7); } 100% { transform: scale(1); } }
@keyframes hgShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

.hg-cards { display: grid; grid-template-columns: repeat(4, 112px); gap: 12px; justify-content: center; }
.hg-card { position: relative; width: 112px; height: 112px; padding: 0; border: 0; background: transparent; cursor: pointer; perspective: 600px; }
.hg-card .hg-cb, .hg-card .hg-cf { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 14px; backface-visibility: hidden; transition: transform 0.3s ease-out; pointer-events: none; }
.hg-card .hg-cb { background: linear-gradient(#5a3a1a, #3a240e); box-shadow: inset 0 0 0 3px #a07c3c, 0 4px 8px rgba(0, 0, 0, 0.5); }
.hg-card .hg-cf { background: radial-gradient(#fff8e4, #e6cf9a); box-shadow: inset 0 0 0 3px #a07c3c, 0 4px 8px rgba(0, 0, 0, 0.5); transform: rotateY(180deg); }
.hg-card .hg-cb img, .hg-card .hg-cb svg { width: 88px; height: 88px; }
.hg-card .hg-cf img, .hg-card .hg-cf svg { width: 76px; height: 76px; }
.hg-card.up .hg-cb { transform: rotateY(-180deg); }
.hg-card.up .hg-cf { transform: rotateY(0); }
.hg-card.got .hg-cf { box-shadow: inset 0 0 0 4px #46b04f, 0 0 18px 4px rgba(127, 224, 142, 0.6); }

.hg-archery .hg-stage { display: flex; align-items: center; justify-content: center; cursor: crosshair; }
.hg-wall { position: relative; width: 92%; height: 200px; border-radius: 12px; background: repeating-linear-gradient(0deg, #6a5a48 0 38px, #5a4a3a 38px 40px), #6a5a48; box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6); overflow: hidden; }
.hg-tgt { position: absolute; left: 0; top: 45px; width: 110px; height: 110px; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.6)); }
.hg-aim { position: absolute; top: 0; bottom: 0; width: 0; border-left: 3px dashed rgba(255, 236, 160, 0.9); }
.hg-arrow { position: absolute; bottom: -60px; width: 6px; height: 60px; margin-left: -3px; border-radius: 3px; background: linear-gradient(#e8e0d0, #8a6a3a); opacity: 0; }
.hg-arrow.fly { animation: hgArrow 0.35s ease-out forwards; }
@keyframes hgArrow { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-160px); opacity: 1; } }
.hg-archery .hg-word { top: 6px; }

.hg-candles .hg-stage { display: flex; align-items: flex-end; justify-content: center; }
.hg-altar { display: flex; align-items: flex-end; gap: 14px; padding: 0 18px 14px; border-bottom: 18px solid #6a3a1a; border-radius: 0 0 10px 10px; }
.hg-candle { position: relative; padding: 0; border: 0; background: transparent; cursor: pointer; --q: 1; }
.hg-candle .hg-svg { pointer-events: none; }
.hg-flame { position: absolute; left: 50%; top: -6px; width: 22px; height: 34px; margin-left: -11px; border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%; background: radial-gradient(ellipse at 50% 70%, #fff6c0, #ffb02a 55%, rgba(255, 90, 10, 0)); transform-origin: 50% 90%; animation: hgFlick 0.3s infinite alternate; pointer-events: none; }
.hg-candle.dim .hg-flame { transform: scale(calc(0.25 + var(--q) * 0.75)); opacity: calc(0.25 + var(--q) * 0.75); animation: hgFlick 0.09s infinite alternate; }
.hg-candle.dim { filter: drop-shadow(0 0 10px rgba(255, 120, 40, 0.8)); }
.hg-candle.out .hg-flame { opacity: 0; transform: scale(0.2); transition: opacity 0.25s, transform 0.25s; }
.hg-candle.lit .hg-flame { transform: scale(1.35); filter: brightness(1.3); }
.hg-candle.shake { animation: hgShake 0.3s; }
@keyframes hgFlick { from { transform: scale(calc(0.25 + var(--q) * 0.75)) rotate(-3deg); } to { transform: scale(calc(0.27 + var(--q) * 0.75)) rotate(3deg); } }

.hg-coins .hg-stage { display: flex; align-items: flex-end; justify-content: space-around; }
.hg-merchant { display: flex; flex-direction: column; align-items: center; }
.hg-merchant .hg-fig { width: 128px; height: 160px; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.6)); }
.hg-ask { display: flex; flex-direction: column; align-items: center; padding: 8px 16px 10px; margin-bottom: 10px; border-radius: 16px; background: #fffaf0; border: 3px solid #a07c3c; }
.hg-ask-n { display: flex; align-items: center; gap: 6px; font: 900 34px/1 var(--sans); color: #3a2a14; }
.hg-tray { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 200px; height: 150px; padding-bottom: 12px; border-radius: 50% / 30%; background: radial-gradient(#7a5a32, #3a2610); box-shadow: inset 0 0 0 4px #b98b3d, 0 8px 14px rgba(0, 0, 0, 0.5); }
.hg-sum { font: 900 46px/1 var(--sans); color: #fff; text-shadow: 0 2px 4px #000; }
.hg-tray.even .hg-sum { color: #9df0a8; }
.hg-tray.over .hg-sum { color: #ff8a7a; }
.hg-tray.over { animation: hgShake 0.35s; }
.hg-tray.paid { box-shadow: inset 0 0 0 4px #46b04f, 0 0 26px 8px rgba(127, 224, 142, 0.6); }
.hg-tray.wrong { box-shadow: inset 0 0 0 4px #e0584a, 0 0 22px 6px rgba(224, 88, 74, 0.55); }
.hg-pile { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; width: 150px; min-height: 24px; margin-top: 6px; }
.hg-pc { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #9aa8b6); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); animation: hgDrop 0.2s ease-out; }
.hg-pc.g { background: radial-gradient(circle at 35% 30%, #fff1b0, #c8901c); }
@keyframes hgDrop { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hg-purse { display: flex; gap: 12px; justify-content: center; }
.hg-coin { display: flex; width: 104px; height: 104px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.25); cursor: pointer; }
.hg-coin:active { transform: translateY(3px) scale(0.95); }
.hg-coin .hg-svg { pointer-events: none; }

/* свитки стоя — крупные, четыре в ряд (аудит 07.11 zal-08: было по три в 104 px — полокна пусто): 4 × 150, рубашка 120,
   лицо 110 */
body.vertical .hg-cards { grid-template-columns: repeat(4, 150px); gap: 14px; }
body.vertical .hg-card { width: 150px; height: 150px; }
body.vertical .hg-scrolls .hg-cards { margin-block: auto; } /* сетка — посередине окна, без пустого низа */
body.vertical .hg-card .hg-cb img, body.vertical .hg-card .hg-cb svg { width: 120px; height: 120px; }
body.vertical .hg-card .hg-cf img, body.vertical .hg-card .hg-cf svg { width: 110px; height: 110px; }
body.vertical .hg-door { width: 150px; }
body.vertical .hg-purse { flex-wrap: wrap; }
body.vertical .hg-altar { gap: 6px; padding: 0 8px 12px; }
body.vertical .hg-doors { display: grid; grid-template-columns: repeat(2, 260px); gap: 14px; }
body.vertical .hg-door { width: 260px; padding: 10px 8px 12px; }
body.vertical .hg-door .hg-arch { width: 118px; height: 118px; }
body.vertical .hg-door .hg-arch img, body.vertical .hg-door .hg-arch svg { width: 92px; height: 92px; }
body.vertical .hg-door b { font-size: var(--fs-sub); }
