@font-face { font-family: "Norma Serif"; src: url(fonts/PTSerif-Regular.ttf); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Norma Serif"; src: url(fonts/PTSerif-Bold.ttf); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Norma Serif"; src: url(fonts/PTSerif-Italic.ttf); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Norma Serif"; src: url(fonts/PTSerif-BoldItalic.ttf); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --serif: "Norma Serif", "PT Serif", "Charter", "Times New Roman", serif;
  --mono: "Courier New", Courier, "Liberation Mono", monospace;
  --paper: #ddd6c4;
  --ink: #0c0f13;
  --ash: #8e918c;
  --snow: #d9dbd6;
  --rust: #b4603c;
  --ice: #8fa3ad;
  --lamp: #c4a763;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; background: #000; overflow: hidden; color: var(--snow);
  font-family: var(--mono);
  user-select: none; -webkit-user-select: none;
}
#stage {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px;
  margin: -540px 0 0 -960px; transform: scale(var(--s, 1)); transform-origin: center center;
  overflow: hidden; background: #000;
}
#cv { position: absolute; inset: 0; width: 1920px; height: 1080px; display: block; }
#shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0) 36%, rgba(2,3,5,.5) 64%, rgba(2,3,5,.75) 100%),
              linear-gradient(180deg, rgba(0,0,0,.55) 0, rgba(0,0,0,0) 22%);
}
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
#fader { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .5s; z-index: 60; }
#fader.on { opacity: 1; pointer-events: auto; }
.hidden { display: none !important; }

/* загрузка */
#boot { position: absolute; inset: 0; background: #05070a; z-index: 100; display: flex; align-items: center; justify-content: center; transition: opacity .8s; }
#boot.gone { opacity: 0; pointer-events: none; }
.b-in { text-align: center; }
.b-t { font-size: 96px; letter-spacing: .4em; padding-left: .4em; color: #c9ccc6; font-weight: 700; }
.b-p { width: 480px; height: 3px; background: rgba(255,255,255,.12); margin: 36px auto 14px; }
.b-p i { display: block; height: 100%; width: 0; background: #aeb3b2; transition: width .2s; }
.b-s { color: var(--ash); font-size: 20px; letter-spacing: .2em; }

/* HUD */
#hud { position: absolute; left: 0; top: 0; right: 0; padding: 26px 40px; display: flex; justify-content: space-between; pointer-events: none; z-index: 10; }
#hud > * { pointer-events: auto; }
.day b { font-size: 32px; letter-spacing: .2em; font-weight: 700; text-shadow: 0 2px 8px #000; }
.day span { margin-left: 20px; color: var(--ice); font-size: 21px; text-shadow: 0 2px 6px #000; }
.stats { display: flex; gap: 18px; margin-top: 14px; align-items: flex-end; }
.st { width: 70px; text-align: center; position: relative; }
.st img { height: 42px; width: auto; display: block; margin: 0 auto 6px; filter: drop-shadow(0 2px 4px #000) saturate(.5); }
.st .bar { height: 6px; background: rgba(255,255,255,.14); }
.st .bar i { display: block; height: 100%; background: #b8bdbb; transition: width .9s ease; }
.st em { position: absolute; top: -2px; right: -2px; font-size: 15px; color: var(--lamp); font-style: normal; }
.st.low .bar i { background: var(--rust); animation: pulse 1.1s infinite; }
.st.low img { animation: pulse 1.1s infinite; }
.flags { display: flex; gap: 8px; margin-left: 10px; }
.flag { height: 40px; filter: drop-shadow(0 2px 4px #000); }
.inv { margin-top: 12px; display: flex; gap: 18px; font-size: 21px; color: var(--snow); text-shadow: 0 2px 6px #000; }
.inv span { display: inline-flex; align-items: center; gap: 8px; }
.inv img { height: 34px; width: auto; }
.inv .fuel { color: var(--lamp); letter-spacing: .08em; font-size: 17px; }
.inv .debt { color: #b8a38a; letter-spacing: .08em; font-size: 17px; }
.inv .debt.full { color: var(--rust); animation: pulse 1.1s infinite; }
.inv .mark { color: #c28169; letter-spacing: .06em; font-size: 17px; }
.inv .mark img { height: 30px; width: 30px; object-fit: contain; filter: drop-shadow(0 2px 4px #000); }
.inv .mark.full { animation: pulse 1.1s infinite; }
.hud-r { display: flex; gap: 12px; align-items: flex-start; }
.num { font-size: 27px; letter-spacing: .22em; padding: 6px 16px; border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.5); }
.mini { font: inherit; font-size: 18px; background: rgba(0,0,0,.5); color: var(--ash); border: 1px solid rgba(255,255,255,.2); padding: 10px 16px; cursor: pointer; letter-spacing: .06em; }
.mini:hover { color: var(--snow); border-color: rgba(255,255,255,.5); }
.mini.off { text-decoration: line-through; }

/* шкала нормы */
.normbar { position: absolute; left: 40px; top: 196px; width: 620px; height: 80px; background: url(img/ui/norm-frame.webp) center / 100% 100% no-repeat; filter: drop-shadow(0 4px 10px #000); }
.normbar .grv { position: absolute; left: 6%; right: 6%; top: 30%; bottom: 30%; overflow: hidden; }
.normbar .grv i { display: block; height: 100%; width: 0; background: url(img/ui/norm-fill.webp) left center / auto 100% repeat-x; transition: width 1.2s ease; }
.normbar u { position: absolute; top: 14%; bottom: 14%; left: calc(6% + 88% * .769); width: 3px; background: var(--rust); }
.normbar span { position: absolute; left: 6px; bottom: -28px; font-size: 18px; color: var(--ash); text-shadow: 0 2px 6px #000; letter-spacing: .1em; }

/* панель выбора */
.panel, .mdl, .ec-in {
  background: rgba(10,12,15,.9) url(../assets-webp/overlays/old-paper-seamless.webp); background-blend-mode: multiply; background-size: 640px;
  border: 1px solid rgba(170,175,170,.2);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.7), 0 30px 80px rgba(0,0,0,.65);
}
.panel { position: absolute; right: 64px; bottom: 56px; width: 800px; max-height: calc(100% - 56px - 120px); display: flex; flex-direction: column; padding: 34px 40px 36px; animation: rise .5s ease-out both; }
.panel .body { display: flex; flex-direction: column; min-height: 0; }
.panel .choices { overflow-y: auto; min-height: 0; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #5a6064 transparent; }
/* много вариантов (барак): компактные кнопки, чтобы панель не вылезала за экран */
.panel.many { padding: 26px 36px 28px; }
.panel.many .kicker { padding-bottom: 10px; margin-bottom: 14px; }
.panel.many .text { font-size: 25px; line-height: 1.4; min-height: 0; }
.panel.many .choices { margin-top: 16px; gap: 7px; }
.panel.many .btn { min-height: 74px; border-width: 16px 26px; border-image-width: 16px 26px; }
.panel.many .btn::before { inset: -6px -12px; }
.panel.many .btn .l { font-size: 22px; }
.panel.many .btn .s { font-size: 17px; margin-top: 1px; }
/* Двусторонний указ: быстрый выбор без третьей безопасной кнопки. */
.panel.decree { width: 920px; right: 50%; bottom: 110px; margin-right: -460px; }
.panel.decree .text { font-size: 32px; }
.choices.duel { grid-template-columns: 1fr 1fr; gap: 16px; }
.choices.duel .btn { min-height: 156px; padding: 0 14px; }
.choices.duel .btn .num { display: block; margin-bottom: 8px; color: var(--rust); }
.choices.duel .btn .l { font-size: 28px; }
.choices.duel .btn .s { padding-left: 0; margin-top: 10px; }
.kicker { font-size: 19px; letter-spacing: .34em; color: var(--ice); padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.14); }
.text { font-family: var(--serif); font-size: 29px; line-height: 1.46; color: var(--paper); min-height: 80px; text-indent: 1.3em; hyphens: auto; -webkit-hyphens: auto; filter: url(#ink); }
.text span { opacity: 0; animation: fadeword .45s ease-out forwards; display: inline-block; text-indent: 0; }
.text.skip span { animation: none !important; opacity: 1; }
.item { display: flex; align-items: center; gap: 16px; margin: 4px 0 10px; }
.item img { height: 70px; width: auto; }
.item b { font-size: 38px; color: var(--lamp); letter-spacing: .06em; }
.choices, .reply { margin-top: 26px; display: grid; gap: 10px; animation: fadein .6s ease-out both; animation-delay: var(--d, 0ms); }

.btn {
  position: relative; display: block; width: 100%; min-height: 100px; text-align: left; font: inherit; color: #eef0ea; cursor: pointer;
  background: none; padding: 0 6px; border-style: solid; border-width: 22px 32px;
  border-image: url(img/ui/btn-normal.webp) 92 112 fill / 22px 32px stretch;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.6));
  transition: transform .08s;
}
/* тёмная вставка под текстом: светлые буквы читаются на любой фактуре пластины */
.btn::before {
  content: ''; position: absolute; inset: -8px -16px; background: rgba(12,14,17,.8);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); pointer-events: none; transition: background .12s;
}
.btn > * { position: relative; }
.btn:hover { border-image-source: url(img/ui/btn-hover.webp); }
.btn:hover::before { background: rgba(34,38,43,.84); }
.btn:active { border-image-source: url(img/ui/btn-pressed.webp); transform: translateY(1px); }
.btn:active::before { background: rgba(6,7,9,.9); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn .num { display: inline-block; width: 30px; font-weight: 700; color: #8f989c; font-size: 20px; padding: 0; border: 0; background: none; letter-spacing: 0; }
.btn .l { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.2; color: #efe9d8; filter: url(#ink); }
.btn .s { display: block; padding-left: 30px; font-family: var(--serif); font-style: italic; font-size: 19px; color: #b9b5a6; margin-top: 3px; }
.btn.go { min-height: 80px; text-align: center; }
.btn.go .l { letter-spacing: .25em; font-size: 23px; }

/* Не меню: приказ требует удержать тело в нужном состоянии. */
.action { position: absolute; left: 50%; top: 50%; width: 860px; min-height: 330px; margin: -165px 0 0 -430px; padding: 48px 64px; box-sizing: border-box; text-align: center; background: rgba(8,10,13,.96) url(../assets-webp/overlays/old-paper-seamless.webp); background-blend-mode: multiply; border: solid transparent; border-width: 34px; border-image: url(img/ui/event-frame.webp) 95 97 92 98 stretch; box-shadow: 0 36px 110px #000; animation: rise .3s ease-out both; }
.action-kicker { color: var(--ice); letter-spacing: .32em; font-size: 18px; }
.action-text { margin: 28px 0; font-family: var(--serif); font-size: 31px; line-height: 1.3; color: var(--paper); }
.action-key, .action-keys { color: var(--lamp); letter-spacing: .14em; font-size: 22px; }
.action-keys b { display: inline-block; margin: 0 9px 0 18px; padding: 3px 9px; color: var(--paper); border: 1px solid rgba(196,167,99,.6); }
.action-bar { height: 8px; margin-top: 36px; background: rgba(255,255,255,.12); box-shadow: inset 0 1px 3px #000; }
.action-bar i { display: block; width: 0; height: 100%; background: var(--lamp); box-shadow: 0 0 12px rgba(238,191,104,.7); }

.ochko { position: absolute; left: 50%; top: 50%; width: 1180px; min-height: 720px; margin: -360px 0 0 -590px; padding: 42px 58px; box-sizing: border-box; overflow: hidden; background: linear-gradient(rgba(7,8,8,.28),rgba(7,8,8,.42)), url(../assets-webp/p10/02-card-table.webp) center / cover; background-clip: padding-box; border: solid transparent; border-width: 34px; border-image: url(img/ui/event-frame.webp) 95 97 92 98 stretch; box-shadow: 0 36px 110px #000; }
.ochko-note { margin: -5px 0 24px; color: #b9ab90; font-family: var(--serif); font-style: italic; font-size: 21px; }
.ochko-row { display: grid; grid-template-columns: 190px 1fr; align-items: center; min-height: 190px; border-top: 1px solid rgba(196,167,99,.25); }
.ochko-row b { color: var(--ice); font-size: 18px; letter-spacing: .12em; }
.ochko-hand { display: flex; align-items: center; gap: 10px; min-height: 150px; }
.ochko-card { display: block; width: 104px; height: 150px; object-fit: cover; border: 1px solid #8d7346; border-radius: 10px; box-shadow: 0 8px 16px rgba(0,0,0,.6); transform: rotate(-2deg); }.ochko-card.back { background: #d5bd89 url(../assets-webp/p10/cards/back.webp) center / cover; cursor: default; }
.ochko-card:nth-child(even) { transform: rotate(2deg); }
.ochko-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }.ochko-card.attack { box-shadow: 0 0 0 3px #a66041, 0 8px 16px #000; }
.trump-suit { display: inline-block; width: 26px; height: 26px; margin: 0 5px -7px; background: url(../assets-webp/p10/03-suit-emblems-2x2.webp) center / 200% 200%; }.trump-suit.spade { background-position: 0 0; }.trump-suit.heart { background-position: 100% 0; }.trump-suit.diamond { background-position: 0 100%; }.trump-suit.club { background-position: 100% 100%; }
.ochko-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 18px; }.ochko-actions .btn { min-height: 78px; text-align: center; }.ochko-actions .btn .s { padding-left: 0; }
.ochko-stakes { display: grid; gap: 14px; margin: 76px auto 0; width: 620px; }.ochko-stakes .btn { min-height: 92px; text-align: center; }.ochko-stakes .btn .s { padding-left: 0; }

/* «Дурак»: стол остаётся целиком в раме; карты кладутся рукой, а не кнопкой. */
.durak { min-height: 730px; }
.durak .ochko-note { margin-bottom: 12px; }
.durak-table { position: relative; height: 245px; margin: 6px 0 10px; border-top: 1px solid rgba(196,167,99,.28); border-bottom: 1px solid rgba(196,167,99,.28); }
.durak-opponent { position: absolute; left: 0; top: 18px; color: var(--ice); font-size: 18px; letter-spacing: .12em; }
.durak-stock { position: absolute; left: 205px; top: 18px; color: #b9ab90; font-size: 15px; letter-spacing: .1em; }
.durak-stock i { display: inline-block; width: 43px; height: 61px; margin: -14px 8px -24px; vertical-align: middle; background: url(../assets-webp/p10/cards/back.webp) center / cover; border: 1px solid #8d7346; border-radius: 4px; transform: rotate(-5deg); }
.durak-zone { position: absolute; left: 50%; top: 37px; width: 430px; height: 180px; margin-left: -215px; border: 1px dashed rgba(208,177,101,.37); border-radius: 11px; background: rgba(4,5,5,.22); }
.durak-zone.drag-over { border-color: #ddbc75; background: rgba(141,105,48,.2); box-shadow: inset 0 0 25px rgba(221,188,117,.14); }
.durak-hint { position: absolute; left: 0; right: 0; top: 70px; text-align: center; color: #b9ab90; font-family: var(--serif); font-style: italic; font-size: 18px; pointer-events: none; }
.durak-pair { position: absolute; left: 50%; top: 14px; width: 225px; height: 155px; margin-left: -112px; }
.durak-pair .ochko-card { position: absolute; top: 0; width: 94px; height: 136px; padding: 0; background: transparent; cursor: default; }
.durak-pair .attack { left: 10px; }
.durak-pair .defense { left: 104px; top: 10px; transform: rotate(10deg); animation: card-slide .28s ease-out both; }
.durak-hand-title { display: flex; justify-content: space-between; align-items: baseline; margin-top: 5px; color: var(--ice); font-size: 18px; letter-spacing: .12em; }
.durak-hand-title small { color: #b9ab90; font-family: var(--serif); font-size: 17px; font-style: italic; letter-spacing: 0; }
.durak .ochko-hand { min-height: 151px; padding: 6px 0; }
.durak .ochko-card { box-sizing: border-box; padding: 0; background: transparent; cursor: grab; touch-action: none; }
.durak .ochko-card:active { cursor: grabbing; }
.durak .ochko-card.invalid { opacity: .38; filter: grayscale(.8); }
.durak .ochko-card.dragging { opacity: .3; }
.durak-card-ghost { position: fixed; z-index: 30; width: 104px; height: 150px; margin: 0; padding: 0; pointer-events: none; opacity: .96; transform: translate(-50%,-50%) rotate(4deg); filter: drop-shadow(0 15px 12px rgba(0,0,0,.65)); }
.durak .ochko-card.dealt { animation: card-deal .26s ease-out both; }
.durak .ochko-actions { grid-template-columns: 1fr 1fr; margin-top: 0; }
.durak-status { min-height: 25px; margin: 2px 0 0; color: #d0c19f; font-family: var(--serif); font-style: italic; font-size: 18px; }
@keyframes card-deal { from { opacity: 0; transform: translate(130px,-55px) rotate(11deg) scale(.75); } to { opacity: 1; } }
@keyframes card-slide { from { opacity: 0; transform: translate(-95px, 34px) rotate(-11deg) scale(.72); } to { opacity: 1; transform: rotate(10deg); } }

.modal.archive .mdl { width: 1420px; max-height: 860px; overflow: auto; }
.art-archive { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.art-archive figure { margin: 0; padding: 7px; background: rgba(0,0,0,.32); border: 1px solid rgba(196,167,99,.22); }
.art-archive img { display: block; width: 100%; height: 148px; object-fit: cover; background: #050607; }
.art-archive figcaption { margin-top: 6px; overflow: hidden; color: #aaa697; font-size: 13px; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }

/* карточка события */
.card {
  position: absolute; left: 50%; top: 50%; width: 1660px; height: 820px; margin: -410px 0 0 -830px;
  display: grid; grid-template-columns: 700px 1fr; gap: 44px; padding: 56px 66px;
  border: solid transparent; border-width: 36px; border-image: url(img/ui/event-frame.webp) 95 97 92 98 stretch;
  background: rgba(8,10,13,.94) url(../assets-webp/overlays/old-paper-seamless.webp); background-blend-mode: multiply; background-size: 640px;
  box-shadow: 0 40px 120px rgba(0,0,0,.8);
  animation: rise .55s ease-out both;
}
.card .pic { align-self: start; padding: 0; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 10px 40px rgba(0,0,0,.7); background: #000; }
.card .pic img { width: 100%; display: block; }
.card .body { display: flex; flex-direction: column; min-height: 0; }
.card .text { font-size: 28px; }
.card .choices, .card .reply { margin-top: auto; }
.card .btn { min-height: 92px; }
.trace { margin-top: 14px; padding: 9px 13px; border-left: 2px solid var(--lamp); color: #bcb3a0; font-family: var(--serif); font-size: 20px; font-style: italic; line-height: 1.3; animation: fadein .5s ease-out both; }

/* Портреты «На представку»: один лист, шесть ячеек. Лицо появляется
   как реплика из тьмы, не как отдельная декоративная картинка. */
.dialogue-line { display: grid; grid-template-columns: 118px 1fr; gap: 16px; min-height: 106px; margin: -2px 0 14px; padding: 8px 12px 8px 8px; border-left: 2px solid rgba(196,167,99,.62); background: rgba(0,0,0,.25); }
.portrait { width: 106px; height: 94px; background-image: var(--portrait-sheet, url(../assets-webp/p5/01-presentka-portraits-3x2.webp)); background-size: 300% 200%; background-repeat: no-repeat; filter: grayscale(.18) contrast(1.08); box-shadow: inset 0 0 18px rgba(0,0,0,.8); }
.portrait.naumov { background-position: 0 0; }
.portrait.sevochka { background-position: 50% 0; }
.portrait.garkunov { background-position: 100% 0; }
.portrait.sashka { background-position: 0 100%; }
.portrait.narrator { background-position: 50% 100%; }
.portrait.lamp { background-position: 100% 100%; }
.portrait.lunev { background-position: 0 0; }
.portrait.sivyi { background-position: 50% 0; }
.portrait.kochetkov { background-position: 100% 0; }
.portrait.morozov { background-position: 0 100%; }
.speaker-name { margin: 3px 0 6px; color: var(--ice); font-size: 16px; letter-spacing: .2em; }
.speaker-quote { font-family: var(--serif); font-size: 22px; line-height: 1.25; color: #d7d0c0; font-style: italic; }

/* редкий найденный лист: фон — готовый ассет, текст всегда накладывается кодом */
.note-read { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.58); z-index: 48; animation: fadein .45s both; }
.note-sheet { position: relative; width: 690px; height: 920px; filter: drop-shadow(0 28px 56px rgba(0,0,0,.8)); }
.note-sheet > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.note-copy { position: absolute; left: 15%; right: 15%; top: 20%; bottom: 24%; color: #282219; font-family: var(--serif); display: flex; flex-direction: column; }
.note-copy .kicker { color: #685a43; border-color: rgba(60,46,27,.35); font-family: var(--mono); font-size: 17px; }
.note-copy p { margin: 18px 0 0; font-size: 31px; line-height: 1.48; text-indent: 1.2em; filter: url(#ink); }
.note-sign { margin-top: auto; color: #6d604a; font-style: italic; font-size: 22px; text-align: right; }
.note-sheet .btn { position: absolute; left: 15%; right: 15%; bottom: 8%; width: 70%; min-height: 68px; }

.deltas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.4); }
.chip img { height: 36px; width: auto; }
.chip i { font-style: normal; font-size: 17px; letter-spacing: 2px; }
.chip.up i { color: #cfd4cf; }
.chip.down i { color: var(--rust); }

/* карточка дня */
.daycard { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .4s; animation: fadein 1s both; cursor: pointer; }
.daycard.out { opacity: 0; }
.dc-in { text-align: center; text-shadow: 0 4px 24px #000; }
.dc-n { font-family: var(--serif); filter: url(#ink); font-size: 130px; font-weight: 700; letter-spacing: .24em; padding-left: .24em; color: #e2e4de; }
.dc-t { font-family: var(--serif); font-style: italic; font-size: 32px; margin-top: 24px; color: #a9b6bb; letter-spacing: .03em; }
.dc-b { font-family: var(--serif); font-size: 25px; margin-top: 14px; color: var(--ash); }
.dc-b b { color: var(--snow); letter-spacing: .15em; }

/* экран смерти */
.endcard { position: absolute; left: 90px; top: 130px; width: 940px; animation: rise .8s ease-out both; }
.ec-in { padding: 40px 48px 40px; }
.ec-l { font-family: var(--serif); filter: url(#ink); font-size: 42px; line-height: 1.3; margin: 4px 0 18px; color: #e8e2d0; }
.ec-sub { font-family: var(--serif); font-style: italic; font-size: 24px; color: #a9a597; margin-bottom: 20px; }
.ec-prev { font-size: 19px; color: var(--ash); margin-bottom: 24px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; }
.ec-prev div { padding: 3px 0; }
.ec-prev s { margin-right: 10px; }

/* модальные окна */
.modal { position: absolute; inset: 0; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; z-index: 50; animation: fadein .25s both; }
.mdl { width: 860px; max-height: 920px; overflow: auto; padding: 40px 44px; display: grid; gap: 14px; }
.mdl .lg { max-height: 560px; overflow: auto; margin-bottom: 8px; }
.mdl .row { display: flex; gap: 26px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-family: var(--serif); font-size: 24px; }
.mdl .row s { color: var(--ash); min-width: 110px; }
.mdl .row.dead { opacity: .45; text-decoration: line-through; }
.mdl .row.me b { color: var(--lamp); }
.mdl .row b { min-width: 230px; }
.ledger-now { margin: -2px 0 16px; padding: 12px 16px; border: 1px solid rgba(194,167,99,.34); background: rgba(0,0,0,.25); color: #c5bfad; font-family: var(--serif); font-size: 21px; line-height: 1.45; }
.ledger-now .debt-line { color: #c28169; }
.pm { font-family: var(--serif); font-size: 25px; line-height: 1.5; color: #cfc9b8; margin: 4px 0 10px; }

/* титульный экран */
.title { position: absolute; inset: 0; animation: fadein 1.4s both; }
.t-name { position: absolute; left: 50%; top: 88px; width: 900px; height: auto; transform: translateX(-50%); filter: drop-shadow(0 12px 24px rgba(0,0,0,.72)); }
.t-sub { position: absolute; left: 0; right: 0; top: 430px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 30px; letter-spacing: .12em; color: #20252a; }
.t-menu { position: absolute; left: 50%; top: 560px; width: 560px; margin-left: -280px; display: grid; gap: 14px; }
.t-foot { position: absolute; left: 0; right: 0; bottom: 36px; text-align: center; font-size: 19px; color: #3a4046; letter-spacing: .08em; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeword { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* вступление */
.intro { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .4s; }
.intro.out { opacity: 0; }
.in-l { width: 1060px; }
.in-l p { font-family: var(--serif); filter: url(#ink); font-size: 37px; line-height: 1.45; margin: 0 0 26px; color: var(--paper); opacity: 0; animation: fadein 1.2s ease-out forwards; text-shadow: 0 2px 20px #000; }
.in-l p.hd { font-size: 48px; font-weight: 700; letter-spacing: .28em; color: #a9b6bb; }
.in-k { font-family: var(--serif); font-style: italic; font-size: 23px; color: var(--ash); margin: 30px 0 22px; opacity: 0; animation: fadein 1s ease-out forwards; }
.in-l .btn { width: 520px; opacity: 0; animation: fadein 1s ease-out forwards; }

/* важные слова в тексте: приглушённый цвет и курсив, как выделение в книге */
.text .k { font-style: italic; }
.text .k-goods { color: #bba670; }
.text .k-danger { color: #b0705a; }

/* всплывающая подсказка в стиле книги */
.st, .flag, .inv span, .day, .hud-r .num { cursor: help; }
#tip {
  position: absolute; z-index: 70; width: 460px; padding: 24px 30px 22px; pointer-events: none;
  background: #d9d0b8 url(../assets-webp/overlays/old-paper-seamless.webp); background-blend-mode: multiply; background-size: 560px;
  color: #1d1912; font-family: var(--serif);
  border: 1px solid #5d543f;
  box-shadow: inset 0 0 0 6px #d9d0b8, inset 0 0 0 7px #7a6e55, inset 0 0 40px rgba(90,70,40,.35), 0 16px 44px rgba(0,0,0,.65);
  animation: tipin .16s ease-out both;
}
#tip.hidden { display: none; }
#tip h4 { margin: 0 0 4px; padding: 0 0 10px; font-size: 27px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid rgba(40,32,20,.55); position: relative; }
#tip h4::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 9px; height: 9px; margin-left: -5px; background: #d9d0b8; border: 1px solid rgba(40,32,20,.65); transform: rotate(45deg); }
#tip h4 img { height: 40px; width: auto; filter: invert(1) contrast(1.1) drop-shadow(0 1px 0 rgba(255,255,255,.2)); mix-blend-mode: multiply; }
#tip h4 .mark { width: 14px; height: 14px; background: #5a3a22; transform: rotate(45deg); margin: 0 6px; }
#tip p { margin: 16px 0 12px; font-size: 22px; line-height: 1.42; text-indent: 1.1em; }
#tip .now { margin-top: 10px; padding-top: 10px; border-top: 1px dotted rgba(40,32,20,.55); font-style: italic; font-size: 21px; color: #5a2f1a; }
@keyframes tipin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

#snd-hint { position: absolute; left: 40px; bottom: 30px; z-index: 80; padding: 10px 18px; font-family: var(--serif); font-style: italic; font-size: 22px; color: #cfc9b8; background: rgba(8,10,13,.8); border: 1px solid rgba(255,255,255,.18); opacity: 0; transition: opacity .4s; pointer-events: none; }
#snd-hint.on { opacity: 1; }
