/* Пульт стилей — в духе Scrollywood: тёмный «монтажный стол», кость и красный, Noto Serif Display + Geologica + IBM Plex Mono.
   Без aspect-ratio и inset — ради старых iPhone. */
@font-face { font-family: 'SW Serif'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62.5% 100%;
  src: url(fonts/noto-serif-display-cyrillic-standard-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'SW Serif'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62.5% 100%;
  src: url(fonts/noto-serif-display-latin-standard-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: 'SW Serif'; font-style: italic; font-display: swap; font-weight: 100 900;
  src: url(fonts/noto-serif-display-cyrillic-wght-italic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'SW Serif'; font-style: italic; font-display: swap; font-weight: 100 900;
  src: url(fonts/noto-serif-display-latin-wght-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'SW Sans'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/geologica-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'SW Sans'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/geologica-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: 'SW Mono'; font-style: normal; font-display: swap; font-weight: 400;
  src: url(fonts/ibm-plex-mono-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'SW Mono'; font-style: normal; font-display: swap; font-weight: 400;
  src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }

:root { --ink: #0c0b0a; --ink2: #151311; --ink3: #1e1b18; --bone: #efe7d6; --bone2: #d8cdb6;
  --mute: rgba(239,231,214,.58); --dim: rgba(239,231,214,.34); --line: rgba(239,231,214,.14); --line2: rgba(239,231,214,.28);
  --red: #ff4d2e; --red2: #ff7a52;
  --serif: 'SW Serif', Georgia, serif; --sans: 'SW Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'SW Mono', ui-monospace, Consolas, monospace; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--bone); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
body { background: radial-gradient(120% 80% at 70% -10%, #2a1a14 0%, rgba(12,11,10,0) 55%), var(--ink); overflow: hidden; }
/* зерно плёнки */
body:after { content: ''; position: fixed; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

.pu { height: 100vh; display: flex; flex-direction: column; }
.pu-top { display: flex; align-items: center; gap: 24px; padding: 14px 28px; border-bottom: 1px solid var(--line); }
.pu-logo { display: flex; align-items: baseline; gap: 10px; }
.pu-logo i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); align-self: center; }
.pu-logo b { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 24px; letter-spacing: -.01em; }
.pu-logo span, .pu-tc, .pu-keys { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.pu-tc { margin-left: auto; color: var(--bone2); }
.pu-keys { display: flex; gap: 16px; }
.pu-keys kbd { display: inline-block; min-width: 18px; padding: 1px 5px; margin-right: 3px; border: 1px solid var(--line2); border-radius: 4px; font-family: var(--mono); font-size: 10px; text-align: center; color: var(--bone); }

.pu-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; padding: 20px 28px 14px; }
.pu-mon { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.pu-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 14px; background: #050504; box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px rgba(0,0,0,.55); overflow: hidden; }
.pu-frame { position: relative; flex: 0 0 auto; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.08); background: #fff; }
.pu-frame iframe { display: block; border: 0; width: 1440px; height: 900px; transform-origin: 0 0; background: #fff; }
.pu.tel .pu-frame { border-radius: 34px; box-shadow: 0 0 0 10px #1b1917, 0 0 0 11px var(--line2), 0 30px 60px rgba(0,0,0,.6); }

/* видоискатель поверх экрана */
.pu-vf { position: absolute; left: 0; right: 0; top: 0; bottom: 64px; pointer-events: none; z-index: 3; }
.pu-vf i { position: absolute; width: 22px; height: 22px; border: 0 solid var(--bone); opacity: .55; }
.pu-vf .c1 { left: 12px; top: 12px; border-left-width: 2px; border-top-width: 2px; }
.pu-vf .c2 { right: 12px; top: 12px; border-right-width: 2px; border-top-width: 2px; }
.pu-vf .c3 { left: 12px; bottom: 12px; border-left-width: 2px; border-bottom-width: 2px; }
.pu-vf .c4 { right: 12px; bottom: 12px; border-right-width: 2px; border-bottom-width: 2px; }
.pu-rec { position: absolute; left: 44px; top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--bone); display: flex; align-items: center; gap: 7px; }
.pu-rec em { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: puRec 1.6s steps(2, start) infinite; }
@keyframes puRec { to { visibility: hidden; } }
.pu-ratio { position: absolute; right: 44px; top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--mute); }

/* «склейка» при смене стиля */
.pu-cut { position: absolute; left: 0; right: 0; top: 0; bottom: 64px; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 14px; background: var(--ink); opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility 0s linear .28s; pointer-events: none; }
.pu-cut.on { opacity: 1; visibility: visible; transition: opacity .18s ease; }
.pu-cut b { font-family: var(--serif); font-weight: 300; font-stretch: 62.5%; font-size: 120px; line-height: .9; color: var(--bone); }
.pu-cut span { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--red2); }

.pu-ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 52px; }
.pu-seg { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(239,231,214,.04); }
.pu-seg button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 18px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-size: 14px; color: var(--mute); transition: background .2s, color .2s; }
.pu-seg button small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.pu-seg button.on { background: var(--bone); color: var(--ink); }
.pu-seg button.on small { color: rgba(12,11,10,.55); }
.pu-dev button { justify-content: center; padding: 10px 16px; }
.pu-open { margin-left: auto; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--bone2); text-decoration: none; border-bottom: 1px solid var(--line2); padding-bottom: 2px; }
.pu-open:hover { color: var(--red2); border-color: var(--red2); }

/* карточка стиля */
.pu-card { min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, rgba(239,231,214,.05), rgba(239,231,214,.015)); overflow: auto; }
.pu-no { font-family: var(--serif); font-weight: 200; font-stretch: 62.5%; font-size: 92px; line-height: .85; color: var(--red); letter-spacing: -.02em; }
.pu-card h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.08; letter-spacing: -.01em; }
.pu-src { margin: 0; font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.4; color: var(--bone2); }
.pu-card > * { flex-shrink: 0; } /* длинное описание не сплющивает палитру и кнопки — прокручивается только описание */
.pu-card > .pu-dl { flex-shrink: 1; min-height: 0; overflow: auto; }
.pu-pal { display: flex; height: 54px; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.pu-pal span { flex: 1 1 0; position: relative; }
.pu-pal span em { position: absolute; left: 6px; bottom: 5px; font-family: var(--mono); font-style: normal; font-size: 9px; letter-spacing: .04em; mix-blend-mode: difference; color: #fff; opacity: .75; }
.pu-dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pu-dl dt { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.pu-dl dd { margin: 3px 0 0; font-size: 14px; line-height: 1.5; color: var(--bone); }
.pu-nav { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.pu-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line2); background: none; cursor: pointer; font-size: 18px; transition: background .2s, border-color .2s; }
.pu-nav button:hover { background: var(--red); border-color: var(--red); color: var(--ink); }
.pu-nav span { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--mute); }

/* киноплёнка со стилями */
.pu-strip { flex: 0 0 auto; background: #070605; border-top: 1px solid var(--line); }
.pu-perf { height: 14px; background-image: radial-gradient(circle at 50% 50%, #1d1a17 0 3.5px, transparent 4px); background-size: 22px 14px; background-repeat: repeat-x; background-position: 0 50%; }
.pu-film { display: flex; gap: 10px; padding: 4px 28px; overflow-x: auto; scrollbar-width: none; }
.pu-film::-webkit-scrollbar { display: none; }
.pu-fr { flex: 0 0 auto; width: 128px; padding: 8px; border: 1px solid #24201c; border-radius: 6px; background: #0f0d0c; cursor: pointer; text-align: left; transition: border-color .2s, transform .2s, background .2s; }
.pu-fr:hover { transform: translateY(-2px); border-color: var(--line2); }
.pu-fr.on { border-color: var(--red); background: #1a0f0b; box-shadow: 0 0 0 1px var(--red), 0 8px 24px rgba(255,77,46,.18); }
.pu-fr .sw { display: flex; height: 30px; border-radius: 3px; overflow: hidden; }
.pu-fr .sw span { flex: 1 1 0; }
.pu-fr b { display: block; margin-top: 7px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--red2); }
.pu-fr small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.25; color: var(--bone2); height: 29px; overflow: hidden; }
.pu-fr.net { opacity: .38; }

@media (max-width: 1100px) {
  body { overflow: auto; }
  .pu { height: auto; min-height: 100vh; }
  .pu-main { grid-template-columns: 1fr; padding: 14px 16px; }
  .pu-stage { height: 62vh; flex: 0 0 auto; }
  .pu-vf { bottom: auto; height: 62vh; } /* рамка — по экрану, кнопки под ним переносятся в 2 ряда */
  .pu-keys { display: none; }
  .pu-top { padding: 12px 16px; }
  .pu-film { padding: 4px 16px; }
}
@media (max-width: 560px) {
  .pu-stage { height: 70vh; }
  .pu-vf { height: 70vh; }
  .pu-tc { display: none; }
  .pu-open { margin-left: 0; }
  .pu-no { font-size: 64px; }
}
@media (prefers-reduced-motion: reduce) { .pu-rec em { animation: none; } .pu-cut, .pu-fr { transition: none; } }
a.pu-logo { color: inherit; text-decoration: none; }
