/* ============================================================
   VHS PORTFOLIO — STYLESHEET
   style.css
   ============================================================ */

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

/* ── CSS CUSTOM PROPERTIES ── */
:root {
  --black: #050505;
  --white: #e8e8e0;
  --blue: #1a6fff;
  --blue-dim: #0d3a8a;
  --blue-glow: rgba(26, 111, 255, 0.15);
  --surface: #09090b;
  --surface-raised: #0d0d10;
  --surface-soft: rgba(255, 255, 255, 0.025);
  --muted: rgba(232, 232, 224, 0.48);
  --border: rgba(232, 232, 224, 0.12);
  --border-strong: rgba(232, 232, 224, 0.3);
  --red-rec: #ff2a2a;
  --scan-opacity: 0.04;
  --grain-opacity: 0.035;
  --radius-sm: 4px;
  --radius-md: 8px;
  --ease-ui: 180ms ease;
}

/* ── BASE ── */
html,
body {
  height: 100%;
  background:
    radial-gradient(circle at 42% 18%, rgba(26, 111, 255, 0.07), transparent 34%),
    var(--black);
  color: var(--white);
  font-family: 'IBM Plex Mono', 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 3px;
}

/* ============================================================
   PRIVATE PREVIEW ACCESS GATE
   ============================================================ */
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at center, rgba(26, 111, 255, 0.12), transparent 45%),
    rgba(0, 0, 0, 0.96);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body:not(.access-locked) .access-gate {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.access-locked .page-wrapper,
body.access-locked #sd-trigger {
  visibility: hidden;
  pointer-events: none;
}

.access-gate-window {
  width: min(520px, 100%);
  color: #000000;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 2px 2px 0 #000000, 0 24px 90px rgba(0, 0, 0, 0.72), 0 0 70px rgba(26, 111, 255, 0.18);
  font-family: 'Tahoma', 'Arial', sans-serif;
}

.access-gate-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 7px;
  color: #ffffff;
  background: linear-gradient(90deg, #0a246a, #a6caf0);
  font-size: 11px;
  font-weight: bold;
}

.access-gate-body {
  padding: 24px;
}

.access-gate-status {
  margin-bottom: 12px;
  color: #0a246a;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  font-weight: bold;
  letter-spacing: 0.15em;
}

.access-gate-body h1 {
  margin-bottom: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(18px, 5vw, 28px);
  letter-spacing: 0.08em;
}

.access-gate-body p {
  max-width: 440px;
  margin-bottom: 22px;
  color: #333333;
  font-size: 12px;
  line-height: 1.6;
}

.access-gate-form label {
  display: block;
  margin-bottom: 6px;
  color: #0a246a;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.12em;
}

.access-gate-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.access-gate-input-row input {
  min-width: 0;
  padding: 10px 12px;
  color: #000000;
  background: #ffffff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  outline: none;
}

.access-gate-input-row input:focus {
  box-shadow: 0 0 0 2px #0a246a;
}

.access-gate-input-row button {
  padding: 8px 14px;
  color: #ffffff;
  background: #0a246a;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  font-family: 'Tahoma', 'Arial', sans-serif;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
}

.access-gate-input-row button:active {
  border-color: #404040 #ffffff #ffffff #404040;
}

.access-gate-message {
  min-height: 16px;
  margin-top: 10px;
  color: #666666;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.access-gate-message.error {
  color: #b00020;
}

.access-gate-window.shake {
  animation: access-denied 0.28s linear;
}

.access-gate-footer {
  display: flex;
  justify-content: space-between;
  padding: 4px 7px;
  border-top: 1px solid #808080;
  font-size: 9px;
}

@keyframes access-denied {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── FILM GRAIN ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='512' height='512' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain 0.12s steps(1) infinite;
}

@keyframes grain {
  0% {
    background-position: 0 0;
  }

  10% {
    background-position: -50px -80px;
  }

  20% {
    background-position: 80px 20px;
  }

  30% {
    background-position: -30px 50px;
  }

  40% {
    background-position: 60px -60px;
  }

  50% {
    background-position: -90px 10px;
  }

  60% {
    background-position: 20px 80px;
  }

  70% {
    background-position: -70px -30px;
  }

  80% {
    background-position: 40px 60px;
  }

  90% {
    background-position: -20px -90px;
  }

  100% {
    background-position: 70px 30px;
  }
}

/* ── CRT SCANLINES ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 2px,
      rgba(0, 0, 0, var(--scan-opacity)) 2px,
      rgba(0, 0, 0, var(--scan-opacity)) 4px);
  animation: scanline-drift 8s linear infinite;
}

@keyframes scanline-drift {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 0 80px;
  }
}

/* ── GLITCH OVERLAY ── */
.glitch-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

/* ============================================================
   MODAL — BUCHUNGSFORMULAR
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #080808;
  border: 1px solid rgba(26, 111, 255, 0.5);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 60px rgba(26, 111, 255, 0.12), 0 0 120px rgba(0, 0, 0, 0.8);
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 111, 255, 0.2) transparent;
}

/* Blauer Glow-Streifen oben */
.modal-box::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0.8;
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.modal-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.modal-title-bracket {
  color: var(--blue);
}

.modal-subtitle {
  font-size: 8px;
  letter-spacing: 0.18em;
  color: rgba(232, 232, 224, 0.3);
  text-transform: uppercase;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: 1px solid rgba(232, 232, 224, 0.15);
  color: rgba(232, 232, 224, 0.4);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
}

.modal-close:hover {
  border-color: rgba(232, 232, 224, 0.4);
  color: var(--white);
}

/* ── FORMULAR FELDER ── */
#bookingForm {
  padding: 20px 24px 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-label {
  font-size: 8px;
  letter-spacing: 0.22em;
  color: rgba(26, 111, 255, 0.8);
  text-transform: uppercase;
}

.form-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(232, 232, 224, 0.12);
  color: var(--white);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: rgba(232, 232, 224, 0.2);
}

.form-input:focus {
  border-color: rgba(26, 111, 255, 0.6);
  background: rgba(26, 111, 255, 0.04);
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(26,111,255,0.6)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

.form-select option {
  background: #0a0a0a;
  color: var(--white);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.7;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.form-note {
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(232, 232, 224, 0.25);
  text-transform: uppercase;
  line-height: 1.6;
}

.form-submit {
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--blue);
  border: none;
  padding: 11px 20px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  font-weight: 600;
}

.form-submit:hover {
  background: #3d8bff;
  box-shadow: 0 0 20px rgba(26, 111, 255, 0.4);
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── ERFOLGS-SCREEN ── */
.form-success {
  display: none;
  padding: 40px 24px;
  text-align: center;
}

.form-success.visible {
  display: block;
}

.success-icon {
  font-size: 28px;
  color: var(--blue);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.success-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--black);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.success-body {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 0, 0, 0.5);
  line-height: 1.9;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.success-code {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
}

/* ============================================================
   PAGE WRAPPER + ERROR SIDEBARS
   ============================================================ */
.page-wrapper {
  display: flex;
  align-items: stretch;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  padding: 10px;
}

.error-sidebar {
  flex-shrink: 0;
  width: 170px;
  background: #070707 url("textur/vhs-tex.gif") center/cover no-repeat;
  background-blend-mode: multiply;
  border-right: 1px solid rgba(26, 111, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 20px;
  padding: 20px 12px;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── RECHTE SIDEBAR: jetzt ein Slide-in Drawer ── */
.error-sidebar.right {
  /* aus dem normalen Flex-Flow raus */
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 170px;
  max-width: 170px;
  z-index: 500;

  /* versteckt: komplett rechts außerhalb */
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  border-right: none;
  border-left: 1px solid rgba(26, 111, 255, 0.18);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.7), -2px 0 12px rgba(26, 111, 255, 0.08);
}

/* Geöffneter Zustand */
.error-sidebar.right.drawer-open {
  transform: translateX(0);
  width: 45vw;
  max-width: 560px;
}

.error-sidebar.right.drawer-open .error-box {
  width: 80%;
  min-width: 320px;
}

/* ── SD-KARTEN TRIGGER BUTTON ── */
#sd-trigger {
  position: fixed;
  /* initial: halb sichtbar rechts */
  right: -175px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 600;
  cursor: pointer;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* SD-Karte halb abschneiden */
  clip-path: inset(0 50% 0 0%);
  width: 350px;
  height: 400px;
  padding: 0;
  background: none;
  border: none;
  outline: none;
}

#sd-trigger img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(-4px 0 12px rgba(26, 111, 255, 0.5));
  transition: filter 0.3s ease;
  transform: scaleX(1) rotate(270deg);
}

#sd-trigger:hover img {
  filter: drop-shadow(-4px 0 20px rgba(255, 255, 255, 0.9));
}

/* Wenn Drawer offen: SD-Karte zieht mit nach links, clip weg */
#sd-trigger.drawer-open {
  right: calc(min(45vw, 560px) + 10px);
  clip-path: inset(0 0 0 0);
}

/* Kleiner Pfeil-Hinweis auf der SD-Karte (Hover) */
#sd-trigger::after {
  content: '◀';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: rgba(26, 111, 255, 0.7);
  letter-spacing: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  font-family: 'IBM Plex Mono', monospace;
}

#sd-trigger:hover::after {
  opacity: 1;
}

.error-sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 3px,
      rgba(0, 0, 0, 0.15) 3px,
      rgba(0, 0, 0, 0.15) 4px);
  z-index: 1;
}

.error-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 40px;
  background: linear-gradient(to left, transparent, rgba(26, 111, 255, 0.04));
  pointer-events: none;
  z-index: 0;
}

.error-sidebar.right::before {
  right: auto;
  left: 0;
  background: linear-gradient(to right, transparent, rgba(26, 111, 255, 0.04));
}

/* ── WINDOWS MEDIA PLAYER BOX ── */
.win-window {
  position: relative;
  z-index: 2;
  width: 100%;
  font-family: 'Tahoma', 'Arial', sans-serif;
  font-size: 11px;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 1px 1px 0 #000000;
}

.contact-panel {
  width: 100%;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 1px 1px 0 #000000;
  overflow: hidden;
  opacity: 0;
  max-height: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
  transform: translateY(-10px);
}

.contact-panel.open {
  opacity: 1;
  max-height: 2000px;
  transform: translateY(0);
}

.site-modal-backdrop {
  z-index: 10020;
}

.site-modal-window {
  width: min(720px, 100%);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  opacity: 1;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: #808080 #d4d0c8;
}

.site-modal-backdrop.open .site-modal-window {
  max-height: min(90vh, 820px);
  transform: translateY(0) scale(1);
}

.site-modal-window .contact-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
}

.site-modal-view[hidden] {
  display: none;
}

.legal-content {
  padding: 16px;
  color: #101010;
  font-family: 'Tahoma', 'Arial', sans-serif;
}

.legal-content h2 {
  margin: 18px 0 6px;
  color: #0a246a;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.65;
}

.legal-alert {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #808080;
  background: #fff4c2;
  color: #5c4300;
  font-size: 10px;
  font-weight: bold;
  line-height: 1.5;
}

.legal-note {
  margin-top: 18px !important;
  padding-top: 12px;
  border-top: 1px solid #808080;
  color: rgba(0, 0, 0, 0.6);
  font-size: 9px !important;
  letter-spacing: 0.08em;
}

.cookie-content {
  padding: 16px;
  color: #101010;
  font-family: 'Tahoma', 'Arial', sans-serif;
}

.cookie-intro,
.cookie-details {
  font-size: 11px;
  line-height: 1.65;
}

.cookie-intro {
  margin-bottom: 14px;
}

.cookie-category {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #a0a0a0;
}

.cookie-category-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cookie-category-copy strong {
  color: #0a246a;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cookie-category-copy span,
.cookie-details {
  color: #333333;
  font-size: 10px;
  line-height: 1.55;
}

.cookie-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 105px;
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
}

.cookie-switch input {
  width: 17px;
  height: 17px;
  accent-color: #0a246a;
}

.cookie-switch:has(input:disabled) {
  cursor: default;
  opacity: 0.7;
}

.cookie-details {
  padding-top: 12px;
  border-top: 1px solid #a0a0a0;
}

.cookie-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.cookie-actions button,
.youtube-consent-placeholder button {
  min-height: 38px;
  padding: 8px 10px;
  color: #000000;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  font-family: 'Tahoma', 'Arial', sans-serif;
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
}

.cookie-actions button:active,
.youtube-consent-placeholder button:active {
  border-color: #404040 #ffffff #ffffff #404040;
}

body.modal-open {
  overflow: hidden;
}

.contact-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 0;
}

.contact-title,
.contact-subtitle {
  display: block;
}

.contact-title {
  font-family: 'Tahoma', sans-serif;
  font-size: 10px;
  font-weight: bold;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-title-bracket {
  color: #000000;
  opacity: 0.6;
}

.contact-subtitle {
  font-size: 8px;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 4px;
}

.contact-close {
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000000;
  font-family: 'Tahoma', sans-serif;
  font-size: 10px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}

.contact-panel form,
.contact-panel .form-success {
  padding: 12px;
}

.contact-panel .form-row {
  gap: 12px;
}

.contact-panel .form-footer {
  padding-top: 10px;
}

.contact-panel .form-note {
  color: rgba(0, 0, 0, 0.55);
}

.contact-panel .form-success {
  display: none;
}

.contact-panel .form-success.visible {
  display: block;
}

.contact-panel .form-input,
.contact-panel .form-select,
.contact-panel .form-textarea {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 0, 0, 0.12);
  color: #000000;
}

.contact-panel .form-input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.contact-panel .form-submit {
  background: #0a246a;
  color: #ffffff;
}

.contact-panel .form-submit:hover {
  background: #1b3b98;
}

.win-titlebar {
  background: linear-gradient(to right, #0a246a, #a6caf0);
  padding: 3px 4px 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.win-titlebar-left {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.win-title {
  font-family: 'Tahoma', sans-serif;
  font-size: 10px;
  font-weight: bold;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
  letter-spacing: 0.01em;
}

.win-buttons {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.win-btn {
  width: 16px;
  height: 14px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  font-family: 'Tahoma', sans-serif;
  line-height: 1;
}

.win-btn:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

.win-menubar {
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  padding: 2px 4px;
  display: flex;
  gap: 0;
}

.win-menu-item {
  padding: 2px 6px;
  font-size: 10px;
  color: #000000;
  cursor: pointer;
  font-family: 'Tahoma', sans-serif;
}

.win-menu-item:hover {
  background: hsl(224, 83%, 23%);
  color: #ffffff;
}

.win-body {
  padding: 6px;
  background: #d4d0c8;
}

.win-display-area {
  background: #000000;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  height: 70px;
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.win-status-text {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  color: #00cc44;
  text-shadow: 0 0 4px #00cc44;
  letter-spacing: 0.08em;
  animation: win-blink-status 2s step-end infinite;
}

@keyframes win-blink-status {

  0%,
  88%,
  100% {
    opacity: 1;
  }

  90%,
  94% {
    opacity: 0;
  }
}

.win-vis-bar {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 12px;
}

.win-vis-bar-el {
  width: 3px;
  background: #00cc44;
  box-shadow: 0 0 2px #00cc44;
  animation: win-vis-dance 0.6s ease-in-out infinite;
}

@keyframes win-vis-dance {

  0%,
  100% {
    height: 2px;
  }

  50% {
    height: var(--h, 8px);
  }
}

.win-info-panel {
  background: #d4d0c8;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 5px 6px;
  margin-bottom: 5px;
  font-family: 'Tahoma', sans-serif;
}

.win-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.win-info-row:last-child {
  margin-bottom: 0;
}

.win-info-label {
  font-size: 9px;
  color: #444444;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.win-info-value {
  font-size: 9px;
  color: #000000;
  font-family: 'Tahoma', sans-serif;
}

.win-green {
  color: #006400;
  font-weight: bold;
}

.win-info-divider {
  height: 1px;
  background: #808080;
  box-shadow: 0 1px 0 #ffffff;
  margin: 4px 0;
}

.win-info-highlight {
  font-size: 9px;
  color: #000000;
  line-height: 1.6;
  font-family: 'Tahoma', sans-serif;
  text-transform: uppercase;
}

/* Inline VHS-style highlight used inside win-info-highlight */
.win-info-highlight .vhs-inline {
  display: inline-block;
  position: relative;
  color: lch(0% 0 0);
  padding: 0 2px;
  background: linear-gradient(90deg, rgba(26, 111, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(26, 111, 255, 0.06) 100%);
  background-size: 200% 100%;
  text-shadow: 0 0 8px rgba(26, 111, 255, 0.18), 0 0 2px rgba(0, 0, 0, 0.6);
  animation: vhs-inline-glow 2.6s linear infinite, vhs-inline-flicker 0.14s steps(2, start) infinite;
}

.win-info-highlight .vhs-inline::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(180deg, transparent 44%, rgba(255, 255, 255, 0.06) 48%, rgba(255, 255, 255, 0.02) 52%, transparent 56%);
  opacity: 0.75;
  animation: vhs-inline-scan 1.6s linear infinite;
}

@keyframes vhs-inline-glow {
  0% {
    background-position: 0% 0%;
  }

  50% {
    background-position: 100% 0%;
  }

  100% {
    background-position: 0% 0%;
  }
}

@keyframes vhs-inline-flicker {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.88;
  }
}

@keyframes vhs-inline-scan {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

.win-info-code {
  font-size: 8px;
  color: #555555;
  font-style: italic;
  margin-top: 3px;
  font-family: 'Tahoma', sans-serif;
}

.win-controls {
  padding: 2px 0;
}

.win-ctrl-btn {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  font-family: 'Tahoma', sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.win-ctrl-btn:hover {
  background: #e8e4dc;
}

.win-ctrl-btn:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

.win-taskbar {
  background: linear-gradient(to bottom, #c0c0c0, #a8a8a8);
  border-top: 2px solid #ffffff;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.win-ready {
  font-family: 'Tahoma', sans-serif;
  font-size: 9px;
  color: #000000;
  padding: 1px 5px;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  flex: 1;
}

.win-time {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  color: #000000;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 1px 4px;
  letter-spacing: 0.05em;
}

.error-vert-text {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%) rotate(180deg);
  z-index: 2;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 7px;
  letter-spacing: 0.25em;
  color: rgba(232, 232, 224, 0.08);
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
}

.error-dot {
  position: relative;
  z-index: 2;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  animation: blink-rec 2s ease-in-out infinite;
}

@keyframes error-blink {

  0%,
  88%,
  100% {
    opacity: 1;
    border-color: rgba(26, 111, 255, 0.35);
  }

  90% {
    opacity: 0.5;
    border-color: rgba(26, 111, 255, 0.9);
  }

  92% {
    opacity: 1;
  }
}

@keyframes cursor-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* App-Container */
.app-container {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

/* ============================================================
   LAYOUT GRID
   ============================================================ */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 26vw, 390px);
  grid-template-rows: 54px minmax(0, 1fr) 42px;
  height: 100%;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: color-mix(in srgb, var(--surface-raised) 96%, transparent);
  position: relative;
  overflow: hidden;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0.6;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--white);
  text-transform: uppercase;
  animation: text-glitch 8s ease infinite;
}

.logo span {
  color: var(--blue);
}

@keyframes text-glitch {

  0%,
  90%,
  100% {
    clip-path: none;
    transform: translateX(0);
  }

  91% {
    clip-path: rect(10px, 9999px, 30px, 0);
    transform: translateX(-3px);
  }

  92% {
    clip-path: none;
    transform: translateX(0);
  }

  93% {
    clip-path: rect(50px, 9999px, 70px, 0);
    transform: translateX(2px);
  }

  94% {
    clip-path: none;
  }
}

.topbar-meta {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(232, 232, 224, 0.3);
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.rec-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--red-rec);
  text-transform: uppercase;
}

.rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-rec);
  box-shadow: 0 0 6px var(--red-rec);
  animation: blink-rec 1.4s ease-in-out infinite;
}

@keyframes blink-rec {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.1;
  }
}

.timecode {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(232, 232, 224, 0.5);
  font-variant-numeric: tabular-nums;
  min-width: 88px;
  text-align: right;
}

/* ============================================================
   VIDEO PANEL
   ============================================================ */
.video-panel {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #050506, #020203);
  position: relative;
  overflow-y: auto;
}

.video-header {
  min-height: 45px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.video-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(232, 232, 224, 0.35);
  text-transform: uppercase;
}

.video-channel {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--blue);
  text-transform: uppercase;
}

.video-preview-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2vw, 28px) clamp(18px, 2.4vw, 32px) 16px;
  max-width: 1188px;
  margin: 0 auto;
  width: 100%;
}

.video-frame {
  width: 100%;
  max-width: 1135px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  position: relative;
  background: #000;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(26, 111, 255, 0.05);
}

.volume-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  width: 128px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(26, 111, 255, 0.22);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 232, 224, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.volume-display.visible {
  opacity: 1;
}

.volume-display-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.volume-label {
  color: rgba(26, 111, 255, 0.95);
}

.volume-percent {
  color: rgba(232, 232, 224, 0.95);
}

.volume-meter {
  height: 4px;
  width: 100%;
  background: rgba(232, 232, 224, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.volume-meter-fill {
  height: 100%;
  width: 80%;
  background: linear-gradient(90deg, rgba(26, 111, 255, 0.95), rgba(26, 111, 255, 0.55));
  transition: width 0.15s ease;
}

.volume-slider-wrap {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  width: 160px;
}

.volume-slider {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: rgba(232, 232, 224, 0.12);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 8v8h4l5 5V3L9 8H5z' fill='white'/%3E%3Cpath d='M15.5 8.5a3.5 3.5 0 010 7' stroke='white' stroke-width='1.5' fill='none'/%3E%3Cpath d='M17.5 6.5a6.5 6.5 0 010 11' stroke='white' stroke-width='1.5' fill='none' opacity='0.6'/%3E%3C/svg%3E") center/60% no-repeat;
  border: 1px solid rgba(232, 232, 224, 0.55);
  box-shadow: 0 0 8px rgba(26, 111, 255, 0.35);
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 8v8h4l5 5V3L9 8H5z' fill='white'/%3E%3Cpath d='M15.5 8.5a3.5 3.5 0 010 7' stroke='white' stroke-width='1.5' fill='none'/%3E%3Cpath d='M17.5 6.5a6.5 6.5 0 010 11' stroke='white' stroke-width='1.5' fill='none' opacity='0.6'/%3E%3C/svg%3E") center/60% no-repeat;
  border: 1px solid rgba(232, 232, 224, 0.55);
  box-shadow: 0 0 8px rgba(26, 111, 255, 0.35);
}

.video-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.82) 100%);
  z-index: 3;
  pointer-events: none;
}

.video-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid var(--blue);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 4;
  pointer-events: none;
}

.video-frame:hover::before {
  opacity: 0.6;
}

.video-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Ensure preview video is centered and covers the frame */
.video-canvas {
  object-fit: cover;
  object-position: center center;
}

.photo-canvas {
  display: none;
  object-fit: contain;
  background: #000;
}

.video-frame.photo-active .photo-canvas {
  display: block;
}

.video-frame.photo-active .video-click-overlay,
.video-frame.photo-active .sound-prompt,
.video-frame.photo-active .desc-overlay,
.video-frame.photo-active .volume-display,
.video-frame.photo-active .volume-slider-wrap,
.video-frame.photo-active .play-btn,
.video-frame.photo-active .tape-counter {
  display: none !important;
}

#youtubePlayerContainer {
  width: 100%;
  height: 100%;
  display: none;
  border: none;
}

.youtube-consent-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--white);
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(26, 111, 255, 0.04) 3px 4px),
    #080808;
  text-align: center;
}

.youtube-consent-placeholder strong {
  color: var(--blue);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.youtube-consent-placeholder span {
  max-width: 430px;
  color: rgba(232, 232, 224, 0.6);
  font-size: 9px;
  line-height: 1.6;
}

.youtube-consent-placeholder button {
  margin-top: 4px;
}

.row-bg-consent {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(5, 5, 5, 0.25), rgba(5, 5, 5, 0.8)),
    repeating-linear-gradient(135deg, rgba(26, 111, 255, 0.16) 0 4px, transparent 4px 10px);
}

iframe.video-canvas {
  border: none;
}

.video-click-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
}

.sound-prompt {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 190px;
  padding: 14px 18px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(26, 111, 255, 0.8);
  background: rgba(0, 0, 0, 0.78);
  box-shadow: 0 0 28px rgba(26, 111, 255, 0.28);
  color: #fff;
  font-family: inherit;
  text-align: center;
  pointer-events: none;
  animation: sound-prompt-pulse 1.6s ease-in-out infinite;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sound-prompt.hidden {
  opacity: 0;
  visibility: hidden;
}

.sound-prompt-icon {
  display: inline-block;
  position: relative;
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  flex: 0 0 auto;
  filter:
    drop-shadow(0 0 5px rgba(26, 111, 255, 0.9))
    drop-shadow(0 0 12px rgba(26, 111, 255, 0.45));
  animation:
    sound-icon-pulse 1.3s ease-in-out infinite,
    sound-icon-glitch 4s infinite;
}

.sound-prompt-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: url("assets/vhs-sound-icon.gif") center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: 0.22;
  pointer-events: none;
  animation: sound-icon-rgb-shift 0.12s linear infinite;
}

.sound-prompt-icon::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  top: 50%;
  height: 2px;
  background: rgba(26, 111, 255, 0.8);
  opacity: 0;
  animation: sound-icon-tracking-error 3.5s infinite;
}

.sound-prompt-icon picture,
.sound-prompt-icon-image {
  display: block;
  width: 100%;
  height: 100%;
}

.sound-prompt-icon-image {
  object-fit: contain;
  user-select: none;
}

.sound-prompt-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.sound-prompt-subtitle {
  color: rgba(232, 232, 224, 0.62);
  font-size: 7px;
  letter-spacing: 0.14em;
}

@keyframes sound-prompt-pulse {
  0%, 100% {
    box-shadow: 0 0 18px rgba(26, 111, 255, 0.18);
  }
  50% {
    box-shadow: 0 0 34px rgba(26, 111, 255, 0.48);
  }
}

@keyframes sound-icon-pulse {
  0%, 100% {
    scale: 1;
    opacity: 0.8;
  }
  50% {
    scale: 1.12;
    opacity: 1;
  }
}

@keyframes sound-icon-rgb-shift {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-1px, 0);
  }
  50% {
    transform: translate(1px, 0);
  }
  75% {
    transform: translate(-1px, 1px);
  }
}

@keyframes sound-icon-glitch {
  0%, 88%, 100% {
    translate: 0;
  }
  89% {
    translate: -3px;
  }
  90% {
    translate: 4px;
  }
  91% {
    translate: -6px;
  }
  92% {
    translate: 0;
  }
}

@keyframes sound-icon-tracking-error {
  0%, 90%, 100% {
    opacity: 0;
    transform: translateY(0);
  }
  91% {
    opacity: 1;
    transform: translateY(-10px);
  }
  93% {
    opacity: 0.6;
    transform: translateY(12px);
  }
  95% {
    opacity: 0;
    transform: translateY(0);
  }
}

.video-frame.raw-video .vhs-glitch,
.video-frame.raw-video .video-overlay-info,
.video-frame.raw-video .desc-overlay,
.video-frame.raw-video .volume-display,
.video-frame.raw-video .volume-slider-wrap,
.video-frame.raw-video .play-btn,
.video-frame.raw-video .tape-counter {
  display: none !important;
}

.video-frame.raw-video::after,
.video-frame.raw-video::before {
  display: none !important;
}

.video-frame.raw-video {
  border: none;
}

/* ── YouTube active: hide custom controls, expose iframe ── */
.video-frame.yt-active .video-click-overlay,
.video-frame.yt-active .play-btn,
.video-frame.yt-active .volume-slider-wrap,
.video-frame.yt-active .sound-prompt {
  display: none !important;
}

.vhs-glitch {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.vhs-noise-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  animation: noise-bar 4s linear infinite;
}

@keyframes noise-bar {
  0% {
    top: -5%;
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  95% {
    opacity: 1;
  }

  100% {
    top: 105%;
    opacity: 0;
  }
}

.vhs-tracking {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(26, 111, 255, 0.25);
  animation: tracking 7s ease-in-out infinite;
  animation-delay: 2.5s;
}

@keyframes tracking {
  0% {
    top: -5%;
    opacity: 0;
  }

  3% {
    opacity: 1;
  }

  97% {
    opacity: 1;
  }

  100% {
    top: 105%;
    opacity: 0;
  }
}

.video-overlay-info {
  position: absolute;
  z-index: 4;
  pointer-events: none;
}

.video-overlay-top {
  top: 13px;
  left: 14px;
}

.video-overlay-bottom {
  bottom: 12px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.video-overlay-br {
  bottom: 12px;
  right: 14px;
}

.vhs-text {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.9);
}

.vhs-text.blue {
  color: rgba(26, 111, 255, 0.85);
}

.vhs-text.bright {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.play-btn {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 84px;
  height: 30px;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(12, 12, 16, 0.96), rgba(20, 20, 24, 0.98));
  border: 1px solid rgba(26, 111, 255, 0.85);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 14px rgba(26, 111, 255, 0.12);
  cursor: pointer;
  color: var(--white);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.4;
  transition: opacity 0.25s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.play-btn:hover {
  opacity: 1;
  border-color: rgba(26, 111, 255, 1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 18px rgba(26, 111, 255, 0.22);
}

.play-btn img {
  width: 18px;
  height: 18px;
  display: block;
}

.play-btn span {
  display: inline-block;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
}


/* ── Tape progress ── */
.tape-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 56px);
  max-width: 380px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 4;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(26, 111, 255, 0.18);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.tape-track {
  flex: 1;
  height: 4px;
  background: rgba(232, 232, 224, 0.08);
  position: relative;
  border-radius: 999px;
  overflow: hidden;
}

.tape-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(26, 111, 255, 0.95), rgba(26, 111, 255, 0.55));
  width: 0%;
  transition: width 0.25s ease;
  box-shadow: 0 0 8px rgba(26, 111, 255, 0.25);
}

.tape-time {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(232, 232, 224, 0.75);
  white-space: nowrap;
}

.video-overlay-bottom-center {
  left: 50%;
  transform: translateX(-50%);
}

.tape-track {
  flex: 1;
  height: 2px;
  background: rgba(232, 232, 224, 0.1);
  position: relative;
}

.tape-fill {
  height: 100%;
  background: var(--blue);
  width: 0%;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px var(--blue);
}

.tape-time {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(232, 232, 224, 0.4);
  padding-left: 14px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ── Project info ── */
.project-info {
  padding: 18px clamp(24px, 3vw, 36px) 22px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface-soft);
}

.project-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  position: relative;
}

.project-title-main {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.2;
}

.project-year {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.project-desc {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  letter-spacing: 0.04em;
  max-width: 680px;
  max-height: 3.4em;
  overflow: hidden;
  transition: max-height 240ms ease;
}

.project-desc-block[hidden] {
  display: none;
}

.project-desc-block.expanded .project-desc {
  max-height: 32em;
}

.project-desc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 4px 0;
  color: var(--blue);
  background: transparent;
  border: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.project-desc-toggle:hover {
  color: var(--white);
}

.project-desc-toggle-icon {
  font-size: 12px;
  line-height: 1;
  transition: transform var(--ease-ui);
}

.project-desc-block.expanded .project-desc-toggle-icon {
  transform: rotate(45deg);
}

.project-tags {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.tag {
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 232, 224, 0.4);
  border: 1px solid rgba(232, 232, 224, 0.15);
  padding: 3px 8px;
  border-radius: 2px;
}

.tag.blue {
  color: var(--blue);
  border-color: rgba(26, 111, 255, 0.35);
  background: rgba(26, 111, 255, 0.06);
}

/* ============================================================
   SIDEBAR ARCHIVE
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface), #040405);
  overflow: hidden;
}

.sidebar-header {
  min-height: 45px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 9px;
  letter-spacing: 0.25em;
  color: rgba(232, 232, 224, 0.48);
  text-transform: uppercase;
}

.sidebar-count {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-left: auto;
  white-space: nowrap;
}

.gallery-switch {
  display: flex;
  border: 1px solid rgba(232, 232, 224, 0.12);
  background: rgba(232, 232, 224, 0.02);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.gallery-switch-btn {
  appearance: none;
  border: 0;
  border-right: 1px solid rgba(232, 232, 224, 0.12);
  padding: 5px 8px;
  background: transparent;
  color: rgba(232, 232, 224, 0.35);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color var(--ease-ui), background var(--ease-ui);
}

.gallery-switch-btn:last-child {
  border-right: 0;
}

.gallery-switch-btn:hover,
.gallery-switch-btn.active {
  color: #ffffff;
  background: rgba(26, 111, 255, 0.2);
}

.sidebar.photo-gallery-active .sidebar-filter {
  display: none;
}

.sidebar-filter {
  padding: 10px 18px 11px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.filter-row {
  display: flex;
  gap: 5px;
}

.filter-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 232, 224, 0.42);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(232, 232, 224, 0.1);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover,
.filter-btn.active {
  color: #ffffff;
  border-color: rgba(26, 111, 255, 0.5);
  background: rgba(26, 111, 255, 0.14);
}

.projects-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 232, 224, 0.1) transparent;
}

.projects-list::-webkit-scrollbar {
  width: 3px;
}

.projects-list::-webkit-scrollbar-track {
  background: transparent;
}

.projects-list::-webkit-scrollbar-thumb {
  background: rgba(232, 232, 224, 0.12);
}

.project-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: start;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(232, 232, 224, 0.06);
  cursor: pointer;
  position: relative;
  transition: background var(--ease-ui);
  overflow: hidden;
}

.project-row>* {
  position: relative;
  z-index: 1;
}

.project-row .row-bg-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.project-row:hover .row-bg-video,
.project-row.active .row-bg-video {
  opacity: 1;
}

.project-row .row-bg-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 4, 6, 0.88), rgba(4, 4, 6, 0.4));
  pointer-events: none;
}

.project-row .row-bg-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(0.85) brightness(0.85);
  image-rendering: pixelated;
  transform: scale(1.03);
}

.project-row .row-bg-video iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(0.85) brightness(0.85);
  transform: scale(1.35);
  transform-origin: center;
  border: none;
}

/* YouTube thumbnail — shown on hover AND active state */
.project-row .row-bg-video .row-bg-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(0.85) brightness(0.85);
  transform: scale(1.03);
  display: block;
}

.project-row.photo-row .row-bg-video {
  opacity: 0.22;
}

.project-row.photo-row:hover .row-bg-video,
.project-row.photo-row.active .row-bg-video {
  opacity: 0.72;
}

.project-row.photo-row .row-bg-video::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.project-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  opacity: 0;
  transition: opacity 0.15s;
}

.project-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.project-row:hover::before {
  opacity: 1;
}

.project-row.active {
  background: linear-gradient(90deg, rgba(26, 111, 255, 0.16), rgba(26, 111, 255, 0.04));
}

.project-row.active::before {
  opacity: 1;
}

.project-row:hover .row-cat {
  color: rgba(26, 111, 255, 0.6);
}

.row-num {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(232, 232, 224, 0.2);
  padding-top: 1px;
  font-variant-numeric: tabular-nums;
}

.row-content {
  min-width: 0;
}

.row-name {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 232, 224, 0.86);
  margin-bottom: 3px;
  transition: color 0.15s;
  line-height: 1.3;
}

.project-row:hover .row-name,
.project-row.active .row-name {
  color: var(--white);
}

.row-cat {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: rgba(232, 232, 224, 0.4);
  text-transform: uppercase;
}

.row-right {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.row-year {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(232, 232, 224, 0.3);
}

.row-status {
  font-size: 7px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid;
}

.row-status.live {
  color: #29e87a;
  border-color: rgba(41, 232, 122, 0.35);
  background: rgba(41, 232, 122, 0.05);
}

.row-status.arch {
  color: rgba(232, 232, 224, 0.3);
  border-color: rgba(232, 232, 224, 0.12);
}

.row-status.wip {
  color: rgba(255, 200, 50, 0.8);
  border-color: rgba(255, 200, 50, 0.3);
  background: rgba(255, 200, 50, 0.05);
}

.sidebar-reel {
  min-height: 54px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.instagram-link {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: var(--radius-sm);
  outline: none;
}

.instagram-link:focus-visible {
  box-shadow: 0 0 0 1px var(--blue);
}

.instagram-media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.instagram-static,
.instagram-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 120ms ease;
}

.instagram-static {
  opacity: 0.72;
}

.instagram-hover {
  opacity: 0;
  pointer-events: none;
}

.instagram-link.is-playing .instagram-static {
  opacity: 0;
}

.instagram-link.is-playing .instagram-hover {
  opacity: 1;
}

.reel-label {
  min-width: 0;
  overflow: hidden;
  font-size: 8px;
  letter-spacing: 0.18em;
  color: rgba(232, 232, 224, 0.4);
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   STATUS BAR
   ============================================================ */
.statusbar {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: color-mix(in srgb, var(--surface-raised) 98%, transparent);
  position: relative;
  z-index: 10;
}

.statusbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-dim), transparent);
  opacity: 0.5;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 3;
}

.status-logo-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  pointer-events: auto;
  cursor: pointer;
  isolation: isolate;
  transition: filter 0.15s ease;
}

.status-logo-link::before,
.status-logo-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: url("LOGO/Logo-VEYE.jpg") center / contain no-repeat;
  opacity: 0;
  pointer-events: none;
}

.status-logo-link:hover,
.status-logo-link:focus-visible {
  filter: brightness(1.25) contrast(1.15);
  outline: none;
}

.status-logo-link:hover .status-logo,
.status-logo-link:focus-visible .status-logo {
  animation: status-logo-glitch 0.42s steps(2, end) infinite;
}

.status-logo-link:hover::before,
.status-logo-link:focus-visible::before {
  opacity: 0.7;
  filter: sepia(1) saturate(8) hue-rotate(165deg);
  mix-blend-mode: screen;
  animation: status-logo-glitch-blue 0.34s steps(2, end) infinite;
}

.status-logo-link:hover::after,
.status-logo-link:focus-visible::after {
  opacity: 0.55;
  filter: sepia(1) saturate(8) hue-rotate(305deg);
  mix-blend-mode: screen;
  animation: status-logo-glitch-red 0.27s steps(2, end) infinite reverse;
}

.status-logo {
  position: relative;
  z-index: 2;
  max-height: 28px;
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}

@keyframes status-logo-glitch {
  0%, 100% {
    transform: translate(0);
    clip-path: inset(0);
  }
  20% {
    transform: translate(-2px, 1px);
    clip-path: inset(15% 0 58% 0);
  }
  40% {
    transform: translate(2px, -1px);
    clip-path: inset(62% 0 9% 0);
  }
  60% {
    transform: translate(-1px, 0);
    clip-path: inset(38% 0 32% 0);
  }
  80% {
    transform: translate(1px, 1px);
    clip-path: inset(5% 0 72% 0);
  }
}

@keyframes status-logo-glitch-blue {
  0%, 100% {
    transform: translate(0);
    clip-path: inset(0 0 70% 0);
  }
  33% {
    transform: translate(4px, -1px);
    clip-path: inset(35% 0 28% 0);
  }
  66% {
    transform: translate(-3px, 1px);
    clip-path: inset(72% 0 4% 0);
  }
}

@keyframes status-logo-glitch-red {
  0%, 100% {
    transform: translate(0);
    clip-path: inset(68% 0 5% 0);
  }
  40% {
    transform: translate(-4px, 1px);
    clip-path: inset(8% 0 65% 0);
  }
  75% {
    transform: translate(3px, -1px);
    clip-path: inset(42% 0 25% 0);
  }
}

.status-item {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(232, 232, 224, 0.25);
  text-transform: uppercase;
}

.status-item.highlight {
  color: var(--blue);
}

.status-actions {
  gap: 4px;
}

.status-action {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(232, 232, 224, 0.52);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
  line-height: 1;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.status-action:hover,
.status-action:focus-visible,
.status-action.highlight {
  border-color: rgba(26, 111, 255, 0.45);
  background: rgba(26, 111, 255, 0.08);
  color: var(--blue);
  outline: none;
}

.status-bar-anim {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 12px;
}

.bar-el {
  width: 2px;
  background: var(--blue);
  opacity: 0.6;
  animation: bar-dance 1.2s ease-in-out infinite;
}

.bar-el:nth-child(1) {
  animation-delay: 0s;
}

.bar-el:nth-child(2) {
  animation-delay: 0.15s;
}

.bar-el:nth-child(3) {
  animation-delay: 0.3s;
}

.bar-el:nth-child(4) {
  animation-delay: 0.45s;
}

.bar-el:nth-child(5) {
  animation-delay: 0.6s;
}

@keyframes bar-dance {

  0%,
  100% {
    height: 3px;
  }

  50% {
    height: 10px;
  }
}

canvas {
  display: block;
}

/* ============================================================
   TYPEWRITER DESCRIPTION OVERLAY
   ============================================================ */

.desc-overlay {
  position: absolute;
  top: 30px;
  left: 14px;
  z-index: 4;
  pointer-events: none;
  max-width: 38%;
}

.desc-overlay-header {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(41, 232, 122, 0.55);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.desc-overlay-text {
  font-size: 10px;
  line-height: 1.65;
  letter-spacing: 0.06em;
  color: rgba(41, 232, 122, 0.75);
  text-shadow: 0 0 6px rgba(41, 232, 122, 0.4);
  word-break: break-word;
  white-space: pre-wrap;
  display: inline;
}

.desc-cursor {
  font-size: 8px;
  color: rgba(41, 232, 122, 0.9);
  text-shadow: 0 0 8px rgba(41, 232, 122, 0.6);
  animation: cursor-block-blink 0.75s step-end infinite;
  vertical-align: bottom;
}

.desc-cursor.done {
  animation: cursor-block-blink 1.4s step-end infinite;
  opacity: 0.45;
}

@keyframes cursor-block-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Gesamte Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

/* Hintergrund */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Schieberegler */
::-webkit-scrollbar-thumb {
  background: rgba(232, 232, 224, 0.14);
  border-radius: 999px;
}

/* Beim Überfahren mit der Maus */
::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 111, 255, 0.45);
}
/* ============================================================
   RESPONSIVE DESIGN — VHS PORTFOLIO
   Breakpoints:
   - 1100px  : tablet landscape  — sidebar stacks below video
   - 768px   : tablet portrait   — single column, compact topbar
   - 480px   : mobile            — full mobile layout
   ============================================================ */

/* ── GLOBAL RESPONSIVE UTILITIES ── */
@media (max-width: 1100px) {
  html, body {
    overflow: auto;
  }

  .page-wrapper {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 0;
  }

  .app-container {
    flex: 0 0 auto;
    width: 100%;
  }

  /* Layout becomes single column: video top, sidebar bottom */
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: 48px auto auto 38px;
    height: auto;
    min-height: 0;
    flex: none;
    border-radius: 0;
  }

  .topbar {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .video-panel {
    grid-column: 1;
    grid-row: 2;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-y: visible;
  }

  .sidebar {
    grid-column: 1;
    grid-row: 3;
    border-top: 1px solid var(--border);
    max-height: 420px;
  }

  .statusbar {
    grid-column: 1;
    grid-row: 4;
  }

  /* SD trigger & right drawer: smaller gap */
  #sd-trigger {
    right: -130px;
    width: 260px;
    height: 600px;
  }

  #sd-trigger.drawer-open {
    right: calc(min(80vw, 480px) + 8px);
  }

  .error-sidebar.right {
    width: 80vw;
    max-width: 480px;
  }

  .error-sidebar.right.drawer-open {
    width: 80vw;
    max-width: 480px;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow: auto;
  }

  .page-wrapper {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }

  .app-container {
    min-height: 100vh;
    min-height: 100svh;
  }

  .layout {
    grid-template-rows: 44px auto minmax(200px, 1fr) 38px;
    min-height: 100vh;
    min-height: 100svh;
  }

  /* ── TOPBAR ── */
  .topbar {
    padding: 0 12px;
    height: 44px;
  }

  .topbar-left {
    gap: 10px;
  }

  .topbar-meta {
    display: none; /* hide verbose meta on small screens */
  }

  .logo {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .timecode {
    font-size: 9px;
    min-width: 72px;
  }

  .topbar-right {
    gap: 12px;
  }

  /* ── VIDEO PANEL ── */
  .video-preview-wrap {
    padding: 10px 10px 8px;
  }

  .video-header {
    padding: 10px 14px 10px;
  }

  /* VHS overlay text scales down */
  .vhs-text {
    font-size: 9px;
  }

  .desc-overlay {
    max-width: 55%;
    top: 20px;
    left: 10px;
  }

  .desc-overlay-text {
    font-size: 8px;
  }

  /* Tape counter slims on mobile */
  .tape-counter {
    padding: 7px 10px;
    max-width: 280px;
  }

  .tape-time {
    font-size: 8px;
  }

  /* Play button stays usable */
  .play-btn {
    bottom: 52px;
    min-width: 72px;
    height: 28px;
    font-size: 7px;
  }

  /* Volume slider — smaller, top-right */
  .volume-slider-wrap {
    width: 100px;
    top: 10px;
    right: 10px;
  }

  /* Project info below video */
  .project-info {
    padding: 12px 16px 16px;
  }

  .project-title-main {
    font-size: 12px;
  }

  .project-desc {
    font-size: 9px;
  }

  /* ── SIDEBAR ── */
  .sidebar {
    height: 100%;
    max-height: none;
    min-height: 0;
  }

  .sidebar-header {
    padding: 10px 14px 8px;
  }

  .sidebar-filter {
    padding: 8px 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sidebar-filter::-webkit-scrollbar {
    display: none;
  }

  .filter-row {
    flex-wrap: nowrap;
    gap: 4px;
    min-width: max-content;
  }

  .filter-btn {
    font-size: 7px;
    padding: 3px 7px;
    white-space: nowrap;
  }

  .project-row {
    padding: 10px 14px;
    grid-template-columns: 22px 1fr auto;
  }

  .row-name {
    font-size: 9px;
  }

  .row-cat {
    font-size: 7px;
  }

  .row-status {
    font-size: 6px;
    padding: 1px 4px;
  }

  /* ── STATUS BAR ── */
  .statusbar {
    padding: 0 12px;
  }

  /* Hide some status items on small screens */
  .status-left .status-item:nth-child(2),
  .status-left .status-item:nth-child(3) {
    display: none;
  }

  .status-right .status-item:first-of-type {
    display: none;
  }

  .status-logo {
    max-height: 22px;
    height: 22px;
  }

  /* ── RIGHT DRAWER ── */
  .error-sidebar.right {
    width: 100vw;
    max-width: 100vw;
  }

  .error-sidebar.right.drawer-open {
    width: 100vw;
    max-width: 100vw;
  }

  #sd-trigger {
    right: -110px;
    width: 220px;
    height: 520px;
  }

  #sd-trigger.drawer-open {
    right: calc(100vw + 8px);
  }

  /* Contact drawer full width */
  .contact-panel .form-row {
    grid-template-columns: 1fr;
  }

  /* Win window stays readable */
  .win-info-highlight {
    font-size: 8px;
    line-height: 1.5;
  }

  /* ── FORM ROWS — stack to single column ── */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 1100px) and (orientation: portrait) {
  .page-wrapper {
    padding-bottom: 112px;
  }

  .video-header {
    min-height: 58px;
    padding: 15px clamp(16px, 4vw, 28px);
  }

  .video-label,
  .video-channel {
    font-size: 10px;
  }

  .sidebar-header {
    min-height: 54px;
    padding: 14px clamp(16px, 4vw, 28px);
  }

  .sidebar-filter {
    padding: 9px clamp(12px, 3vw, 20px);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(26, 111, 255, 0.45) transparent;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-filter::-webkit-scrollbar {
    display: block;
    height: 3px;
  }

  .sidebar-filter::-webkit-scrollbar-thumb {
    background: rgba(26, 111, 255, 0.45);
    border-radius: 999px;
  }

  .filter-row {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    min-width: max-content;
    gap: 6px;
  }

  .filter-btn {
    flex: 0 0 auto;
    min-height: 32px;
    min-width: 92px;
    padding: 6px 8px;
    font-size: clamp(7px, 1.4vw, 9px);
    letter-spacing: 0.11em;
  }

  .project-row {
    min-height: 76px;
    padding: 17px clamp(16px, 4vw, 28px);
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
  }

  .row-num {
    font-size: 10px;
  }

  .row-name {
    margin-bottom: 5px;
    font-size: clamp(10px, 2vw, 12px);
    line-height: 1.35;
  }

  .row-cat {
    font-size: clamp(7px, 1.5vw, 9px);
  }

  .row-year {
    font-size: 10px;
  }

  .row-status {
    font-size: 7px;
    padding: 2px 6px;
  }

  .sidebar-reel {
    position: fixed;
    right: 0;
    bottom: 48px;
    left: 0;
    z-index: 690;
    min-height: 64px;
    padding: 14px clamp(16px, 4vw, 28px);
    background: #050506;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.42);
  }

  .statusbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 700;
    min-height: 48px;
    padding: 0 clamp(14px, 3vw, 24px);
    background: #070709;
  }

  .status-item {
    font-size: 9px;
  }

  .status-action {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 8px;
  }

  .status-logo {
    max-height: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .access-gate {
    padding: 10px;
  }

  .access-gate-body {
    padding: 18px 14px;
  }

  .access-gate-input-row {
    grid-template-columns: 1fr;
  }

  .access-gate-input-row button {
    min-height: 38px;
  }

  .cookie-category {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cookie-actions {
    grid-template-columns: 1fr;
  }

  /* ── TOPBAR — ultra-compact ── */
  .topbar {
    height: 40px;
    padding: 0 10px;
  }

  .logo {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .rec-indicator {
    font-size: 8px;
    gap: 5px;
  }

  .timecode {
    font-size: 8px;
    min-width: 60px;
    letter-spacing: 0.06em;
  }

  /* ── LAYOUT ── */
  .layout {
    grid-template-rows: 40px auto minmax(180px, 1fr) 34px;
  }

  /* ── VIDEO PANEL ── */
  .video-header {
    min-height: 54px;
    padding: 13px 14px;
  }

  .video-label {
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .video-channel {
    font-size: 9px;
  }

  .video-preview-wrap {
    padding: 8px 8px 6px;
  }

  /* Keep VHS overlays from being cut off */
  .vhs-text {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .video-overlay-top {
    top: 8px;
    left: 8px;
  }

  .video-overlay-bottom {
    bottom: 8px;
    left: 8px;
  }

  .video-overlay-br {
    bottom: 8px;
    right: 8px;
  }

  /* Description overlay hidden on very small screens to avoid clutter */
  .desc-overlay {
    display: none;
  }

  /* Tape counter compact */
  .tape-counter {
    padding: 5px 8px;
    max-width: 220px;
    gap: 8px;
    border-radius: 8px;
    bottom: 10px;
  }

  .tape-time {
    font-size: 7px;
    padding-left: 8px;
  }

  /* Play button */
  .play-btn {
    bottom: 46px;
    min-width: 64px;
    height: 26px;
    font-size: 6px;
    gap: 3px;
    padding: 0 8px;
  }

  .play-btn img {
    width: 14px;
    height: 14px;
  }

  /* Volume slider hidden on small screens — touch unfriendly */
  .volume-slider-wrap {
    display: none;
  }

  /* ── PROJECT INFO ── */
  .project-info {
    padding: 10px 12px 14px;
  }

  .project-title-main {
    font-size: 11px;
    letter-spacing: 0.05em;
  }

  .project-year {
    font-size: 9px;
  }

  .project-desc {
    font-size: 8px;
    line-height: 1.6;
  }

  .tag {
    font-size: 7px;
    padding: 2px 6px;
    letter-spacing: 0.14em;
  }

  /* ── SIDEBAR ── */
  .sidebar {
    height: 100%;
    max-height: none;
    min-height: 0;
  }

  .sidebar-title {
    font-size: 8px;
    letter-spacing: 0.18em;
  }

  .sidebar-count {
    font-size: 8px;
  }

  .sidebar-filter {
    padding: 8px 12px;
  }

  .filter-row {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    min-width: max-content;
    gap: 5px;
  }

  .filter-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 88px;
    min-height: 32px;
    padding: 6px 5px;
    font-size: 7px;
  }

  .project-row {
    min-height: 72px;
    padding: 15px 14px;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    column-gap: 6px;
  }

  .row-num {
    font-size: 9px;
  }

  .row-name {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .row-cat {
    font-size: 7px;
  }

  .row-year {
    font-size: 9px;
  }

  /* Hide status badges on mobile — too cramped */
  .row-status {
    display: none;
  }

  .reel-label {
    font-size: 7px;
    letter-spacing: 0.12em;
  }

  /* ── STATUS BAR ── */
  .statusbar {
    padding: 0 10px;
    height: 46px;
    min-height: 46px;
    justify-content: center;
  }

  .page-wrapper {
    padding-bottom: 108px;
  }

  .sidebar-reel {
    bottom: 46px;
    min-height: 62px;
    padding: 13px 14px;
  }

  .status-item {
    font-size: 7px;
    letter-spacing: 0.1em;
  }

  .status-left,
  .status-center {
    display: none;
  }

  .status-actions {
    width: 100%;
    justify-content: center;
  }

  .status-action {
    flex: 1;
    max-width: 132px;
    min-height: 34px;
    padding: 8px 5px;
    font-size: 8px;
    letter-spacing: 0.07em;
  }

  .status-bar-anim {
    display: none;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .site-modal-window {
    max-height: calc(100vh - 16px);
  }

  .legal-content {
    padding: 12px;
  }

  /* ── SD TRIGGER — hidden on smallest screens, use a simple button ── */
  #sd-trigger {
    /* Collapse to a small pill button */
    right: 0;
    width: auto;
    height: auto;
    clip-path: none;
    background: var(--blue-dim);
    border: 1px solid rgba(26, 111, 255, 0.5);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 10px 8px;
    top: auto;
    bottom: 104px;
    transform: none;
  }

  #sd-trigger img {
    width: 28px;
    height: 28px;
    transform: none;
    rotate: 0deg;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(26, 111, 255, 0.5));
  }

  #sd-trigger.drawer-open {
    right: 100vw;
    clip-path: none;
  }

  /* Full-screen drawer on mobile */
  .error-sidebar.right {
    width: 100vw;
    max-width: 100vw;
    padding: 16px 14px;
    gap: 14px;
    overflow-y: auto;
  }

  .error-sidebar.right.drawer-open {
    width: 100vw;
    max-width: 100vw;
  }

  /* WMP window on mobile */
  .win-window {
    font-size: 10px;
  }

  .win-display-area {
    height: 50px;
  }

  .win-info-highlight {
    font-size: 8px;
  }

  /* Contact form — full width fields */
  .contact-panel form,
  .contact-panel .form-success {
    padding: 10px;
  }

  .contact-panel .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .form-submit {
    width: 100%;
    padding: 13px;
    font-size: 9px;
  }

  .form-note {
    text-align: center;
  }

  /* Error vertical text hidden */
  .error-vert-text {
    display: none;
  }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .logo,
  .vhs-noise-bar,
  .vhs-tracking,
  .rec-dot,
  .bar-el,
  .win-vis-bar-el,
  .win-status-text,
  .desc-cursor,
  .sound-prompt,
  .sound-prompt-icon,
  .sound-prompt-icon::before,
  .sound-prompt-icon::after,
  .status-logo-link .status-logo,
  .status-logo-link::before,
  .status-logo-link::after,
  body::before,
  body::after {
    animation: none !important;
  }

  .status-logo-link::before,
  .status-logo-link::after {
    display: none;
  }

  .instagram-hover {
    display: none;
  }

  .instagram-static {
    opacity: 0.72 !important;
  }

  .sound-prompt-icon::before {
    background-image: url("assets/vhs-sound-icon-static.png");
  }

  .win-info-highlight .vhs-inline {
    animation: none !important;
    background: rgba(26, 111, 255, 0.12);
  }
}
