@font-face {
  font-family: 'Handjet';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/handjet-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Handjet';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/handjet-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
  One CRT tube: near-black glass, a single phosphor colour, dotted rules.
  `data-phosphor` swaps the palette, `data-fx="off"` stops the scanline band.
  No framework, no build step: this file is served as-is.
*/

:root,
[data-phosphor='orange'] {
  --ph: #ff9f2e;
  --ph-dim: #e08a2a;
  --ph-faint: #8a5418;
  --ph-ink: #1c0900;
  --ph-glow: rgb(255 140 30 / 0.55);
  --ph-glow-soft: rgb(255 120 20 / 0.22);
  --glass: #0d0703;
  --glass-2: #170b04;
}
[data-phosphor='amber'] {
  --ph: #ffc23d;
  --ph-dim: #d9a133;
  --ph-faint: #7d5c17;
  --ph-ink: #1d1300;
  --ph-glow: rgb(255 190 60 / 0.5);
  --ph-glow-soft: rgb(255 180 40 / 0.2);
  --glass: #0c0903;
  --glass-2: #161005;
}
[data-phosphor='green'] {
  --ph: #5cff86;
  --ph-dim: #45c967;
  --ph-faint: #1f6b33;
  --ph-ink: #021a08;
  --ph-glow: rgb(80 255 130 / 0.45);
  --ph-glow-soft: rgb(60 255 120 / 0.18);
  --glass: #030a05;
  --glass-2: #061309;
}

* { box-sizing: border-box; }

html { background: #000; color-scheme: dark; }

body {
  margin: 0;
  background: #000;
  color: var(--ph);
  font-family: 'VT323', 'Handjet', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 20px;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 0 1px var(--ph), 0 0 6px var(--ph-glow), 0 0 16px var(--ph-glow-soft);
}

::selection { background: var(--ph); color: var(--ph-ink); text-shadow: none; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ph); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }

h1, h2, h3, p, dl, dd, dt, figure, ul { margin: 0; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 4px 10px;
  border: 2px solid var(--ph);
  background: #000;
  z-index: 100;
}
.skip:focus { left: 8px; }

/* ── The tube ─────────────────────────────────────────────────────────── */

.wrap { padding: clamp(8px, 1.4vw, 20px); }

.tube {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(16px, 2.4vw, 40px);
  background: radial-gradient(120% 95% at 50% 45%, var(--glass-2) 0%, var(--glass) 55%, #020100 100%);
  border-radius: 48px / 60px;
  box-shadow: 0 0 0 2px #050302, 0 0 60px 8px var(--ph-glow-soft), inset 0 0 120px rgb(0 0 0 / 0.85);
  overflow: hidden;
  isolation: isolate;
}
.tube-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
.tube-scanlines {
  z-index: 20;
  background: repeating-linear-gradient(to bottom, rgb(0 0 0 / 0) 0 2px, rgb(0 0 0 / 0.32) 2px 3px);
  mix-blend-mode: multiply;
}
.tube-vignette {
  z-index: 21;
  background:
    radial-gradient(130% 110% at 50% 50%, transparent 58%, rgb(0 0 0 / 0.55) 82%, rgb(0 0 0 / 0.92) 100%),
    linear-gradient(to bottom, rgb(255 255 255 / 0.025), transparent 18%);
}
.tube-band { z-index: 22; overflow: hidden; }
.tube-band::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 22%;
  background: linear-gradient(to bottom, transparent, var(--ph-glow-soft), transparent);
  opacity: 0.25;
  animation: scan 9s linear infinite;
}
.tube-content { position: relative; z-index: 10; }

[data-fx='off'] .tube-scanlines,
[data-fx='off'] .tube-band { display: none; }

@keyframes scan { from { transform: translateY(-30%); } to { transform: translateY(130%); } }
@keyframes power-on {
  0% { filter: brightness(2.6); opacity: 0.55; }
  45% { filter: brightness(2); opacity: 1; }
  100% { filter: brightness(1); opacity: 1; }
}
.power-on { animation: power-on 520ms cubic-bezier(0.2, 0.7, 0.1, 1) both; }

@media (prefers-reduced-motion: reduce) {
  .tube-band { display: none !important; }
  .power-on { animation: none !important; }
  * { transition-duration: 0ms !important; }
}

/* ── Top bar and footer ───────────────────────────────────────────────── */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 3px dotted var(--ph-faint);
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-name { font-size: 26px; letter-spacing: 0.08em; }
.brand-domain { font-size: 16px; color: var(--ph-dim); letter-spacing: 0.12em; }
.nav { display: flex; flex-wrap: wrap; gap: 14px; }
.nav-link { font-size: 20px; letter-spacing: 0.06em; }
.nav-link.is-active { background: var(--ph); color: var(--ph-ink); padding: 0 6px; text-shadow: none; }
.prefs { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.pref { color: var(--ph-dim); letter-spacing: 0.1em; }
.theme-picker { display: flex; align-items: center; gap: 4px; }
.swatch { display: inline-flex; padding: 2px; border: 2px solid transparent; background: transparent; cursor: pointer; line-height: 0; }
.swatch.is-on { border-color: var(--ph); }
.swatch-dot { width: 12px; height: 12px; display: block; box-shadow: 0 0 6px currentColor; }
.swatch-orange .swatch-dot { background: #ff9f2e; color: #ff9f2e; }
.swatch-amber .swatch-dot { background: #ffc23d; color: #ffc23d; }
.swatch-green .swatch-dot { background: #5cff86; color: #5cff86; }

.main { display: flex; flex-direction: column; gap: 28px; padding: 24px 0 8px; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 3px dotted var(--ph-faint);
  font-size: 16px;
  color: var(--ph-dim);
}
.footer-links { display: flex; gap: 12px; }

/* ── Type scale ───────────────────────────────────────────────────────── */

.display { font-size: clamp(34px, 6vw, 56px); line-height: 0.95; letter-spacing: 0.04em; }
.title { font-size: 34px; line-height: 1; }
.lead { font-size: 24px; line-height: 1.15; }
.body { font-size: 20px; line-height: 1.25; }
.micro { font-size: 16px; line-height: 1.2; letter-spacing: 0.06em; }
.dim { color: var(--ph-dim); }
.intro { max-width: 62ch; color: var(--ph-dim); text-transform: none; }
.kicker { font-size: 16px; letter-spacing: 0.16em; color: var(--ph-dim); }
.upper { text-transform: uppercase; }

/* ── Page furniture ───────────────────────────────────────────────────── */

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.page-aside { font-size: 16px; color: var(--ph-dim); }

.section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; align-items: baseline; gap: 12px; }
.section-title { font-size: 16px; letter-spacing: 0.18em; color: var(--ph-dim); white-space: nowrap; }
.section-aside { font-size: 16px; color: var(--ph-dim); white-space: nowrap; }

.leader {
  flex: 1 1 auto;
  min-width: 1.5rem;
  height: 0;
  border-bottom: 3px dotted var(--ph-faint);
  transform: translateY(-0.3em);
}
.leader-row { display: flex; align-items: baseline; gap: 8px; }
.leader-right { color: var(--ph-dim); }
.rule-dots { height: 0; border-bottom: 3px dotted var(--ph-faint); }

/* ── Panels and lists ─────────────────────────────────────────────────── */

.panel { border: 2px solid var(--ph-faint); }
.panel-line { border: 2px dotted var(--ph-faint); }
.panel-head {
  padding: 2px 8px;
  border-bottom: 2px solid var(--ph-faint);
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--ph-dim);
}
.panel-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.panel-body > p { text-transform: none; line-height: 1.3; }

.kv { display: flex; flex-direction: column; gap: 6px; }
.kv dt { font-size: 16px; color: var(--ph-dim); letter-spacing: 0.06em; }
.kv dd { font-size: 20px; word-break: break-word; }

.contact-link { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.contact-link:hover { text-decoration-style: solid; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border: 2px solid var(--ph-faint); padding: 0 6px; font-size: 16px; color: var(--ph-dim); }

.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > * { flex: 1 1 320px; min-width: 0; }

.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }

.entry { border-left: 2px solid var(--ph-faint); padding-left: 12px; display: flex; flex-direction: column; gap: 2px; }
.entry ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; text-transform: none; }
.entry li::before { content: '· '; }

.commit { border: 2px solid var(--ph-faint); }
.commit-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; padding: 2px 8px; border-bottom: 2px dotted var(--ph-faint); font-size: 16px; color: var(--ph-dim); }
.commit-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.commit-body ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 3px; text-transform: none; line-height: 1.3; }
.commit-body li::before { content: '· '; }
.hash { background: var(--ph); color: var(--ph-ink); padding: 0 5px; text-shadow: none; }

/* ── Typing terminal block ───────────────────────────────────────────── */
.terminal {
  position: relative;
  margin: 18px 0;
  padding: 34px 16px 16px;
  height: 360px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ph-faint) #050302;
  scrollbar-gutter: stable;
  border: 2px solid var(--ph-faint);
  background: #050302;
  background-image: repeating-linear-gradient(to bottom, rgb(0 0 0 / 0) 0 3px, rgb(255 255 255 / 0.018) 3px 4px);
  color: var(--ph);
  font: inherit;
  font-size: 19px;
  line-height: 1.25;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: inset 0 0 40px rgb(0 0 0 / 0.8), 0 0 18px var(--ph-glow-soft);
}
.terminal::before {
  content: 'TERMINAL';
  position: absolute;
  inset: 0 0 auto;
  padding: 3px 96px 3px 12px;
  border-bottom: 2px dotted var(--ph-faint);
  background: rgb(0 0 0 / 0.45);
  color: var(--ph-dim);
  font-size: 15px;
  letter-spacing: 0.18em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.terminal[data-title]::before { content: attr(data-title); }
.terminal-replay {
  position: absolute;
  top: 4px;
  right: 8px;
  z-index: 1;
  display: none;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--ph-dim);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.terminal.is-done .terminal-replay { display: block; }
.terminal-replay:hover, .terminal-replay:focus-visible { color: var(--ph); }
.terminal.is-typing { animation: terminal-power 260ms steps(2, end) both; }
.terminal-output { white-space: pre-wrap; }
.terminal-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 1px;
  background: var(--ph);
  box-shadow: 0 0 8px var(--ph-glow);
  vertical-align: -0.12em;
  animation: terminal-blink 900ms steps(1, end) infinite;
}
.terminal.is-done .terminal-cursor { animation-duration: 1.2s; }
.terminal::-webkit-scrollbar { width: 14px; height: 14px; }
.terminal::-webkit-scrollbar-track { background: #050302; border-left: 2px solid var(--ph-faint); }
.terminal::-webkit-scrollbar-thumb { background: var(--ph-faint); border: 2px solid #050302; }
.terminal::-webkit-scrollbar-thumb:hover { background: var(--ph); }
.terminal::-webkit-scrollbar-corner { background: #050302; }
.terminal:focus-visible { outline: 2px solid var(--ph); outline-offset: 2px; }

.crt-monitor {
  position: relative;
  width: 100%;
  margin: 24px 0 30px;
  padding: 0 10px;
  border: 3px solid #34200f;
  border-radius: 14px 14px 10px 10px;
  background: linear-gradient(160deg, #241407 0%, #0b0602 58%, #030201 100%);
  box-shadow: 0 0 0 3px #050301, 0 16px 34px rgb(0 0 0 / 0.72), inset 0 0 0 1px rgb(255 159 46 / 0.12);
}
.crt-monitor::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 32%;
  height: 15px;
  transform: translateX(-50%);
  border: 2px solid #34200f;
  border-top: 0;
  background: linear-gradient(to bottom, #0b0602, #030201);
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
}
.crt-monitor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 2px 4px;
  border-bottom: 2px dotted var(--ph-faint);
  color: var(--ph-dim);
  font-size: 13px;
  letter-spacing: 0.15em;
}
.crt-monitor-title { overflow: hidden; color: var(--ph); text-overflow: ellipsis; white-space: nowrap; }
.crt-monitor-tty { margin-left: auto; color: var(--ph-faint); font-size: 11px; white-space: nowrap; }
.crt-monitor-frame {
  overflow: hidden;
  margin: 0;
  border: 3px solid #000;
  border-radius: 8px;
  background: #050302;
  box-shadow: inset 0 0 28px rgb(0 0 0 / 0.9), 0 0 12px var(--ph-glow-soft);
}
.crt-monitor .terminal {
  height: 360px;
  margin: 0;
  padding: 16px 18px;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 0 40px rgb(0 0 0 / 0.8);
}
.crt-monitor .terminal::before { content: none; }
.crt-monitor-base {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  padding: 2px 4px 6px;
  color: var(--ph-faint);
  font-size: 10px;
  letter-spacing: 0.13em;
}
.crt-monitor-base span:last-child { margin-left: auto; }
.crt-monitor-led { width: 6px; height: 6px; display: inline-block; background: var(--ph); box-shadow: 0 0 8px var(--ph); animation: terminal-blink 1.7s steps(1, end) infinite; }
.crt-monitor-head .terminal-replay {
  position: static;
  display: none;
  flex: 0 0 auto;
  margin-left: 0;
  padding: 0 4px;
  border: 1px solid var(--ph-faint);
  font-size: 11px;
}
.crt-monitor.is-done .terminal-replay { display: block; }
.crt-monitor-head .terminal-replay:hover, .crt-monitor-head .terminal-replay:focus-visible { border-color: var(--ph); }

.monitor-width-half .crt-monitor, .monitor-width-half > .terminal { width: 50%; }
.monitor-width-third .crt-monitor, .monitor-width-third > .terminal { width: 33.3333%; }

@keyframes terminal-power {
  from { opacity: 0.2; filter: brightness(2.4); }
  to { opacity: 1; filter: brightness(1); }
}
@keyframes terminal-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .terminal.is-typing { animation: none; }
  .terminal-cursor { animation: none; }
}

@media (max-width: 760px) {
  .monitor-width-half .crt-monitor, .monitor-width-half > .terminal,
  .monitor-width-third .crt-monitor, .monitor-width-third > .terminal { width: 100%; }
  .terminal, .crt-monitor .terminal { height: 300px; }
  .crt-monitor { margin: 18px 0 26px; padding: 0 7px; }
  .crt-monitor-head { font-size: 11px; }
}

.art {
  white-space: pre;
  margin: 0;
  font-size: clamp(8px, 1.1vw, 14px);
  line-height: 1.05;
  letter-spacing: 0.12em;
  color: var(--ph);
  text-shadow: 0 0 6px var(--ph-glow);
}
.art-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border-bottom: 2px solid var(--ph-faint);
  background: var(--glass-2);
  min-height: 120px;
  overflow: hidden;
}

/* ── Chooser ──────────────────────────────────────────────────────────── */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--ph-faint);
  background: linear-gradient(to bottom, var(--glass-2), transparent 60%);
}
.card:hover, .card:focus-within { border-color: var(--ph); }
.card-link { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.card-thumb { display: block; border: 2px solid var(--ph-faint); background: #000; }
.card-thumb img { display: block; width: 100%; height: 160px; object-fit: cover; }
.card-top { display: flex; justify-content: space-between; font-size: 16px; color: var(--ph-dim); letter-spacing: 0.1em; }
.card-name { font-size: 34px; letter-spacing: 0.05em; }
.card-lines { display: flex; flex-direction: column; gap: 2px; font-size: 16px; color: var(--ph-dim); letter-spacing: 0.06em; }
.card-cta { margin-top: auto; display: flex; justify-content: space-between; font-size: 16px; color: var(--ph-dim); }

/* ── Published work ───────────────────────────────────────────────────── */

.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.plate { display: flex; flex-direction: column; border: 2px solid var(--ph-faint); background: #000; }
.plate:hover { border-color: var(--ph); }
.plate-thumb { display: block; border-bottom: 2px solid var(--ph-faint); background: var(--glass-2); }
.plate-thumb img { display: block; width: 100%; height: 150px; object-fit: cover; }
.plate-body { padding: 4px 8px 6px; display: flex; flex-direction: column; gap: 1px; }
.plate-title { font-size: 20px; }
.plate-meta { font-size: 16px; color: var(--ph-dim); letter-spacing: 0.06em; }

/* Original-image lightbox: JS toggles `.is-open`, `:target` stays as fallback. */
.lightbox { display: none; }
.lightbox:target, .lightbox.is-open { display: grid; position: fixed; inset: 0; z-index: 60; place-items: center; padding: 16px; }
body.is-locked { overflow: hidden; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / 0.86); }
.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--ph);
  background: var(--glass);
  box-shadow: 0 0 40px 4px var(--ph-glow-soft);
}
.lightbox-head, .lightbox-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  font-size: 16px;
  color: var(--ph-dim);
}
.lightbox-head { border-bottom: 2px dotted var(--ph-faint); }
.lightbox-foot { border-top: 2px dotted var(--ph-faint); }
.lightbox-zoom-label { min-width: 4.5ch; text-align: right; }
.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72vh;
  max-height: calc(92vh - 100px);
  min-height: 180px;
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
  touch-action: none;
}
.lightbox-stage.is-zoomed { cursor: grab; }
.lightbox-stage.is-dragging { cursor: grabbing; }
.lightbox-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.close { border: 2px solid var(--ph-faint); padding: 0 8px; }

/* ── Forms and admin ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid var(--ph-faint);
  background: transparent;
  color: var(--ph);
  font: inherit;
  font-size: 20px;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.btn:hover { border-color: var(--ph); text-decoration: none; }
.btn-fill { background: var(--ph); border-color: var(--ph); color: var(--ph-ink); text-shadow: none; }
.btn-fill:hover { filter: brightness(1.08); }
.btn-ghost { font-size: 16px; min-height: 32px; padding: 0 10px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 2px; }
.field > span { font-size: 16px; color: var(--ph-dim); }
.field input[type='text'], .field input[type='password'], .field input[type='number'], .field input[type='search'], .field input[type='date'] {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-bottom: 3px dotted var(--ph-faint);
  background: transparent;
  color: var(--ph);
  font: inherit;
  font-size: 20px;
}
.field input:hover, .field input:focus { border-bottom-color: var(--ph); outline-offset: 0; }
.range { display: flex; flex-direction: column; gap: 0; }
.range-top { display: flex; justify-content: space-between; font-size: 16px; color: var(--ph-dim); }
.range input[type='range'] { width: 100%; accent-color: var(--ph); cursor: pointer; }
.check { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; border: 2px solid var(--ph-faint); padding: 0 8px; font-size: 20px; }
.check input { accent-color: var(--ph); width: 18px; height: 18px; }

.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 12px;
  border: 2px dashed var(--ph-faint);
  text-align: center;
  cursor: pointer;
}
.file-drop:hover { border-color: var(--ph); }
.file-drop input { margin-top: 8px; max-width: 100%; }

.notice { border: 2px solid var(--ph-faint); padding: 6px 10px; font-size: 16px; letter-spacing: 0.06em; }
.notice-ok { border-color: var(--ph); }
.notice-bad { border-color: #ff6b6b; color: #ff9b9b; }

.preview-box { display: flex; align-items: center; justify-content: center; min-height: 170px; border: 2px solid var(--ph-faint); background: var(--glass-2); padding: 4px; }
.preview-box img { display: block; max-width: 100%; max-height: 360px; height: auto; }
.raw-thumb { display: block; max-height: 96px; width: auto; border: 2px solid var(--ph-faint); }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }

.admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pager { padding-top: 8px; border-top: 2px dotted var(--ph-faint); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }

.login { max-width: 420px; margin: 0 auto; }
.captcha-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.captcha-image { display: block; width: 240px; max-width: 100%; height: auto; border: 2px solid var(--ph-faint); background: #000; image-rendering: pixelated; }
.login-alt { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 10px; border-top: 2px dotted var(--ph-faint); }
.passkey-list { display: flex; flex-direction: column; gap: 6px; }
.passkey-item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-bottom: 1px dotted var(--ph-faint); padding: 4px 0; }
.passkey-item form { margin-left: auto; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .topbar { align-items: flex-start; }
  .nav { order: 3; width: 100%; }
  .tube { border-radius: 28px / 34px; }
}

/* ── CMS, cart, comments and the AJAX chrome ──────────────────────────── */

.badge {
  display: inline-block;
  min-width: 1.1em;
  padding: 0 4px;
  background: var(--ph);
  color: var(--ph-ink);
  text-shadow: none;
  text-align: center;
}
.pref-button { background: none; border: 0; font: inherit; color: var(--ph-dim); cursor: pointer; padding: 0; }
.pref-button:hover { color: var(--ph); }
.nav-admin { color: var(--ph-dim); }

.clock-card {
  border: 2px dotted var(--ph-faint);
  padding: 8px 12px;
  min-width: 220px;
}
.clock { font-size: clamp(34px, 5vw, 52px); line-height: 0.95; letter-spacing: 0.06em; }

.flashes { display: flex; flex-direction: column; gap: 6px; }
.flashes:empty { display: none; }
.notice { border: 2px solid var(--ph-faint); padding: 6px 10px; font-size: 16px; letter-spacing: 0.05em; }
.notice-ok { border-color: var(--ph); }
.notice-bad { border-color: #ff6b6b; color: #ff9b9b; }

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 32px));
  padding: 8px 14px;
  border: 2px solid var(--ph);
  background: var(--glass);
  color: var(--ph);
  font-size: 16px;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
.toast.is-on { opacity: 1; transform: none; }
.toast[data-state='bad'] { border-color: #ff6b6b; color: #ff9b9b; }

.cards .card-name-sm { font-size: 26px; }
.card-cta { margin-top: auto; display: flex; justify-content: space-between; font-size: 16px; color: var(--ph-dim); }
.card-link { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 12px; }

.plate-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  font-size: 16px;
  color: var(--ph-faint);
  letter-spacing: 0.16em;
  background: repeating-linear-gradient(45deg, transparent 0 8px, rgb(255 159 46 / 0.05) 8px 9px);
}
.works-wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.plate-thumb-tall img { height: 210px; }
.plate-thumb { display: block; overflow: hidden; background: var(--glass-2); border-bottom: 2px solid var(--ph-faint); }
.plate-thumb img { display: block; width: 100%; height: 150px; object-fit: cover; }

.section-aside a, a.section-aside { color: var(--ph-dim); }
a.section-aside:hover { color: var(--ph); }

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 0;
  border-top: 2px dotted var(--ph-faint);
  border-bottom: 2px dotted var(--ph-faint);
}
.admin-nav .nav-link { font-size: 16px; letter-spacing: 0.1em; color: var(--ph-dim); }
.admin-nav .nav-link:hover { color: var(--ph); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.stat { border: 2px solid var(--ph-faint); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.stat-n { font-size: 34px; line-height: 0.9; }
.stat-l { font-size: 14px; letter-spacing: 0.12em; color: var(--ph-dim); }

.table { width: 100%; border-collapse: collapse; font-size: 18px; }
.table th {
  text-align: left;
  font-weight: normal;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--ph-dim);
  border-bottom: 2px solid var(--ph-faint);
  padding: 4px 8px 4px 0;
  white-space: nowrap;
}
.table td { padding: 5px 8px 5px 0; border-bottom: 1px dotted var(--ph-faint); vertical-align: top; }
.table-sm { font-size: 16px; }
.cell-wrap { max-width: 320px; overflow-wrap: anywhere; }

.field textarea, .field select {
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 2px solid var(--ph-faint);
  border-radius: 0;
  background: rgb(0 0 0 / 0.35);
  color: var(--ph);
  font: inherit;
  font-size: 18px;
  line-height: 1.25;
}
.field textarea:focus, .field select:focus, .field input:focus { border-color: var(--ph); outline: none; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; }
.field-inline input { min-height: 34px; width: 12rem; }
.field-inline select { width: auto; min-width: 9rem; min-height: 34px; }
.checks { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.checks legend { font-size: 16px; color: var(--ph-dim); padding: 0 0 4px; }
.check input { width: 18px; height: 18px; }

.image-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border: 2px dotted var(--ph-faint); padding: 8px; }
.image-preview { max-height: 90px; width: auto; border: 2px solid var(--ph-faint); cursor: zoom-in; }
.image-preview:hover { border-color: var(--ph); }

.media-field { border: 2px dotted var(--ph-faint); padding: 8px; gap: 8px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.media-card { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 2px solid var(--ph-faint); background: var(--glass-2); }
.media-card.is-preview { border-color: var(--ph); box-shadow: inset 0 0 0 1px var(--ph); }
.media-card img { display: block; width: 100%; height: 96px; object-fit: cover; background: #000; }
.media-open { display: block; cursor: zoom-in; }
.media-name { font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.media-file { display: flex; align-items: center; justify-content: center; height: 96px; border: 1px dashed var(--ph-faint); font-size: 18px; }
.media-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.media-drop { padding: 12px; }
.media-drop input { margin-top: 0; }

.public-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.public-gallery a { display: block; border: 2px solid var(--ph-faint); background: #000; }
.public-gallery a:hover { border-color: var(--ph); }
.public-gallery img { display: block; width: 100%; height: 180px; object-fit: cover; }
.attachments { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.attachments li { border-bottom: 1px dotted var(--ph-faint); padding-bottom: 4px; }
.attachments a { display: flex; justify-content: space-between; gap: 10px; color: var(--ph); }
.attachments a:hover { text-decoration: underline; }

.cover-zoom { display: block; cursor: zoom-in; }
.cover-zoom:hover img { opacity: 0.92; }

.btn-sm { min-height: 32px; padding: 0 10px; font-size: 16px; }
.admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-row-between { justify-content: space-between; }
.admin-form .field { margin-bottom: 4px; }

.prose { max-width: 72ch; display: flex; flex-direction: column; gap: 14px; font-size: 22px; line-height: 1.35; text-transform: none; }
.prose p { margin: 0; }
.prose [dir='rtl'], .prose [lang='fa'] { text-align: right; line-height: 1.65; }
.display[dir='rtl'], .title[dir='rtl'], .lead[dir='rtl'], .body[dir='rtl'], .micro[dir='rtl'], .comment-body[dir='rtl'], .comment-author[dir='rtl'], .card-name[dir='rtl'], .plate-title[dir='rtl'], .plate-meta[dir='rtl'] { text-align: right; }
.display[dir='rtl'] { line-height: 1.15; }
.title[dir='rtl'] { line-height: 1.3; }
.comment-body[dir='rtl'] { line-height: 1.65; }
.prose ul[dir='rtl'], .prose ol[dir='rtl'] { padding-left: 0; padding-right: 1.4em; }
.prose blockquote[dir='rtl'] { padding-left: 0; padding-right: 14px; border-left: 0; border-right: 3px dotted var(--ph-faint); }
.prose a { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.prose img { max-width: 100%; height: auto; border: 2px solid var(--ph-faint); }
.prose h2, .prose h3 { text-transform: none; letter-spacing: 0.02em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose blockquote { margin: 0; padding-left: 14px; border-left: 3px dotted var(--ph-faint); color: var(--ph-dim); }
.prose code { border: 1px solid var(--ph-faint); padding: 0 4px; font-size: 0.9em; }
.article { display: flex; flex-direction: column; gap: 20px; }
.article-cover { margin: 0; border: 2px solid var(--ph-faint); background: #000; }
.article-cover img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.post-row h2 a { text-decoration: none; }
.post-row.has-thumb { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: stretch; }
.post-row-thumb { display: block; min-width: 0; border-right: 2px solid var(--ph-faint); background: #000; }
.post-row-thumb img { display: block; width: 100%; height: 100%; min-height: 150px; object-fit: cover; }
@media (max-width: 700px) {
  .post-row.has-thumb { grid-template-columns: 1fr; }
  .post-row-thumb { border-right: 0; border-bottom: 2px solid var(--ph-faint); }
  .post-row-thumb img { height: 180px; }
}
.callout .panel-body { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* ── Avatars and the profile crop editor ──────────────────────────────── */
.avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  overflow: hidden;
  border: 2px solid var(--ph-faint);
  background: #000;
  line-height: 0;
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 26px; height: 26px; border-width: 1px; }
.avatar-sm { width: 34px; height: 34px; border-width: 1px; }
.avatar-lg { width: 180px; height: 180px; }
.avatar-pref { padding: 0; }
.avatar-empty { color: var(--ph-dim); font-size: 14px; letter-spacing: 0.08em; text-align: center; line-height: 1.2; }
.avatar-editor { flex-direction: row; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.avatar-controls { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1 1 280px; }
.avatar-crop { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.avatar-crop[hidden] { display: none; }
.avatar-crop-stage { position: relative; width: min(260px, 100%); aspect-ratio: 1; overflow: hidden; border: 2px solid var(--ph); background: #000; cursor: grab; touch-action: none; }
.avatar-crop-stage:active { cursor: grabbing; }
.avatar-crop-stage img { position: absolute; left: 0; top: 0; max-width: none; display: block; pointer-events: none; user-select: none; }
.avatar-zoom { width: min(260px, 100%); }
.avatar-zoom input { width: 100%; accent-color: var(--ph); cursor: pointer; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-pick { cursor: pointer; align-self: flex-start; }

.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { border-left: 2px solid var(--ph-faint); padding-left: 10px; display: flex; flex-direction: column; gap: 4px; }
.comment-head { display: flex; align-items: baseline; gap: 8px; }
.comment-author { letter-spacing: 0.08em; }
.comment-body { margin: 0; font-size: 20px; line-height: 1.3; text-transform: none; overflow-wrap: anywhere; }
.replies { margin-left: 18px; padding-left: 10px; border-left: 2px dotted var(--ph-faint); display: flex; flex-direction: column; gap: 10px; }
.comment-form textarea { min-height: 84px; }
.btn-reply { align-self: flex-start; }

.cart-table .qty, .qty { width: 4.5rem; min-height: 34px; padding: 0 6px; border: 2px solid var(--ph-faint); background: #000; color: var(--ph); font: inherit; }
.inline-form { display: flex; align-items: center; gap: 6px; }
.cart-total { margin-top: 10px; }
.mail-log {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.35;
  border: 2px solid var(--ph-faint);
  padding: 10px;
  background: rgb(0 0 0 / 0.4);
  max-height: 420px;
  overflow: auto;
}
.login { max-width: 460px; margin: 0 auto; width: 100%; }

@media (max-width: 720px) {
  .table thead { display: none; }
  .table tr { display: block; border-bottom: 2px dotted var(--ph-faint); padding: 6px 0; }
  .table td { display: flex; gap: 8px; border: 0; padding: 2px 0; }
  .table td::before { content: attr(data-label); color: var(--ph-dim); font-size: 14px; min-width: 5.5rem; }
  .clock-card { width: 100%; }
}

/* ── Error channels: a second CRT inside the first ───────────────────── */

.error-head { position: relative; align-items: flex-end; }
.error-code {
  font-size: clamp(72px, 16vw, 180px);
  line-height: 0.72;
  letter-spacing: -0.04em;
  color: var(--ph-faint);
  opacity: 0.6;
  text-shadow: 0 0 24px var(--ph-glow-soft);
}
.error-console { display: flex; justify-content: center; }
.crt-tv {
  position: relative;
  width: min(780px, 100%);
  padding: 42px 10px 0;
  filter: drop-shadow(0 20px 28px rgb(0 0 0 / 0.65));
}
.crt-antenna {
  position: absolute;
  top: 3px;
  z-index: 0;
  width: 2px;
  height: 48px;
  background: var(--ph-faint);
  transform-origin: bottom center;
}
.crt-antenna-left { left: 31%; transform: rotate(-22deg); }
.crt-antenna-right { right: 31%; transform: rotate(22deg); }
.crt-shell {
  position: relative;
  z-index: 1;
  padding: 16px 16px 0;
  border: 3px solid var(--ph-faint);
  border-radius: 30px 30px 18px 18px;
  background: linear-gradient(160deg, #211306 0%, #0c0703 54%, #050302 100%);
  box-shadow: 0 0 0 3px #030201, inset 0 0 28px rgb(0 0 0 / 0.9), 0 0 26px var(--ph-glow-soft);
}
.crt-screen {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 3px solid #000;
  border-radius: 16px;
  background: #030201;
  box-shadow: 0 0 0 2px var(--ph-faint), inset 0 0 34px rgb(0 0 0 / 0.95);
}
.crt-screen-content { position: absolute; inset: 0; z-index: 1; display: grid; background: #030201; }
.crt-channel {
  position: absolute;
  top: 7px;
  right: 9px;
  z-index: 6;
  padding: 1px 5px;
  border: 1px solid var(--ph-faint);
  background: rgb(0 0 0 / 0.58);
  color: var(--ph-dim);
  font-size: 12px;
  letter-spacing: 0.12em;
}
.crt-scanlines {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgb(0 0 0 / 0) 0 2px, rgb(0 0 0 / 0.34) 2px 3px);
  mix-blend-mode: multiply;
}
.crt-glass {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(120% 100% at 50% 50%, transparent 56%, rgb(0 0 0 / 0.5) 82%, rgb(0 0 0 / 0.9) 100%),
    linear-gradient(115deg, rgb(255 255 255 / 0.08), transparent 24%, transparent 72%, rgb(255 255 255 / 0.03));
  box-shadow: inset 0 0 26px rgb(0 0 0 / 0.85);
}
.crt-controls { display: flex; align-items: center; gap: 14px; padding: 10px 2px 9px; }
.crt-brand { display: flex; flex-direction: column; gap: 1px; color: var(--ph-dim); font-size: 14px; letter-spacing: 0.16em; line-height: 0.9; }
.crt-brand small { color: var(--ph-faint); font-size: 8px; letter-spacing: 0.12em; }
.crt-knobs { display: flex; gap: 6px; }
.crt-knob {
  display: block;
  width: 17px;
  height: 17px;
  border: 2px solid var(--ph-faint);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--glass-2), #030201 65%);
  box-shadow: inset 0 0 0 2px #030201;
}
.crt-speaker {
  flex: 1 1 auto;
  height: 15px;
  opacity: 0.5;
  background: repeating-linear-gradient(to right, var(--ph-faint) 0 1px, transparent 1px 5px);
}
.crt-led { width: 6px; height: 6px; background: var(--ph); box-shadow: 0 0 8px var(--ph); }
.crt-foot { margin-top: 7px; text-align: center; color: var(--ph-dim); font-size: 14px; letter-spacing: 0.14em; }
.crt-foot-led { color: var(--ph); animation: err-blink 1.1s steps(2, end) infinite; }

.error-search { width: min(620px, 100%); margin: 2px auto 0; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.pixel-scene { display: block; width: 100%; height: 100%; image-rendering: pixelated; shape-rendering: crispEdges; }
.pixel-bg { fill: #030201; }
.pixel-floor { fill: #100a04; }
.pixel-road { fill: #090603; }
.pixel-fill { fill: var(--ph); }
.pixel-dim { fill: var(--ph-dim); }
.pixel-faint { fill: var(--ph-faint); }
.pixel-hot { fill: #ffe0a3; }
.pixel-red { fill: #ff6b6b; }
.pixel-ink { fill: #000; }
.pixel-brick { fill: var(--ph-faint); opacity: 0.28; }
.pixel-stars { fill: var(--ph-dim); opacity: 0.7; }
.pixel-mountains { fill: var(--ph-dim); opacity: 0.2; }
.pixel-sun { fill: var(--ph); opacity: 0.35; }
.pixel-alarm-cone { fill: #ff6b6b; opacity: 0.2; }
.pixel-text { font-family: 'VT323', 'Handjet', monospace; font-size: 8px; letter-spacing: 1px; fill: var(--ph); }
.pixel-text-dim { fill: var(--ph-dim); }
.pixel-text-red { fill: #ff6b6b; }

.scene-404-sign { animation: err-sign404 2.4s steps(2, end) infinite; }
.scene-hero404 { animation: err-hero404 4.8s steps(14, end) infinite; }
.scene-coin404 { animation: err-coin404 1.2s steps(2, end) infinite; }
.scene-camera-led { animation: err-blink 760ms steps(2, end) infinite; }
.scene-alarm403 { opacity: 0; animation: err-alarm403 5.4s steps(1, end) infinite; }
.scene-thief403 { animation: err-thief403 5.4s steps(12, end) infinite; }
.scene-caught403 { opacity: 0; animation: err-caught403 5.4s steps(1, end) infinite; }
.scene-busted403 { opacity: 0; animation: err-busted403 5.4s steps(1, end) infinite; }
.scene-alarm-lamp, .scene-busted-text { animation: err-blink 260ms steps(2, end) infinite; }
.scene-car503 { animation: err-car503 6.2s steps(12, end) infinite; }
.scene-boom503 { opacity: 0; animation: err-boom503 6.2s steps(1, end) infinite; }
.scene-smoke503 { opacity: 0; animation: err-smoke503 6.2s steps(1, end) infinite; }
.scene-driver503 { opacity: 0; animation: err-driver503 6.2s steps(1, end) infinite; }
.scene-impact503 { animation: err-blink 260ms steps(2, end) infinite; }
.scene-no-service { animation: err-blink 1.1s steps(2, end) infinite; }

@keyframes err-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes err-sign404 { 0%, 78%, 100% { opacity: 1; } 80%, 92% { opacity: 0.25; } }
@keyframes err-coin404 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes err-hero404 {
  0%, 10% { transform: translate(0, 0); opacity: 1; }
  38% { transform: translate(38px, 0); opacity: 1; }
  46% { transform: translate(44px, -14px); opacity: 1; }
  54% { transform: translate(51px, 10px); opacity: 1; }
  61% { transform: translate(51px, 28px); opacity: 1; }
  63% { transform: translate(51px, 33px); opacity: 0; }
  64%, 100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes err-thief403 {
  0%, 8% { transform: translate(0, 0); opacity: 1; }
  34% { transform: translate(82px, 0); opacity: 1; }
  42%, 100% { transform: translate(82px, 0); opacity: 0; }
}
@keyframes err-alarm403 { 0%, 42% { opacity: 0; } 43%, 77% { opacity: 1; } 78%, 100% { opacity: 0; } }
@keyframes err-caught403 { 0%, 42% { opacity: 0; } 43%, 77% { opacity: 1; } 78%, 100% { opacity: 0; } }
@keyframes err-busted403 { 0%, 45% { opacity: 0; } 46%, 78% { opacity: 1; } 79%, 100% { opacity: 0; } }
@keyframes err-car503 {
  0%, 6% { transform: translate(0, 0); }
  30% { transform: translate(38px, 0); }
  33% { transform: translate(39px, -1px); }
  35% { transform: translate(37px, 1px); }
  37%, 100% { transform: translate(38px, 0); }
}
@keyframes err-boom503 { 0%, 36% { opacity: 0; } 37%, 44% { opacity: 1; } 45%, 100% { opacity: 0; } }
@keyframes err-smoke503 {
  0%, 40% { opacity: 0; transform: translate(0, 0); }
  41%, 58% { opacity: 0.8; transform: translate(0, -2px); }
  59%, 100% { opacity: 0.4; transform: translate(2px, -8px); }
}
@keyframes err-driver503 {
  0%, 44% { opacity: 0; transform: translate(78px, 52px); }
  45%, 51% { opacity: 1; transform: translate(78px, 52px); }
  58% { opacity: 1; transform: translate(66px, 38px); }
  70%, 74% { opacity: 1; transform: translate(34px, 56px); }
  78% { opacity: 1; transform: translate(33px, 54px); }
  82% { opacity: 1; transform: translate(35px, 56px); }
  86%, 100% { opacity: 1; transform: translate(34px, 56px); }
}

@media (max-width: 700px) {
  .error-head .error-code { position: absolute; right: 0; bottom: 0; font-size: 72px; opacity: 0.28; }
  .error-head > div { min-width: 0; }
  .crt-tv { padding: 32px 3px 0; }
  .crt-shell { padding: 9px 9px 0; border-radius: 18px 18px 12px 12px; }
  .crt-screen { border-radius: 9px; }
  .crt-controls { gap: 8px; padding: 7px 1px 6px; }
  .crt-speaker { display: none; }
  .crt-brand { font-size: 11px; }
  .crt-brand small { font-size: 7px; }
  .crt-knob { width: 13px; height: 13px; }
  .crt-foot { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-scene *, .crt-foot-led { animation: none !important; }
}
