
html[data-lang="de"] .lab .intro h1 > span[data-l="de"], html[data-lang="zh"] .lab .intro h1 > span[data-l="zh"], html[data-lang="en"] .lab .intro h1 > span[data-l="en"], html[data-lang="ja"] .lab .intro h1 > span[data-l="ja"] { display: inline; }
.lab .stage { background: radial-gradient(ellipse 46% 46% at 44% 57%, #565d69 0%, #2a2e35 42%, #111215 74%, #08080a 100%); touch-action: none; }
.lab.pad .stage { background: radial-gradient(ellipse 48% 48% at 50% 56%, #565d69 0%, #2a2e35 42%, #111215 74%, #08080a 100%); }
.lab .stage canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.lab .stage canvas.gl:active { cursor: grabbing; }
.load { position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%); font-size: 14px; line-height: 20px; color: var(--w2); text-align: center; transition: opacity .3s linear; max-width: 80%; }
.ready .load { opacity: 0; pointer-events: none; }

.frame { position: absolute; border: 1.5px solid var(--k); pointer-events: none; opacity: 0; transition: opacity .1s linear; z-index: 2; }
.frame.on { opacity: 1; }
.frame::before, .frame::after { content: ""; position: absolute; width: 8px; height: 8px; border: 0 solid var(--k); }
.frame::before { right: -1.5px; bottom: -1.5px; border-width: 0 4px 4px 0; }
.frame::after { right: -1.5px; top: -1.5px; border-width: 4px 4px 0 0; }
.frame .tab { position: absolute; left: -1.5px; bottom: 100%; margin-left: var(--dx, 0px); display: flex; background: var(--k); color: #000; font-size: 15px; line-height: 24px; padding-left: 8px; white-space: nowrap; }
.frame.below .tab { bottom: auto; top: 100%; }
.frame .tab b { font-weight: 400; margin-right: 8px; }
.frame .tab span { padding-right: 8px; }
.frame .tab i { font-style: normal; background: #000; color: var(--k); padding: 0 8px; font-size: 13px; }
.frame .tab i:empty { display: none; }
.frame.light .tab, .frame.light .tab i { color: #fff; }
.frame.held { border-width: 3px; }
.frame.held::before { right: -3px; bottom: -3px; }
.frame.held::after { right: -3px; top: -3px; }
.frame.held .tab { left: -3px; }

.lablist { position: fixed; right: calc(var(--fx) + var(--pad)); top: calc(var(--fy) + 84px); width: 380px; padding: 10px 14px 14px; background: rgba(0, 0, 0, .78); border-left: 3px solid var(--k); z-index: 3; }
.lablist h2 { margin: 0 0 8px; font: 400 15px/22px var(--mono); color: var(--k); }
.lablist ol { list-style: none; margin: -4px -12px; padding: 4px 12px; }
@media (min-width: 900px) { .lablist ol { max-height: max(160px, calc(var(--fh) - 340px)); overflow-y: auto; scroll-padding: 4px 0; scrollbar-width: thin; scrollbar-color: var(--k) transparent; } }
.lablist li a { display: grid; grid-template-columns: 4ch 1fr; column-gap: 12px; padding: 3px 8px; margin: 0 -8px; font-size: 18px; line-height: 26px; }
.lablist li a small { grid-column: 2; font-size: 13px; line-height: 18px; color: var(--w2); }
.lablist li a.free { color: rgba(244, 244, 241, .55); font-size: 15px; line-height: 22px; }
.lablist li a.on { background: var(--k); color: #000; }
.lablist li a.on small { color: rgba(0, 0, 0, .7); }
.lablist li a.free.on { background: #34343a; color: var(--w); }
.lablist.light li a.on:not(.free), .lablist.light li a.on:not(.free) small { color: #fff; }
.lablist li a:focus-visible, .lablist-go:focus-visible, .tools button:focus-visible { outline: 2px solid var(--w); outline-offset: 2px; }
.lablist-go { margin-top: 12px; display: inline-block; background: var(--k); color: #000; padding: 2px 12px; font-size: 15px; line-height: 24px; }
.lablist.light .lablist-go { color: #fff; }
.lablist-go:disabled { background: #34343a; color: rgba(244, 244, 241, .5); cursor: default; }
.lablist .note { margin: 10px 0 0; font-size: 13px; line-height: 19px; color: var(--w2); }
@media (prefers-reduced-motion: no-preference) {
  .nope .lablist-go { animation: nope .28s linear; }
  @keyframes nope { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
}
.leaving .lablist, .leaving .labtools, .leaving .tape, .leaving .credit, .leaving .frame { opacity: 0 !important; transition: opacity .2s linear; }

.tools { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tools button { border: 1px solid rgba(244, 244, 241, .55); padding: 1px 10px; font-size: 13px; line-height: 22px; }
.tools button i { font-style: normal; color: var(--y); margin-left: 6px; }
.labtools { position: fixed; right: calc(var(--fx) + var(--pad)); top: calc(var(--fy) + 84px); padding: 10px 14px 12px; background: rgba(0, 0, 0, .74); border-left: 3px solid var(--c); z-index: 3; }
.labtools .rows { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 18px; font-size: 13px; line-height: 20px; }
.labtools .rows dt { color: var(--w2); }
.labtools .rows dd { margin: 0; text-align: right; font-size: 18px; }

.tape { position: fixed; left: calc(var(--fx) + var(--pad)); right: calc(var(--fx) + var(--pad)); bottom: calc(var(--fy) + 88px); height: 74px; display: flex; align-items: stretch; gap: 12px; background: rgba(0, 0, 0, .55); padding-right: 10px; z-index: 3; }
.tape > b { flex: none; display: grid; place-items: center; padding: 0 12px; background: var(--r); color: #fff; font-weight: 400; font-size: 15px; }
.tape canvas { flex: 1; min-width: 0; height: 62px; align-self: center; display: block; }
.lab .bars { left: calc(var(--fx) + var(--pad)); right: calc(var(--fx) + var(--pad)); bottom: calc(var(--fy) + 24px); }
.credit { position: fixed; right: calc(var(--fx) + var(--pad)); bottom: calc(var(--fy) + 88px); margin: 0; max-width: calc(var(--fw) - 2 * var(--pad) - 470px); font-size: 12px; line-height: 20px; color: var(--w2); text-align: right; z-index: 3; }
.credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.credit a:hover, .credit a:focus-visible { color: var(--w); }
.lab.pad .credit { bottom: calc(var(--fy) + 172px); }

@media (max-width: 1099px) and (min-width: 900px) { .lablist { width: 320px; } }

@media (max-width: 899px) {
  .lab .stage, .lab.pad .stage { height: auto; background: radial-gradient(ellipse 78% 52% at 50% 56%, #565d69 0%, #2a2e35 44%, #111215 78%, #08080a 100%); }
  .lablist, .labtools { position: static; width: auto; margin: 10px var(--pad) 0; }
  .tape { position: static; margin: 10px var(--pad) 0; height: 66px; }
  .tape canvas { height: 56px; }
  .credit, .lab.pad .credit { display: none; }
  .lab .bars { margin-bottom: 14px; }
  .lablist li a:not(.free) { min-height: 44px; align-content: center; }
  .lablist-go { line-height: 40px; }
  .tools button { line-height: 40px; }
  .lablist { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 6px; }
  .lablist > * { flex: 0 0 100%; min-width: 0; }
  .lablist > ol { flex: 0 0 auto; width: calc(100% + 24px); }
  .lablist > .lablist-go, .lablist > .tools { flex: 0 0 auto; }
  .lablist-go { padding: 2px 10px; }
  .lablist .tools button { padding: 1px 8px; font-size: 12px; }
  .lablist ol { max-height: max(92px, calc(var(--vh, 100svh) - var(--rest, 420px))); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--k) transparent; }
}
@media print { .lablist, .labtools, .tape, .credit { display: none; } }

.lab.tapes .stage { background: #0a0a0c; }
.lab.tapes .stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 62% 56% at 44% 46%, #2c3038 0%, #17191d 46%, rgb(10 10 12 / 0) 80%); transition: opacity .5s linear; }
.pulled.lab.tapes .stage::before { opacity: 0; }
@media (min-width: 900px) { .lab.tapes .head .who, .lab.tapes .head .stat { background: rgba(8, 8, 10, .72); box-shadow: 0 0 0 6px rgba(8, 8, 10, .72); } }
.roll { display: flex; margin: 0; height: 1em; overflow: hidden; font-size: 64px; line-height: 1; color: var(--k); }
.roll .d { display: block; height: 1em; }
.roll .d u { display: block; white-space: pre; text-decoration: none; transform: translateY(calc(var(--d, 0) * -1em)); transition: transform .34s var(--ease); }
.lab.tapes .lablist-go { margin-top: 10px; }
.tapecard { display: none; margin-top: 10px; }
.tapecard .tools { margin-top: 0; }
.pulled .lablist-go { display: none; }
.pulled .tapecard { display: block; }
@media (min-width: 900px) { .lab.tapes .lablist { width: 260px; } }
@media (min-width: 900px) { .lab.tapes .credit { max-width: calc(var(--fw) - 2 * var(--pad) - 640px); } }
@media (prefers-reduced-motion: reduce) { .roll .d u { transition: none; } }

.lab.tapes .lablist, .lab.tapes .frame { --k: var(--w) !important; }
.lab.tapes .lablist.light .lablist-go, .lab.tapes .frame.light .tab, .lab.tapes .frame.light .tab i { color: #000; }

.lab.fenster .stage { background: #08080a; touch-action: auto; }
.lab.fenster .stage .werk { position: absolute; left: 50%; top: 166px; transform: translateX(-50%); width: min(var(--fw) - 2 * var(--pad), (var(--fh) - 166px - 94px) * 16 / 9); aspect-ratio: 16 / 9; display: block; border: 0; background: #000; }
@media (min-width: 900px) and (min-aspect-ratio: 19 / 10) {
  .lab.fenster .stage .werk { left: auto; right: var(--pad); top: 76px; transform: none; width: min(var(--fw) - 2 * var(--pad) - 430px - 16px, (var(--fh) - 76px - 94px) * 16 / 9); }
}
@media (max-width: 899px) {
  .lab.fenster .stage { background: #08080a; }
  .lab.fenster .stage .werk { left: 0; top: 0; transform: none; width: 100%; height: 100%; aspect-ratio: auto; background: #12110f; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .lab.fenster { display: block; padding: 0; overflow: hidden; }
  .lab.fenster > .head, .lab.fenster > .bars, .lab.fenster .ttl { display: none; }
  .lab.fenster .intro { position: fixed; left: 0; top: 0; width: 44px; margin: 0; }
  .lab.fenster .intro .blue.nav { min-width: 0; width: 44px; height: 44px; }
  .lab.fenster .intro .back { width: 44px; }
  .lab.fenster .stage { position: fixed; left: 44px; right: 0; top: 0; bottom: auto; width: auto; height: var(--vh, 100svh); min-height: 0; margin: 0; }
  .lab.fenster .stage .werk { left: 0; right: auto; top: 0; transform: none; width: 100%; height: 100%; aspect-ratio: auto; background: #12110f; }
}

@media (max-width: 899px) and (max-height: 600px) {
  .intro { margin-top: 6px; }
  .stage { margin-top: 6px; }
  .lablist, .labtools, .tape { margin-top: 6px; }
  .bars { margin-top: 8px; }
  .lab .bars, .werke .bars { margin-bottom: 10px; }
  .ticker { margin: 8px var(--pad) 10px; }
}
