
.werke { --tt-white: var(--w); --tt-yellow: var(--y); --tt-cyan: var(--c); --tt-green: var(--g); --tt-blue: var(--b); background: #000; }

.werke .stage { background: #000; }
.werke .scene { isolation: isolate;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.under { position: absolute; inset: 0; background-color: #fff; transition: background-color .7s linear; }
.plate { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.plate.lit { mix-blend-mode: multiply; }
.plate.dark { opacity: 1; transition: opacity .8s var(--ease); }
.is-on .plate.dark { opacity: 0; }
.mosaik-feld.lit { z-index: 3; background-color: inherit; isolation: isolate; }
.mosaik-feld.lit canvas { mix-blend-mode: multiply; }
.mosaik-feld.dark { z-index: 4; transition: opacity .8s var(--ease); }
.is-on .mosaik-feld.dark { opacity: 0; }

.tube { position: absolute; overflow: hidden; background: #000; filter: brightness(1.12); }
.chan { position: absolute; inset: 0; opacity: 0; }
.chan.on { opacity: 1; }
.chan img, .chan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.chan.px img { image-rendering: pixelated; }
.chan[data-ch="room"] video, .chan[data-ch="room"] img { filter: brightness(1.65) contrast(1.08) saturate(.85); }
.hud { position: absolute; left: 6%; top: 6%; z-index: 2; display: flex; align-items: center; gap: .46em; font: 400 max(26px, 11px / var(--s))/1 var(--mono); color: #fff; text-shadow: 0 1px 6px #000; }
.hud i { width: .46em; height: .46em; border-radius: 50%; background: #f33; }
.osd { position: absolute; right: 6%; top: 6%; font: 400 max(40px, 12px / var(--s))/1 var(--mono); color: var(--tt-green); text-shadow: 0 0 6px rgba(0, 0, 0, .9); opacity: 0; transition: opacity .25s linear; z-index: 4; }
.osd.show { opacity: 1; }
.noise { position: absolute; inset: -50%; z-index: 5; opacity: 0; pointer-events: none; background-size: 260px 260px; }
.zap .noise { opacity: 1; animation: grain .12s steps(2) infinite; }
.zap .chan { filter: brightness(1.5) contrast(.5) saturate(.2); }
@keyframes grain { 0% { transform: translate(0, 0); } 50% { transform: translate(-4%, 3%); } 100% { transform: translate(3%, -3%); } }
.chan.snow { background: #6f7377; overflow: hidden; }
.chan .schnee { position: absolute; inset: -50%; background-size: 230px 230px; pointer-events: none; }
.chan.on .schnee { animation: grain .12s steps(2) infinite; }
@media (prefers-reduced-motion: reduce) { .chan.on .schnee { animation: none; } }
.chan.bild { overflow: hidden; }
.chan.bild img { object-fit: contain; inset: 6% 7%; width: 86%; height: 88%; }
.chan.bild .schnee.leise { opacity: .16; }
.chan.bild .stab { position: absolute; aspect-ratio: 1; -webkit-mask: var(--strip) 0 0 / 800% 100% no-repeat; mask: var(--strip) 0 0 / 800% 100% no-repeat; }
.chan.bild.on .stab { animation: stab8 1.2s steps(8) infinite; }
@keyframes stab8 { to { -webkit-mask-position: 114.2857% 0; mask-position: 114.2857% 0; } }
@media (prefers-reduced-motion: reduce) { .chan.bild.on .stab { animation: none; } }

.tube { --s: .6; }
.doku video { object-position: 18% 50%; }
.bb { position: absolute; left: 56px; bottom: 166px; z-index: 2; }
.bb b, .bb small { display: block; width: max-content; clip-path: inset(0 100% 0 0); transition: clip-path .3s var(--ease); }
.bb b { padding: .12em .42em .18em; background: var(--tt-white); color: #000; font: 500 max(34px, 13px / var(--s))/1.24 var(--sans); }
.bb small { padding: .18em .64em .22em; background: var(--tt-blue); color: var(--tt-white); font: 400 max(22px, 11px / var(--s))/1.28 var(--mono); transition-delay: .09s; }
.bb-on .bb b, .bb-on .bb small { clip-path: inset(0); }
.tag { position: absolute; left: 56px; top: 42px; z-index: 2; padding: .1em .6em .14em; background: #000; color: var(--tt-white); font: 400 max(20px, 11px / var(--s))/1.3 var(--mono); visibility: hidden; }
.tag-on .tag { visibility: visible; }
.ut { position: absolute; left: 7%; right: 7%; bottom: 52px; z-index: 2; margin: 0; text-align: center; font: 400 max(34px, 12px / var(--s))/1.36 var(--mono); color: var(--tt-white); visibility: hidden; }
.ut span { padding: .09em .36em .11em; background: #000; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.doku.ut-on .ut { visibility: visible; }
.compact .bb { bottom: 56px; }
.compact .bb-on .ut { display: none; }
.compact .ut { left: 4%; right: 4%; font-size: max(28px, 11px / var(--s)); }

.power { position: absolute; inset: 0; z-index: 6; background: #000; pointer-events: none; }
.power::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: #fff; transform: scaleX(0); }
.is-on .power { animation: power-bg .55s linear forwards; }
.is-on .power::before { animation: power-line .55s var(--ease) forwards; }
@keyframes power-bg { 0%, 50% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes power-line { 0% { transform: scaleX(0); opacity: 1; } 45% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1) scaleY(200); opacity: 0; } }

.testcard { position: absolute; inset: 0; background: #1b1b1b; display: grid; grid-template-rows: 62% 10% 28%; }
.testcard .cb { display: grid; grid-template-columns: repeat(8, 1fr); }
.testcard .cb i:nth-child(1) { background: #f4f4f1; } .testcard .cb i:nth-child(2) { background: #ffff00; }
.testcard .cb i:nth-child(3) { background: #00ffff; } .testcard .cb i:nth-child(4) { background: #00ff00; }
.testcard .cb i:nth-child(5) { background: #ff00ff; } .testcard .cb i:nth-child(6) { background: #ff0000; }
.testcard .cb i:nth-child(7) { background: #0000ff; } .testcard .cb i:nth-child(8) { background: #000; }
.testcard .grey { display: grid; grid-template-columns: repeat(10, 1fr); }
.testcard .grey i { background: hsl(0 0% calc(var(--n) * 10%)); }
.testcard .label { display: grid; place-items: center; background: #000; color: var(--tt-white); font: 400 max(44px, 11px / var(--s))/1.15 var(--mono); text-align: center; padding: 0 4%; }
.sprite { position: absolute; left: 39%; top: 47%; width: 21%; aspect-ratio: 1; background-size: 400% 400%; image-rendering: pixelated; animation: idle 1.5s steps(1) infinite; filter: brightness(.82); }
@keyframes idle { 0% { background-position: 0 0; } 50% { background-position: -100% 0; } }

.tt { position: fixed; right: calc(var(--fx) + var(--pad)); top: calc(var(--fy) + 76px); bottom: calc(var(--fy) + 124px); width: min(520px, calc(var(--fw) * .4)); z-index: 3;
  display: flex; flex-direction: column; justify-content: center; font: 400 20px/28px var(--mono); pointer-events: none; }
.tt > * { pointer-events: auto; }
.tt-list { list-style: none; margin: -4px; padding: 4px; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--tt-yellow) transparent; }
.tt-list a { display: grid; grid-template-columns: 60px 1fr; padding: 6px 12px; }
.tt-list .no { color: var(--tt-yellow); font-variant-numeric: tabular-nums; }
.tt-list small { grid-column: 2; font-size: 15px; line-height: 20px; color: var(--tt-cyan); }
.tt-list a.on { background: var(--tt-white); color: #000; }
.tt-list a.on .no, .tt-list a.on small { color: #000; }
.tt-list a:focus-visible { outline: 2px solid var(--tt-yellow); outline-offset: 2px; }
.tt-list li.gap { height: 20px; }
.werke .stage { --lade-x: 29%; --lade-y: 46%; }
.tt-list .go { display: none; }
.tt-note { flex: none; min-height: 28px; margin: 12px 0 0; padding: 0 12px; color: var(--tt-green); }

.werke .bars { left: calc(var(--fx) + var(--pad)); right: calc(var(--fx) + var(--pad)); bottom: calc(var(--fy) + 24px); }

@media (min-width: 900px) and (max-height: 840px) {
  .tt-list a { padding: 3px 12px; }
  .tt-list li.gap { height: 8px; }
  .tt-note { margin-top: 6px; }
}
@media (min-width: 900px) and (pointer: coarse) {
  .tt-list a { min-height: 44px; align-content: center; }
}

@media (max-width: 899px) {
  html:has(body.werke) { background: #000; }
  .werke .stage { flex: none; height: clamp(170px, calc(var(--vh, 100svh) * .42), 360px); min-height: 0; touch-action: pan-x pan-y; }
  .werke .stage { --lade-x: 50%; --lade-y: 50%; }
  .werke .scene { transition: none; }
  .tt { position: static; width: auto; margin: 0; padding: 10px var(--pad) 0; font-size: 16px; line-height: 22px; display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
  .tt-list { --nc: 44px; --py: 4px; margin: 0; padding: 0; flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .tt-list::-webkit-scrollbar { display: none; }
  .tt-list.more-down { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent); }
  .tt-list.more-up { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30px); mask-image: linear-gradient(to bottom, transparent, #000 30px); }
  .tt-list.more-up.more-down { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30px, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 30px, #000 calc(100% - 30px), transparent); }
  .tt { position: relative; inset: auto; }
  .tt.more-down::after, .tt.more-up::before { content: ""; position: absolute; left: calc(50% - 7px); width: 13px; height: 7px; background: var(--tt-yellow); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h13v1H0zM1 1h11v1H1zM2 2h9v1H2zM3 3h7v1H3zM4 4h5v1H4zM5 5h3v1H5zM6 6h1v1H6z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h13v1H0zM1 1h11v1H1zM2 2h9v1H2zM3 3h7v1H3zM4 4h5v1H4zM5 5h3v1H5zM6 6h1v1H6z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; pointer-events: none; z-index: 1; }
  .tt.more-down::after { bottom: 1px; }
  .tt.more-up::before { top: 1px; transform: rotate(180deg); }
  .tt-list a { grid-template-columns: var(--nc) 1fr; padding: var(--py) 8px; min-height: 40px; align-content: center; }
  .tt-list a:not(.on) small { display: none; }
  .tt-list a:not(.on) .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tt-list a.on { min-height: 48px; }
  .tt-list a.on[data-ready="1"] { grid-template-columns: var(--nc) 1fr 56px; padding-right: 0; background: linear-gradient(to right, var(--tt-white) calc(100% - 60px), transparent calc(100% - 60px), transparent calc(100% - 56px), var(--tt-blue) calc(100% - 56px)); }
  .tt-list a.on[data-ready="1"] .t, .tt-list a.on[data-ready="1"] small { padding-right: 14px; }
  .tt-list a.on[data-ready="1"] .go { display: grid; place-items: center; grid-column: 3; grid-row: 1 / span 2; margin: calc(-1 * var(--py)) 0; }
  .tt-list .go svg { width: 14px; height: 26px; fill: var(--tt-yellow); }
  .tt-list small { font-size: 13px; line-height: 17px; }
  .tt-list li.gap { height: 8px; }
  .tt-note { flex: none; min-height: 0; margin-top: 4px; padding: 0 8px; }
  .tt-note:empty { display: none; }
  .werke .bars { margin-bottom: 14px; }
}

@media (min-width: 600px) and (max-width: 899px) {
  .tt { padding: 16px var(--pad) 0; font-size: 20px; line-height: 28px; }
  .tt-list { --nc: 60px; --py: 6px; }
  .tt-list a { padding: 6px 12px; }
  .tt-list a.on[data-ready="1"] { padding-right: 0; }
  .tt-list small { font-size: 15px; line-height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .plate.lit { transition: none; }
  .is-on .power, .is-on .power::before { animation: none; }
  .is-on .power { opacity: 0; visibility: hidden; }
  .zap .noise { animation: none; opacity: 0; }
  .zap .chan { filter: none; }
  .sprite { animation: none; }
}

@media print { html:has(body.werke), .werke { background: #fff; } .werke .stage { position: static; } .tt { position: static; width: auto; margin: 12pt; color: #000; } .tt-list .no, .tt-list small { color: #000; } }
