/* Big-screen mode (/?man-hinh=1): the dimming veil and its vertical fader, built by
   src/screen/screen-dimmer.js. The veil darkens everything in the stage, story intro (z 10) included —
   it is for a moment of stillness, not for reading; only the letter sheet (z 20) stays above it. */
.screen-dim {
  position: absolute;
  z-index: 15;
  inset: 0;
  background: #04050c;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease; /* the room darkens slowly, never with a jump */
}

.screen-dimmer {
  position: absolute;
  z-index: 16;
  top: calc(var(--safe-top, 0px) + 158px); /* under the QR toggle and the story chip */
  right: calc(env(safe-area-inset-right, 0px) + 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 44px;
  padding: 10px 0 8px;
  border-radius: 22px;
  background: rgb(var(--event-deep-rgb) / 0.72);
  box-shadow: inset 0 0 0 1px rgb(var(--event-gold-rgb) / 0.28), 0 10px 22px -14px rgba(0, 0, 0, 0.8);
  color: var(--title-color, #ebcb88);
  opacity: 0.85;
  transition: opacity 0.5s ease;
  backdrop-filter: blur(6px);
}

.screen-dimmer:hover, .screen-dimmer:focus-within { opacity: 1; }
/* Hidden after a few idle seconds so nothing glows in a dark room; any mouse move or key brings it back */
.screen-dimmer.is-idle:not(:hover):not(:focus-within) { opacity: 0; }
.screen-dimmer__icon { width: 18px; height: 18px; }

/* A real vertical range: writing-mode turns it upright, rtl puts the maximum (full light) on top */
.screen-dimmer__slider {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 22px;
  height: min(160px, 24vh);
  margin: 0;
  accent-color: var(--title-color, #ebcb88);
  cursor: ns-resize;
}

.screen-dimmer__slider:focus-visible { outline: 2px solid var(--accent, #d9b56e); outline-offset: 3px; border-radius: 4px; }

.screen-dimmer__readout {
  font: 600 10px/1 'Be Vietnam Pro', system-ui, sans-serif;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .screen-dim { transition-duration: 0.01s; }
}
