/* The night palette and navigation belong to all the rooms. */
:root {
  color-scheme:dark; --paper:#14121c; --night:#100e17; --ink:#f5eadd;
  --muted:#cabfb6; --gold:#edce97; --line:#564956; --panel:#211e2b;
}
body[data-room],body[data-room] .top {background:#14121c;color:var(--ink)}
body[data-room] {min-height:100svh;position:relative;isolation:isolate;--haze:#493650;--gleam:#e1b782}
body[data-room]::before {
  content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;
  background:radial-gradient(ellipse at 84% 11%,var(--haze),transparent 48%),
             radial-gradient(ellipse at 8% 19%,#29203e,transparent 44%),linear-gradient(155deg,#17131f,#100f18 84%);
}
body[data-room=sky] {--haze:#233853;--gleam:#cedefa}
body[data-room=instrument],body[data-room=clock] {--haze:#423132;--gleam:#f6c982}
body[data-room=voice] {--haze:#30364a;--gleam:#cfcaed}
body[data-room=quiet] {--haze:#322e40;--gleam:#c5bdcf}
body[data-room] .wrap {width:min(1050px,calc(100% - 8vw))}
body[data-room] .top {background:#15121ed1;border-color:#8c72534d;position:relative;z-index:3}
.top .nav .brand {gap:12px;font-family:Forum,Georgia,serif;color:#f4e8d6}
.top .nav .brand::before {
  content:"";height:15px;width:15px;flex:none;border:1px solid #cda66c;transform:rotate(45deg);
  background:radial-gradient(circle,#ffe4a6 0 1px,transparent 2px 4px,#c59a5e 4.5px 5px,transparent 5.5px);
}
body[data-room] .links a,body[data-room] .foot a {color:#e3d6c4}
body[data-room] .skip {background:#f2dbb0;color:#211624}
body[data-room] :focus-visible {outline:2px solid #fcda98;outline-offset:4px}
body[data-room] main.article {max-width:1050px;padding:22px 0 40px}
body[data-room] .article .крошки {color:#c5b9aa;font-size:13px;line-height:1.5;gap:.45rem;margin-bottom:1rem}
body[data-room] .крошки a {color:#e7caa5;text-decoration-thickness:1px}
.room-front {
  position:relative;isolation:isolate;min-height:clamp(284px,29vw,390px);
  display:grid;grid-template-columns:1.08fr 1fr;align-items:center;margin:0 0 30px;
}
.room-front::after {content:"";height:1px;position:absolute;bottom:0;left:0;right:0;background:linear-gradient(90deg,#8e704d80,#9681522e 47%,transparent)}
.room-type {position:relative;z-index:2;padding:22px 0 38px}
.article .room-type h1 {
  margin:0 0 .2em;font:400 clamp(42px,5.7vw,86px)/.99 Forum,Georgia,serif;
  color:#f8efdf;letter-spacing:-.045em;text-wrap:balance;
}
.article .room-type .чин {max-width:34ch;font:400 clamp(18px,2vw,25px)/1.35 Spectral,Georgia,serif;color:#dec4a1}
.room-plate {position:absolute;inset:0 -2% 0 51%;z-index:0;overflow:hidden;pointer-events:none;isolation:isolate}
.plate-window {position:absolute;inset:0;isolation:isolate}
.room-plate .room-image {
  height:100%;width:100%;max-width:none;object-fit:cover;object-position:50% 42%;display:block;
  filter:saturate(.82) brightness(1.17);opacity:.94;
  mask-image:radial-gradient(ellipse 62% 60% at 54% 47%,#000 38%,#000b 65%,transparent 94%);
}
.plate-halo,.plate-light,.plate-grain {position:absolute;pointer-events:none}
.plate-halo {
  inset:8% 13% 9%;border-radius:50%;border:1px solid color-mix(in srgb,var(--gleam) 36%,transparent);
  transform:rotate(-22deg);box-shadow:0 0 0 5px #b59e8b0c;
}
.plate-halo::before,.plate-halo::after {content:"";position:absolute;left:7%;top:17%;width:5px;height:5px;background:var(--gleam);transform:rotate(45deg);box-shadow:0 0 9px var(--gleam)}
.plate-halo::after {left:87%;top:82%;width:3px;height:3px}
.plate-light {inset:0;background:radial-gradient(ellipse at 72% 41%,#fbd59735,transparent 31%);mix-blend-mode:screen}
.plate-grain {
  inset:4% 8% 8%;opacity:.68;
  background:radial-gradient(circle at 17% 32%,#e2cafa 1px,transparent 2px),
    radial-gradient(circle at 26% 73%,#ffe3a9 1px,transparent 1.8px),
    radial-gradient(circle at 81% 25%,#ffdfac 1px,transparent 2px),
    radial-gradient(circle at 69% 63%,#fff1cb 1px,transparent 1.8px),
    radial-gradient(circle at 44% 12%,#fff7cf 1px,transparent 1.8px);
}
[data-room=folio] .room-plate,[data-room=quiet] .room-plate {inset-block:3%}
[data-room=folio] .room-plate .room-image {object-fit:contain;mask-image:none;filter:saturate(.83) brightness(1.09);position:relative;z-index:1}
[data-room=folio] .plate-window {inset:4%}
[data-room=folio] .plate-halo,[data-room=quiet] .plate-halo {inset:17% 13%;transform:rotate(-23deg) scaleY(.66)}
[data-room=instrument] .plate-halo,[data-room=clock] .plate-halo {
  border:1px dotted #eaca8c99;outline:1px solid #d7ac6d3d;outline-offset:7px;
  inset:4% 19%;aspect-ratio:1;height:82%;width:auto;margin:auto;
}
[data-room=sky] .plate-halo {inset:22% 3%;transform:rotate(-21deg);border-style:dashed}
[data-room=story] .plate-halo {border-radius:50%;border-bottom:0;inset:8% 21% 4%;transform:none}
[data-room=quiet] .room-front {min-height:230px}
[data-room=quiet] .room-plate {opacity:.65}
body[data-room] .article p:not(.чин):not(.речь) {max-width:70ch;line-height:1.65}
body[data-room] .article :is(p,ul,ol,dl,details,table) {overflow-wrap:anywhere}
body[data-room] .article h2 {color:#f3e6d4;font:400 clamp(27px,3.4vw,43px)/1.15 Forum,Georgia,serif;letter-spacing:-.025em}
body[data-room] .article h3 {color:#dfc49d;font-weight:400}
body[data-room] .article .речь {font:400 clamp(22px,2.4vw,31px)/1.35 Forum,Georgia,serif;color:#f0d4a2;max-width:50ch}
body[data-room] .article a {color:#ebcc96;text-underline-offset:.22em}
body[data-room] .article :is(.малое,.тише,.д,small) {color:#cdc2b9}
body[data-room] .article .сетка {grid-template-columns:repeat(auto-fill,minmax(min(148px,100%),1fr));gap:14px}
body[data-room] .article .сетка a {
  background:linear-gradient(145deg,#292538,#17151f 76%);border:1px solid #685849;border-radius:4px;
  color:#f0e3cd;padding:12px 12px 14px;display:flex;flex-direction:column;align-items:flex-start;gap:3px;
}
body[data-room] .article .сетка img {width:100%;height:auto;aspect-ratio:820/1067;object-fit:contain;margin-bottom:6px}
body[data-room] .article .сетка .и {font:400 23px/1.08 Forum,Georgia,serif}
body[data-room] .article .сетка .с {color:#cfc0ae;line-height:1.35}
body[data-room] .article :is(.кнопка,.action,button) {
  min-height:44px;background:#302837;border:1px solid #a28665;color:#f9e5bd;border-radius:4px;
}
body[data-room] .article :is(.инструмент,.сегодня,.блок) {border-left:1px solid #a98e64;background:linear-gradient(90deg,#29233280,transparent);padding:12px clamp(12px,2.2vw,27px);margin:1.15em 0}
body[data-room] .article :is(label,input,select) {display:block;color:#f5ecdf}
body[data-room] .article :is(input,select) {border:1px solid #97826a;background:#1c1927;border-radius:3px;padding:10px 12px;max-width:100%;font:inherit;margin:.3em 0 .6em}
body[data-room] .article input[type=range] {padding:0;accent-color:var(--gold)}
body[data-room] .article .список {max-width:78ch}
body[data-room] .article details {max-width:760px;border-bottom:1px solid #615046;padding:.6em 0}
body[data-room] .article summary {color:#f1d5a7;min-height:44px;padding:.6em 0}
body[data-room] .article .весть {color:#ffd4b5}
body[data-room] .article .итог-расчёта {border-top:1px solid #847050;padding:.8em 0;font-size:20px}
body[data-room] .issue-archive,.room-section-links {margin:2em 0 .75em;border-top:1px solid #625446;padding:1em 0;display:flex;align-items:center;flex-wrap:wrap;gap:8px 1.4em}
.issue-archive [aria-current=page] {color:#f7e9d3;font-weight:600;text-decoration-thickness:2px}
body[data-room] .foot {border-top:1px solid #4e4240;padding-block:16px;flex-wrap:wrap;min-height:65px}
[data-room] .article[data-redirect] {min-height:70svh;display:grid;align-content:center;justify-items:start}
@media (prefers-reduced-motion:no-preference) {
  .room-image {animation:room-breath 13s ease-in-out infinite alternate;transform-origin:57% 45%}
  .plate-light {animation:room-candle 8s ease-in-out infinite alternate}
  .plate-grain {animation:room-embers 9s ease-in-out infinite alternate}
  .plate-halo::before {animation:room-pulse 4s ease-in-out infinite alternate}
  [data-room=clock] .plate-halo,[data-room=instrument] .plate-halo {animation:room-clock 76s linear infinite}
  .room-plate.touch-lit .plate-light {animation:room-touch 800ms ease-out}
  .article .сетка a {transition:transform .26s,border-color .26s,box-shadow .26s}
  @media(hover:hover){.article .сетка a:hover{transform:translateY(-3px);border-color:#bf9b66;box-shadow:0 13px 25px #0f0c197a}}
  .room-front:focus-within .room-image {animation-play-state:paused}
}
@keyframes room-breath {from{transform:scale(1)}to{transform:scale(1.045) translateY(-2px)}}
@keyframes room-clock {to{transform:rotate(338deg)}}
@keyframes room-pulse {from{opacity:.45}to{opacity:1}}
@keyframes room-candle {from{opacity:.28;transform:translate(-5%,2%)}to{opacity:.95;transform:translate(3%,-3%)}}
@keyframes room-embers {from{transform:translate(-2%,3%);opacity:.46}to{transform:translate(2%,-4%);opacity:.88}}
@keyframes room-touch {0%{opacity:.4}28%{opacity:1;filter:brightness(1.7)}100%{opacity:.63}}
@media (max-width:650px) {
  body[data-room] .wrap {width:calc(100% - 34px)}
  body[data-room] .top .nav {min-height:57px;gap:10px}
  body[data-room] .brand {font-size:26px;gap:7px}
  body[data-room] .links {display:flex;gap:12px}
  body[data-room] .links a {font-size:13px;min-height:44px;display:grid;align-items:center}
  body[data-room] main.article {padding-top:16px}
  body[data-room] .article .крошки {line-height:1.45;margin-bottom:4px}
  .room-front {display:flex;flex-direction:column-reverse;align-items:stretch;min-height:0;margin-bottom:18px}
  .room-plate,[data-room=folio] .room-plate,[data-room=quiet] .room-plate {position:relative;inset:auto;width:100%;height:clamp(141px,36vw,210px);overflow:hidden}
  [data-room=folio] .room-plate {height:clamp(174px,47vw,234px)}
  [data-room=quiet] .room-front {min-height:0}
  [data-room=quiet] .room-plate {height:95px}
  .room-type {padding:9px 0 19px}
  .article .room-type h1 {font-size:clamp(38px,10.3vw,61px);line-height:1.02;letter-spacing:-.036em}
  .article .room-type .чин {font-size:18px;line-height:1.35}
  .room-plate .room-image {object-position:50% 43%}
  body[data-room] .article .сетка {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  body[data-room] .article .сетка a {padding:8px}
  body[data-room] .article .сетка .и {font-size:21px}
  body[data-room] .article :is(.инструмент,.сегодня,.блок) {padding-inline:12px}
}
@media(max-width:355px){body[data-room] .brand{font-size:23px}body[data-room] .links{gap:9px}body[data-room] .links a{font-size:12px}}
.room-asleep *, .room-asleep *::before,.room-asleep *::after {animation-play-state:paused}
/* A gilded fore-edge follows the depth of the page without crossing the type. */
.book-margins {position:fixed;inset:0;z-index:2;pointer-events:none;overflow:hidden;--progress:0}
.book-rail {position:absolute;inset:0 auto 0 0;width:clamp(10px,2.1vw,34px);opacity:.67;
  background:linear-gradient(90deg,#b48b4f0d,transparent 93%),repeating-linear-gradient(89deg,transparent 0 4px,#c3a97816 4.5px,transparent 5px 8px);
  mask-image:linear-gradient(90deg,#000,transparent);}
.book-rail.rail-right {inset:0 0 0 auto;transform:scaleX(-1)}
.book-rail b {position:absolute;top:0;left:1px;width:65%;height:28svh;
  transform:translateY(calc(var(--progress) * 69svh));
  background:radial-gradient(ellipse at 0 48%,#fff0baae,transparent 9%,#d8b77d4d 13%,transparent 67%);}
.rail-right b {top:auto;bottom:0;transform:translateY(calc(var(--progress) * -69svh))}
@media(prefers-reduced-motion:no-preference){
  .book-rail::after {content:"";position:absolute;inset:0;background:repeating-linear-gradient(82deg,transparent 0 16px,#f5cd8f49 16.5px,transparent 17px 41px);
    mask-image:radial-gradient(ellipse at 6% 50%,#000 0,transparent 78%);animation:grain-current 17s ease-in-out infinite alternate;}
  .rail-right::after {animation-direction:alternate-reverse;animation-delay:-6s}
  .book-rail b {transition:transform .35s ease-out}
}
@keyframes grain-current {from{transform:translateY(-16%);opacity:.15}to{transform:translateY(16%);opacity:.7}}
@media(prefers-reduced-motion:reduce){.book-rail b{display:none}}
.room-lunar {pointer-events:auto;overflow:visible}
.room-lunar .plate-window {display:grid;place-items:center}
.phase-disc {display:flex;flex-direction:column;align-items:center;gap:4px;z-index:1;position:relative}
.phase-disc svg {height:clamp(124px,14vw,187px);max-height:65%;width:auto;max-width:95%}
body[data-room] .article .phase-disc p {font-size:13px;max-width:29ch;margin:0;text-align:center;line-height:1.3;color:#d3c7b2}
@media(max-width:650px){
 .room-lunar{height:177px}.room-lunar .plate-halo{inset:11% 18% 26%}.phase-disc svg{height:109px}
 .book-rail{width:9px;opacity:.78}
}
