/* Владислав: Ночная смена — сайт. PS1-хоррор + HUD как в Source.
   Всё локально: шрифты и текстуры взяты из игры (OFL / CC0). */

@font-face { font-family: "Noto Sans"; src: url(../assets/fonts/NotoSans-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url(../assets/fonts/NotoSans-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url(../assets/fonts/NotoSans-Black.woff2) format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Noto Sans Mono"; src: url(../assets/fonts/NotoSansMono-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans Mono"; src: url(../assets/fonts/NotoSansMono-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(../assets/fonts/Caveat.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
	--accent: #ffb000;
	--accent-dim: rgba(255, 176, 0, .55);
	--accent-deep: #8a5f00;
	--text: #dcd9cc;
	--dim: rgba(220, 217, 204, .56);
	--red: #d9140d;
	--bg: #070707;
	--ink: #1d2c6e;
	--paper: #ece3c7;
	--sans: "Noto Sans", system-ui, sans-serif;
	--mono: "Noto Sans Mono", ui-monospace, monospace;
	--hand: "Caveat", "Comic Sans MS", cursive;
	--wrap: 1180px;
	--gut: 16px;
	--shadow: 3px 3px 0 #000;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-width: 320px;
	overflow-x: hidden;
	color: var(--text);
	font: 400 17px/1.55 var(--sans);
	background-color: var(--bg);
	background-image:
		linear-gradient(rgba(5, 5, 6, .9), rgba(5, 5, 6, .93)),
		url(../assets/tex/concrete_wall.png);
	background-size: auto, 512px 512px;
	image-rendering: pixelated;
}
img { max-width: 100%; display: block; image-rendering: pixelated; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.accent { color: var(--accent); }
.red { color: #ff4a3d; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: #000; padding: 6px 10px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- экранные эффекты: зерно, сканлайны, виньетка ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.fx-grain {
	position: absolute; inset: -128px;
	background: url(../assets/tex/grain.png) 0 0 / 256px 256px;
	opacity: .085;
	animation: grain .6s steps(6) infinite;
}
.fx-scan {
	position: absolute; inset: 0;
	background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .22) 2px 3px);
}
.fx-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%); }
@keyframes grain {
	0% { transform: translate(0, 0); } 17% { transform: translate(-37px, 21px); } 33% { transform: translate(53px, -44px); }
	50% { transform: translate(-12px, 71px); } 67% { transform: translate(88px, 9px); } 83% { transform: translate(-64px, -58px); }
}

/* ---------- пиксельные рамки из UI-атласа игры ---------- */
.panel {
	border: 20px solid transparent;
	border-image: url(../assets/ui/panel.png) 20 fill / 20px stretch;
	image-rendering: pixelated;
}
.bar {
	display: inline-flex; align-items: center;
	margin: 0 0 28px;
	min-height: 40px;
	border-style: solid; border-color: transparent;
	border-width: 12px 16px 12px 24px;
	border-image: url(../assets/ui/header.png) 12 16 12 24 fill / 12px 16px 12px 24px stretch;
	image-rendering: pixelated;
	padding: 0 12px 0 14px;
	font: 900 clamp(18px, 2.4vw, 24px)/1 var(--sans);
	letter-spacing: .12em;
	color: var(--accent);
	text-shadow: 2px 2px 0 #000;
}
.hz {
	display: inline-block; width: 64px; height: 12px; margin-right: 12px; vertical-align: middle;
	background: url(../assets/ui/hazard.png) 0 0 / 32px 12px repeat-x;
	image-rendering: pixelated;
}
.hazard-strip {
	height: 16px;
	background: url(../assets/tex/hazard.png) 0 0 / 32px 32px repeat-x;
	image-rendering: pixelated;
	border-top: 2px solid #000; border-bottom: 2px solid #000;
	filter: saturate(.9) brightness(.85);
}

/* ---------- HUD ---------- */
.hud { position: fixed; left: 16px; bottom: 16px; z-index: 40; pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity .3s steps(3), transform .3s steps(3); }
.hud.on { opacity: 1; transform: none; }
.hud-plate {
	display: flex; align-items: baseline; gap: 14px;
	border: 8px solid transparent;
	border-image: url(../assets/ui/hud_plate.png) 8 fill / 8px stretch;
	image-rendering: pixelated;
	padding: 2px 10px 0;
	color: var(--accent);
}
.hud-label { font: 700 12px/1 var(--sans); letter-spacing: .12em; }
.hud-num { font: 900 30px/1.1 var(--sans); text-shadow: 2px 2px 0 #000; }
.hud-num b { font-weight: 900; }
.hud.bump .hud-num { animation: bump .5s steps(4); }
@keyframes bump { 0% { color: #fff; transform: scale(1.25); } 100% { color: var(--accent); transform: none; } }
.toast {
	position: fixed; left: 50%; top: 18%; z-index: 45; transform: translateX(-50%);
	max-width: calc(100vw - 32px);
	padding: 8px 18px;
	font: 900 clamp(16px, 3vw, 26px)/1.25 var(--sans); letter-spacing: .08em; text-align: center;
	color: var(--accent); text-shadow: 2px 2px 0 #000;
	background: rgba(0, 0, 0, .55);
	opacity: 0; pointer-events: none;
	transition: opacity .4s steps(4);
}
.toast.on { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg {
	position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(ellipse at 72% 40%, rgba(255, 176, 0, .08), transparent 55%),
		linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, .92) 85%, var(--bg)),
		url(../assets/tex/factory_panel.png) 0 0 / 384px 384px;
	image-rendering: pixelated;
}
.hero-grid {
	display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
	gap: clamp(24px, 5vw, 72px); align-items: center;
	padding-top: clamp(40px, 9vh, 110px); padding-bottom: clamp(40px, 8vh, 96px);
	min-height: min(100svh, 980px);
}
.kicker { margin: 0 0 18px; font: 700 13px/1.3 var(--mono); letter-spacing: .18em; color: var(--dim); }
.hero-text { container-type: inline-size; min-width: 0; }
.title { margin: 0; line-height: .9; }
.title-main {
	display: block;
	font: 900 clamp(40px, 14.6cqi, 132px)/.92 var(--sans);
	letter-spacing: -.01em;
	color: #e6e3d7;
	text-shadow: 4px 4px 0 #000, 0 0 24px rgba(0, 0, 0, .6);
}
.title-sub {
	display: flex; align-items: center; margin-top: 14px;
	font: 700 clamp(17px, 2.8vw, 34px)/1 var(--sans);
	letter-spacing: .42em; color: var(--accent); text-shadow: 2px 2px 0 #000;
}
.tagline { max-width: 34em; margin: 28px 0 30px; font-size: clamp(16px, 1.6vw, 19px); color: var(--text); text-shadow: 1px 1px 0 #000; }
.hero-foot { margin: 34px 0 0; font-size: 12px; color: rgba(220, 217, 204, .38); }

/* VHS-дрожание */
.vhs { position: relative; display: inline-block; animation: vhs-jit 4.2s steps(1) infinite; }
.vhs::before, .vhs::after {
	content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%;
	pointer-events: none; text-shadow: none; opacity: 0;
}
.vhs::before { color: rgba(255, 30, 40, .55); animation: vhs-r 4.2s steps(1) infinite; }
.vhs::after { color: rgba(0, 230, 255, .4); animation: vhs-c 4.2s steps(1) infinite; }
@keyframes vhs-jit {
	0%, 100% { transform: none; } 61% { transform: translate(-2px, 0); } 62% { transform: translate(3px, 1px) skewX(-4deg); }
	63% { transform: translate(-1px, 0); } 64% { transform: none; } 88% { transform: translate(1px, -1px); } 89% { transform: none; }
}
@keyframes vhs-r {
	0%, 60%, 65%, 87%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0); }
	61% { opacity: 1; transform: translate(-5px, 0); clip-path: inset(10% 0 55% 0); }
	62% { opacity: 1; transform: translate(4px, 0); clip-path: inset(60% 0 8% 0); }
	63% { opacity: 1; transform: translate(-3px, 0); clip-path: inset(35% 0 40% 0); }
	88% { opacity: .8; transform: translate(-3px, 0); clip-path: inset(0 0 70% 0); }
}
@keyframes vhs-c {
	0%, 60%, 65%, 87%, 90%, 100% { opacity: 0; transform: none; clip-path: inset(0); }
	61% { opacity: 1; transform: translate(5px, 0); clip-path: inset(50% 0 20% 0); }
	62% { opacity: 1; transform: translate(-4px, 0); clip-path: inset(5% 0 75% 0); }
	88% { opacity: .8; transform: translate(3px, 0); clip-path: inset(70% 0 0 0); }
}

/* меню как в игре: курсор ▶ + дизер-«таблетка» */
.menu { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.menu-item {
	position: relative; display: inline-flex; align-items: center;
	padding: 6px 44px 6px 34px;
	font: 700 clamp(19px, 2vw, 24px)/1.1 var(--sans); letter-spacing: .04em;
	color: #cfccbf; text-decoration: none; text-shadow: 2px 2px 0 #000;
	border: 0 solid transparent;
}
.menu-item .cur {
	position: absolute; left: 6px; top: 50%; width: 15px; height: 26px; margin-top: -13px;
	background: url(../assets/ui/cursor.png) 0 0 / 15px 26px no-repeat; image-rendering: pixelated;
	visibility: hidden;
}
.menu-item:hover, .menu-item:focus-visible, .menu-item.is-hot {
	color: var(--accent);
	border-width: 0 32px 0 4px;
	border-image: url(../assets/ui/pill.png) 0 32 0 4 fill / 0 32px 0 4px stretch;
	padding-left: 30px; padding-right: 12px;
	outline: none;
}
.menu-item:hover .cur, .menu-item:focus-visible .cur, .menu-item.is-hot .cur { visibility: visible; animation: blink 1s steps(1) infinite; }
.menu-item.is-hot { font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; margin-bottom: 8px; }
.menu:hover .menu-item.is-hot:not(:hover) { color: #cfccbf; border-width: 0; padding: 6px 44px 6px 34px; }
.menu:hover .menu-item.is-hot:not(:hover) .cur { visibility: hidden; }
.menu-item:hover { animation: jit .25s steps(2) 1; }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }
@keyframes jit { 0% { transform: translate(2px, 0); } 50% { transform: translate(-1px, 1px); } 100% { transform: none; } }

/* постер в металлической рамке */
.poster-frame { position: relative; margin: 0; max-width: 460px; justify-self: end; width: 100%; box-shadow: 10px 10px 0 rgba(0, 0, 0, .6); }
.poster { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; background: #111; filter: contrast(1.05) saturate(.92); }
.dither {
	position: absolute; inset: 0; pointer-events: none;
	background: url(../assets/tex/bayer.png) 0 0 / 8px 8px; image-rendering: pixelated; opacity: .55; mix-blend-mode: multiply;
}

/* ---------- секции ---------- */
.section { padding: clamp(56px, 9vw, 110px) 0; position: relative; }
.section + .section { border-top: 2px solid rgba(0, 0, 0, .6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03); }
.hint { margin: 14px 0 0; font-size: 13px; color: var(--dim); letter-spacing: .08em; }

/* ---------- записка ---------- */
.lore-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.note {
	position: relative;
	padding: 44px clamp(22px, 4vw, 52px) 40px clamp(48px, 7vw, 84px);
	color: var(--ink);
	font: 400 clamp(22px, 2.3vw, 27px)/1.34 var(--hand);
	background:
		radial-gradient(circle at 22px 18%, #0b0b0b 7px, transparent 8px),
		radial-gradient(circle at 22px 50%, #0b0b0b 7px, transparent 8px),
		radial-gradient(circle at 22px 82%, #0b0b0b 7px, transparent 8px),
		linear-gradient(90deg, transparent 0 clamp(38px, 6vw, 70px), rgba(210, 40, 40, .55) 0 calc(clamp(38px, 6vw, 70px) + 2px), transparent 0),
		repeating-linear-gradient(to bottom, transparent 0 33px, rgba(60, 90, 170, .28) 33px 34px),
		repeating-linear-gradient(to right, transparent 0 33px, rgba(60, 90, 170, .14) 33px 34px),
		radial-gradient(ellipse at 70% 80%, rgba(120, 90, 30, .22), transparent 60%),
		var(--paper);
	transform: rotate(-1.2deg);
	box-shadow: 8px 10px 0 rgba(0, 0, 0, .55);
	clip-path: polygon(0 1%, 4% 0, 30% .6%, 55% 0, 80% .8%, 100% 0, 99.4% 30%, 100% 62%, 99.2% 100%, 70% 99.2%, 40% 100%, 12% 99.3%, 0 100%, .6% 60%);
}
.note h3 { margin: 0 0 12px; font: 700 clamp(28px, 3vw, 36px)/1.1 var(--hand); color: #111a4a; }
.note p { margin: 0 0 8px; }
.note u { text-decoration-color: rgba(200, 30, 30, .7); text-decoration-thickness: 2px; }
.note .ps { margin-top: 18px; color: #7a1010; transform: rotate(-1deg); }
.tape {
	position: absolute; top: -6px; left: 50%; width: 130px; height: 30px; margin-left: -65px;
	background: rgba(240, 232, 190, .55); transform: rotate(2deg);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .15);
}
.stamp {
	position: absolute; right: clamp(10px, 3vw, 30px); top: clamp(14px, 3vw, 30px);
	padding: 4px 14px; border: 4px solid rgba(190, 20, 20, .75); color: rgba(190, 20, 20, .75);
	font: 900 clamp(22px, 3vw, 32px)/1 var(--sans); letter-spacing: .12em;
	transform: rotate(12deg); mix-blend-mode: multiply;
}

.dossier { background-clip: padding-box; font-size: 15px; }
.dossier-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 4px 14px; color: var(--accent); font-weight: 700; letter-spacing: .16em; border-bottom: 2px dashed rgba(255, 176, 0, .35); padding-bottom: 10px; }
.led { width: 10px; height: 10px; background: url(../assets/ui/led_on.png) 0 0 / 10px 10px; image-rendering: pixelated; animation: blink 1.6s steps(1) infinite; }
.dossier dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0 4px 20px; }
.dossier dt { color: var(--dim); font-size: 13px; letter-spacing: .1em; padding-top: 1px; }
.dossier dd { margin: 0; color: var(--text); font-weight: 700; }
.tape-deck {
	display: flex; gap: 14px; align-items: center; margin: 0 4px 4px;
	padding: 10px; background: rgba(0, 0, 0, .45); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255, 176, 0, .18);
}
.tape-deck img { width: 84px; height: 84px; flex: none; border: 2px solid #000; }
.tape-deck p { margin: 0; font-size: 14px; line-height: 1.4; }
.tape-deck b { color: var(--accent); }

/* ---------- галерея ---------- */
.gallery-wrap { position: relative; }
.gallery {
	list-style: none; margin: 0; padding: 4px 2px 18px;
	display: flex; gap: 18px;
	overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scroll-padding: 0 2px;
	scrollbar-width: thin; scrollbar-color: var(--accent-deep) #111;
}
.gallery::-webkit-scrollbar { height: 10px; }
.gallery::-webkit-scrollbar-track { background: #111; }
.gallery::-webkit-scrollbar-thumb { background: var(--accent-deep); border: 2px solid #111; }
.gallery li { flex: 0 0 min(82%, 560px); scroll-snap-align: start; }
.shot { display: block; width: 100%; padding: 0; margin: 0; background: none; border: 0; cursor: zoom-in; text-align: left; color: inherit; font: inherit; }
.shot-frame { display: block; position: relative; }
.shot-frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #0c0c0c; }
.shot-frame::after { content: ""; position: absolute; inset: 0; background: url(../assets/tex/bayer.png) 0 0 / 8px 8px; opacity: .35; mix-blend-mode: multiply; image-rendering: pixelated; }
.shot:hover .shot-frame, .shot:focus-visible .shot-frame { border-image-source: url(../assets/ui/panel_t.png); }
.shot:hover img { filter: brightness(1.15) contrast(1.05); }
.shot-cap { display: flex; gap: 10px; margin-top: 10px; font-size: 15px; line-height: 1.35; }
.shot-cap .n { font-family: var(--mono); font-weight: 700; color: var(--accent); flex: none; }
.g-arrow {
	position: absolute; top: calc(50% - 40px); z-index: 2;
	width: 44px; height: 60px; border: 0; cursor: pointer;
	background: rgba(0, 0, 0, .75) center / 20px 36px no-repeat; image-rendering: pixelated;
	box-shadow: inset 0 0 0 2px rgba(255, 176, 0, .35);
}
.g-prev { left: -8px; background-image: url(../assets/ui/arrow_l.png); }
.g-next { right: -8px; background-image: url(../assets/ui/arrow_r.png); }
.g-arrow:hover { background-color: rgba(40, 28, 0, .9); }
.g-arrow[disabled] { opacity: .25; cursor: default; }
@media (hover: none) { .g-arrow { display: none; } }

.lightbox {
	width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
	background: rgba(0, 0, 0, .94); color: var(--text); overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .7); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: min(94vw, 1500px); touch-action: pan-y; }
.lightbox img { max-width: 100%; max-height: 80vh; width: auto; margin: 0 auto; border: 4px solid #000; box-shadow: 0 0 0 2px rgba(255, 176, 0, .4); }
.lightbox figcaption { margin-top: 12px; text-align: center; font-size: 16px; padding: 0 56px; }
.lb-btn, .lb-close { position: absolute; border: 0; cursor: pointer; background: rgba(0, 0, 0, .6) center / 20px 36px no-repeat; image-rendering: pixelated; box-shadow: inset 0 0 0 2px rgba(255, 176, 0, .35); }
.lb-btn { top: calc(50% - 32px); width: 48px; height: 64px; }
.lb-prev { left: 12px; background-image: url(../assets/ui/arrow_l.png); }
.lb-next { right: 12px; background-image: url(../assets/ui/arrow_r.png); }
.lb-close { top: 12px; right: 12px; width: 48px; height: 48px; color: var(--accent); font: 700 22px/1 var(--mono); }
.lb-btn:hover, .lb-close:hover { background-color: rgba(60, 40, 0, .9); }

/* ---------- управление ---------- */
.controls { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px clamp(24px, 5vw, 64px); align-items: center; padding: 8px; }
.ctl-wasd { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 8px 12px; }
.ctl-wasd p { margin: 0; }
.wasd { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; }
.wasd .k { width: 56px; height: 56px; font-size: 20px; }
.wasd .k:nth-child(1) { grid-column: 2; grid-row: 1; }
.wasd .k:nth-child(2) { grid-column: 1; grid-row: 2; }
.wasd .k:nth-child(3) { grid-column: 2; grid-row: 2; }
.wasd .k:nth-child(4) { grid-column: 3; grid-row: 2; }
.ctl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.ctl-list li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ctl-list li > span { margin-left: 6px; }
.k {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	min-width: 44px; height: 44px; padding: 0 6px;
	border: 6px solid transparent;
	border-image: url(../assets/ui/key.png) 6 fill / 6px stretch;
	image-rendering: pixelated;
	font: 700 15px/1 var(--mono); color: #e8e4d6; text-shadow: 1px 1px 0 #000;
}
.k-wide { min-width: 64px; }
.k-xwide { min-width: 108px; }

#shots { background: linear-gradient(rgba(7, 7, 8, .93), rgba(7, 7, 8, .95)), url(../assets/tex/metal_corrugated.png) 0 0 / 256px 256px; }
#controls { background: linear-gradient(rgba(7, 7, 8, .9), rgba(7, 7, 8, .94)), url(../assets/tex/metal_plate.png) 0 0 / 256px 256px; }

/* ---------- «Доверяешь Владику?» ---------- */
.trust { text-align: center; overflow: hidden; }
.trust::before {
	content: ""; position: absolute; left: 50%; top: -120px; width: 900px; max-width: 160vw; height: 700px; transform: translateX(-50%);
	background: radial-gradient(ellipse at 50% 20%, rgba(255, 176, 0, .13), transparent 62%);
	pointer-events: none; animation: lamp 7s steps(1) infinite;
}
.trust > .wrap { position: relative; }
@keyframes lamp { 0%, 100% { opacity: 1; } 41% { opacity: .35; } 42% { opacity: 1; } 44% { opacity: .2; } 45% { opacity: 1; } 78% { opacity: .6; } 79% { opacity: 1; } }
.trust-q { margin: 0; font: 900 clamp(34px, 7.4vw, 96px)/1 var(--sans); color: #eeeadc; text-shadow: 4px 4px 0 #000; letter-spacing: -.005em; }
.trust-sub { margin: 16px 0 38px; color: var(--dim); font-size: 14px; letter-spacing: .12em; }
.trust-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: clamp(14px, 3vw, 36px); }
.big-btn {
	cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px;
	padding: 18px 10px 14px;
	border: 20px solid transparent;
	border-image: url(../assets/ui/panel.png) 20 fill / 20px stretch;
	image-rendering: pixelated;
	background: none; color: var(--accent);
	font: 900 clamp(40px, 7vw, 76px)/1 var(--sans); letter-spacing: .02em; text-shadow: 4px 4px 0 #000;
	box-shadow: 8px 8px 0 rgba(0, 0, 0, .6);
	transition: transform .12s steps(2);
}
.big-btn small { margin-top: 10px; font: 700 13px/1.2 var(--mono); letter-spacing: .14em; color: var(--dim); text-shadow: none; }
.big-btn:hover, .big-btn:focus-visible { border-image-source: url(../assets/ui/panel_t.png); color: #fff; animation: jit .25s steps(2) 1; }
.big-btn:hover span, .big-btn:focus-visible span { text-shadow: 4px 4px 0 #000, -3px 0 0 rgba(255, 30, 40, .6), 3px 0 0 rgba(0, 230, 255, .45); }
.big-btn:active { transform: translate(4px, 4px); box-shadow: 4px 4px 0 rgba(0, 0, 0, .6); }
.big-btn[aria-expanded="true"] { transform: translate(4px, 4px); box-shadow: 2px 2px 0 rgba(0, 0, 0, .6), inset 0 0 0 3px var(--accent); color: #000; }
.big-btn[aria-expanded="true"] span { background: var(--accent); padding: 0 12px; text-shadow: none; }
.big-btn[aria-expanded="true"] small { color: var(--accent); }
.trust-btns.chosen .big-btn[aria-expanded="false"] { opacity: .55; }

.answer { margin: 44px auto 0; max-width: 1100px; animation: glitch-in .5s steps(5) both; }
.answer[hidden] { display: none; }
@keyframes glitch-in {
	0% { opacity: 0; clip-path: inset(0 0 90% 0); transform: translateX(-8px); }
	40% { opacity: 1; clip-path: inset(30% 0 30% 0); transform: translateX(6px); }
	70% { clip-path: inset(0 0 10% 0); transform: translateX(-2px); }
	100% { opacity: 1; clip-path: inset(0); transform: none; }
}
.answer-lead { margin: 0; font: 900 clamp(22px, 3.2vw, 34px)/1.2 var(--sans); color: var(--accent); text-shadow: 2px 2px 0 #000; }
.answer-lead q { quotes: "«" "»"; color: #fff; }
.answer-sub { margin: 8px 0 28px; }
.dl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; text-align: left; }
.dl { position: relative; display: flex; flex-direction: column; font-size: 15px; }
.dl h3 { display: flex; align-items: center; gap: 10px; margin: 2px 0 2px; font: 900 24px/1.1 var(--sans); color: #eeeadc; }
.dl-meta { margin: 0 0 14px; font-size: 13px; color: var(--dim); }
.dl-how { margin: 14px 0 6px; line-height: 1.45; }
.dl-how b { color: var(--accent); font-weight: 700; }
.dl.is-you::before {
	content: "ТВОЯ ОС"; position: absolute; top: -30px; right: -6px; z-index: 1;
	font: 700 12px/1 var(--mono); letter-spacing: .12em; padding: 5px 8px;
	background: var(--accent); color: #000; box-shadow: 3px 3px 0 #000;
}
.dl.is-you { border-image-source: url(../assets/ui/panel_t.png); }
.dl-btn, .play-btn {
	display: flex; align-items: center; justify-content: center; gap: 12px;
	padding: 12px 16px; text-decoration: none;
	font: 900 20px/1 var(--sans); letter-spacing: .08em;
	color: #000; background: var(--accent);
	box-shadow: 4px 4px 0 #000, inset -3px -3px 0 var(--accent-deep), inset 3px 3px 0 #ffd36b;
}
.dl-btn:hover, .play-btn:hover { background: #ffc233; animation: jit .25s steps(2) 1; }
.dl-btn:active, .play-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000, inset 3px 3px 0 var(--accent-deep); }
.dl-btn.off { pointer-events: none; background: #3a3526; color: #807a66; box-shadow: 4px 4px 0 #000; }
.cmd { margin: 4px 0 0; padding: 10px 12px; overflow-x: auto; background: #050505; border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255, 176, 0, .15); }
.cmd code, .dl-how code { font: 400 13px/1.5 var(--mono); color: #b8f07a; }
.cmd code { white-space: pre-wrap; word-break: break-all; }
.dl-how code { color: var(--text); background: rgba(0, 0, 0, .5); padding: 1px 4px; }
.fine { margin: 18px 0 0; font-size: 13px; color: var(--dim); }
.os-ico { width: 26px; height: 26px; flex: none; image-rendering: pixelated; background: center / contain no-repeat; }
.os-ico.win { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffb000' d='M0 0h6v6H0zM7 0h6v6H7zM0 7h6v6H0zM7 7h6v6H7z'/%3E%3C/svg%3E"); }
.os-ico.mac { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffb000' d='M7 0h2v2H7zM6 2h1v1H6zM2 3h4v1h3V3h2v1h1v2h-1v3h1v2h-1v1H9v1H4v-1H3v-1H2V9H1V4h1z'/%3E%3C/svg%3E"); }
.os-ico.tux { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffb000' d='M4 0h5v1h1v4h1v2h1v4h-2v2H3v-2H1V7h1V5h1V1h1z'/%3E%3Cpath fill='%23000' d='M5 2h1v1H5zM7 2h1v1H7z'/%3E%3Cpath fill='%23eeeadc' d='M4 6h5v5H4z'/%3E%3C/svg%3E"); }

.touch-warn {
	max-width: 640px; margin: 0 auto 22px; padding: 12px 16px; text-align: left; font-size: 15px;
	border: 2px solid #000; background: rgba(120, 10, 5, .55); box-shadow: inset 0 0 0 2px rgba(255, 74, 61, .5), 4px 4px 0 #000;
}
.touch-warn[hidden] { display: none; }
.touch-warn b { color: #ffcf70; }
.play-box { max-width: 640px; margin: 0 auto; }
.play-btn { font-size: clamp(20px, 3vw, 28px); padding: 18px 20px; position: relative; }
.play-btn .cur { width: 15px; height: 26px; background: url(../assets/ui/cursor.png) 0 0 / 15px 26px; image-rendering: pixelated; filter: brightness(0); animation: blink 1s steps(1) infinite; }
.play-facts { list-style: none; margin: 18px 4px 2px; padding: 0; display: grid; gap: 6px; text-align: left; font-size: 14px; }
.play-facts li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.play-facts .dim { letter-spacing: .1em; }

/* ---------- футер ---------- */
.footer { margin-top: clamp(24px, 6vw, 60px); background: linear-gradient(rgba(0, 0, 0, .78), rgba(0, 0, 0, .9)), url(../assets/tex/rust.png) 0 0 / 256px 256px; image-rendering: pixelated; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; padding-top: 48px; padding-bottom: 96px; }
.love p { margin: 0 0 10px; max-width: 36em; }
.love-big { font: 700 clamp(40px, 6vw, 64px)/1.05 var(--hand) !important; color: #f2ead0; margin-bottom: 18px !important; transform: rotate(-2deg); transform-origin: left; }
.heart { color: #ff3b4f; display: inline-block; animation: beat 1.4s steps(2) infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.legal { font-size: 13px; color: var(--dim); }
.legal p { margin: 0 0 10px; }
.legal b { color: var(--text); }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
	.dl-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
	.dl.is-you { order: -1; }
	.dl.is-you::before { top: -14px; right: 12px; }
	.dl-grid { row-gap: 26px; }
}
@media (max-width: 860px) {
	.hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 36px; }
	.poster-frame { justify-self: center; max-width: 380px; }
	.lore-grid { grid-template-columns: minmax(0, 1fr); }
	.note { transform: rotate(-.6deg); }
	.controls { grid-template-columns: minmax(0, 1fr); }
	.footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
	body { font-size: 16px; }
	.panel { border-width: 14px; border-image-width: 14px; }
	.big-btn { border-width: 14px; border-image-width: 14px; padding: 12px 4px 10px; }
	.poster-frame { max-width: 300px; }
	.hero-grid { padding-top: 24px; }
	.title-sub { letter-spacing: .28em; }
	.title-sub .hz { width: 40px; }
	.kicker .hz { display: none; }
	.menu-item { padding-left: 30px; }
	.ctl-list { grid-template-columns: minmax(0, 1fr); }
	.wasd { grid-template-columns: repeat(3, 50px); }
	.wasd .k { width: 50px; height: 50px; }
	.gallery li { flex-basis: 88%; }
	.hud { left: 8px; bottom: 8px; }
	.hud.on { opacity: 0; }
	.hud.on.peek { opacity: 1; }
	.hud-num { font-size: 22px; }
	.hud-label { font-size: 10px; }
	.big-btn small { font-size: 11px; letter-spacing: .06em; }
	.lb-btn { display: none; }
	.lightbox figcaption { padding: 0 12px; }
	.footer-grid { padding-bottom: 80px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.vhs::before, .vhs::after { display: none; }
}

@media (min-width: 1600px) {
	:root { --wrap: 1400px; }
	.poster-frame { max-width: 520px; }
}
