/* =====================================================================
   ПРЕДМЕТЫ — «Переулок Тайн»: общая сцена, переходы, навигация,
   оболочка просмотра предмета, формы админа.
   Оформление заведений — items-vault.css, items-shop.css, items-market.css.
   ===================================================================== */
body.ip {
  --hdr: 78px;
  --brass: #c9a35e; --brass-l: #f0d9a4; --brass-d: #6b5530;
  --ink: #e2dccf; --ink-m: #a19c90; --ink-f: #6c685f;
  --f-sten: 'Oswald', 'Arial Narrow', sans-serif;
  --f-shop: 'Cormorant SC', 'Cinzel', serif;
  --f-shop2: 'Cormorant Garamond', 'EB Garamond', serif;
  --f-hand: 'Marck Script', 'Caveat', cursive;
  --f-chalk: 'Amatic SC', 'Caveat', cursive;
  --f-note: 'Caveat', 'Marck Script', cursive;
  --ease: cubic-bezier(.2,.8,.2,1);
  --ink-brown: #3a2414;
  background: #06070b;
}
@media (max-width: 1260px) { body.ip { --hdr: 68px; } }
body.ip.iv-open { overflow: hidden; }
body.ip .site-footer { position: relative; z-index: 2; }
body.ip[data-place="vault"] { background: #07090c; }
body.ip[data-place="shop"] { background: #120a07; }
body.ip[data-place="market"] { background: #0b0a09; }
.place[hidden], .hub[hidden] { display: none !important; }

/* =====================================================================
   ПЕРЕУЛОК
   ===================================================================== */
.hub {
  --hubh: clamp(640px, calc(100vh - var(--hdr)), 940px);
  position: relative;
  height: var(--hubh);
  overflow: hidden;
  isolation: isolate;
  background: #070810;
}
@supports (height: 100svh) { .hub { --hubh: clamp(640px, calc(100svh - var(--hdr)), 940px); } }
.hub-scene {
  position: absolute; inset: 0;
  transform-origin: var(--ox, 50%) var(--oy, 60%);
  transition: transform 1s cubic-bezier(.7,0,.3,1), filter 1s ease;
}
.hub.zoom .hub-scene { transform: scale(2.6); filter: brightness(1.5) blur(1.5px); }
.hub.zoom .hub-info, .hub.zoom .hub-rain { opacity: 0; transition: opacity .4s ease; }
.hub.back .hub-scene { animation: hubBack 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes hubBack { from { transform: scale(1.5); filter: brightness(1.6) blur(2px); } to { transform: none; filter: none; } }

/* небо */
.hub-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 38% at 80% 12%, rgba(170,40,48,.22), transparent 70%),
    linear-gradient(to bottom, #04050a 0%, #0a0d1c 34%, #171428 58%, #261a2c 70%, #0d0b11 100%);
}
.hub-stars {
  position: absolute; inset: 0 0 45% 0;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, #ffe9c4, transparent),
    radial-gradient(1.4px 1.4px at 210px 40px, #fff, transparent),
    radial-gradient(1px 1px at 280px 120px, #cfd8ff, transparent),
    radial-gradient(1px 1px at 60px 150px, #fff, transparent),
    radial-gradient(1.2px 1.2px at 330px 20px, #fff, transparent);
  background-size: 360px 180px;
  opacity: .45;
  -webkit-mask: linear-gradient(to bottom, #000 30%, transparent);
          mask: linear-gradient(to bottom, #000 30%, transparent);
  animation: hubTwinkle 7s ease-in-out infinite alternate;
}
@keyframes hubTwinkle { from { opacity: .25; } to { opacity: .55; } }
.hub-moon {
  position: absolute; top: 6%; right: 13%;
  width: clamp(70px, 8.5vw, 128px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 64%, rgba(80,10,16,.35) 0 9%, transparent 10%),
    radial-gradient(circle at 62% 30%, rgba(80,10,16,.3) 0 6%, transparent 7%),
    radial-gradient(circle at 58% 70%, rgba(80,10,16,.25) 0 12%, transparent 13%),
    radial-gradient(circle at 38% 34%, #ffc0aa 0%, #e2563f 36%, #8e2124 70%, #4a0e14 100%);
  box-shadow: 0 0 60px 16px rgba(220,60,50,.32), 0 0 180px 70px rgba(160,30,40,.16);
  animation: hubMoon 9s ease-in-out infinite alternate;
}
@keyframes hubMoon { from { box-shadow: 0 0 50px 12px rgba(220,60,50,.26), 0 0 160px 60px rgba(160,30,40,.12); } to { box-shadow: 0 0 70px 20px rgba(230,70,55,.38), 0 0 200px 80px rgba(170,35,45,.2); } }
.hub-cloud {
  position: absolute; height: 9%; width: 46%;
  background: radial-gradient(ellipse at center, rgba(40,32,54,.55) 0%, rgba(40,32,54,.3) 45%, transparent 72%);
  filter: blur(12px);
  animation: hubCloud 90s linear infinite;
}
.hub-cloud.c1 { top: 8%; animation-delay: -20s; }
.hub-cloud.c2 { top: 15%; height: 6%; width: 34%; animation-duration: 120s; animation-delay: -70s; opacity: .8; }
.hub-cloud.c3 { top: 3%; height: 5%; width: 28%; animation-duration: 150s; animation-delay: -110s; opacity: .6; }
@keyframes hubCloud { from { transform: translateX(-60vw); } to { transform: translateX(160vw); } }
.hub-city { position: absolute; left: 0; right: 0; top: 11%; height: 38%; opacity: .95; }
.hub-city svg { width: 100%; height: 100%; display: block; }
.sky-clock { animation: hubClock 6s ease-in-out infinite alternate; }
.sky-win { opacity: .55; }
.sky-blink { animation: hubWin 7s steps(1) infinite; }
.sky-smoke circle { transform-box: fill-box; transform-origin: center; opacity: 0; animation: skySmoke 9s ease-out infinite; }
@keyframes skySmoke { 0% { transform: translate(0,0) scale(.5); opacity: 0; } 20% { opacity: .55; } 100% { transform: translate(70px,-90px) scale(3.4); opacity: 0; } }
@keyframes hubClock { from { opacity: .4; } to { opacity: .7; } }
@keyframes hubWin { 0%, 60% { opacity: .55; } 61%, 100% { opacity: .12; } }
.hub-smoke {
  position: absolute; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(70,64,80,.5), transparent 65%);
  filter: blur(6px);
  animation: hubSmoke 9s ease-out infinite;
}
.hub-smoke.s1 { left: 24%; top: 26%; }
.hub-smoke.s2 { left: 71%; top: 22%; animation-delay: -4.5s; }
@keyframes hubSmoke { 0% { transform: translate(0,0) scale(.4); opacity: 0; } 25% { opacity: .9; } 100% { transform: translate(60px,-120px) scale(2.2); opacity: 0; } }

/* улица и фасады */
.hub-street {
  position: absolute; left: 0; right: 0; bottom: 25%;
  --dw: min(370px, 19.5vw, calc(var(--hubh) * .4));
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 2;
}
.hub-door {
  position: relative; z-index: 2; flex: 0 0 var(--dw); max-width: none;
  display: block; color: inherit; text-decoration: none; outline: none;
  cursor: pointer;
}
.hub-fill { position: relative; z-index: 1; display: block; align-self: stretch; overflow: hidden; pointer-events: none; filter: brightness(.8) saturate(.85); transition: filter .5s ease; }
.hub-fill svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hub-fill.side { flex: 1 1 0; min-width: 0; }
.hub-fill.side.l { flex-grow: 2.3; margin-right: calc(var(--dw) * -.08); }
.hub-fill.side.r { margin-left: calc(var(--dw) * -.08); }
.hub-fill.mid { flex: 0 0 calc(var(--dw) * .6); margin: 0 calc(var(--dw) * -.08); }
.hub-street.has-on .hub-fill { filter: brightness(.42) saturate(.55); }
.tr-brick, .tr-joint { stroke: rgba(0,0,0,.45); stroke-width: 1; fill: none; }
.tr-flk { animation: fsFlicker 3.6s ease-in-out infinite; }
.hub-fac { display: block; filter: brightness(.86) saturate(.92); transition: filter .5s ease; }
.hub-fac svg { display: block; width: 100%; height: auto; overflow: visible; }
.hub-street.has-on .hub-door:not(.on) .hub-fac { filter: brightness(.48) saturate(.55); }
.hub-door.on .hub-fac { filter: brightness(1.12) saturate(1.1) drop-shadow(0 0 34px color-mix(in srgb, var(--lc) 38%, transparent)); }
.hub-door:focus-visible .hub-fac { outline: 2px solid var(--lc); outline-offset: 4px; }
.hub-pool {
  position: absolute; left: 4%; right: 4%; top: 100%; height: 150px;
  background: radial-gradient(ellipse 48% 55% at 50% 0%, color-mix(in srgb, var(--lc) 50%, transparent), transparent 72%);
  opacity: .5; filter: blur(3px); pointer-events: none; transition: opacity .5s ease;
}
.hub-pool::after {
  content: ""; position: absolute; left: 34%; right: 34%; top: 0; height: 100%;
  background: repeating-linear-gradient(90deg, transparent 0 7px, color-mix(in srgb, var(--lc) 55%, transparent) 7px 9px, transparent 9px 16px);
  -webkit-mask: linear-gradient(to bottom, #000, transparent 85%);
          mask: linear-gradient(to bottom, #000, transparent 85%);
  opacity: .5; filter: blur(1.5px);
  animation: hubShimmer 2.6s ease-in-out infinite alternate;
}
@keyframes hubShimmer { from { transform: scaleX(1) skewX(0); opacity: .35; } to { transform: scaleX(1.25) skewX(-4deg); opacity: .6; } }
.hub-door.on .hub-pool { opacity: .95; }
.hub-tag { display: none; }

/* анимации в рисунках фасадов */
.fv-j { stroke: rgba(0,0,0,.4); stroke-width: 1.4; }
.fv-sign { font-family: 'Old Standard TT', 'EB Garamond', serif; font-weight: 700; font-size: 19px; letter-spacing: 3px; fill: #dcc89c; }
.fv-sign-sh { fill: #15120e; }
.fv-lamp, .fv-lampglow { animation: fsFlicker 3.2s ease-in-out infinite; }
.fv-lampglow { transform-box: fill-box; transform-origin: center; }
.fv-fan { animation: fsFlicker 5s ease-in-out infinite; }
.fv-oculus { animation: fvOc 6s ease-in-out infinite alternate; }
@keyframes fvOc { from { opacity: .7; } to { opacity: 1; } }
.fv-gate-l, .fv-gate-r { transition: transform 1s var(--ease); }
.fv-gate-l { transform: scaleX(.86); } .fv-gate-r { transform: scaleX(.86); }
.hub-door.on .fv-gate-l, .hub-door.on .fv-gate-r { transform: scaleX(.22); }
.hub-door.on .fv-lampglow { opacity: 1; }
.fs-brick, .fm-brick { stroke: rgba(0,0,0,.35); stroke-width: 1; fill: none; }
.fs-fascia { font-family: var(--f-shop); font-weight: 700; font-size: 25px; letter-spacing: 3px; fill: #e9c77a; }
.fs-plate { font-family: var(--f-sten); font-size: 9.5px; letter-spacing: 1.5px; fill: #e9ecef; }
.fs-plate2 { font-family: var(--f-sten); font-size: 4.5px; letter-spacing: 1px; fill: #9aa1aa; }
.fs-num { font-family: var(--f-shop); font-size: 13px; fill: #3a1d0b; }
.fs-opentx { font-family: var(--f-sten); font-size: 8px; letter-spacing: 1px; fill: #6d1b26; }
.fs-window, .fs-doorwin, .fs-transom { animation: fsFlicker 4s ease-in-out infinite; }
@keyframes fsFlicker { 0%, 100% { opacity: 1; } 40% { opacity: .9; } 42% { opacity: .78; } 44% { opacity: .95; } 70% { opacity: .88; } }
.fs-flame { animation: fsFlame .5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes fsFlame { from { transform: scale(1,1); } to { transform: scale(.85,1.15); } }
.fs-ball { animation: fsBall 3s ease-in-out infinite alternate; }
@keyframes fsBall { from { opacity: .75; } to { opacity: 1; } }
.fs-tail { transform-box: fill-box; transform-origin: 0 100%; animation: fsTail 2.4s ease-in-out infinite; }
@keyframes fsTail { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-18deg); } }
.fs-hang { transform-box: view-box; transform-origin: 370px 252px; animation: fsHang 4.5s ease-in-out infinite; }
@keyframes fsHang { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.fs-lantern { animation: fsFlicker 2.2s ease-in-out infinite; }
.hub-door.on .fs-open { animation: fsOpen 1.2s ease-in-out infinite; transform-box: view-box; transform-origin: 332px 432px; }
@keyframes fsOpen { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.fm-wanted { font-family: var(--f-sten); font-weight: 700; font-size: 10px; fill: #3a2a1a; letter-spacing: .5px; }
.fm-reward { font-family: var(--f-sten); font-size: 6px; fill: #3a2a1a; }
.fm-signtx { font-family: var(--f-sten); font-weight: 700; font-size: 20px; letter-spacing: 2px; fill: #ece5cf; }
.fm-stencil { font-family: var(--f-sten); font-size: 10px; fill: #1d140a; letter-spacing: 1px; opacity: .75; }
.fm-chalktx { font-family: var(--f-chalk); font-size: 26px; fill: #e8e2cf; opacity: .7; }
.fm-lamp, .fm-halo { animation: fmFlicker 3.4s linear infinite; }
@keyframes fmFlicker { 0%, 100% { opacity: 1; } 8% { opacity: .55; } 9% { opacity: 1; } 47% { opacity: .9; } 48% { opacity: .35; } 50% { opacity: .95; } 80% { opacity: .85; } }
.fm-glow { animation: fmGlow 4s ease-in-out infinite alternate; }
@keyframes fmGlow { from { opacity: .55; } to { opacity: .9; } }
.fm-drip { animation: fmDrip 3s ease-in infinite; }
@keyframes fmDrip { 0% { stroke-dasharray: 0 10; } 60% { stroke-dasharray: 8 10; } 100% { stroke-dasharray: 8 10; opacity: 0; } }
.fm-gate { transform-box: view-box; transform-origin: 124px 500px; transition: transform 1s var(--ease); }
.hub-door.on .fm-gate { transform: scaleX(.55); }

/* мостовая, туман, пар */
.hub-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 25%; z-index: 1; overflow: hidden; background: #0c0b10; }
.hub-ground::before {
  content: ""; position: absolute; left: -30%; right: -30%; top: 0; height: 260%;
  transform-origin: 50% 0; transform: perspective(260px) rotateX(58deg);
  background:
    radial-gradient(ellipse 21px 8px at 24px 10px, #23222a 55%, transparent 62%) 0 0 / 48px 20px,
    radial-gradient(ellipse 21px 8px at 0 20px, #1e1d24 55%, transparent 62%) 0 0 / 48px 20px,
    radial-gradient(ellipse 21px 8px at 48px 20px, #1e1d24 55%, transparent 62%) 0 0 / 48px 20px,
    #0e0d12;
}
.hub-ground::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.65), rgba(0,0,0,.1) 30%, rgba(8,8,12,.5) 100%);
}
.hub-curb { position: absolute; left: 0; right: 0; top: 0; height: 7px; z-index: 2; background: linear-gradient(#34323b, #121116); box-shadow: 0 4px 14px rgba(0,0,0,.6); }
.hub-fog {
  position: absolute; left: -50%; width: 200%; z-index: 3; pointer-events: none;
  background:
    radial-gradient(ellipse 18% 50% at 20% 50%, rgba(170,170,200,.14), transparent 70%),
    radial-gradient(ellipse 22% 45% at 55% 55%, rgba(170,170,200,.11), transparent 70%),
    radial-gradient(ellipse 16% 50% at 85% 50%, rgba(170,170,200,.13), transparent 70%);
  filter: blur(6px);
}
.hub-fog.f1 { bottom: 8%; height: 70%; animation: hubFog 70s linear infinite; }
.hub-fog.f2 { bottom: 30%; height: 60%; opacity: .7; animation: hubFog 110s linear infinite reverse; }
@keyframes hubFog { from { transform: translateX(0); } to { transform: translateX(25%); } }
.hub-steam {
  position: absolute; right: 22%; bottom: 22%; width: 120px; height: 160px; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at 50% 80%, rgba(200,210,190,.22), transparent 65%);
  filter: blur(10px);
  animation: hubSteam 5s ease-out infinite;
}
@keyframes hubSteam { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-90px) scale(1.6); opacity: 0; } }

/* указатель с названием переулка */
.hub-post {
  position: absolute; left: max(10px, 1.1vw); bottom: 21%;
  width: 180px; height: 62%; z-index: 4;
}
.hub-post-pole {
  position: absolute; left: 34px; width: 12px; top: 18px; bottom: 0;
  background: linear-gradient(90deg, #0b0c0f, #43464e 45%, #101115);
  border-radius: 3px;
}
.hub-post-pole::after {
  content: ""; position: absolute; left: -10px; right: -10px; bottom: 0; height: 26px;
  background: linear-gradient(90deg, #0b0c0f, #3a3d45 45%, #101115); border-radius: 4px 4px 0 0;
}
.hub-post-cap {
  position: absolute; left: 30px; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8a8f99, #1a1b20 70%);
}
.hub-plate {
  position: absolute; top: 9%; left: 0; z-index: 2;
  margin: 0; padding: 9px 14px 8px; min-width: 172px;
  background: linear-gradient(180deg, #16181d, #0b0c0f);
  border: 2px solid #d4d8de; border-radius: 6px;
  box-shadow: inset 0 0 0 3px #0b0c0f, inset 0 0 0 4px rgba(212,216,222,.5), 0 14px 30px rgba(0,0,0,.6);
  font-family: var(--f-sten); font-weight: 500; font-size: 16px; letter-spacing: .14em; text-transform: uppercase;
  color: #f1f3f5; text-align: center; line-height: 1.15;
}
.hub-plate small { display: block; margin-top: 4px; font-size: 9.5px; font-weight: 400; letter-spacing: .22em; color: #9aa1aa; }
.hub-arrow {
  position: absolute; left: 38px; z-index: 1;
  width: 150px; height: 40px; padding: 0 22px 0 14px;
  display: flex; align-items: center;
  border: 0; cursor: pointer;
  background: linear-gradient(180deg, #6b4a2b, #45301b);
  clip-path: polygon(0 0, 86% 0, 100% 50%, 86% 100%, 0 100%);
  font-family: var(--f-sten); font-weight: 500; font-size: 11px; line-height: 1.08; letter-spacing: .1em; text-transform: uppercase; text-align: left;
  color: #f3e6c8; text-shadow: 0 1px 0 rgba(0,0,0,.5);
  transition: transform .35s var(--ease), filter .35s ease;
}
.hub-arrow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--ac); }
.hub-arrow::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(0,0,0,.12) 5px 6px); pointer-events: none; }
.hub-arrow span { position: relative; z-index: 1; padding-left: 4px; }
.hub-arrow.a1 { top: 31%; --ac: #ff5a4a; transform: rotate(-4deg); }
.hub-arrow.a2 { top: 42%; --ac: #ffb45c; transform: rotate(3deg); }
.hub-arrow.a3 { top: 53%; --ac: #c6e266; transform: rotate(-2deg); }
.hub-arrow:hover, .hub-arrow.on, .hub-arrow:focus-visible { filter: brightness(1.3); outline: none; }
.hub-arrow.a1:hover, .hub-arrow.a1.on { transform: rotate(-4deg) translateX(8px); }
.hub-arrow.a2:hover, .hub-arrow.a2.on { transform: rotate(3deg) translateX(8px); }
.hub-arrow.a3:hover, .hub-arrow.a3.on { transform: rotate(-2deg) translateX(8px); }

/* газовый фонарь справа */
.hub-lamp { position: absolute; right: max(10px, 1.2vw); bottom: 21%; width: 70px; height: 60%; z-index: 4; pointer-events: none; }
.hub-lamp-pole { position: absolute; left: 30px; width: 10px; top: 54px; bottom: 0; background: linear-gradient(90deg, #0b0c0f, #43464e 45%, #101115); border-radius: 3px; }
.hub-lamp-pole::after { content: ""; position: absolute; left: -9px; right: -9px; bottom: 0; height: 22px; background: linear-gradient(90deg, #0b0c0f, #3a3d45 45%, #101115); border-radius: 4px 4px 0 0; }
.hub-lamp-head {
  position: absolute; left: 17px; top: 10px; width: 36px; height: 46px;
  background: linear-gradient(180deg, #fff2c8, #ffc463 60%, #b97a2a);
  clip-path: polygon(10% 0, 90% 0, 100% 18%, 82% 100%, 18% 100%, 0 18%);
  box-shadow: inset 0 0 0 3px #15161a;
  animation: fsFlicker 3s ease-in-out infinite;
}
.hub-lamp-head::before { content: ""; position: absolute; left: -2px; right: -2px; top: -2px; height: 8px; background: #15161a; }
.hub-lamp-glow {
  position: absolute; left: -110px; top: -100px; width: 290px; height: 290px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,110,.38), rgba(255,170,80,.12) 40%, transparent 68%);
  animation: fsFlicker 3s ease-in-out infinite;
}

.hub-rain { position: absolute; inset: 0; z-index: 5; pointer-events: none; width: 100%; height: 100%; }

/* подсказка и поиск */
.hub-info {
  position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%);
  width: min(640px, 92vw); z-index: 6; text-align: center;
}
.hub-hint { margin: 0 0 12px; min-height: 52px; font-family: var(--font-body); font-style: italic; font-size: 16px; line-height: 1.5; color: rgba(232,226,214,.78); text-shadow: 0 2px 10px #000; }
.hub-hint b { font-style: normal; font-family: var(--font-display); font-weight: 500; font-size: 14px; letter-spacing: .12em; color: #f0d9a4; }
.hub-hint .hc-name { display: block; font-style: normal; font-size: 26px; line-height: 1.1; letter-spacing: .06em; color: var(--lc); text-shadow: 0 0 22px color-mix(in srgb, var(--lc) 45%, transparent); }
.hub-hint .hc-name.v { font-family: 'Cinzel Decorative', 'Cinzel', serif; font-weight: 700; letter-spacing: .08em; }
.hub-hint .hc-name.s { font-family: var(--f-shop); font-weight: 700; font-size: 29px; }
.hub-hint .hc-name.m { font-family: var(--f-chalk); font-size: 34px; letter-spacing: .08em; }
.hub-hint .hc-meta { display: block; margin-top: 2px; font-family: var(--font-mono); font-style: normal; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(232,226,214,.55); }
.hub-hint.swap { animation: hubHint .45s var(--ease) both; }
@keyframes hubHint { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hub-find {
  position: relative; display: flex; align-items: center; gap: 10px;
  margin: 0 auto; max-width: 440px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 40px;
  background: rgba(8,8,12,.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.hub-find:focus-within { border-color: rgba(240,217,164,.5); box-shadow: 0 0 0 4px rgba(240,217,164,.08); }
.hub-find > svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: #b9b2a3; stroke-width: 1.7; stroke-linecap: round; }
.hub-find input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; outline: none; color: #eee6d6; font-family: var(--font-body); font-size: 16.5px; }
.hub-find input::placeholder { color: rgba(220,214,200,.45); font-style: italic; }
.hub-results {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 10px);
  max-height: min(52vh, 420px); overflow-y: auto; padding: 6px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 16px;
  background: rgba(12,12,17,.97); box-shadow: 0 30px 60px -20px #000;
  text-align: left; animation: hubHint .3s var(--ease) both;
}
.hub-results[hidden] { display: none; }
.hub-res {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px;
  border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; color: #e6e0d4;
}
.hub-res:hover, .hub-res:focus-visible, .hub-res.sel { background: rgba(255,255,255,.06); outline: none; }
.hub-res i { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 10px var(--rc); }
.hub-res b { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-res small { flex: 0 0 auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #8d877a; }
.hub-res-none { padding: 14px; margin: 0; font-style: italic; color: #8d877a; text-align: center; }

/* =====================================================================
   НАВИГАЦИЯ ВНУТРИ ЗАВЕДЕНИЯ
   ===================================================================== */
.pnav {
  position: sticky; top: var(--hdr); z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 9px max(18px, calc(50% - 590px));
  background: var(--pn-bg, rgba(10,10,12,.88));
  border-bottom: 1px solid var(--pn-line, rgba(255,255,255,.08));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--pn-font, var(--font-mono));
}
.pnav a, .pnav button { font: inherit; }
.pnav-back {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px;
  border: 1px solid var(--pn-line, rgba(255,255,255,.12)); border-radius: var(--pn-r, 8px);
  color: var(--pn-ink, #ddd); text-decoration: none; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}
.pnav-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pnav-back:hover { background: var(--pn-on, rgba(255,255,255,.06)); color: var(--pn-accent, #fff); }
.pnav-here { margin-left: 6px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--pn-muted, #888); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnav-sw { margin-left: auto; display: flex; gap: 6px; }
.pnav-sw a {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--pn-r, 8px);
  color: var(--pn-muted, #888); text-decoration: none; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.pnav-sw a i { width: 8px; height: 8px; border-radius: 50%; background: var(--dc); box-shadow: 0 0 8px var(--dc); opacity: .6; }
.pnav-sw a:hover { color: var(--pn-ink, #ddd); }
.pnav-sw a.on { color: var(--pn-accent, #fff); border-color: var(--pn-line, rgba(255,255,255,.12)); background: var(--pn-on, rgba(255,255,255,.05)); }
.pnav-sw a.on i { opacity: 1; }
@media (max-width: 1180px) { .pnav-here { display: none; } }
@media (max-width: 900px) and (min-width: 761px) { .pnav-sw a { padding: 7px 8px; letter-spacing: .04em; } }
@media (max-width: 760px) {
  .pnav { padding: 8px 12px; gap: 6px; }
  .pnav-here { display: none; }
  .pnav-sw a { padding: 7px 9px; }
  .pnav-sw a span { display: none; }
  .pnav-sw a i { width: 10px; height: 10px; }
}

/* =====================================================================
   ПЕРЕХОДЫ
   ===================================================================== */
.ip-curtain { position: fixed; inset: 0; z-index: 900; pointer-events: none; opacity: 0; background: var(--cc, #000); transition: opacity .5s ease; }
.ip-curtain.on { opacity: 1; pointer-events: auto; }
.ip-intro { position: fixed; inset: 0; z-index: 901; pointer-events: none; display: none; overflow: hidden; }
.ip-intro.on { display: block; }

/* =====================================================================
   ОБОЛОЧКА ПРОСМОТРА ПРЕДМЕТА
   ===================================================================== */
.iv { position: fixed; inset: 0; z-index: 800; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.iv[hidden] { display: none; }
.iv-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 12px max(16px, calc(50% - 640px));
}
.iv-crumb { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.iv-ib { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer; }
.iv-ib svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iv-ib:disabled { opacity: .3; cursor: default; }
.iv-wrap { position: relative; max-width: 1280px; margin: 0 auto; padding: 4px 24px 60px; }
.iv-cm { max-width: 860px; margin: 40px auto 0; padding: 4px 26px 26px; }
.iv-admin { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.iv.swap-l .iv-stage { animation: ivSwapL .55s var(--ease) both; }
.iv.swap-r .iv-stage { animation: ivSwapR .55s var(--ease) both; }
@keyframes ivSwapL { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes ivSwapR { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .iv-wrap { padding: 4px 12px 40px; } .iv-cm { padding: 4px 14px 20px; } .iv-bar { padding: 10px 12px; } }

/* =====================================================================
   КНОПКИ, ФОРМА АДМИНА, ОБРЕЗКА ФОТО
   ===================================================================== */
.vbtn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; cursor: pointer; border: 1px solid rgba(201,163,94,.55);
  background: linear-gradient(180deg, rgba(201,163,94,.3), rgba(201,163,94,.1)); color: #fff; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  transition: transform .2s var(--ease), box-shadow .2s, opacity .2s; }
.vbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vbtn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 0 22px -6px rgba(201,163,94,.9); }
.vbtn:disabled { opacity: .45; cursor: default; }
.vbtn.ghost { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.14); color: var(--ink-m); }
.vbtn.ghost:hover:not(:disabled) { color: #fff; border-color: rgba(201,163,94,.5); }
.vbtn.danger { border-color: rgba(217,71,60,.6); background: rgba(217,71,60,.14); color: #ffb4ad; }
.vbtn.sm { padding: 6px 11px; font-size: 10px; }

.vm { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; padding: 20px; }
.vm[hidden] { display: none; }
.vm-scrim { position: absolute; inset: 0; background: rgba(4,4,6,.72); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: vFade .3s ease both; }
@keyframes vFade { from { opacity: 0; } to { opacity: 1; } }
.vm-box { position: relative; width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px 26px 22px; border-radius: 18px;
  border: 1px solid rgba(201,163,94,.35); background: linear-gradient(180deg, rgba(201,163,94,.08), #101114 200px), #101114; box-shadow: 0 40px 90px -30px #000;
  animation: vmIn .45s var(--ease) both; }
@keyframes vmIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.vm-box h3 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--ink); }
.vm-sub { margin: 0 0 18px; font-size: 14.5px; color: var(--ink-f); }
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vm-f { display: flex; flex-direction: column; gap: 6px; }
.vm-f.full { grid-column: 1 / -1; }
.vm-f label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-m); }
.vm-f small { font-size: 12.5px; color: var(--ink-f); }
.vm-f input, .vm-f select, .vm-f textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.35);
  color: var(--ink); font-family: var(--font-body); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.vm-f textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.vm-f input:focus, .vm-f select:focus, .vm-f textarea:focus { border-color: rgba(201,163,94,.6); box-shadow: 0 0 0 3px rgba(201,163,94,.12); }
.vm-f select option { background: #131417; }
.vm-f[hidden] { display: none; }
.vm-msg { min-height: 20px; margin: 14px 0 0; font-size: 14px; color: var(--ink-m); }
.vm-msg.err { color: #ff8a80; } .vm-msg.ok { color: #b9e2c3; }
.vm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
@media (max-width: 600px) { .vm-grid { grid-template-columns: 1fr; } }

.vcrop { position: fixed; inset: 0; z-index: 980; display: grid; place-items: center; padding: 20px; background: rgba(4,4,6,.8); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.vcrop[hidden] { display: none; }
.vcrop-box { width: min(380px, 100%); padding: 22px; border-radius: 18px; border: 1px solid rgba(201,163,94,.35); background: #101114; text-align: center; animation: vmIn .4s var(--ease) both; }
.vcrop-box h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 21px; color: var(--ink); }
.vcrop-name { margin: 4px 0 14px; color: var(--ink-f); font-size: 14px; }
.vcrop-stage { position: relative; width: 240px; height: 320px; margin: 0 auto; border-radius: 12px; overflow: hidden; border: 1px dashed rgba(201,163,94,.45); cursor: grab; touch-action: none; }
.vcrop-stage canvas { width: 100%; height: 100%; display: block; }
.vcrop-stage.drag { cursor: grabbing; } .vcrop-stage.over { border-color: var(--brass-l); box-shadow: 0 0 24px rgba(201,163,94,.5); }
.vcrop-drop { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--ink-f); pointer-events: none; }
.vcrop-stage.has .vcrop-drop { display: none; }
.vcrop-box input[type=range] { width: 240px; margin: 14px auto 4px; accent-color: var(--brass); }
.vcrop-hint { margin: 0; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-f); letter-spacing: .06em; }
.vcrop-msg { min-height: 18px; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-m); }
.vcrop-msg.err { color: #ff8a80; } .vcrop-msg.ok { color: #b9e2c3; }
.vcrop-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* =====================================================================
   ТЕЛЕФОН: переулок листается вбок
   ===================================================================== */
@media (max-width: 760px) {
  .hub { --hubh: auto; height: auto; min-height: 0; padding: 0 0 18px; }
  .hub-scene { position: relative; inset: auto; padding-top: 18px; display: flex; flex-direction: column; }
  .hub-post { order: -1; }
  .hub.zoom .hub-scene { transform: scale(1.8); }
  .hub-post { position: relative; left: auto; bottom: auto; width: auto; height: auto; display: flex; justify-content: center; margin: 4px 0 10px; z-index: 4; }
  .hub-post-pole, .hub-post-cap, .hub-arrow { display: none; }
  .hub-plate { position: relative; top: auto; left: auto; font-size: 16px; }
  .hub-lamp { display: none; }
  .hub-city { top: 70px; height: 220px; }
  .hub-street {
    position: relative; left: auto; bottom: auto; transform: none;
    width: 100%; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    justify-content: flex-start; align-items: flex-end;
    padding: 6px 11vw 0;
  }
  .hub-street::-webkit-scrollbar { display: none; }
  .hub-door { flex: 0 0 78vw; max-width: none; scroll-snap-align: center; }
  .hub-fill { display: none; }
  .hub-pool { height: 70px; }
  .hub-tag {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    position: relative; z-index: 4; margin: 10px auto 0; padding: 9px 12px; width: 88%;
    border: 1px solid color-mix(in srgb, var(--lc) 45%, transparent); border-radius: 12px;
    background: rgba(8,8,12,.78); text-align: center;
  }
  .hub-tag b { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--lc); }
  .hub-tag small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #a39d90; }
  .hub-ground { position: relative; height: 60px; margin-top: -36px; }
  .hub-fog.f2 { display: none; }
  .hub-steam { display: none; }
  .hub-info { position: relative; left: auto; bottom: auto; transform: none; margin: 16px auto 0; }
  .hub-hint { min-height: 0; font-size: 15.5px; }
  .hub-results { bottom: auto; top: calc(100% + 8px); }
}

@media (max-width: 1150px) and (min-width: 761px) { .hub-arrow { display: none; } .hub-plate { min-width: 0; font-size: 14px; } }

@media (prefers-reduced-motion: reduce) {
  .hub *, .hub *::before, .hub *::after { animation: none !important; }
  .hub-scene { transition: none; }
}
