/* ============================================================
   Интерфейсы вещей: книжная полка, смола, «Буханка», глобус, календарь
   ============================================================ */
@font-face { font-family: 'Old Standard'; src: url('../fonts/OldStandard-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Old Standard'; src: url('../fonts/OldStandard-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Old Standard'; src: url('../fonts/OldStandard-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'ZH Serif'; src: url('../fonts/zh/NotoSerifSC-400.woff2') format('woff2'); font-weight: 100 550; font-display: swap; unicode-range: U+2E80-2FDF, U+3000-303F, U+3100-312F, U+3190-31FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF; }   /* иероглифы — см. console.css */
@font-face { font-family: 'ZH Serif'; src: url('../fonts/zh/NotoSerifSC-700.woff2') format('woff2'); font-weight: 551 1000; font-display: swap; unicode-range: U+2E80-2FDF, U+3000-303F, U+3100-312F, U+3190-31FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF; }
@font-face { font-family: 'HE Serif'; src: url('../fonts/he/FrankRuhlLibre-Hebrew.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; unicode-range: U+0590-05FF, U+FB1D-FB4F; }   /* иврит — Frank Ruhl Libre, книжная классика */

#thing { position: fixed; inset: 0; z-index: 42; display: grid; place-items: center; background: rgba(1, 4, 14, .66); backdrop-filter: blur(3px); }
#thing[hidden] { display: none; }
#thing.in { animation: thFade .25s ease-out both; }
#thing.out { animation: thFade .25s ease-in reverse both; }
@keyframes thFade { from { opacity: 0; } }
#thing .thIn {
  position: relative; width: min(1180px, calc(100vw - 32px)); height: min(760px, calc(100vh - 32px));
  overflow: clip; border-radius: 18px; border: 2px solid #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(88, 240, 255, .07), transparent 55%),
    radial-gradient(100% 80% at 0% 100%, rgba(255, 91, 214, .07), transparent 60%),
    linear-gradient(180deg, rgba(18, 30, 78, .98), rgba(6, 11, 34, .98));
  box-shadow: -3px 2px 0 rgba(88,240,255,.75), 3px 3px 0 rgba(255,91,214,.65), 0 30px 90px rgba(0,0,0,.7);
}
#thing .thIn:focus { outline: none; }
#thing.in .thIn { animation: thPop .34s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes thPop { from { transform: scale(.95) translateY(10px); opacity: 0; } }
.thClose { position: absolute; right: 14px; top: 12px; z-index: 5; font: 8px/1 'Pixel', 'ZH Pixel', 'HE Pixel'; color: #8e9ccc; padding: 8px; }
.thClose:hover, .thClose:focus-visible { color: #fff; outline: none; }
.thBody { position: absolute; inset: 0; }

/* общий макет: слева сцена с вещью, справа текст */
.thGrid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); height: 100%; }
.thStage { position: relative; min-height: 0; container-type: size; overflow: hidden; border-right: 1px solid rgba(90, 115, 190, .35);
  background: radial-gradient(62% 58% at 50% 46%, rgba(70, 96, 190, .26), transparent 70%), radial-gradient(40% 12% at 50% 86%, rgba(0, 0, 0, .45), transparent 70%); }
.thSide { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 34px 30px 26px; scrollbar-width: thin; scrollbar-color: #2a3a78 transparent; }
#thTitle { margin: 0 0 14px; padding-right: 70px; font: italic 900 30px/1.08 'Exo 2', 'ZH Sans', 'HE Sans'; color: #fff; text-shadow: -2px 1px 0 rgba(88,240,255,.75), 2px 2px 0 rgba(255,91,214,.65); }
.thText { margin: 0; font: 400 16px/1.62 'Exo 2', 'ZH Sans', 'HE Sans'; color: #d9e1fa; }
.thText.in { animation: txIn .45s ease-out both; }
@keyframes txIn { from { opacity: 0; transform: translateY(6px); } }
.thSmall { margin: 18px 0 0; font: 7px/1.8 'Pixel', 'ZH Pixel', 'HE Pixel'; color: #6f7cae; }
.thSub { margin: 22px 0 8px; font: italic 800 16px/1.2 'Exo 2', 'ZH Sans', 'HE Sans'; color: #fff; }
.thTabs { display: grid; gap: 8px; margin: 0 0 18px; }
.thTabs button, .thBtn { text-align: start; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(90, 115, 190, .5); background: rgba(10, 20, 58, .6);
  font: italic 800 15px/1.2 'Exo 2', 'ZH Sans', 'HE Sans'; color: #b8c4ea; transition: color .15s, border-color .15s, background .15s; }
.thTabs button.on, .thTabs button:hover, .thBtn:hover { color: #fff; border-color: #fff; background: rgba(20, 34, 90, .7); }
.thTabs button:focus-visible, .thBtn:focus-visible { outline: 2px solid #58f0ff; outline-offset: 2px; }
.thBtn { margin-top: 20px; align-self: flex-start; }
.thHint { position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; text-align: center; font: 7px/1.4 'Pixel', 'ZH Pixel', 'HE Pixel'; color: #7684b8; pointer-events: none; transition: opacity .4s; }
.thArrows { font: 400 13px/1 'Exo 2', 'ZH Sans', 'HE Sans'; margin-right: 8px; vertical-align: -2px; color: #58f0ff; }

/* «вертушка» */
.turnCv { position: absolute; inset: 0; margin: auto; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); display: block; cursor: grab; touch-action: pan-y; outline: none; opacity: 0; transition: opacity .5s; }
.ready > .turnCv { opacity: 1; }
.grabbing > .turnCv { cursor: grabbing; }
.turnCv:focus-visible { outline: 2px dashed rgba(88, 240, 255, .5); outline-offset: -8px; border-radius: 50%; }
.vnTurn, .glTurn, .rsTurn { position: absolute; inset: 0; container-type: size; }

/* ---------- смола ---------- */
.rsOver { position: absolute; inset: 0; margin: auto; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); transform-origin: 0 0;
  transition: transform .8s cubic-bezier(.45, .05, .25, 1), opacity .4s .1s; }
.rsOver img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.rsStage.zoomed .rsOver { opacity: 0; transition: transform .8s cubic-bezier(.45, .05, .25, 1), opacity .35s .5s; pointer-events: none; }
.rsTurn { opacity: 0; pointer-events: none; transition: opacity .45s; }
.rsTurn.show { opacity: 1; pointer-events: auto; }
.rsStage .thHint { opacity: 0; }
.rsStage.zoomed .thHint { opacity: 1; transition-delay: .9s; }

/* ---------- «Буханка» ---------- */
.vnFav { margin: 0 0 12px; font: 600 14.5px/1.4 'Exo 2', 'ZH Sans', 'HE Sans'; color: #ffd84d; }
.vnFav span { margin-right: 4px; }
.vnList section { margin: 0 0 14px; }
.vnList h4 { margin: 0 0 6px; font: 7px/1.4 'Pixel', 'ZH Pixel', 'HE Pixel'; color: #8e9ccc; letter-spacing: .04em; text-transform: uppercase; }
.vnList h4 span { color: #56639a; margin-left: 4px; }
.vnList ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 18px; }
.vnList li { break-inside: avoid; padding: 3px 0 3px 12px; position: relative; font: 400 13.5px/1.35 'Exo 2', 'ZH Sans', 'HE Sans'; color: #aab8e2; }
.vnList li::before { content: ''; position: absolute; left: 0; top: .72em; width: 5px; height: 1px; background: #56639a; }

/* ---------- глобус (WebGL) ---------- */
.glStage { overflow: hidden; background: radial-gradient(48% 46% at 50% 47%, rgba(255, 190, 110, .12), transparent 70%), radial-gradient(62% 58% at 50% 46%, rgba(70, 96, 190, .22), transparent 72%); }
.glCv, .glPins { position: absolute; inset: 0; display: block; touch-action: none; }
.glCv { cursor: grab; outline: none; opacity: 0; transition: opacity .6s; }
.glStage.ready .glCv { opacity: 1; }
.glStage.grabbing .glCv { cursor: grabbing; }
.glCv:focus-visible { box-shadow: inset 0 0 0 2px rgba(88, 240, 255, .5); }
.glPins { pointer-events: none; }
.glStand { position: absolute; max-width: none; pointer-events: none; user-select: none; transition: opacity .3s; }
.glTip { position: absolute; z-index: 3; pointer-events: none; padding: 7px 10px; border-radius: 8px; background: rgba(6, 11, 34, .9); border: 1px solid rgba(255, 255, 255, .35);
  font: 600 14px/1.2 'Exo 2', 'ZH Sans', 'HE Sans'; color: #fff; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.glTip span { display: block; margin-top: 4px; font: 7px/1 'Pixel', 'ZH Pixel', 'HE Pixel'; letter-spacing: .04em; }
.glTip span.lived { color: #ffd84d; } .glTip span.visited { color: #ffb866; }
.glZoom { position: absolute; right: 16px; bottom: 44px; z-index: 3; display: grid; gap: 6px; }
.glZoom button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(6, 11, 34, .75); font: 600 20px/1 'Exo 2', 'ZH Sans', 'HE Sans'; color: #fff; }
.glZoom button:hover { background: rgba(20, 34, 90, .9); }
.glZoom button:focus-visible { outline: 2px solid #58f0ff; outline-offset: 2px; }

/* ---------- часы ---------- */
.ckStage { display: grid; place-items: center; }
.ckBox { position: relative; height: min(94cqh, calc(94cqw * 1500 / 736)); touch-action: none; outline: none; user-select: none;
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .55)); }
.ckBox img { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-user-drag: none; pointer-events: none; }
.ckPendClip { position: absolute; inset: 0; }
.ckGlass { position: absolute; pointer-events: none; border-radius: 8% 8% 0 0 / 5% 5% 0 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .1) 38%, transparent 47%, transparent 62%, rgba(255, 255, 255, .05) 68%, transparent 76%); }
.ckHand { will-change: transform; filter: drop-shadow(1px 2px 1.5px rgba(0, 0, 0, .45)); }
.ckBox.grabbing { cursor: grabbing; }
.ckBox:focus-visible { outline: 2px dashed rgba(88, 240, 255, .5); outline-offset: 6px; }
.ckStage .thHint { bottom: 10px; }

/* ---------- глобус ---------- */
.glLegend { list-style: none; margin: 14px 0 10px; padding: 0; display: grid; gap: 6px; font: 400 13.5px/1.35 'Exo 2', 'ZH Sans', 'HE Sans'; color: #aab8e2; }
.glLegend li { display: flex; align-items: center; gap: 10px; }
.glLegend li::before, .glList button::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; }
.glLegend .lived::before, .glList .lived::before { background: #ffd84d; box-shadow: 0 0 8px rgba(255, 216, 77, .8); }
.glLegend .visited::before, .glList .visited::before { background: #ffb866; box-shadow: 0 0 10px rgba(255, 170, 70, .75); opacity: .75; }
.glList { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.glList button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(90, 115, 190, .45);
  background: rgba(10, 20, 58, .55); font: 600 13.5px/1 'Exo 2', 'ZH Sans', 'HE Sans'; color: #b8c4ea; transition: color .15s, border-color .15s, background .15s; }
.glList button:hover, .glList button.on { color: #fff; border-color: #fff; background: rgba(20, 34, 90, .75); }
.glList button:focus-visible { outline: 2px solid #58f0ff; outline-offset: 2px; }

/* ---------- календарь ---------- */
.clStage { display: grid; place-items: center; }
.clBoard { position: relative; width: min(74cqw, 60cqh); aspect-ratio: 3 / 4; padding: 12% 9% 9%; border-radius: 10px; container-type: inline-size;
  background: radial-gradient(90% 60% at 50% 18%, #8a1e1a, #4a0c0c 70%), #4a0c0c;
  box-shadow: inset 0 0 0 3px #3a0808, inset 0 0 0 5px #c9a14a, inset 0 0 0 7px #3a0808, 0 26px 60px rgba(0, 0, 0, .6); }
.clBoard::before { content: '★'; position: absolute; left: 0; right: 0; top: 3.4%; text-align: center; font: 400 6cqi/1 'Old Standard', 'ZH Serif', 'HE Serif', serif; color: #e2bd62; text-shadow: 0 1px 0 #2a0505; }
.clRings { position: absolute; left: 50%; top: 9.5%; width: 34%; transform: translateX(-50%); display: flex; justify-content: space-between; z-index: 3; pointer-events: none; }
.clRings i { width: 16%; aspect-ratio: 1 / 2.2; border-radius: 40% 40% 30% 30%; background: linear-gradient(90deg, #6d6f78, #e9ecf2 45%, #8c8f99); box-shadow: 0 2px 3px rgba(0, 0, 0, .5); }
.clPad { position: relative; height: 100%; perspective: 900px; }
.clPad::before { content: ''; position: absolute; inset: 1.5% -1% -2.2% -1%; border-radius: 3px; background: repeating-linear-gradient(180deg, #e9e2d0 0 2px, #cfc6b0 2px 3px); box-shadow: 0 6px 12px rgba(0, 0, 0, .45); }
.clPage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 3%; padding: 11% 8% 7%; border-radius: 2px; text-align: center;
  background: radial-gradient(130% 90% at 50% 0%, #fbf6ea, #efe6d2); color: #2a1f16; transform-origin: 50% 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  font: 400 12px/1.4 'Old Standard', 'ZH Serif', 'HE Serif', serif; cursor: pointer; }
.clPage::before { content: ''; position: absolute; left: 4%; right: 4%; top: 4.5%; height: 2px; background: radial-gradient(circle, rgba(120, 100, 80, .55) 1px, transparent 1.4px) 0 0 / 7px 2px repeat-x; }
.clYear { font: 700 21cqi/.9 'Old Standard', 'ZH Serif', 'HE Serif', serif; color: #b3201b; letter-spacing: -.01em; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.clT { font: italic 400 4.4cqi/1.2 'Old Standard', 'ZH Serif', 'HE Serif', serif; color: #3d2a1c; }
.clPic { width: 100%; flex: 1; min-height: 0; border-radius: 2px; background: #10152a center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(60, 40, 20, .5), 0 0 0 3px #efe6d2, 0 0 0 4px rgba(120, 90, 60, .35); filter: sepia(.25) saturate(.9); }
.clNote { font: 400 3.3cqi/1.35 'Old Standard', 'ZH Serif', 'HE Serif', serif; color: #5a4632; }
.clLast { cursor: default; justify-content: center; }
.clEmpty { margin: 0; font: italic 400 4.2cqi/1.5 'Old Standard', 'ZH Serif', 'HE Serif', serif; color: #6d5842; }
button.clPage:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 -6px 18px rgba(255, 220, 160, .12); }
button.clPage:focus-visible { outline: 2px solid #58f0ff; outline-offset: 3px; }
.clPage.torn { animation: clTear .9s cubic-bezier(.5, .05, .7, .4) forwards; pointer-events: none; }
@keyframes clTear {
  0% { transform: none; }
  22% { transform: rotateX(-24deg) rotateZ(-2deg); }
  100% { transform: translate(18%, 135%) rotateX(-60deg) rotateZ(16deg); opacity: 0; visibility: hidden; }
}

/* ---------- шкаф ---------- */
.wdStage { display: grid; place-items: center; }
.wdBox { position: relative; height: min(92cqh, calc(92cqw * 1440 / 760)); aspect-ratio: var(--ar); perspective: 1800px; transform-origin: 0 0;
  transition: transform .85s cubic-bezier(.45, .05, .25, 1), opacity .35s .55s; }
.wdOpen { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.wdOpen.hot { cursor: pointer; }
.wdHl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .18s; mix-blend-mode: screen; }
.wdHl.on { opacity: 1; }
.wdTag { position: absolute; z-index: 3; margin: 0; transform: translate(-50%, calc(-100% - 10px)); padding: 7px 12px 8px; border-radius: 9px; pointer-events: none; white-space: nowrap;
  background: rgba(4, 8, 24, .78); border: 1px solid rgba(240, 248, 255, .85); box-shadow: 0 0 14px rgba(110, 195, 255, .45); text-align: center; }
.wdTag b { display: block; font: italic 800 15px/1.1 'Exo 2', 'ZH Sans', 'HE Sans', sans-serif; color: #fff; }
.wdTag span { display: block; margin-top: 4px; font: 6px/1 'Pixel', 'ZH Pixel', 'HE Pixel', monospace; color: #9fb4e8; }
.wdTag.in { animation: wdTag .25s ease-out both; }
@keyframes wdTag { from { opacity: 0; transform: translate(-50%, calc(-100% - 2px)); } }
.wdDoor { position: absolute; padding: 0; border: 0; background-repeat: no-repeat; transform-style: preserve-3d; backface-visibility: hidden; cursor: pointer;
  transition: transform 1.25s cubic-bezier(.34, .02, .18, 1); }
.wdDoor.l { transform-origin: 0 50%; }
.wdDoor.r { transform-origin: 100% 50%; }
.wdDoor .wdBack { position: absolute; inset: 0; transform: rotateY(180deg); backface-visibility: hidden; background-color: #2a160a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5), inset 0 0 40px rgba(0, 0, 0, .45); }
.wdStage.open .wdDoor.l { transform: rotateY(-112deg); }
.wdStage.open .wdDoor.r { transform: rotateY(112deg); }
.wdDoor:focus-visible { outline: 2px solid #58f0ff; outline-offset: -4px; }
.wdStage.open .thHint { opacity: 0; }
.wdStage.zoomed .wdBox { opacity: 0; pointer-events: none; }
.wdStage.zoomed .thHint { opacity: 1; transition-delay: .9s; }
.wdTurn { position: absolute; inset: 0; container-type: size; opacity: 0; pointer-events: none; transition: opacity .45s; }
.wdTurn.show { opacity: 1; pointer-events: auto; }

/* ============================================================
   КНИЖНАЯ ПОЛКА
   ============================================================ */
#thing .thIn.th-books { background:
    radial-gradient(55% 45% at 50% 100%, rgba(255, 176, 90, .16), transparent 70%),
    radial-gradient(60% 50% at 30% 42%, rgba(255, 190, 120, .08), transparent 70%),
    linear-gradient(180deg, rgba(18, 26, 66, .98), rgba(10, 10, 26, .99)); }
.th-books .thBody { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.bkHead { padding: 26px 30px 0; max-width: 820px; }
.bkHead #thTitle { margin-bottom: 8px; }
.bkHead .thText { font-size: 15px; color: #b9c4e8; }
.bkStage { position: relative; min-height: 0; perspective: 1700px; }
.bkEmpty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font: 8px/1.6 'Pixel', 'ZH Pixel', 'HE Pixel'; color: #6f7cae; transition: opacity .4s; }
.bkStage.open .bkEmpty { opacity: 0; }
.bkFly { position: absolute; left: 0; top: 0; bottom: 0; width: 46%; transform-style: preserve-3d; perspective: 1700px; pointer-events: none; }
.bkObj { position: absolute; left: 50%; top: 50%; width: var(--W); height: var(--H); margin: calc(var(--H) / -2) 0 0 calc(var(--W) / -2); transform-style: preserve-3d; pointer-events: auto; }
.bkBob { width: 100%; height: 100%; transform-style: preserve-3d; }
.bkObj.rest .bkBob { animation: bkBob 6s ease-in-out infinite; }
@keyframes bkBob { 50% { transform: translateY(-7px) rotateZ(.4deg); } }
.bk3d { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(-12deg); cursor: grab; transition: transform .6s cubic-bezier(.3, 1.35, .45, 1); }
.bkObj.flying .bk3d, .bkObj.leaving .bk3d, .bkObj.turning .bk3d { transition: none; }
.bkObj.turning .bk3d { cursor: grabbing; }
.bk3d .f { position: absolute; display: block; background: #2a1a10 center / 100% 100% no-repeat; backface-visibility: hidden; }
.bk3d .front { inset: 0; transform: translateZ(calc(var(--T) / 2)); border-radius: 2px 5px 5px 2px; box-shadow: inset 3px 0 6px rgba(0, 0, 0, .35); }
.bk3d .back { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--T) / 2)); border-radius: 5px 2px 2px 5px; }
.bk3d .spineF { top: 0; height: 100%; width: var(--T); left: calc(50% - var(--T) / 2); transform: rotateY(-90deg) translateZ(calc(var(--W) / 2)); border-radius: 3px; }
.bk3d .edge { top: 1.2%; height: 97.6%; width: calc(var(--T) - 4px); left: calc(50% - var(--T) / 2 + 2px); transform: rotateY(90deg) translateZ(calc(var(--W) / 2 - 4px));
  background: repeating-linear-gradient(90deg, #efe6d0 0 1px, #d9ceb4 1px 2px), #e7dcc4; box-shadow: inset 0 0 12px rgba(80, 50, 20, .35); }
.bk3d .top, .bk3d .bottom { left: 1%; width: calc(98% - 4px); height: calc(var(--T) - 4px); top: calc(50% - var(--T) / 2 + 2px);
  background: repeating-linear-gradient(0deg, #efe6d0 0 1px, #d9ceb4 1px 2px), #e7dcc4; box-shadow: inset 0 0 10px rgba(80, 50, 20, .35); }
.bk3d .top { transform: rotateX(90deg) translateZ(calc(var(--H) / 2 - 4px)); }
.bk3d .bottom { transform: rotateX(-90deg) translateZ(calc(var(--H) / 2 - 4px)); }
.bkShadow { position: absolute; left: 6%; right: 6%; bottom: -26px; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); opacity: 0; transition: opacity .6s; }
.bkObj.rest .bkShadow { opacity: 1; }

.bkInfo { position: absolute; right: 0; top: 0; bottom: 0; width: 54%; overflow-y: auto; padding: 18px 40px 20px 8px; display: flex; flex-direction: column; justify-content: center;
  scrollbar-width: thin; scrollbar-color: #2a3a78 transparent; }
.bkInfo.in { animation: bkInfo .6s .35s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes bkInfo { from { opacity: 0; transform: translateX(18px); } }
.bkAu { margin: 0 0 6px; font: 7px/1.5 'Pixel', 'ZH Pixel', 'HE Pixel'; color: #e2bd62; letter-spacing: .05em; text-transform: uppercase; }
.bkInfo h3 { margin: 0 0 14px; font: 700 34px/1.1 'Old Standard', 'ZH Serif', 'HE Serif', 'Exo 2', 'ZH Sans', 'HE Sans', serif; color: #fff4dc; text-shadow: 0 2px 16px rgba(255, 180, 90, .25); }
.bkText { margin: 0; font: 400 16px/1.62 'Exo 2', 'ZH Sans', 'HE Sans'; color: #d9e1fa; }
.bkSym { margin: 14px 0 0; font: italic 400 15px/1.5 'Old Standard', 'ZH Serif', 'HE Serif', serif; color: #e2bd62; }
.bkNav { display: flex; gap: 8px; margin-top: 22px; }
.bkNav button { padding: 9px 14px; border-radius: 10px; border: 1px solid rgba(226, 189, 98, .45); background: rgba(40, 28, 12, .35); font: italic 800 14px/1 'Exo 2', 'ZH Sans', 'HE Sans'; color: #e8d6ae; transition: color .15s, border-color .15s, background .15s; }
.bkNav button:hover { color: #fff; border-color: #ffe2a0; background: rgba(90, 60, 20, .4); }
.bkNav button:focus-visible { outline: 2px solid #58f0ff; outline-offset: 2px; }
.bkInfo .thHint { position: static; margin-top: 16px; text-align: start; color: #6f7cae; }

.bkShelf { position: relative; padding: 0 30px 16px; --sh: clamp(120px, 23vh, 210px); }
.bkShelf::before { content: ''; position: absolute; left: 50%; bottom: 20px; width: min(760px, 90%); height: calc(var(--sh) * 1.3); transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 60% at 50% 0%, rgba(255, 196, 120, .18), transparent 75%); }
.bkRow { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 2px; height: var(--sh); }
.spine { flex: none; height: 100%; width: calc(var(--sh) * var(--r)); padding: 0; border: 0; border-radius: 3px 3px 2px 2px; background: #2a1a10 center / 100% 100% no-repeat;
  box-shadow: inset 2px 0 3px rgba(255, 255, 255, .08), inset -3px 0 5px rgba(0, 0, 0, .45), 0 -2px 10px rgba(0, 0, 0, .35);
  transition: transform .28s cubic-bezier(.2, 1.3, .4, 1), filter .2s, opacity .2s; animation: spIn .5s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: var(--d); cursor: pointer; }
@keyframes spIn { from { transform: translateY(24px); opacity: 0; } }
.spine:hover, .spine:focus-visible { transform: translateY(-14px); filter: brightness(1.15) drop-shadow(0 0 10px rgba(255, 200, 120, .35)); outline: none; }
.spine:focus-visible { box-shadow: 0 0 0 2px #58f0ff; }
.spine.out { opacity: 0; pointer-events: none; transition: opacity .15s; }
.bkPlank { position: relative; height: 16px; margin: 0 auto; width: min(760px, 100%); border-radius: 2px 2px 4px 4px;
  background: linear-gradient(180deg, #8a5a32 0 18%, #6b4224 19% 62%, #4a2c16 63%), repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 2px, transparent 2px 9px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .55); }
.bkLabel { margin: 10px 0 0; min-height: 1.4em; text-align: center; font: italic 400 15px/1.4 'Old Standard', 'ZH Serif', 'HE Serif', serif; color: #e8d6ae; opacity: 0; transition: opacity .2s; }
.bkLabel.on { opacity: 1; }

@media (max-width: 820px) {
  .thGrid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 46%) minmax(0, 1fr); }
  .thStage { border-right: 0; border-bottom: 1px solid rgba(90, 115, 190, .35); }
  .thSide { padding: 20px 18px 18px; }
  #thTitle { font-size: 24px; }
  .vnList ul { columns: 1; }
  .bkHead { padding: 18px 18px 0; } .bkHead .thText { display: none; }
  .bkFly { width: 100%; height: 50%; bottom: auto; }
  .bkInfo { left: 0; width: auto; top: 50%; padding: 6px 18px 10px; justify-content: flex-start; }
  .bkInfo h3 { font-size: 22px; margin-bottom: 8px; }
  .bkText { font-size: 14.5px; }
  .bkShelf { padding: 0 12px 10px; --sh: clamp(96px, 17vh, 150px); transition: --sh .3s; }
  .bkStage.open ~ .bkShelf { --sh: 74px; }
  .bkStage.open ~ .bkShelf .bkLabel { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #thing.in .thIn, .spine, .bkInfo.in, .thText.in { animation: none; }
  .bkObj.rest .bkBob { animation: none; }
  .rsOver, .clPage.torn, .wdBox, .wdDoor { transition: none; animation-duration: .01s; }
}

/* чемоданы */
.scStage .scCv { cursor: pointer; }
.scStage .thHint { transition: opacity .4s; }

/* ---------- иврит: окна вещей справа налево (колонки сетки отражаются сами, здесь — отступы и чёрточки) ---------- */
[dir="rtl"] .thStage { border-right: 0; border-left: 1px solid rgba(90, 115, 190, .35); }
[dir="rtl"] #thTitle { padding-right: 0; padding-left: 70px; }
[dir="rtl"] .thArrows { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .vnFav span { margin-right: 0; margin-left: 4px; }
[dir="rtl"] .vnList h4 span { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .vnList li { padding: 3px 12px 3px 0; }
[dir="rtl"] .vnList li::before { left: auto; right: 0; }
@media (max-width: 820px) { [dir="rtl"] .thStage { border-left: 0; } }
[dir="rtl"] .thClose { right: auto; left: 14px; }   /* крестик — над заголовком, а не над картинкой */
