/* Фон — только у html: у body его нет, иначе он лёг бы поверх плеера YouTube, что стоит под холстом (#cinemaStage, z-index −1). */
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
html { background: #0b0806; }
canvas { display: block; touch-action: none; }
.ui { position: fixed; font-family: 'Cormorant Garamond', Georgia, serif; color: #eadfc8; text-shadow: 0 1px 8px rgba(0,0,0,.75); }
/* Клавиши почти не видны, пока к ним не подойдёт указатель (на телефоне — пока их не коснёшься); счёт листов виден всегда. */
.bar { display: flex; gap: 15px; align-items: center; transition: opacity 1s; touch-action: manipulation; }
.bar > .key { opacity: .13; transition: opacity .5s, transform .12s, box-shadow .2s; }
.bar.near > .key, .bar:focus-within > .key { opacity: 1; transition-duration: .2s, .12s, .2s; }
@media (pointer: coarse) { .bar > .key { opacity: .2; } }
.bar .label { font-style: italic; font-size: 17px; opacity: .8; margin-right: 4px; }
#views { left: 22px; top: 18px; }
/* Шторка режима чтения: z-index не задан, поэтому она под клавишами и подсказками, которые стоят в разметке после неё. */
#curtain { inset: 0; background: #0b0806; opacity: 0; pointer-events: none; transition: opacity .15s linear; }
#curtain.shut { opacity: 1; }
/* В режиме чтения виньетка слабее: текст у краёв разворота читается. */
body.reading { --vignette: .28; }
/* Кнопки — как клавиши машинки: кремовая середина, тёмный обод, знак тушью. Выбранная — с латунным ободом. */
.key { position: relative; box-sizing: border-box; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; display: inline-grid; place-items: center; color: #2a1f15; text-shadow: none;
  background: radial-gradient(circle at 50% 36%, #f7efdc 0%, #e8dabb 60%, #cdba93 100%);
  box-shadow: 0 0 0 2.5px #241a12, 0 0 0 3.5px rgba(205,175,125,.32), 0 3px 9px rgba(0,0,0,.6), inset 0 -2px 3px rgba(80,55,25,.28); transition: transform .12s, box-shadow .2s; }
button.key { cursor: pointer; }
button.key:hover { transform: translateY(-1px); }
button.key:active { transform: translateY(1.5px); }
.key.on { box-shadow: 0 0 0 2.5px #a07c3a, 0 0 0 3.5px rgba(245,205,135,.5), 0 3px 9px rgba(0,0,0,.6), inset 0 -2px 3px rgba(80,55,25,.28); }
.key:disabled { opacity: .55; cursor: progress; }
.key svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.key .glyph { font: 17px 'PT Mono', monospace; letter-spacing: -.04em; line-height: 1; }
.key .glyph.book { font: 19px 'Old Standard TT', serif; letter-spacing: 0; }
/* Подпись всплывает под клавишей (у нижних — над ней). */
.bar .key::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 9px); transform: translateX(-50%); white-space: nowrap; font: italic 500 16px 'Cormorant Garamond', serif; color: #eadfc8; text-shadow: 0 1px 6px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.8); opacity: 0; transition: opacity .2s; pointer-events: none; }
.bar .key:hover::after, .bar .key:focus-visible::after { opacity: 1; transition-delay: .25s; }
#tools .key:last-child::after { left: auto; right: -6px; transform: none; }
#views .key:first-child::after { left: -6px; transform: none; }
#typeTools .key::after, #readTools .key::after, #bookBar .key::after { top: auto; bottom: calc(100% + 9px); }
#typeTools .key:last-child::after, #readTools .key:last-child::after { left: auto; right: -6px; transform: none; }
/* Свет в зале и густота краски — полоска с бегунком у клавиши. */
.slider { display: flex; align-items: center; gap: 10px; padding: 9px 14px; z-index: 6; color: #2f2418; text-shadow: none; background: #e9dfc6 url(../assets/textures/book-paper.jpg) center / cover; border-radius: 3px; box-shadow: 0 10px 28px rgba(0,0,0,.6), inset 0 0 0 1px rgba(110,80,45,.3); }
.slider[hidden] { display: none; }
.slider svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.slider input { -webkit-appearance: none; appearance: none; width: 170px; height: 22px; margin: 0; background: transparent; cursor: pointer; }
.slider input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #3a2a1a, #b08a48); box-shadow: inset 0 1px 1px rgba(0,0,0,.4); }
.slider input::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #3a2a1a, #b08a48); }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: radial-gradient(circle at 50% 36%, #f7efdc, #cdba93); box-shadow: 0 0 0 2px #241a12, 0 2px 5px rgba(0,0,0,.5); }
.slider input::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: radial-gradient(circle at 50% 36%, #f7efdc, #cdba93); box-shadow: 0 0 0 2px #241a12, 0 2px 5px rgba(0,0,0,.5); }
/* Фигурка пресс-папье — три кнопки внизу по центру, как варианты в «убранстве». */
#weightPick { left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 6; display: flex; gap: 8px; padding: 8px 12px; color: #2f2418; text-shadow: none; background: #e9dfc6 url(../assets/textures/book-paper.jpg) center / cover; border-radius: 3px; box-shadow: 0 10px 28px rgba(0,0,0,.6), inset 0 0 0 1px rgba(110,80,45,.3); }
#weightPick[hidden] { display: none; }
#weightPick button { margin: 0; font: italic 500 17px 'Cormorant Garamond', serif; color: #2f2418; background: rgba(255,250,238,.7); border: 0; border-radius: 3px; padding: 4px 14px 5px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(110,80,45,.35); }
#weightPick button.on { box-shadow: inset 0 0 0 2px #a07c3a; background: rgba(255,246,222,.95); }
#tools { right: 22px; top: 18px; }
#typeTools, #readTools, #bookBar { right: 22px; bottom: 22px; display: none; }
#bookBar input { width: 4.2em; font: italic 500 17px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; text-align: center; background: rgba(20,14,9,.55); border: 0; border-bottom: 1px solid rgba(234,223,200,.45); border-radius: 2px; padding: 2px 4px 3px; text-shadow: none; outline: 0; }
#bookBar input:focus { border-bottom-color: #d8b878; background: rgba(20,14,9,.8); }
#bookTip { display: none; pointer-events: none; z-index: 6; font: italic 500 17px 'Cormorant Garamond', Georgia, serif; white-space: nowrap; background: rgba(20,14,9,.74); padding: 2px 10px 4px; border-radius: 3px; text-shadow: none; }
.typing #tools { opacity: 0; pointer-events: none; }
/* «Машинка» — только пока печатаешь: вернуться к ней после того, как огляделся. */
#views [data-v=type] { display: none; }
.typing #views [data-v=type] { display: inline-grid; }
#hint { left: 0; right: 0; bottom: 64px; text-align: center; font-style: italic; font-size: 20px; line-height: 1.45; pointer-events: none; transition: opacity .8s; padding: 0 12%; }
#credits { left: 18px; bottom: 6px; right: 18px; font-size: 11.5px; opacity: .34; pointer-events: none; }
/* Справа внизу клавиши бывают только у машинки — только тогда строка авторов уступает им место. */
/* За машинкой строки авторов нет (её вопрос «зачем мы в режиме печатания показываем текст с лицензиями?»): указание авторства — в «подробнее» и в справке, этого лицензиям достаточно. */
.typing #credits { opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
#loading { inset: 0; display: grid; place-items: center; font-style: italic; font-size: 21px; background: #0b0806; transition: opacity 1.2s; pointer-events: none; z-index: 10; }
/* Тёплая плёночная зернистость и виньетка — чуть-чуть, для лампового ощущения. */
#grain { position: fixed; inset: 0; pointer-events: none; z-index: 5; background: radial-gradient(ellipse at 50% 55%, transparent 55%, rgba(8,5,3,var(--vignette,.55)) 100%); }
#grain::after { content: ''; position: absolute; inset: -50%; background-image: var(--noise); opacity: .07; mix-blend-mode: overlay; animation: grain 1.2s steps(6) infinite; }
/* На ходу зернистость стоит: её шаг стоил пропущенного кадра (stillGrain в room.js). */
.moving #grain::after { animation-play-state: paused; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-1%, 3%); } 80% { transform: translate(4%, 1%); } 100% { transform: translate(0, 0); } }
@media (max-width: 760px) { #typeTools { left: 12px; right: 12px; flex-wrap: wrap; justify-content: flex-end; } #readTools { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); box-sizing: border-box; flex-wrap: wrap; justify-content: flex-end; } #credits { right: 12px; bottom: 2px; } #views { left: 12px; top: 12px; } #tools { right: 12px; top: 12px; } .bar { gap: 12px; } .bar .key { width: 38px; height: 38px; } .bar .key svg { width: 22px; height: 22px; } }
/* За машинкой и при чтении подсказка — сверху, чтобы не закрывать клавиши и разворот. */
.typing #hint { bottom: auto; top: 64px; }
/* Памятка по управлению — карточка из той же бумаги, что и листы. */
/* Памятка и авторы — карточки из той же бумаги, что и листы. */
.sheet { inset: 0; display: grid; place-items: center; background: rgba(8,5,3,.45); z-index: 8; transition: opacity .5s; text-shadow: none; }
.sheet[hidden] { display: none; }
.sheet .card { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; box-sizing: border-box; padding: 26px 30px 22px; color: #2f2418; background: #e9dfc6 url(../assets/textures/book-paper.jpg) center / cover; box-shadow: 0 18px 50px rgba(0,0,0,.6), inset 0 0 40px rgba(120,90,50,.18); border-radius: 2px; }
.sheet h2 { margin: 0 0 14px; font: italic 500 25px 'Cormorant Garamond', serif; }
#help .card { width: min(700px, calc(100vw - 32px)); }
#help dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 17px; line-height: 1.28; }
#help dt { font-family: 'PT Mono', monospace; font-size: 13.5px; letter-spacing: .02em; padding-top: 3px; color: #4a3826; }
#help dd { margin: 0; }
#help .intro { margin: 0 0 16px; font-size: 17px; line-height: 1.3; }
.sheet button { margin-top: 18px; font: italic 500 18px 'Cormorant Garamond', serif; color: #2f2418; background: rgba(255,250,238,.7); border: 0; border-radius: 3px; padding: 5px 18px 6px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(110,80,45,.35); }
/* Вопрос у двери — внизу кадра: дверь со львами остаётся на виду. */
#door { place-items: end center; padding-bottom: 7vh; box-sizing: border-box; background: rgba(8,5,3,.25); }
#door .card { width: min(440px, calc(100vw - 32px)); text-align: center; padding: 24px 30px 24px; }
#door p { margin: 0 0 8px; font-size: 19px; line-height: 1.3; }
#door .note { font-size: 16.5px; font-style: italic; color: #5a4630; }
#door .star { margin: 14px 0 0; font-size: 16.5px; }
#door .star a { color: #4a3520; text-decoration: none; border-bottom: 1px solid rgba(90,70,48,.35); }
#door .star a:hover, #door .star a:focus-visible { color: #2a1d12; border-bottom-color: #8a6a36; outline: 0; }
#door .star svg { width: 1.05em; height: 1.05em; vertical-align: -.16em; margin: 0 .1em; fill: #f2c230; stroke: #a87b12; stroke-width: 1; stroke-linejoin: round; filter: drop-shadow(0 0 3px rgba(242,194,48,.55)); }
#door .choice { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
#door .choice button { margin-top: 0; }
#door .choice a { font: italic 500 18px 'Cormorant Garamond', serif; color: #f3e9d0; background: #3a2218; border-radius: 3px; padding: 5px 18px 6px; text-decoration: none; box-shadow: inset 0 0 0 1px #8a6a36; }
#door .choice a:hover, #door .choice a:focus-visible { background: #4a2c1a; }
#about .card { width: min(760px, calc(100vw - 32px)); font-size: 16px; line-height: 1.35; }
#about h3 { margin: 18px 0 6px; font: 13.5px 'PT Mono', monospace; letter-spacing: .02em; color: #4a3826; }
#about p, #about ul { margin: 6px 0; }
#about ul { padding-left: 18px; }
#about table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
#about td, #about th { text-align: left; vertical-align: top; padding: 4px 8px 4px 0; border-bottom: 1px solid rgba(110,80,45,.22); }
#about th { font-weight: 600; }
#about a { color: #5a3a1e; white-space: nowrap; }
#about code { font: 13px 'PT Mono', monospace; }
#help h3 { margin: 16px 0 8px; font: 13.5px 'PT Mono', monospace; letter-spacing: .02em; color: #4a3826; }
#help .note { margin: -2px 0 10px; font-size: 15.5px; font-style: italic; }
/* Клавиши — по разделам, одна колонка: значок слева, название жирным, пояснение следом. */
#help .legend h4 { margin: 14px 0 6px; font: italic 600 18px 'Cormorant Garamond', Georgia, serif; color: #3a2a1a; }
#help .legend ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
#help .legend li { display: flex; align-items: flex-start; gap: 12px; font-size: 16.5px; line-height: 1.3; }
#help .legend li > span:last-child { padding-top: 3px; color: #6b5438; }
#help .legend li b { font-weight: 600; color: #1f150c; }
#help .legend .key { flex: none; width: 28px; height: 28px; box-shadow: 0 0 0 2px #241a12, 0 2px 4px rgba(0,0,0,.35); }
#help .legend .key svg { width: 17px; height: 17px; }
#help .legend .key .glyph { font-size: 12.5px; }
@media (max-width: 520px) { #help dl { grid-template-columns: 1fr; gap: 2px; } #help dd { margin-bottom: 8px; } }
/* Убранство: варианты — кнопками-ярлычками, выбранный — с латунным ободком. */
#decor .card { width: min(620px, calc(100vw - 32px)); }
#decor h3 { margin: 16px 0 8px; font: 13.5px 'PT Mono', monospace; letter-spacing: .02em; color: #4a3826; }
#decor .choices { display: flex; flex-wrap: wrap; gap: 8px; }
#decor .choices button { margin: 0; font-size: 17px; padding: 4px 14px 5px; }
#decor .choices button:disabled { opacity: .45; cursor: default; }
#decor .choices button.on { box-shadow: inset 0 0 0 2px #a07c3a; background: rgba(255,246,222,.95); }
/* На узком телефоне клавиши справа переносятся во второй ряд и не наезжают на клавиши слева. */
@media (max-width: 420px) { #tools { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 124px); row-gap: 10px; } }
/* Экран перетасовки (shuffle-screen.js): сукно во весь экран поверх зала, листы на нём — страницами папки. Свет лампы и виньетка — на экране неподвижны. */
.shuf { position: fixed; inset: 0; z-index: 9; background: #1b2418; opacity: 0; transition: opacity .2s; text-shadow: none; }
.shuf.on { opacity: 1; }
.shuf-scroll { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(216, 203, 167, .35) transparent;
  background:
    radial-gradient(ellipse 62% 58% at 17% 6%, rgba(255, 214, 140, .30), rgba(255, 196, 110, .10) 55%, transparent 80%) fixed,
    radial-gradient(ellipse 120% 110% at 42% 38%, transparent 38%, rgba(8, 10, 6, .72) 100%) fixed,
    linear-gradient(rgba(36, 22, 6, .22), rgba(36, 22, 6, .22)) fixed,
    url(../assets/textures/baize-color.jpg) 0 0 / 560px 560px local,
    #34452f;
  background-blend-mode: normal, normal, normal, multiply, normal; }
.shuf-field { position: relative; min-height: 100%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.shuf-field .slot { position: absolute; left: 0; top: 0; width: var(--w); height: calc(var(--h) + var(--cap)); touch-action: pan-y; cursor: grab; will-change: transform; }
.shuf-field.dragging, .shuf-field.dragging .slot { cursor: grabbing; }
.shuf-field .paper { position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); background: #e4d8b8; transform-origin: 50% 50%; will-change: transform; }
.shuf-field .paper canvas { position: relative; display: block; width: 100%; height: 100%; pointer-events: none; }
.shuf-field .sh { position: absolute; inset: 0; pointer-events: none; }
.shuf-field .sh-rest { box-shadow: 0 1px 1.5px rgba(0, 0, 0, .55), 0 3px 6px rgba(0, 0, 0, .38), 0 7px 14px rgba(0, 0, 0, .2); }
.shuf-field .sh-lift { opacity: 0; box-shadow: 3px 12px 22px rgba(0, 0, 0, .36), 6px 28px 48px rgba(0, 0, 0, .3), 1px 3px 5px rgba(0, 0, 0, .28); }
.shuf-field .num { position: absolute; left: 0; top: calc(var(--h) + 7px); width: 100%; text-align: center; pointer-events: none;
  font: italic 500 15px 'Cormorant Garamond', serif; color: #d8cba7; opacity: .62; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
/* Окно на месте вставки: продавленное сукно — чуть темнее, без рамки */
.shuf-field .hole { position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); opacity: 0; pointer-events: none; will-change: transform, opacity;
  background: radial-gradient(ellipse at 50% 45%, rgba(6, 12, 4, .07), rgba(6, 12, 4, .15));
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .2), inset 0 0 22px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 230, 170, .05); border-radius: 2px; }
.shuf-done { position: fixed; right: 22px; top: 18px; z-index: 1; }
.shuf-done::after { content: attr(data-tip); position: absolute; right: -6px; top: calc(100% + 9px); white-space: nowrap; font: italic 500 16px 'Cormorant Garamond', serif; color: #eadfc8; text-shadow: 0 1px 6px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .8); opacity: 0; transition: opacity .2s; pointer-events: none; }
.shuf-done:hover::after, .shuf-done:focus-visible::after { opacity: 1; transition-delay: .25s; }
.shuf-said { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: min(92vw, 760px); text-align: center; pointer-events: none;
  font: italic 500 16px 'Cormorant Garamond', serif; color: #eadfc8; text-shadow: 0 1px 6px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .8); opacity: 0; transition: opacity .5s; }
.shuf-said.on { opacity: .9; transition-duration: .2s; }
.key[hidden] { display: none; }
@media (max-width: 760px) { .shuf-done { right: 12px; top: 12px; width: 38px; height: 38px; } }

/* Строка книги: название мелким курсивом (не шире трети строки), клавиши «положить» и «вынуть» PDF. */
#bookBar .label.title { max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; opacity: .62; margin-right: 6px; }
#bookBar [hidden] { display: none; }
/* Клавиши строки книги и строки папки лежат на тёмной плашке и видны всегда: без них вещью нельзя пользоваться (урок 2026-11-17: клавиша, спрятанная в .13, осталась незамеченной). Подпись — над клавишей по наведению. */
#bookBar > .key, #readTools > .key { opacity: 1; width: 40px; height: 40px; }
#bookBar .key svg, #readTools .key svg { width: 23px; height: 23px; }
/* Подпись на тёмной подложке: под строкой книги — светлая страница, и без неё курсив не прочесть. */
#bookBar .key::after, #readTools .key::after, #standKeys .key::after, body.reading #views [data-v=read]::after { background: rgba(20,14,9,.8); padding: 1px 10px 3px; border-radius: 9px; text-shadow: none; }
#bookBar #bookPad::after, #bookBar #bookOut::after, #readTools #folderOut::after { left: auto; right: -6px; transform: none; }
/* Нажатая один раз клавиша, которой нужно подтверждение («вынуть PDF»), краснеет, пока подтверждение ждёт. */
.key.armed { box-shadow: 0 0 0 2.5px #a8483a, 0 0 0 3.5px rgba(235,140,110,.5), 0 3px 9px rgba(0,0,0,.6), inset 0 -2px 3px rgba(80,55,25,.28); }
/* На сенсорном экране подпись показывает долгое касание (room.js, longTip), наведения там нет. */
.key.tipping::after { opacity: 1 !important; transition-delay: 0s !important; }
@media (hover: none) { .bar .key:hover::after { opacity: 0; } .bar .key.tipping:hover::after { opacity: 1; } }
/* Пока раскрытая книга перед глазами, строка и подсказка лежат на светлой бумаге: мелкий текст об авторах уходит, у надписей — плотная тень. */
#credits { transition: opacity .6s; }
.bookread #credits { opacity: 0; visibility: hidden; }
.bookread #hint { text-shadow: 0 1px 2px #000, 0 0 5px rgba(0,0,0,.95), 0 0 14px rgba(0,0,0,.9), 0 0 26px rgba(0,0,0,.75); }
#bookBar, #readTools { background: rgba(20,14,9,.62); padding: 5px 16px 5px 18px; border-radius: 28px; right: 14px; bottom: 14px; }
#readTools .label { opacity: .92; text-shadow: none; }
#bookBar .label { opacity: .92; text-shadow: none; }
#bookBar .label.title { opacity: .7; }

@media (max-width: 900px) { #bookBar { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 28px); gap: 8px 12px; border-radius: 18px; } #bookBar .label.title { max-width: 9em; } }
/* Вопрос «Куда положить PDF?»: тёмная плашка у строки книги; нажатие мимо — отмена. */
#bookAsk { inset: 0; z-index: 7; }
#bookAsk[hidden] { display: none; }
#bookAsk .plate { position: absolute; right: 14px; bottom: 74px; width: min(340px, calc(100vw - 28px)); box-sizing: border-box; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; background: rgba(20,14,9,.9); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(205,175,125,.2); text-shadow: none; }
#bookAsk h3 { margin: 0 4px 2px; font: italic 600 20px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; }
#bookAsk .opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 7px 12px 8px; border: 0; border-radius: 9px; cursor: pointer; color: #eadfc8; font-family: 'Cormorant Garamond', Georgia, serif; background: rgba(60,42,26,.7); box-shadow: inset 0 0 0 1px rgba(205,175,125,.25); transition: background .15s, box-shadow .15s; }
#bookAsk .opt b { font: italic 600 19px 'Cormorant Garamond', Georgia, serif; }
#bookAsk .opt span { font: italic 500 15px 'Cormorant Garamond', Georgia, serif; opacity: .72; }
#bookAsk .opt:hover, #bookAsk .opt:focus-visible { background: rgba(92,64,36,.85); box-shadow: inset 0 0 0 1px #d8b878; outline: 0; }

/* Клавиши подставки — колонка над правым концом строки книги: включить, круче, угол, площе. Видны заметнее остальных клавиш (это то, чем пользуются прямо сейчас), подпись — слева. */
#standKeys { right: 22px; bottom: 84px; display: none; flex-direction: column; gap: 9px; align-items: center; }
#standKeys[hidden] { display: none; }
#standKeys > .key { opacity: .9; width: 40px; height: 40px; }
#standKeys.near > .key, #standKeys:focus-within > .key { opacity: 1; }
#standKeys .key[hidden], #standKeys .label[hidden] { display: none; }
#standKeys .key:disabled { opacity: .3; cursor: default; }
#standKeys .key::after { top: 50%; bottom: auto; left: auto; right: calc(100% + 12px); transform: translateY(-50%); }
#standKeys .label { margin: -2px 0; padding: 0 8px 1px; border-radius: 10px; background: rgba(20,14,9,.62); font-variant-numeric: tabular-nums; }
/* «Читать книгу?» — крупная плашка под книгой (или внизу), по центру; остальной экран чуть темнее, нажатий затемнение не ловит. Положение по вертикали задаёт offerPlace (room.js). */
#readDim { inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(ellipse at 50% 78%, rgba(8,5,3,.03) 0, rgba(8,5,3,.12) 75%); }
#readDim.on { opacity: 1; }
#readDim[hidden], #readOffer[hidden] { display: none; }
#readOffer { left: 50%; top: 70%; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 26px 16px; border-radius: 22px; background: rgba(17,11,7,.58); box-shadow: 0 8px 26px rgba(0,0,0,.3), inset 0 0 0 1px rgba(216,184,120,.38); text-shadow: none; max-width: calc(100vw - 32px); box-sizing: border-box; animation: offerIn .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes offerIn { from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.96); } }
#readOffer .q { font: italic 600 32px/1.1 'Cormorant Garamond', Georgia, serif; color: #f6ecd6; white-space: nowrap; }
#readOffer .sub { font: italic 500 16px 'Cormorant Garamond', Georgia, serif; color: rgba(234,223,200,.7); margin-bottom: 10px; }
#readOffer .row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
#readOffer button { font: italic 600 22px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; background: rgba(92,64,36,.6); border: 0; border-radius: 26px; padding: 8px 30px 10px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(216,184,120,.4); transition: background .15s, box-shadow .15s; }
#readOffer button:first-of-type { background: rgba(170,118,52,.78); color: #fff6e0; box-shadow: inset 0 0 0 1px rgba(255,226,160,.55), 0 2px 12px rgba(190,130,50,.35); }
#readOffer button.quiet { margin-top: 6px; font-size: 18px; padding: 2px 12px 4px; background: none; box-shadow: none; color: rgba(234,223,200,.72); }
#readOffer button:hover, #readOffer button:focus-visible { box-shadow: inset 0 0 0 2px #e6c47e; outline: 0; }
@media (max-width: 560px) { #readOffer { padding: 16px 18px 18px; } #readOffer .q { font-size: 32px; white-space: normal; text-align: center; } #readOffer button { font-size: 22px; padding: 6px 20px 8px; } }
/* Режим чтения: наверху слева — одна клавиша, «читать книгу» с перечёркнутым значком (выйти); остальные клавиши видов и вся группа справа убраны. Клавиша видна всегда, подпись — первые секунды
   первого чтения (класс cap) и по наведению. */
body.reading #tools, body.reading #inkPanel, body.reading #views .key:not([data-v=read]) { display: none; }
body.nocursor, body.nocursor * { cursor: none !important; }
body.reading:not(.idleui) .bar, body.reading:not(.idleui) #hint { transition-duration: .15s; }
body.idleui .bar, body.idleui #hint, body.idleui #bookTip, body.idleui #lightPanel, body.idleui #credits { opacity: 0 !important; pointer-events: none !important; transition-duration: .4s; }
body.reading #views [data-v=read] { opacity: 1; width: 46px; height: 46px; }
body.reading #views [data-v=read]::after, #fsKey .key::after { left: -6px; transform: none; }
#fsKey { left: 83px; top: 18px; display: none; }
body.reading #fsKey { display: flex; }
body.reading #fsKey .key { opacity: 1; width: 46px; height: 46px; }
/* Свет — и при чтении: клавиша рядом с «во весь экран» (в зале она прячется — там свет в группе справа). */
#fsKey { gap: 14px; }
#lightReadBtn::after { left: -6px; transform: none; }
body.reading #views [data-v=read].cap::after { opacity: 1; }
/* «Убрать папку» — клавиша в строке папки; вопрос о листах — та же плашка, что «Куда положить PDF?». */
#folderAsk { inset: 0; z-index: 7; }
#folderAsk[hidden] { display: none; }
#folderAsk .plate { position: absolute; right: 14px; bottom: 74px; width: min(360px, calc(100vw - 28px)); box-sizing: border-box; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; background: rgba(20,14,9,.9); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(205,175,125,.2); text-shadow: none; }
#folderAsk h3 { margin: 0 4px 2px; font: italic 600 20px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; }
#folderAsk .opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 7px 12px 8px; border: 0; border-radius: 9px; cursor: pointer; color: #eadfc8; font-family: 'Cormorant Garamond', Georgia, serif; background: rgba(60,42,26,.7); box-shadow: inset 0 0 0 1px rgba(205,175,125,.25); transition: background .15s, box-shadow .15s; }
#folderAsk .opt b { font: italic 600 19px 'Cormorant Garamond', Georgia, serif; }
#folderAsk .opt span { font: italic 500 15px 'Cormorant Garamond', Georgia, serif; opacity: .72; }
#folderAsk .opt:hover, #folderAsk .opt:focus-visible { background: rgba(92,64,36,.85); box-shadow: inset 0 0 0 1px #d8b878; outline: 0; }
#folderAsk .opt.danger { background: rgba(70,30,22,.72); box-shadow: inset 0 0 0 1px rgba(205,120,95,.35); }
#folderAsk .opt.danger span { opacity: .85; color: #f0c4b4; }
#folderAsk .opt.danger:hover, #folderAsk .opt.danger:focus-visible { background: rgba(104,42,30,.88); box-shadow: inset 0 0 0 1px #e0907a; }
#folderAsk .opt[hidden] { display: none; }

/* Ярлык папки: поле названия ложится на ярлык буквами машинки; в строке раскрытой папки — то же поле поменьше. */
#labelEdit { position: fixed; z-index: 6; box-sizing: border-box; margin: 0; padding: 0 .5em; font-family: 'PT Mono', monospace; color: #17161f; text-align: center; background: #eee0c2; border: 1px solid rgba(48,36,30,.6); border-radius: 0; outline: 0; caret-color: #17161f; box-shadow: inset 0 0 0 3px #eee0c2, inset 0 0 0 4px rgba(48,36,30,.3), 0 3px 12px rgba(0,0,0,.5); }
#labelEdit[hidden], #folderName[hidden] { display: none; }
#labelEdit::placeholder { color: rgba(23,22,31,.42); }
#folderName { box-sizing: border-box; width: 15em; height: 30px; padding: 0 .6em; font: 15px 'PT Mono', monospace; color: #17161f; background: #eee0c2; border: 1px solid rgba(48,36,30,.6); border-radius: 2px; outline: 0; }
#folderName::placeholder { color: rgba(23,22,31,.42); }
/* Вопрос «Открыть стол из файла?»: та же тёмная плашка, что у «Убрать папку?»; нажатие мимо — «оставить как есть». */
#deskAsk { inset: 0; z-index: 7; }
#deskAsk[hidden] { display: none; }
#deskAsk .plate { position: absolute; right: 14px; top: 64px; width: min(380px, calc(100vw - 28px)); box-sizing: border-box; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; background: rgba(20,14,9,.9); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(205,175,125,.2); text-shadow: none; }
#deskAsk h3 { margin: 0 4px 2px; font: italic 600 20px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; }
#deskAsk p { margin: 0 4px 2px; font: italic 500 16px/1.35 'Cormorant Garamond', Georgia, serif; color: #eadfc8; opacity: .82; }
#deskAsk .opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 7px 12px 8px; border: 0; border-radius: 9px; cursor: pointer; color: #eadfc8; font-family: 'Cormorant Garamond', Georgia, serif; background: rgba(60,42,26,.7); box-shadow: inset 0 0 0 1px rgba(205,175,125,.25); transition: background .15s, box-shadow .15s; }
#deskAsk .opt b { font: italic 600 19px 'Cormorant Garamond', Georgia, serif; }
#deskAsk .opt span { font: italic 500 15px 'Cormorant Garamond', Georgia, serif; opacity: .72; }
#deskAsk .opt:hover, #deskAsk .opt:focus-visible { background: rgba(92,64,36,.85); box-shadow: inset 0 0 0 1px #d8b878; outline: 0; }
#deskAsk .opt.danger { background: rgba(70,30,22,.72); box-shadow: inset 0 0 0 1px rgba(205,120,95,.35); }
#deskAsk .opt.danger span { opacity: .85; color: #f0c4b4; }
#deskAsk .opt.danger:hover, #deskAsk .opt.danger:focus-visible { background: rgba(104,42,30,.88); box-shadow: inset 0 0 0 1px #e0907a; }
#cinemaAsk { inset: 0; z-index: 7; }
#cinemaAsk[hidden] { display: none; }
#cinemaAsk .plate { position: absolute; right: 14px; top: 64px; width: min(420px, calc(100vw - 28px)); box-sizing: border-box; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; background: rgba(20,14,9,.9); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(205,175,125,.2); text-shadow: none; }
#cinemaAsk h3 { margin: 0 4px 2px; font: italic 600 20px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; }
#cinemaAsk p { margin: 0 4px 2px; font: italic 500 16px/1.35 'Cormorant Garamond', Georgia, serif; color: #eadfc8; opacity: .82; }
#cinemaAsk .opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 7px 12px 8px; border: 0; border-radius: 9px; cursor: pointer; color: #eadfc8; font-family: 'Cormorant Garamond', Georgia, serif; background: rgba(60,42,26,.7); box-shadow: inset 0 0 0 1px rgba(205,175,125,.25); transition: background .15s, box-shadow .15s; }
#cinemaAsk .opt b { font: italic 600 19px 'Cormorant Garamond', Georgia, serif; }
#cinemaAsk .opt span { font: italic 500 15px 'Cormorant Garamond', Georgia, serif; opacity: .72; }
#cinemaAsk .opt:hover, #cinemaAsk .opt:focus-visible { background: rgba(92,64,36,.85); box-shadow: inset 0 0 0 1px #d8b878; outline: 0; }
#cinemaAsk .opt.danger { background: rgba(70,30,22,.72); box-shadow: inset 0 0 0 1px rgba(205,120,95,.35); }
#cinemaAsk .opt.danger span { opacity: .85; color: #f0c4b4; }
#cinemaAsk .opt.danger:hover, #cinemaAsk .opt.danger:focus-visible { background: rgba(104,42,30,.88); box-shadow: inset 0 0 0 1px #e0907a; }
/* «Проектор»: поле для ссылки, кнопки; примечание про запрет показа — мелко внизу. */
#cinemaAsk form { display: flex; gap: 8px; }
#cinemaAsk input[type=text] { flex: 1; min-width: 0; font: italic 500 18px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; background: rgba(60,42,26,.55); border: 0; border-radius: 9px; padding: 7px 12px 8px; box-shadow: inset 0 0 0 1px rgba(205,175,125,.3); outline: 0; }
#cinemaAsk input[type=text]::placeholder { color: rgba(234,223,200,.5); }
#cinemaAsk input[type=text]:focus { box-shadow: inset 0 0 0 1px #d8b878; background: rgba(60,42,26,.8); }
#cinemaAsk form .opt { flex: none; justify-content: center; padding: 7px 16px 8px; }
#cinemaAsk .opt[hidden], #cinemaAsk p[hidden], #cinemaAsk .row[hidden] { display: none; }
#cinemaAsk .seek { display: flex; align-items: center; gap: 10px; margin: 0 4px; font: italic 500 16px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; font-variant-numeric: tabular-nums; }
#cinemaAsk .seek[hidden] { display: none; }
#cinemaAsk .seek span { flex: none; min-width: 3.2em; opacity: .82; }
#cinemaAsk .seek .jump { flex: none; position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #eadfc8; background: rgba(60,42,26,.55); box-shadow: inset 0 0 0 1px rgba(216,184,120,.3); }
#cinemaAsk .seek .jump svg { position: absolute; inset: 4px; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#cinemaAsk .seek .jump i { position: absolute; inset: 0; display: grid; place-items: center; padding-top: 3px; font: italic 600 11.5px 'Cormorant Garamond', Georgia, serif; }
#cinemaAsk .seek .jump:hover, #cinemaAsk .seek .jump:focus-visible { background: rgba(92,64,36,.85); box-shadow: inset 0 0 0 1px #d8b878; outline: 0; }
#cinemaAsk .seek span:last-child { text-align: right; }
#cinemaAsk .seek input { flex: 1; min-width: 0; -webkit-appearance: none; appearance: none; height: 22px; margin: 0; background: transparent; cursor: pointer; }
#cinemaAsk .seek input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #d8b878 var(--p, 0%), rgba(234,223,200,.22) var(--p, 0%)); }
#cinemaAsk .seek input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: radial-gradient(circle at 50% 36%, #f7efdc, #cdba93); box-shadow: 0 0 0 2px #241a12, 0 2px 5px rgba(0,0,0,.5); }
#cinemaAsk .seek input:focus { outline: 0; }
#cinemaAsk .seek input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px #d8b878, 0 2px 5px rgba(0,0,0,.5); }
#cinemaAsk .row { display: flex; align-items: center; gap: 10px; margin: 0 4px; font: italic 500 16px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; }
#cinemaAsk .row span { opacity: .82; }
#cinemaAsk select { flex: 1; min-width: 0; font: italic 500 17px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; background: rgba(60,42,26,.7); border: 0; border-radius: 9px; padding: 6px 10px; box-shadow: inset 0 0 0 1px rgba(216,184,120,.3); cursor: pointer; }
#cinemaAsk select:focus { outline: 0; box-shadow: inset 0 0 0 1px #d8b878; }
#cinemaAsk select option { background: #2a1d12; color: #eadfc8; }
#cinemaAsk .small { font-size: 14px; opacity: .6; margin-top: 2px; }
#cinemaAsk .bad { color: #f0c4b4; opacity: 1; }
/* Окошко YouTube: ложится ровно на экран; выход — клавиша наверху слева (Esc внутри окошка забирает YouTube). */
/* Плеер YouTube под холстом зала: сцена с перспективой и камерой (cinema.js, placeFrame), плеер в ней повёрнут на панель; виден сквозь окно в зале. */
#cinemaStage { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
#cinemaStage[hidden] { display: none; }
#cinemaStage .cam { position: absolute; left: 0; top: 0; transform-style: preserve-3d; pointer-events: none; }
#cinemaFrame { position: absolute; left: 0; top: 0; border: 0; background: #000; pointer-events: none; }


/* Фильмотека немого кино (filmlib.js): панель слева, тёмная, как плашка проектора; список прокручивается. */
#filmLib { left: 0; top: 0; z-index: 7; }
.filmlib { position: fixed; left: 14px; top: 64px; bottom: 20px; width: min(560px, calc(100vw - 28px)); box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px;
  background: rgba(20,14,9,.92); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(205,175,125,.2); text-shadow: none; color: #eadfc8; }
.filmlib[hidden] { display: none; }
.filmlib .fl-head { display: flex; align-items: center; gap: 12px; }
.filmlib h3 { margin: 0 4px 0; font: italic 600 22px 'Cormorant Garamond', Georgia, serif; }
.filmlib .fl-tabs { display: flex; gap: 6px; flex: 1; }
.filmlib .fl-tabs button, .filmlib .fl-more { border: 0; border-radius: 9px; padding: 5px 11px 6px; cursor: pointer; color: #eadfc8; background: rgba(60,42,26,.55); font: italic 500 16px 'Cormorant Garamond', Georgia, serif; }
.filmlib .fl-tabs button.on { background: rgba(120,84,44,.85); box-shadow: inset 0 0 0 1px #d8b878; }
.filmlib .fl-close { border: 0; background: none; color: #eadfc8; font-size: 26px; line-height: 1; cursor: pointer; opacity: .7; padding: 0 4px; }
.filmlib .fl-close:hover { opacity: 1; }
.filmlib .fl-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filmlib .fl-filters[hidden] { display: none; }
.filmlib .fl-filters input, .filmlib .fl-filters select { font: italic 500 16px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; background: rgba(60,42,26,.7); border: 0; border-radius: 9px; padding: 5px 10px; box-shadow: inset 0 0 0 1px rgba(216,184,120,.3); }
.filmlib .fl-filters input { flex: 1 1 100%; }
.filmlib .fl-filters select option { background: #2a1d12; }
.filmlib .fl-pickrow { display: flex; gap: 6px; }
.filmlib .fl-pickrow[hidden] { display: none; }
.filmlib .fl-pickrow .fl-search { flex: 1; min-width: 0; }
.filmlib .fl-order { font: italic 500 16px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; background: rgba(60,42,26,.7); border: 0; border-radius: 9px; padding: 5px 10px; box-shadow: inset 0 0 0 1px rgba(216,184,120,.3); }
.filmlib .fl-order option { background: #2a1d12; }
.filmlib .fl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.filmlib .fl-chips[hidden], .filmlib .fl-search[hidden] { display: none; }
.filmlib .fl-chips button { border: 0; border-radius: 14px; padding: 3px 10px 4px; cursor: pointer; color: #eadfc8; background: rgba(60,42,26,.55); font: italic 500 15px 'Cormorant Garamond', Georgia, serif; }
.filmlib .fl-chips button.on { background: rgba(120,84,44,.85); box-shadow: inset 0 0 0 1px #d8b878; }
.filmlib .fl-search { font: italic 500 16px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; background: rgba(60,42,26,.7); border: 0; border-radius: 9px; padding: 5px 10px; box-shadow: inset 0 0 0 1px rgba(216,184,120,.3); }
.filmlib .fl-count { margin: 0 4px; font: italic 500 15px/1.3 'Cormorant Garamond', Georgia, serif; opacity: .72; }
.filmlib .fl-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; overscroll-behavior: contain; }
.filmlib h4 { margin: 10px 4px 2px; font: italic 600 18px 'Cormorant Garamond', Georgia, serif; color: #d8b878; }
.filmlib .fl-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 0; border-radius: 9px; padding: 6px 11px 7px; cursor: pointer; color: #eadfc8; background: rgba(60,42,26,.38); font-family: 'Cormorant Garamond', Georgia, serif; }
.filmlib .fl-item:hover, .filmlib .fl-item:focus-visible { background: rgba(92,64,36,.85); box-shadow: inset 0 0 0 1px #d8b878; outline: 0; }
.filmlib .fl-item.busy { opacity: .55; cursor: progress; }
.filmlib .fl-item b { font: italic 600 18px 'Cormorant Garamond', Georgia, serif; }
.filmlib .fl-meta { font: italic 500 14.5px 'Cormorant Garamond', Georgia, serif; opacity: .72; }
.filmlib .fl-note { font: italic 500 15px/1.3 'Cormorant Garamond', Georgia, serif; opacity: .85; }
.filmlib .fl-more[hidden] { display: none; }
#cinemaCredit a { color: #d8b878; }

/* Японский и китайский: у иероглифов нет курсива — браузер наклонял бы их искусственно; везде прямое начертание. */
html:lang(ja) body *, html:lang(zh) body * { font-style: normal !important; }

/* Предупреждение на телефоне — поверх заставки. */
#phoneGate { inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; box-sizing: border-box; background: #0b0806; }
#phoneGate[hidden] { display: none; }
#phoneGate .card { max-width: 420px; text-align: center; padding: 22px 22px 20px; background: #e9dfc6 url(../assets/textures/book-paper.jpg) center / cover; color: #2f2418; border-radius: 4px; box-shadow: 0 12px 40px rgba(0,0,0,.6); text-shadow: none; }
#phoneGate h2 { margin: 0 0 10px; font: italic 600 24px 'Cormorant Garamond', Georgia, serif; }
#phoneGate p { margin: 0 0 16px; font: 500 18px/1.35 'Cormorant Garamond', Georgia, serif; }
#phoneGate button { font: italic 500 18px 'Cormorant Garamond', Georgia, serif; color: #f3e9d0; background: #3a2218; border: 0; border-radius: 3px; padding: 6px 18px 7px; box-shadow: inset 0 0 0 1px #8a6a36; cursor: pointer; }

/* Автор и ссылки — в справке и в «подробнее». */
.sheet .author { margin: 16px 0 6px; font: italic 500 17px 'Cormorant Garamond', Georgia, serif; color: #4a3520; text-align: center; }
.sheet .author a { color: #3a2218; text-decoration: none; border-bottom: 1px solid rgba(90,70,48,.35); }
.sheet .author a:hover, .sheet .author a:focus-visible { border-bottom-color: #8a6a36; outline: 0; }
.sheet .author svg { width: 1em; height: 1em; vertical-align: -.14em; margin-left: .2em; fill: #f2c230; stroke: #a87b12; stroke-width: 1; stroke-linejoin: round; }
#about .author { margin-top: 0; }

/* ——— Все всплывающие окна — в одном стиле, как плашка проектора (пользователь 2026-11-22: «приведи все поп-апы к одному стилю»):
   тёмная полупрозрачная табличка со скруглением и тонким латунным ободком, светлая антиква; кнопки — тёмные ярлычки с латунью при наведении,
   главное действие — светлее, опасное — красноватое, выбранный вариант — с латунным ободком. Ниже — переопределения прежних бумажных карточек.
   Справка — по её выбору бумажная (длинный текст на бумаге читается легче). */
.sheet { background: rgba(8,5,3,.4); }
.sheet:not(#help) .card, #phoneGate .card, .slider, #weightPick {
  color: #eadfc8; background: rgba(20,14,9,.92); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.6), inset 0 0 0 1px rgba(205,175,125,.22); text-shadow: none;
}
.sheet .card { padding: 20px 24px 18px; }
.sheet:not(#help) h2, #phoneGate h2 { font: italic 600 24px 'Cormorant Garamond', Georgia, serif; color: #f1e6cd; }
.sheet:not(#help) h3, #decor h3, #about h3 { font: 12.5px 'PT Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: rgba(234,223,200,.55); }
.sheet:not(#help) button, #phoneGate button, #weightPick button, #door .choice a {
  font: italic 500 18px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; background: rgba(60,42,26,.7); border: 0; border-radius: 9px;
  padding: 5px 16px 6px; box-shadow: inset 0 0 0 1px rgba(205,175,125,.25); cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s;
}
.sheet:not(#help) button:hover, .sheet:not(#help) button:focus-visible, #phoneGate button:hover, #weightPick button:hover, #door .choice a:hover, #door .choice a:focus-visible {
  background: rgba(92,64,36,.85); box-shadow: inset 0 0 0 1px #d8b878; outline: 0;
}
#door .choice a, #phoneGate button { background: rgba(120,84,44,.85); box-shadow: inset 0 0 0 1px #d8b878; color: #fff6e0; }
#decor .choices button.on, #weightPick button.on { background: rgba(120,84,44,.85); box-shadow: inset 0 0 0 1px #d8b878; color: #fff6e0; }
#door .note { color: rgba(234,223,200,.68); }
#door .star a, #about .author, #about .author a { color: rgba(234,223,200,.82); border-bottom-color: rgba(234,223,200,.3); }
#door .star a:hover, #about .author a:hover { color: #f6ecd6; border-bottom-color: #d8b878; }
#about td, #about th { border-bottom-color: rgba(205,175,125,.16); }
#about a { color: #e3c27a; }
#about code { color: #f1e6cd; }
.slider { color: #eadfc8; }
.slider input::-webkit-slider-runnable-track { background: linear-gradient(90deg, rgba(234,223,200,.2), #d8b878); box-shadow: none; }
.slider input::-moz-range-track { background: linear-gradient(90deg, rgba(234,223,200,.2), #d8b878); }
/* «Читать эту книгу?» — та же табличка (было — пилюля с круглыми кнопками). */
#readOffer { border-radius: 14px; background: rgba(20,14,9,.9); box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(205,175,125,.22); padding: 14px 20px 14px; }
#readOffer .q { font-size: 28px; color: #f1e6cd; }
#readOffer button { font-size: 20px; border-radius: 9px; padding: 6px 24px 8px; background: rgba(60,42,26,.7); box-shadow: inset 0 0 0 1px rgba(205,175,125,.25); }
#readOffer button:first-of-type { background: rgba(120,84,44,.85); box-shadow: inset 0 0 0 1px #d8b878; color: #fff6e0; }
#readOffer button.quiet { background: none; box-shadow: none; font-size: 17px; color: rgba(234,223,200,.7); }
#readOffer button:hover, #readOffer button:focus-visible { box-shadow: inset 0 0 0 1px #e6c47e; background: rgba(92,64,36,.85); }

/* Обучение (tour.js): табличка слева внизу, как плашка проектора; прогресс — латунные отрезки. */
.tour { position: fixed; left: 18px; bottom: 34px; z-index: 7; width: min(340px, calc(100vw - 36px)); box-sizing: border-box; padding: 12px 14px 11px; color: #eadfc8;
  background: rgba(20,14,9,.9); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(205,175,125,.22); text-shadow: none; transition: box-shadow .3s; }
.tour[hidden] { display: none; }
.tour.done { box-shadow: 0 10px 30px rgba(0,0,0,.55), inset 0 0 0 1px #d8b878, 0 0 26px rgba(216,184,120,.35); }
.tour-head { font: italic 500 15px 'Cormorant Garamond', Georgia, serif; opacity: .68; }
.tour-task { font: italic 600 21px/1.2 'Cormorant Garamond', Georgia, serif; margin: 4px 0 3px; color: #f1e6cd; }
.tour-ok { color: #e3c27a; margin-right: 7px; }
.tour-how { font: italic 500 16px/1.3 'Cormorant Garamond', Georgia, serif; opacity: .82; }
.tour-bar { display: flex; gap: 4px; margin: 12px 0 8px; }
.tour-bar i { flex: 1; height: 3px; border-radius: 2px; background: rgba(234,223,200,.16); cursor: pointer; position: relative; }
.tour-bar i::before { content: ''; position: absolute; inset: -8px -2px; }   /* место для нажатия — шире самой чёрточки */
.tour-bar i:hover { background: rgba(216,184,120,.45); }
.tour-bar i.d { background: linear-gradient(90deg, #b0884a, #e3c27a); }
.tour-bar i.n { background: rgba(216,184,120,.5); box-shadow: 0 0 6px rgba(216,184,120,.6); }
.tour-foot, .tour-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tour-row { margin-top: 12px; justify-content: flex-start; }
.tour-link { border: 0; background: none; padding: 0; cursor: pointer; font: italic 500 15px 'Cormorant Garamond', Georgia, serif; color: rgba(234,223,200,.68); border-bottom: 1px solid rgba(234,223,200,.25); }
.tour-link:hover, .tour-link:focus-visible { color: #f6ecd6; border-bottom-color: #d8b878; outline: 0; }
.tour-link[hidden] { display: none; }
.tour-btn { font: italic 500 18px 'Cormorant Garamond', Georgia, serif; color: #eadfc8; background: rgba(60,42,26,.7); border: 0; border-radius: 9px; padding: 5px 16px 6px; box-shadow: inset 0 0 0 1px rgba(205,175,125,.25); cursor: pointer; }
.tour-btn.main { background: rgba(120,84,44,.85); box-shadow: inset 0 0 0 1px #d8b878; color: #fff6e0; }
.tour-btn:hover, .tour-btn:focus-visible { background: rgba(92,64,36,.85); box-shadow: inset 0 0 0 1px #d8b878; outline: 0; }
#help .help-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#help .help-actions button { margin-top: 18px; }
