:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #080d18; color: #edf1fa; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
#player { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #080d18; }
header { padding: 10px 18px; display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
h1 { font-size: 16px; font-weight: 600; margin: 0; }
#scene-title { font-size: 14px; color: #aebbd0; }
#notice { width: 100%; margin: 0; padding: 8px 12px; border-radius: 6px; background: #3b2f12; border: 1px solid #a8822c; color: #fff3d6; font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#notice button { min-height: 32px; padding: 4px 10px; }
#stage { flex: 1; min-height: 100px; display: flex; }
#viewport { flex: 1; min-width: 0; position: relative; overflow: hidden; background: #030610; }
#viewport.zoomed { cursor: grab; touch-action: none; }
#viewport.dragging { cursor: grabbing; }
#picture { position: absolute; overflow: hidden; transform-origin: 0 0; visibility: hidden; }
iframe { position: absolute; border: 0; width: 1920px; height: 1080px; pointer-events: none; }
#caption { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); max-width: 90%; width: max-content; margin: 0; padding: 7px 12px; border-radius: 5px; background: #000e; color: white; font-size: clamp(14px, 2vw, 24px); text-align: center; white-space: pre-line; pointer-events: none; }
#status { position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content; max-width: 90%; padding: 12px 18px; background: #172035ed; border-radius: 8px; text-align: center; }
/* átirat: széles képernyőn a kép mellett, keskenyen alatta; a szöveg a böngésző nagyításával is nő */
#transcript { width: min(440px, 42vw); display: flex; flex-direction: column; background: #0d1424; border-left: 1px solid #2a3a57; font-size: 16px; line-height: 1.5; }
.tr-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid #2a3a57; }
.tr-head h2 { font-size: 16px; margin: 0 6px 0 0; }
#tr-search { flex: 1; min-width: 140px; font: inherit; font-size: 15px; color: inherit; background: #182338; border: 1px solid #465874; border-radius: 6px; padding: 6px 9px; }
.tr-follow { font-size: 13px; }
#tr-close { min-height: 32px; padding: 3px 9px; }
.tr-count { margin: 0; padding: 0 12px; font-size: 13px; color: #aebbd0; }
.tr-count:empty { display: none; }
#tr-now { padding: 10px 14px; background: #13203a; border-bottom: 1px solid #2a3a57; max-height: 40%; overflow: auto; font-size: 17px; }
#tr-now .now-label { margin: 0 0 4px; font-weight: 700; color: #9fdcff; }
#tr-list { position: relative; flex: 1; overflow: auto; padding: 4px 14px 24px; }
.tr-scene h3 { font-size: 16px; margin: 18px 0 6px; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.tr-scene h3 a { color: #9fdcff; text-decoration: none; }
.tr-scene h3 a:hover { text-decoration: underline; }
.tr-time { font-size: 12px; color: #8c9bb4; font-weight: 400; font-variant-numeric: tabular-nums; }
.pre { margin: 4px 0; padding: 4px 8px; border-left: 3px solid #e3b341; background: #2a2414; font-size: 15px; }
.goal { margin: 4px 0; }
.steps-title { margin: 6px 0 0; font-weight: 700; font-size: 14px; color: #aebbd0; }
.steps { margin: 4px 0 8px; padding-left: 24px; }
.cue { margin: 2px 0; padding: 2px 6px; border-radius: 4px; color: #d5dceb; }
.cue.now { background: #1d3557; color: #fff; }
.ct { min-height: 0; padding: 0 5px; font-size: 12px; font-variant-numeric: tabular-nums; background: transparent; border-color: #34465f; color: #8fb6d8; vertical-align: 1px; }
.hit { outline: 2px solid #e3b341; outline-offset: 1px; border-radius: 3px; }
#controls { padding: 10px 16px; background: #111a2b; }
.timeline, .buttons { display: flex; gap: 12px; align-items: center; }
.timeline { margin-bottom: 10px; }
.timeline label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#seek { flex: 1; min-width: 50px; }
#time { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.buttons { flex-wrap: wrap; }
label { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; }
button, select { font: inherit; color: inherit; background: #24324c; border: 1px solid #465874; border-radius: 6px; padding: 8px 10px; min-height: 38px; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
button[aria-pressed="true"] { background: #245e80; border-color: #63c6fb; }
:focus-visible { outline: 2px solid #70d1ff; outline-offset: 3px; }
input { accent-color: #70d1ff; }
#chapter { max-width: min(30vw, 320px); }
#volume { width: 90px; }
#player:fullscreen header h1, #player:fullscreen #scene-title { display: none; }
#player:fullscreen header:has(#notice[hidden]) { display: none; }
dialog { max-width: min(560px, 92vw); background: #111a2b; color: #edf1fa; border: 1px solid #465874; border-radius: 10px; padding: 18px 22px; line-height: 1.5; }
dialog::backdrop { background: #000a; }
dialog h2 { margin: 0 0 10px; font-size: 18px; }
dialog h3 { margin: 14px 0 4px; font-size: 15px; }
dialog dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
dialog dt { color: #aebbd0; }
dialog dd { margin: 0; }
dialog .keys { margin: 0; padding-left: 20px; font-size: 14px; }
dialog .note { font-size: 13px; color: #c8d2e3; }
kbd { font: inherit; font-size: 12px; padding: 1px 5px; border: 1px solid #5a6d8c; border-radius: 4px; background: #1b263b; }
@media (max-width: 900px) {
  #stage { flex-direction: column; }
  #transcript { width: auto; height: 46%; border-left: 0; border-top: 1px solid #2a3a57; }
}
@media (max-width: 600px) {
  header { padding: 8px 10px; gap: 4px; }
  #scene-title { width: 100%; font-size: 12px; }
  #controls { padding: 8px; }
  .timeline { gap: 6px; }
  .buttons { gap: 8px; }
  #chapter { max-width: 170px; }
  button, select { font-size: 13px; padding: 7px; }
  .volume { display: none; }
  #notice { font-size: 13px; padding: 6px 10px; }
}
