@font-face {
  font-family: Lemgo;
  src: url('../fonts/UnifrakturMaguntia-Book.ttf') format('truetype');
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #141315;
  --wood: #211e1d;
  --rule: #49413a;
  --gold: #dfb779;
  --paper: #f5eadb;
  --quiet: #c3b6a6;
  background: var(--ink);
  color: var(--paper);
  font: 16px/1.45 "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box }
body { margin: 0; padding: 0 clamp(14px,4vw,64px) 20px }
.mast, main { max-width: 1180px; margin-inline: auto }
.mast, .heading, .labelrow, .transport, .timeline, nav, .practice { display: flex; align-items: center }
.mast { justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--rule) }
.wordmark { font: 1.25rem Georgia,serif; letter-spacing: .03em }
.wordmark b { color: var(--gold); font-size: .9em; font-weight: 400 }
a { color: var(--quiet); text-underline-offset: 4px }
.mast a, footer a { font-size: .85rem }
.heading { justify-content: space-between; gap: 12px; margin: 18px 0 }
h1 { font: normal clamp(2.5rem,4.5vw,3.65rem)/1.06 Lemgo,Georgia,serif; margin: 0 }
nav { border: 1px solid var(--rule); border-radius: 8px; padding: 3px; background: #211f21 }
nav a { text-decoration: none; padding: 8px 20px; border-radius: 5px; color: var(--quiet); font-size: .94rem; font-weight: 600 }
nav a[aria-current="true"] { background: #ead5b4; color: #281c12 }
.theatre {
  display: grid; grid-template-columns: minmax(0,1fr) clamp(210px,24vw,315px);
  grid-template-areas: "stage device" "note device" "console console"; grid-template-rows: auto 1fr auto;
  column-gap: clamp(22px,3.6vw,54px); row-gap: 18px;
  padding: clamp(14px,2.2vw,28px); border: 1px solid var(--rule); border-radius: 14px;
  background: linear-gradient(135deg,#242122 0%,#1c1b1d 55%,#201d1d 100%);
}
.stage { grid-area: stage; min-width: 0 }
.device { grid-area: device; min-width: 0; display: flex; flex-direction: column }
.labelrow { justify-content: space-between; min-height: 32px; gap: 6px; margin-bottom: 6px }
.labelrow h2 { color: var(--quiet); font: 600 .86rem/1.35 "Segoe UI",sans-serif; margin: 0 }
#focusScreen, #focusPhone { background: transparent; color: var(--gold); border: 0; padding: 7px 0 7px 8px; font-size: .8rem }
#focusPhone { display: none }
.projection { overflow: hidden; aspect-ratio: 16/9; border-radius: 5px; background: #100e10 url(erzaehler.jpg) 50% 3.24786% / 105.2632% auto no-repeat; box-shadow: 0 0 0 1px #564c42 }
canvas { display: block; width: 100%; height: 100% }
.frame { width: min(100%, clamp(188px,32vh,276px)); margin: 0 auto; align-self: center; position: relative; overflow: hidden; aspect-ratio: 452/812; border-radius: 7% / 4%; background: #191719 }
.device .labelrow { width: min(100%, clamp(188px,32vh,276px)); align-self: center }
video { position: absolute; display: block; max-width: none; width: 141.59292%; height: auto; left: -20.79646%; top: -50.24631% }
#hotspot { position: absolute; transform: translate(-50%,-50%); width: 44px; height: 44px; padding: 0; border-radius: 50%; background: transparent; border: 0 }
.awaiting #hotspot { outline: 3px solid #ffcd76; background: #e2ad5938 }
.note { grid-area: note; align-self: start; max-width: 70ch }
#stepNumber { color: var(--gold); margin: 0 0 4px; font-size: .8rem; font-weight: 600 }
#stepTitle { font: normal clamp(1.4rem,2.45vw,2.1rem)/1.15 Georgia,serif; margin: 0 }
#caption { color: var(--quiet); margin: 7px 0 0; line-height: 1.55 }
.console { grid-area: console; border-top: 1px solid var(--rule); padding-top: 12px; min-width: 0 }
.timeline { gap: 16px }
#progress { flex: 1; min-width: 0; margin: 0; height: 22px; accent-color: var(--gold); cursor: pointer }
#clock { color: var(--quiet); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap }
.transport { gap: 7px; margin-top: 8px; flex-wrap: wrap }
button, select { color: var(--paper); font: inherit; cursor: pointer }
.primary, .skip, select { border: 1px solid #5d5145; border-radius: 6px; background: #292524; min-height: 42px }
.primary { min-width: 120px; padding: 7px 14px; background: #74382e; border-color: #ad6e56; font-weight: 600 }
.primary::before { content: '▶'; display: inline-block; font: 12px/1 "Segoe UI Symbol",sans-serif; margin-right: 8px }
.primary.playing::before { content: 'Ⅱ' }
.skip { width: 42px; font: 1.55rem/1 Georgia,serif }
select { max-width: 100%; padding: 5px 9px; margin-left: 6px }
.practice { margin-left: auto; gap: 8px; cursor: pointer; font-size: .9rem; min-height: 40px }
.practice input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold) }
button:disabled { opacity: .35; cursor: default }
button:hover:enabled, a:hover { filter: brightness(1.18) }
:focus-visible { outline: 3px solid #ffcd76; outline-offset: 3px }
#tip { margin: 8px 0 0; color: var(--gold); font-size: .88rem }
footer { margin: 14px 0; text-align: right }
.screen-large .theatre { grid-template-columns: 1fr; grid-template-areas: "stage" "note" "console" }
.screen-large .device { display: none }
.screen-large .projection { max-width: min(100%, 1050px); margin-inline: auto }
@media (min-width: 760px) and (max-height: 810px) {
  .mast { padding-block: 8px }.heading { margin-block: 12px }
  .theatre { padding: 16px 22px; row-gap: 12px }
  main, .mast { max-width: 1030px }
}
@media (max-width: 759px) {
  body { padding-inline: 12px }
  .mast { padding: 10px 1px }
  .heading { margin: 12px 0; flex-wrap: wrap }
  h1 { font-size: clamp(2.1rem,6vw,2.6rem) }
  nav a { font-size: .85rem; padding: 6px 12px }
  .theatre { grid-template-columns: minmax(0,1fr) minmax(132px,.87fr); grid-template-areas: "stage stage" "note device" "console console"; gap: 14px; padding: 13px }
  .device .labelrow,.frame { width: min(100%,180px) }
  #focusPhone { display: inline-block }
  .phone-large .theatre { grid-template-columns: 1fr; grid-template-areas: "device" "console" "note" "stage" }
  .phone-large .frame, .phone-large .device .labelrow { width: min(100%, 270px) }
  .labelrow { min-height: 26px; margin-bottom: 4px }
  .note { padding-top: 6px }
  #caption { font-size: .93rem }
  .console { padding-top: 8px }
  .transport { display: grid; grid-template-columns: minmax(0,1fr) 42px 42px; gap: 6px }
  .primary { min-width: 0 }
  select { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 2px 0 0 }
  .practice { grid-column: 1 / -1; margin: 0; min-height: 32px }
  .screen-large .theatre { grid-template-columns: 1fr }
}
@media (max-width: 360px) {
  .theatre { padding: 10px; column-gap: 9px }
  nav a { padding-inline: 8px }
}
