/* По выбранному образцу: тёмный музей, оливковая штукатурка и тёплый свет. */
:root {
  --brass: #b69b62;
  --brass-soft: rgb(182 155 98 / .5);
  --brass-dim: rgb(182 155 98 / .2);
  --text: #e6dcc2;
  --ivory: #f1e5c9;
  --muted: #bcb298;
  color-scheme: dark;
}
html, body, .stage { background: #13140c; }
.panel { box-shadow: inset 0 0 120px 30px #0009; }
.panel::after {
  background: radial-gradient(ellipse 90% 100% at 50% 47%, transparent 25%, #0009 100%), linear-gradient(#0004, transparent 30%, #0002 80%, #0008);
}
.cloth {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23ccbb88' opacity='.12' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.cloth::before { display: none; }
.cloth::after {
  height: 13vh;
  border-top: 4px ridge #786137;
  background: linear-gradient(180deg, #0007, transparent 28%, #0005), repeating-linear-gradient(90deg, transparent 0 102px, #060703 103px 106px, #5e512a55 107px, transparent 110px 180px), #191a10;
  box-shadow: 0 -1px 0 #c0a66a55, 0 -5px 0 #090b07, 0 -6px 0 #84724377, inset 0 9px 10px #0009;
}
/* Ближний деревянный простенок даёт сцене архитектурную глубину. */
.stage::after {
  content: ''; position: absolute; z-index: 300; pointer-events: none;
  inset: 0 auto 0 0; width: 5.7vw;
  background: linear-gradient(90deg, #080905, #332c18 18%, #17160b 26%, #4e3e1e 29%, #201c0e 34%, #13140a 75%, #534225 85%, #17170c 91%, #080a05);
  border-right: 1px solid #82704455;
  box-shadow: 12px 0 28px #0009, inset -6px 0 9px #000a;
  opacity: .9;
}
.masthead {
  position: fixed; z-index: 7; top: 4vh; left: 10.4vw; right: 10vw;
  display: flex; align-items: center; gap: 32px;
}
.album-brand { font: 14px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .31em; color: var(--ivory); }
.masthead-rule { width: 52px; height: 1px; background: var(--brass); }
.album-spiral { margin-left: auto; color: var(--muted); font: 10px/1 var(--sans); letter-spacing: .08em; text-decoration: none; }
.album-spiral:hover { color: var(--ivory); }
.hud { top: 7.5vh; left: 10vw; text-shadow: none; }
.hud .sign-word { display: none; }
.plate { margin: 0; gap: 34px; align-items: flex-end; }
.plate h1 { font: 400 clamp(125px, 21vh, 235px)/.95 var(--serif); font-variant-numeric: lining-nums; color: var(--ivory); letter-spacing: -.05em; }
.plate-info { padding-bottom: 3vh; }
.count { font: 15px/1.4 var(--sans); letter-spacing: .13em; opacity: 1; }
.piece::before {
  top: -140px;
  width: calc(100% + 140px);
  height: 260px;
  /* Эллипс полностью гаснет внутри слоя: края прямоугольника не видны. */
  background: radial-gradient(ellipse 48% 44% at 50% 50%, #f5ce873b 0%, #dba55320 30%, #c38c420a 54%, transparent 78%);
  filter: blur(12px);
}
.frame, .frame.gilt-dark, .frame.walnut, .frame.ebony {
  --t: 10px;
  background: linear-gradient(135deg, #f7d78955, transparent 35%, #0008), linear-gradient(90deg, #4e3815, #b38d42 20%, #624818 40%, #ba984e 62%, #4c3718 85%, #92723c);
  box-shadow: inset 0 0 0 1px #d1ad6977, inset 0 0 0 3px #463211, inset 0 0 0 4px #b18c4988, inset 0 0 0 6px #6d4f25, inset 0 0 0 8px #271d0e, 0 4px 5px #0008, 0 18px 24px -8px #000b;
}
.canvas::after { background: none; box-shadow: inset 0 1px 5px #0006; }
.label, .piece .label {
  background: none; color: var(--text); box-shadow: none; align-self: flex-start;
  padding: 0 4px; margin-top: 23px; width: 100%; max-width: 100%; gap: 4px;
}
.l-number, .l-life { display: none; }
.l-author, .l-title { font: 13px/1.4 var(--sans); letter-spacing: .04em; }
.piece .l-author { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.l-meta { color: var(--muted); font: 11px/1.4 var(--sans); letter-spacing: .06em; }
.l-ex-short { color: var(--muted); }
.scale { top: 6vh; bottom: auto; height: 32vh; right: 2vw; width: 58px; }
.scale-ticks i { opacity: 0; }
.scale:hover .scale-ticks i { opacity: .3; }
.scale-ticks::before { background: var(--brass-soft); right: 40px; }
.scale-axis span { right: auto; left: 24px; color: var(--text); opacity: 1; font-size: 11px; }
.scale-marker { right: 34px; }
.scale-marker::before { border-radius: 50%; transform: none; width: 6px; height: 6px; }
.scale-marker span { display: none; }
.scale-hover { right: 60px; }
.credit { left: 10.4vw; bottom: 4vh; font-size: 10px; }
.hint { bottom: 5vh; max-width: 60vw; white-space: normal; text-align: center; font-size: 10px; opacity: .65; }
.walk { bottom: 2.5vh; height: 1px; width: 25vw; }
.next-sign { background: none; border: 0; border-block: 1px solid var(--brass-soft); outline: none; }
.ns-year { background: none; -webkit-text-fill-color: currentColor; color: var(--ivory); filter: none; font-weight: 400; }
.ns-info { color: var(--muted); }
.flash span { text-shadow: 0 0 45px #e7c78e33; color: var(--ivory); }
.boot { background: #15160d; }
@media (max-width: 899px) {
  .masthead { left: 9vw; gap: 16px; }
  .album-brand { font-size: 11px; letter-spacing: .23em; }
  .masthead-rule { width: 28px; }
  .count { font-size: 12px; letter-spacing: .06em; }
  .plate { gap: 22px; }
  .scale { right: 1vw; }
  .album-spiral { display: none; }
}
@media (max-width: 640px) {
  .stage::after { display: none; }
  .masthead { top: 25px; left: 24px; right: 24px; }
  .album-brand { font-size: 11px; letter-spacing: .2em; }
  .hud { top: 53px; left: 24px; right: 35px; }
  .plate h1 { font-size: 104px; }
  .plate { gap: 18px; }
  .plate-info { padding-bottom: 13px; }
  .count { font-size: 10px; letter-spacing: .04em; max-width: 108px; }
  .frame, .frame.gilt-dark, .frame.walnut, .frame.ebony { --t: 7.5px; }
  .piece .label { margin-top: 20px; }
  .scale { top: 200px; right: 0; bottom: 90px; height: auto; width: 27px; }
  .scale-ticks::before { right: 10px; }
  .scale-ticks i { right: 10px; opacity: .2; }
  .scale-marker { right: 4px; }
  .scale-axis { display: none; }
  .credit { left: 24px; bottom: 27px; }
  .walk { right: 24px; left: auto; transform: none; bottom: 31px; width: 28vw; }
  .cloth::after { height: 9vh; }
}
@media (max-height: 500px) {
  .masthead { top: 12px; }
  .hud { top: 36px; }
  .plate h1 { font-size: 86px; }
  .plate-info { padding-bottom: 12px; }
}

/* На невысоком экране подписи и подвал должны помещаться целиком. */
@media (max-height: 500px) {
  .hud { top: 34px; }
  .plate h1 { font-size: 72px; }
  .plate-info { padding-bottom: 10px; }
  .piece .label { margin-top: 12px; gap: 3px; }
  .l-author { font-size: 11px; }
  .piece .l-title { font-size: 12px; -webkit-line-clamp: 1; }
  .l-meta { font-size: 9px; }
  .l-ex-short, .hint { display: none; }
  .cloth::after { height: 36px; }
  .credit { bottom: 14px; }
  .walk { bottom: 15px; }
}
.empty p { margin: 0; }
.empty .to-start { margin-top: 16px; font-size: 10px; }
.empty .to-start:disabled { opacity: .5; cursor: wait; }

.wall3d.live .empty { pointer-events: auto; width: min(420px, calc(100% - 64px)); }

/* Пока файл не готов, показываем спокойное поле и индикатор вместо «мыла». */
.canvas { background: #17190f; }
.image-error .canvas::after {
  display: grid; place-items: center; padding: 16px;
  content: 'Изображение не загрузилось'; color: var(--muted);
  font: 12px/1.5 var(--sans); text-align: center; box-shadow: none;
}
.image-error .canvas .loader { display: none; }
