.cinema-shell {
  --cinema-bar: clamp(42px, 10vh, 104px);
  position: fixed;
  inset: 0;
  z-index: 160;
  color: #f3e9d6;
  isolation: isolate;
  pointer-events: auto;
  touch-action: none;
  font-family: inherit;
}

.cinema-shell[hidden], .cinema-bark[hidden] { display: none !important; }

.cinema-letterbox {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--cinema-bar);
  background: #080908;
  z-index: 2;
  pointer-events: none;
}

.cinema-letterbox-top { top: 0; }
.cinema-letterbox-bottom { bottom: 0; }

.cinema-fade {
  position: absolute;
  inset: 0;
  background: #050605;
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

.cinema-subtitle {
  position: absolute;
  bottom: calc(var(--cinema-bar) + 32px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(740px, calc(100% - 40px));
  padding: 9px 16px;
  border-radius: 3px;
  background: rgba(6, 9, 9, 0.76);
  color: #f2e8d5;
  font-size: clamp(16px, 1.7vw, 23px);
  line-height: 1.55;
  letter-spacing: 0.015em;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 2px 6px #000;
  z-index: 5;
  pointer-events: none;
}

.cinema-skip {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
  z-index: 6;
  min-width: 130px;
  min-height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(194, 180, 149, 0.38);
  border-radius: 4px;
  padding: 9px 13px;
  color: #e0d3bb;
  background: rgba(18, 21, 19, 0.94);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  touch-action: manipulation;
}

.cinema-skip:hover { background: #353b30; border-color: #b29d73; }
.cinema-skip:focus-visible { outline: 2px solid #d1b477; outline-offset: 4px; }
.cinema-skip kbd { color: #a99e87; border: 1px solid #514f40; padding: 1px 5px; border-radius: 3px; font: 10px/1.5 monospace; }

.cinema-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 6;
  background: #121511;
  pointer-events: none;
}
.cinema-progress span { display: block; width: 100%; height: 100%; background: #978262; transform-origin: left; }
.cinema-external-pause { visibility: hidden; pointer-events: none; }

.cinema-bark {
  position: fixed;
  left: 50%;
  bottom: max(26px, calc(env(safe-area-inset-bottom) + 16px));
  z-index: 90;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(540px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 19px;
  border-left: 2px solid #a38557;
  color: #e3d7c1;
  background: rgba(11, 16, 16, 0.88);
  text-align: center;
  box-shadow: 0 7px 28px #0004;
  pointer-events: none;
}
.cinema-bark-speaker { font-size: 13px; line-height: 1.45; letter-spacing: 0.04em; }
.cinema-bark-translation { color: #b6b1a2; font-size: 12px; line-height: 1.45; }

@media (max-width: 700px) {
  .cinema-shell { --cinema-bar: clamp(40px, 8vh, 66px); }
  .cinema-skip { right: max(12px, env(safe-area-inset-right)); top: max(9px, env(safe-area-inset-top)); min-width: 112px; font-size: 12px; }
  .cinema-skip kbd { display: none; }
  .cinema-subtitle { bottom: calc(var(--cinema-bar) + 24px + env(safe-area-inset-bottom)); width: calc(100% - 28px); font-size: 16px; padding: 8px 12px; }
  .cinema-bark { bottom: calc(195px + env(safe-area-inset-bottom)); padding: 8px 12px; max-width: calc(100vw - 48px); }
}

@media (max-height: 480px) and (orientation: landscape) {
  .cinema-shell { --cinema-bar: 32px; }
  .cinema-skip { top: 7px; right: max(12px, env(safe-area-inset-right)); }
  .cinema-subtitle { bottom: 43px; font-size: 15px; padding: 5px 11px; width: min(610px, calc(100% - 100px)); }
  .cinema-bark { bottom: 16px; max-width: calc(100vw - 390px); }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-shell *, .cinema-bark { animation: none !important; transition: none !important; }
}
