/* InstantCinema — booth colors, type, shelves */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/BigShoulders-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/BigShoulders-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e0c0a;
  --bg-2: #16130f;
  --bg-3: #211c16;
  --ink: #f3eadc;
  --ink-dim: #d9cdb8;
  --mute: #8f8272;
  --amber: #e6a23c;
  --amber-2: #ffd38a;
  --line: rgba(243, 234, 220, 0.14);
  --danger: #d4654a;
  --ok: #8faf7a;
  --display: "Big Shoulders Display", "Arial Narrow", "Franklin Gothic Medium", Impact, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 1180px;
}

/* reset */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  min-width: 320px;
}

body#top { scroll-padding-top: 70px; }

img { max-width: 100%; border: 0; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; padding: 0; }

h1, h2, h3, h4, p, figure { margin: 0; }

ul, ol { margin: 0; padding: 0; }

a { color: inherit; }

::selection {
  background: var(--amber);
  color: #1a1208;
}

:focus-visible {
  outline: 2px solid var(--amber-2);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--amber);
  color: #1a1208;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 600;
}

.skip:focus { top: 12px; }

.u-hide {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* type */

h1, h2, .brand__name, .missing__code {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
}

/* layout */

.wrap {
  width: min(var(--wrap), calc(100% - 28px));
  margin-inline: auto;
}

.wrap--wide {
  width: min(1280px, calc(100% - 28px));
}

main { padding-bottom: 64px; }

.page, .auth, .acct, .trouble {
  padding-top: 28px;
}

/* шапка */

.mast {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #100e0c;
  border-bottom: 1px solid var(--line);
}

.mast__bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "burger brand user"
    "menu menu menu";
  align-items: center;
  gap: 8px 10px;
  width: min(1280px, calc(100% - 8px));
  margin-inline: auto;
  padding: 10px 8px 8px;
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
}

.brand__mark {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.brand__name {
  font-size: 22px;
  letter-spacing: 0.06em;
  line-height: 0.8;
  white-space: nowrap;
}

.brand__name span { color: var(--amber); }

.tagline {
  display: none;
  margin: 0;
  color: var(--mute);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.3;
}

.burger {
  grid-area: burger;
  width: 40px;
  height: 36px;
  display: grid;
  place-items: center;
}

.burger__lines,
.burger__lines::before,
.burger__lines::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.burger__lines::before,
.burger__lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger__lines::before { top: -6px; }
.burger__lines::after { top: 6px; }

.menu {
  grid-area: menu;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 4px 10px;
  background: #100e0c;
}

.menu a {
  text-decoration: none;
  padding: 8px 6px;
  color: var(--ink-dim);
  font-size: 16px;
}

.menu a[aria-current="page"] {
  color: var(--amber);
  box-shadow: inset 2px 0 0 var(--amber);
}

.js .menu { display: none; }
.js .menu.is-open { display: flex; }

.userbox {
  grid-area: user;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.signin, .signout {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid var(--amber);
  padding-bottom: 1px;
  background: none;
}

.signout { border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }

.who {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.who__name { font-size: 14px; }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2a2118;
  color: var(--amber);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

.avatar--lg { width: 64px; height: 64px; font-size: 26px; }

.bell { position: relative; }

.bell__btn {
  width: 36px;
  height: 36px;
  color: var(--ink);
  position: relative;
}

.bell__count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--amber);
  color: #1a1208;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
}

.drop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(320px, 92vw);
  background: var(--bg-2);
  border: 1px solid rgba(230, 162, 60, 0.45);
  z-index: 50;
  padding: 6px 0 0;
}

.bell:hover .drop,
.bell:focus-within .drop { display: block; }

.drop ul { list-style: none; }

.drop li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}

.drop li:first-child { border-top: 0; }

.drop li.is-new { box-shadow: inset 2px 0 0 var(--amber); }

.drop a { text-decoration: none; color: var(--ink-dim); }

.drop li.is-new a { color: var(--ink); }

.drop time { color: var(--mute); font-size: 12px; white-space: nowrap; }

.drop__all {
  display: block;
  text-align: center;
  padding: 10px;
  color: var(--amber);
  text-decoration: none;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* home strip */

.home .mast {
  position: absolute;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
}

.home .mast.is-stuck {
  position: fixed;
  background: rgba(14, 12, 10, 0.96);
  border-bottom-color: var(--line);
}

.strip {
  position: relative;
  min-height: 520px;
  background: #090807;
  overflow: hidden;
}

.strip__pic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

.strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8, 7, 6, 0.72) 0, rgba(8, 7, 6, 0.05) 32%, rgba(8, 7, 6, 0.18) 55%, rgba(8, 7, 6, 0.92) 100%);
  pointer-events: none;
}

.strip__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  z-index: 1;
}

.eyebrow {
  color: var(--amber);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 8px;
}

.strip h1 {
  font-size: 3.1rem;
  max-width: 12em;
  color: #f7f1e6;
}

.strip__line {
  margin-top: 12px;
  color: var(--ink-dim);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.intro { padding: 26px 0 8px; }

.intro__text {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.6;
  color: #e7dccb;
  max-width: 64ch;
}

.intro__text p { margin: 0 0 0.85em; }

.intro__text ul {
  margin: 0 0 0.6em 1.1em;
}

.intro__text li { margin: 0.2em 0; }

/* shelves */

.shelf { margin: 32px 0; }

.shelf__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shelf__head h2 { font-size: 2.15rem; }

.shelf__head a {
  color: var(--amber);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.shelf__head a:hover { text-decoration: underline; }

.count {
  color: var(--mute);
  font-size: 13px;
  margin: -6px 0 14px;
}

.film {
  background: #241c14;
  padding: 0 0 2px;
}

.film__holes {
  height: 12px;
  background:
    radial-gradient(circle at 7px 6px, #0e0c0a 2.5px, transparent 3px) 0 0 / 20px 12px,
    #3a2d22;
}

.reel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 12px 10px 14px;
  -webkit-overflow-scrolling: touch;
  /* safari: иначе прыгает */
  transform: translateZ(0);
}

.reel::-webkit-scrollbar { height: 8px; }
.reel::-webkit-scrollbar-thumb { background: #3a3126; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 12px;
  align-items: start;
}

/* poster card */

.poster {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
  scroll-snap-align: start;
}

.reel .poster {
  flex: 0 0 70%;
  max-width: 210px;
}

.poster__frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: #090807;
  border: 1px solid rgba(230, 162, 60, 0.4);
  box-shadow: inset 0 0 0 4px #090807, inset 0 0 0 5px rgba(230, 162, 60, 0.22);
  overflow: hidden;
}

.poster__shot {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-fit: cover;
  max-width: none;
}

.poster__icon {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 56px;
  height: 56px;
  max-width: none;
  background: #14110e;
  border: 1px solid rgba(243, 234, 220, 0.4);
  box-shadow: 0 0 0 3px rgba(8, 7, 6, 0.55);
}

.poster__name {
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.poster__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--mute);
  font-size: 12px;
  line-height: 1.35;
}

.poster__ver { overflow-wrap: anywhere; }

.poster__size {
  border: 1px solid rgba(230, 162, 60, 0.45);
  color: var(--amber);
  padding: 0 4px;
  font-size: 11px;
  line-height: 1.5;
}

.poster__fresh {
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}

.poster:hover .poster__frame { border-color: var(--amber); }
.poster:hover .poster__name { color: var(--amber-2); }

/* buttons */

.btn {
  display: inline-block;
  border: 1px solid rgba(230, 162, 60, 0.55);
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 2px;
  line-height: 1.2;
  text-align: center;
}

.btn--go {
  background: var(--amber);
  color: #1a1208;
  border-color: var(--amber);
  font-weight: 600;
}

.btn--ghost { color: var(--ink-dim); }

.btn:hover { border-color: var(--amber-2); }

.btn--go:hover { filter: brightness(1.05); }

[data-mn-fav].is-in {
  color: #1a1208;
  background: var(--amber);
  border-color: var(--amber);
}

/* program */

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--mute);
  font-size: 13px;
  margin-bottom: 10px;
}

.crumb a { color: var(--ink-dim); }

.dock {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  margin-bottom: 18px;
}

.dock__id {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.dock__icon {
  width: 64px;
  height: 64px;
  max-width: none;
  flex: 0 0 auto;
  border: 1px solid rgba(230, 162, 60, 0.4);
  background: #14110e;
}

.dock h1 {
  font-size: clamp(2.3rem, 8vw, 4.4rem);
  overflow-wrap: anywhere;
}

.dock__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 8px;
  color: var(--mute);
  font-size: 14px;
}

.chip {
  display: inline-block;
  border: 1px solid rgba(230, 162, 60, 0.5);
  color: var(--amber);
  text-decoration: none;
  padding: 2px 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dock__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dock__actions .btn { width: 100%; }

.stills { margin: 8px 0 22px; position: relative; }

.stills__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}

.still {
  flex: 0 0 86%;
  scroll-snap-align: start;
  display: block;
  padding: 7px;
  background: #090807;
  border: 1px solid rgba(230, 162, 60, 0.5);
  box-shadow: inset 0 0 0 1px rgba(230, 162, 60, 0.18);
  text-decoration: none;
}

.still img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #120f0c;
}

.stills figcaption {
  color: var(--mute);
  font-size: 13px;
  margin-top: 6px;
}

.stills__arrow {
  display: none;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.rail { order: -1; }

.specs {
  background: var(--bg-2);
  border-top: 2px solid var(--amber);
  padding: 12px 12px 4px;
  margin: 0;
}

.specs div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.specs dt { color: var(--mute); margin: 0; }
.specs dd { margin: 0; overflow-wrap: anywhere; }

.gatebox { margin: 28px 0; }

.gatebox h2 { font-size: 2rem; margin-bottom: 8px; }

.builds { margin-top: 16px; }

.builds h3 {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  margin: 14px 0 8px;
}

.mirror { display: flex; flex-direction: column; gap: 8px; }

.mirror a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(230, 162, 60, 0.4);
  padding: 10px 12px;
  text-decoration: none;
}

.mirror a:hover { border-color: var(--amber); color: var(--amber-2); }

.older { list-style: none; }

.older li {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.older a { color: var(--amber-2); }

/* article */

.tabset { min-width: 0; }

.tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.tabbar button {
  padding: 8px 12px;
  color: var(--mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 14px;
}

.tabbar button[aria-selected="true"] {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

/* без js панели и faq идут подряд */
html:not(.js) .tabset [hidden],
html:not(.js) .faq__a[hidden] { display: block !important; }

.prose {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.68;
  color: #efe4d4;
  overflow-wrap: break-word;
}

.prose h2 {
  font-size: 2rem;
  margin: 1.4em 0 0.4em;
  color: var(--ink);
}

.prose h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.28rem;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 1.3em 0 0.35em;
}

.prose p { margin: 0 0 0.9em; }

.prose ul, .prose ol { margin: 0 0 1em 1.2em; }
.prose li { margin: 0.28em 0; }

.prose a { color: var(--amber-2); }

.prose blockquote {
  margin: 0 0 1em;
  padding: 4px 0 4px 14px;
  border-left: 2px solid var(--amber);
  color: var(--ink-dim);
}

.prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: #2a2118;
  padding: 0.1em 0.35em;
}

.prose pre {
  background: #120f0c;
  border: 1px solid var(--line);
  padding: 12px 14px;
  overflow-x: auto;
  margin: 0 0 1em;
}

.prose pre code { background: none; padding: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1em; }

.prose table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14px;
}

.prose th, .prose td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose th { color: var(--amber); font-weight: 600; }

.faq { margin-top: 28px; }

.faq h2 { font-size: 2rem; margin-bottom: 8px; }

.faq__item { border-top: 1px solid var(--line); }

.faq__item h3 { margin: 0; font-size: inherit; }

.faq__item button {
  width: 100%;
  text-align: left;
  padding: 12px 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
}

.faq__item button::after {
  content: "+";
  float: right;
  color: var(--amber);
}

.faq__item button[aria-expanded="true"]::after { content: "–"; }

.faq__a {
  padding: 0 0 12px;
  color: var(--ink-dim);
  max-width: 68ch;
}

.faq__a p { margin: 0 0 0.6em; }

/* booth — fullscreen stills */

.booth[hidden] { display: none !important; }

.booth {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 4, 3, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 54px 48px 32px;
}

.booth__frame {
  margin: 0;
  max-width: min(1100px, 100%);
  text-align: center;
}

.booth__frame img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  border: 1px solid rgba(230, 162, 60, 0.75);
  box-shadow: 0 0 0 8px #0a0908, 0 0 0 9px rgba(230, 162, 60, 0.35);
  background: #000;
}

.booth figcaption {
  color: var(--ink-dim);
  margin-top: 10px;
  font-size: 14px;
}

.booth__x, .booth__nav {
  position: absolute;
  color: var(--ink);
  background: #1a1612;
  border: 1px solid rgba(230, 162, 60, 0.45);
  width: 40px;
  height: 40px;
}

.booth__x { top: 12px; right: 12px; }

.booth__prev { left: 8px; top: 50%; }
.booth__next { right: 8px; top: 50%; }

/* sheet (panel dialog) */

.sheet[hidden] { display: none !important; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px 12px;
}

.sheet__back {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 4, 0.82);
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.sheet__box {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  background: #16130f;
  border: 1px solid rgba(230, 162, 60, 0.55);
  box-shadow: inset 0 0 0 4px #16130f, inset 0 0 0 5px rgba(230, 162, 60, 0.22);
  padding: 16px 16px 20px;
  border-radius: 2px;
}

.sheet__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.sheet__head h2 { font-size: 2rem; }

.sheet__x {
  border: 1px solid var(--line);
  padding: 6px 8px;
  color: var(--ink-dim);
  flex: 0 0 auto;
}

.sheet__body { font-size: 15px; }
.sheet__body p { margin: 0 0 0.8em; }
.sheet__body ol { margin: 0 0 0.8em 1.2em; }
.sheet__body li { margin: 0.35em 0; }

/* comments */

.thread { margin-top: 36px; }

.thread__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 12px;
}

.thread__head h2 { font-size: 2rem; }

.thread__n { color: var(--amber); }

.sort { display: flex; gap: 8px; }

.sort button {
  color: var(--mute);
  border-bottom: 1px solid transparent;
  padding: 2px 0;
}

.sort button[aria-pressed="true"] {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.cform { margin: 0 0 18px; display: grid; gap: 8px; }

.cform label { font-size: 14px; }

textarea, input[type="text"], input[type="email"], input[type="password"], input[type="search"] {
  width: 100%;
  background: #120f0c;
  border: 1px solid #3a3228;
  border-radius: 2px;
  padding: 10px 12px;
}

textarea { min-height: 120px; resize: vertical; }

.hint { color: var(--mute); font-size: 13px; margin-top: 2px; }

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

.err {
  background: #2a1612;
  border-left: 3px solid var(--danger);
  color: #f0c2b4;
  padding: 10px 12px;
  margin: 0 0 12px;
}

.field-err { color: #e7a090; font-size: 13px; margin: 4px 0 0; }

.note {
  background: #182116;
  border-left: 3px solid var(--ok);
  color: #d5e4c8;
  padding: 10px 12px;
  margin: 0 0 12px;
}

.clist, .replies { list-style: none; }

.comment {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.comment.is-hold { opacity: 0.62; }

.comment header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin-bottom: 4px;
}

.comment__name { font-weight: 600; }

.comment time, .mine time { color: var(--mute); font-size: 13px; }

.comment p { margin: 0 0 8px; overflow-wrap: anywhere; }

.comment__tools { display: flex; gap: 14px; }

.comment__tools button { color: var(--ink-dim); font-size: 14px; }

[data-mn-like].is-liked { color: var(--amber); }

.replies {
  grid-column: 2;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(230, 162, 60, 0.35);
}

.cform--reply { grid-column: 2; }

.badge {
  display: inline-block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 1px 5px;
}

.badge--no { border-color: var(--danger); color: #e7a090; }

.void {
  border: 1px dashed rgba(230, 162, 60, 0.35);
  padding: 18px 14px;
  color: var(--ink-dim);
  margin: 8px 0 16px;
}

.void p { margin: 0; }

/* pager */

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 26px 0 8px;
}

.pager a, .pager .is-off {
  min-width: 36px;
  text-align: center;
  padding: 6px 8px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink-dim);
}

.pager a[aria-current="page"] {
  background: var(--amber);
  color: #1a1208;
  border-color: var(--amber);
}

.pager .is-off { opacity: 0.4; }

/* account + auth */

.idcard {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.idcard h1 { font-size: 3rem; }

.idcard p { color: var(--mute); margin-top: 4px; }

.acct-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.acct-nav a {
  text-decoration: none;
  padding: 8px 0;
  color: var(--mute);
}

.acct-nav a[aria-current="page"] {
  color: var(--amber);
  box-shadow: inset 0 -2px 0 var(--amber);
}

.swap-empty:not(:target) { display: none; }

#empty:target ~ .swap-fill { display: none; }

.notes, .mines { list-style: none; }

.notes li, .mine {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.notes a, .mine a { color: var(--amber-2); }

.notes time, .mine .when { display: block; color: var(--mute); font-size: 13px; margin-top: 4px; }

.form { display: grid; gap: 12px; max-width: 440px; }

.field { display: grid; gap: 4px; }

.field span, .check span { font-size: 14px; }

.check {
  display: flex;
  gap: 8px;
  align-items: center;
}

.check input { width: auto; }

.form .btn { justify-self: start; }

.auth h1, .trouble h1, .page h1, .acct .idcard h1 { font-size: clamp(2.6rem, 8vw, 4rem); }

.page > h1, .auth h1, .trouble h1 { margin-bottom: 12px; }

.auth .sub, .trouble .sub, .page .dek {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink-dim);
  max-width: 58ch;
  margin-bottom: 16px;
}

.links-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }

.links-row a { color: var(--amber-2); }

.find { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; max-width: 520px; }

.find input { flex: 1 1 180px; }

.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.missing__code {
  font-size: 5.5rem;
  color: var(--amber);
  line-height: 0.8;
  margin-bottom: 8px;
}

.toc {
  border-top: 2px solid var(--amber);
  background: var(--bg-2);
  padding: 10px 12px 12px;
  margin: 0 0 18px;
}

.toc p {
  margin: 0 0 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--amber);
}

.toc ol { margin: 0 0 0 1.1em; }
.toc a { color: var(--ink-dim); }

.help-layout { display: grid; gap: 18px; }

/* foot */

.foot {
  border-top: 1px solid var(--line);
  padding: 22px 0 28px;
  color: var(--mute);
}

.foot__bar {
  width: min(var(--wrap), calc(100% - 28px));
  margin-inline: auto;
  display: grid;
  gap: 10px;
}

.foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }

.foot a { color: var(--ink-dim); text-decoration: none; }
.foot a:hover { color: var(--amber); }

.legal { font-size: 13px; }

.totop {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  background: var(--amber);
  color: #1a1208;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 2px;
}

.js .totop { opacity: 0; pointer-events: none; }
.js .totop.is-on { opacity: 1; pointer-events: auto; }

html:not(.js) .totop {
  position: static;
  display: block;
  width: fit-content;
  margin: 0 auto 28px;
}

/* ========== width ========== */

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 16px; }
  .reel .poster { flex-basis: 180px; width: 180px; max-width: none; }
  .strip h1 { font-size: 4.6rem; }
  .still { flex-basis: min(72%, 760px); }
  .dock__actions { flex-direction: row; flex-wrap: wrap; }
  .dock__actions .btn { width: auto; }
  .form .btn { min-width: 160px; }
}

@media (min-width: 960px) {
  .burger { display: none; }

  .mast__bar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "brand tag menu user";
    min-height: 70px;
    align-items: center;
    width: min(1280px, calc(100% - 36px));
    gap: 18px;
  }

  .tagline { display: block; grid-area: tag; max-width: 220px; }

  .menu {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px 16px;
    padding: 0;
    background: transparent;
  }

  .js .menu { display: flex !important; } /* бургер не должен прятать меню на широком */

  .menu a { padding: 6px 0; font-size: 15px; }
  .menu a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--amber); }

  .strip { min-height: 0; height: 70vh; max-height: 760px; }

  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: start;
  }

  .rail { order: 0; position: sticky; top: 84px; }

  .stills__arrow {
    display: grid;
    place-items: center;
    position: absolute;
    top: 38%;
    width: 36px;
    height: 36px;
    background: #1a1612;
    border: 1px solid rgba(230, 162, 60, 0.5);
    color: var(--ink);
    z-index: 2;
  }

  .stills__prev { left: -6px; }
  .stills__next { right: -6px; }

  .help-layout { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .toc { position: sticky; top: 84px; }

  .dock {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .dock__actions { justify-content: flex-end; max-width: 460px; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tagline { max-width: 260px; }
  .strip h1 { font-size: 5.5rem; }
}

@media (max-width: 420px) {
  .brand__name { font-size: 18px; letter-spacing: 0.04em; }
  .who__name { display: none; }
}

/* подогнала отступ под айпад: лента не липла к краю */
@media (min-width: 700px) and (max-width: 900px) {
  .reel { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel { scroll-snap-type: none; }
}

/* program: длинный текст не упирается в рельс */
@media (min-width: 960px) {
  .story .prose { max-width: 68ch; }
}

/* audit fixes */
@media (max-width: 959px) { .help-layout { grid-template-columns: minmax(0, 1fr); } }
.help-layout > * { min-width: 0; }
.prose pre { max-width: 100%; overflow-x: auto; }
.help-layout .prose { max-width: 72ch; }

/* seo: текст вступления после первого блока программ */
.home-about { margin-top: 32px; margin-bottom: 32px; }
.home-about__body { margin-top: 10px; }
/* seo: афиша не занимает весь первый экран, каталог виден сразу */
.strip { min-height: 250px; }
.strip h1 { font-size: 2.25rem; }
@media (min-width: 700px) { .strip { min-height: 0; height: 360px; } .strip h1 { font-size: 3.4rem; } }


/* ---- натяжка на сайт ---- */
.drop[hidden] { display: none !important; }
.findtog {
  grid-area: find; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
}
.findtog:hover, .findtog[aria-expanded="true"] { border-color: var(--amber); color: var(--amber); }
.mast__bar { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "burger brand find user" "menu menu menu menu"; }
.findbar { display: none; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: #100e0c; }
.findbar.is-open { display: flex; }
.findbar input {
  flex: 1 1 auto; min-width: 0; height: 42px; box-sizing: border-box; padding: 0 12px; font: inherit;
  background: var(--bg-2); color: var(--ink); border: 1px solid var(--line);
}
.findbar input:focus { outline: 2px solid var(--amber); outline-offset: 0; }
.userbox .signin {
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px; box-sizing: border-box;
  background: var(--amber); color: #120f0b; font-weight: 700;
}
.userbox .signin:hover { background: var(--amber-2); color: #120f0b; }
@media (min-width: 960px) {
  .mast__bar { grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-areas: "brand tag menu find user"; }
  .findbar { width: min(1280px, calc(100% - 36px)); margin: 0 auto; padding-left: 0; padding-right: 0; border-top: 0; }
}
.home-about__body, .home-about__body p { max-width: none; }
.dock__actions .btn { min-height: 44px; display: inline-flex; align-items: center; }
.dock__actions .btn--go { font-weight: 700; }
#notice { margin-top: 28px; }
#notice textarea, .cform textarea { width: 100%; box-sizing: border-box; }
.sheet__body .mirror { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sheet__body .mirror a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.sheet__body .mirror a:first-child { background: var(--amber); color: #120f0b; border-color: var(--amber); font-weight: 700; }

/* ---- скриншоты: «монтажный стол» ---- */
.stills.is-cut .stills__track, .stills.is-cut .stills__arrow { display: none; }
.cut-view {
  position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: #000; cursor: zoom-in;
}
.cut-view img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; }
.cut-tc {
  position: absolute; left: 12px; bottom: 12px; padding: 4px 9px; background: rgba(14, 12, 10, 0.85);
  color: var(--amber); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .04em;
}
.cut-line {
  position: relative; display: flex; gap: 2px; margin-top: 10px; padding: 18px 6px 8px; overflow-x: auto;
  background: var(--bg-2); border: 1px solid var(--line);
  background-image: repeating-linear-gradient(90deg, rgba(243, 234, 220, .25) 0 1px, transparent 1px 24px);
  background-size: 100% 10px; background-repeat: repeat-x;
}
.cut-clip {
  flex: 0 0 132px; display: flex; flex-direction: column; gap: 4px; padding: 3px; border: 1px solid transparent;
  background: var(--bg-3); color: var(--mute); cursor: pointer; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; text-align: left;
}
.cut-clip img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .7; }
.cut-clip:hover img { opacity: 1; }
.cut-clip[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
.cut-clip[aria-pressed="true"] img { opacity: 1; }
@media (max-width: 559px) { .cut-clip { flex-basis: 96px; } }
/* афиша на телефоне: текст в потоке, не вылезает за верх картинки */
@media (max-width: 699px) {
  .strip { min-height: 0; height: auto; }
  .strip__copy { position: relative; bottom: auto; padding-top: 56px; padding-bottom: 18px; }
  .strip h1 { font-size: 2rem; }
}
