/* TL;DR block: RPG panel (the vector frame is a 9-slice: the corners keep their size, the edges stretch with the content) */
#tldr { padding-top: 10px; }
#tldr .tl-sub { margin: -4px 0 14px; color: var(--hi); font: 600 20px/1.2 "Pixelify Sans", monospace; }
.tl-tabs { display: flex; flex-wrap: nowrap; gap: 5px; margin: 0 0 -2px 8px; position: relative; z-index: 2; }
.tl-tab { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; font: 600 14px/1 "Pixelify Sans", monospace; color: var(--dim); background: #2a1c16; border: 2px solid #5a3a28; border-bottom: 0; padding: 11px 8px 9px; cursor: pointer; position: relative; top: 2px; transition: transform .16s cubic-bezier(.34,1.56,.64,1), color .15s; box-shadow: inset 0 2px 0 #4a3020; }
.tl-tab small { color: #7a6050; }
@media (hover: hover) { .tl-tab:hover { color: var(--fg); transform: translateY(-2px); } }
.tl-tab.on { color: #1e1418; background: var(--hi); border-color: var(--gold); transform: translateY(-4px); box-shadow: inset 0 2px 0 #fff6, 0 -4px 14px rgba(240,200,96,.25); }
.tl-tab.on small { color: #6a4030; }
.tl-tab::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: #5a3a28; }
.tl-tab.on::before { background: #c8443c; box-shadow: 0 0 6px #ff7a40; }
.tl-frame { border: 34px solid transparent; border-image: url(tldr-frame.svg) 130 60 130 60 / 40px 22px 26px 22px stretch; background: linear-gradient(#10121d, #0c0d16); box-shadow: 0 0 0 1px #2a2f4a, 0 12px 40px #0009; padding: 6px 10px 14px; margin-top: 0; }
.tl-main { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tl-items { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 7px; }
.pxb { font: 600 14px/1.25 "Pixelify Sans", monospace; color: var(--fg); background: #3a2a24; border: 0; padding: 0; cursor: pointer; text-align: left; position: relative; transform: translateY(0); box-shadow: 0 4px 0 #14100e, inset 0 0 0 2px #6a4a38, inset 0 2px 0 #8a6a52; transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s cubic-bezier(.34,1.56,.64,1), background .15s; }
@media (hover: hover) { .pxb:hover { transform: translateY(2px); box-shadow: 0 2px 0 #14100e, inset 0 0 0 2px #8a6a52, inset 0 2px 0 #a8845f; } }
.pxb:active, .pxb.on { transform: translateY(4px); box-shadow: 0 0 0 #14100e, inset 0 0 0 2px #c8963c, inset 0 3px 0 #1a1210; background: #2a1c16; }
.pxb:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
.tl-items { max-height: 62vh; overflow: auto; padding-right: 4px; gap: 4px; }
.pxb.item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; background: transparent; box-shadow: none; font-weight: 600; font-size: 13.5px; line-height: 1.25; transform: none; }
.pxb.item:hover, .pxb.item:active, .pxb.item.on { transform: none; box-shadow: none; background: transparent; }
.pxb.item .tt { color: var(--dim); }
.tl-items li.on .tt { color: #fff; }
.gb { flex: 0 0 18px; height: 18px; background: #8c8f99; border: 2px solid #1c1624; border-radius: 50%; opacity: .55; box-shadow: inset 0 2px 0 #b4b7c0, inset 0 -3px 0 #5e616b; transition: background .18s cubic-bezier(.34,1.56,.64,1), transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s; }
.pxb.item:hover .gb { opacity: .8; }
.tl-items li.on .gb { background: #f0c860; opacity: 1; transform: none; box-shadow: inset 0 2px 0 #fff3b0, inset 0 -3px 0 #c8963c, 0 0 10px 2px rgba(240,200,96,.7); }
.tl-sw { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px auto 0; max-width: 520px; }
.tl-sw .pxb { padding: 8px 14px; font-size: 13px; background: #5a4420; box-shadow: inset 0 2px 0 #7a6030, inset 0 -3px 0 #3e2e14, 0 0 0 2px #1c1624; border-radius: 4px; }
.tl-sw .pxb.on { background: #c8963c; box-shadow: inset 0 2px 0 #f0c860, inset 0 -3px 0 #8a5a1c, 0 0 0 2px #1c1624; color: #1e1418; transform: translateY(2px); }
.tl-knobs { display: flex; justify-content: center; gap: 22px; margin: 14px auto 0; max-width: 520px; }
.kn { display: grid; justify-items: center; gap: 5px; }
.kdial { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--c); background: #10121d; box-shadow: inset 0 0 0 3px #07070a, 0 4px 0 #05060a, 0 0 10px color-mix(in srgb, var(--c) 40%, transparent); position: relative; cursor: ns-resize; touch-action: none; padding: 0; }
.kdial i { position: absolute; left: 50%; top: 5px; width: 4px; height: 15px; background: var(--c); transform-origin: 50% 18px; transform: translateX(-50%) rotate(-135deg); }
.kdial:focus-visible { outline: 3px solid var(--hi); outline-offset: 3px; }
.kval { font: 600 12px/1 "Pixelify Sans", monospace; color: var(--dim); }
.tl-lcd { position: relative; background: #000; border: 3px solid #2a2f4a; border-radius: 10px; box-shadow: inset 0 0 0 2px #07070a, 0 0 0 2px #5b6c9c; aspect-ratio: 1 / 1; max-width: 520px; margin: 0 auto; overflow: hidden; }
.tl-lcd video { width: 100%; height: 100%; display: block; image-rendering: pixelated; object-fit: cover; }
.tl-cap { position: absolute; left: 8px; bottom: 8px; background: #000c; color: var(--hi); font: 600 12px/1 "Pixelify Sans", monospace; padding: 5px 8px; }
.tl-how { margin: 14px auto 0; max-width: 520px; }
.tl-hh { font: 600 13px/1 "Pixelify Sans", monospace; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.tl-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip { display: inline-flex; flex-direction: column; align-items: center; min-width: 46px; background: #1d2036; border: 2px solid #5b6c9c; box-shadow: 0 3px 0 #0a0b14; padding: 5px 9px 6px; }
.chip b { font: 700 15px/1.1 "Pixelify Sans", monospace; color: #fff; }
.chip small { font: 600 10px/1 "Pixelify Sans", monospace; color: var(--hi); text-transform: uppercase; margin-bottom: 3px; }
.chip.num { background: #3a2a24; border-color: var(--gold); }
.chip.num b { color: var(--hi); }
.plus { color: var(--dim); font-weight: 700; }
.tl-txt { font-size: 13px; color: var(--dim); flex-basis: 100%; }
@media (max-width: 860px) { .tl-main { grid-template-columns: 1fr; } .tl-frame { border-width: 26px; border-image-width: 28px 14px 18px 14px; padding: 4px 4px 10px; } .tl-tab { font-size: 13px; padding: 9px 10px 7px; } }
@media (prefers-reduced-motion: reduce) { .pxb, .tl-tab, .m-b { transition: none; } .m-b.lit { animation: none; } }

.tl-tab .ti { display: none; width: 22px; height: 22px; vertical-align: middle; }
.tl-tab .ti svg { width: 22px; height: 22px; display: block; }
.tl-tab::before { content: none; }
.tl-tab.on .ti { color: #c8443c; }
@media (max-width: 760px) {
  .tl-tab .tx { display: none; }
  .tl-tab .ti { display: inline-block; }
  .tl-tab { padding: 9px 4px 8px; }
  .tl-tab small { font-size: 11px; margin-left: 2px; }
  .tl-tabs { margin-left: 2px; }
}
@media (min-width: 761px) and (max-width: 1000px) { .tl-tab { font-size: 12px; padding: 10px 4px 8px; } .tl-tab small { display: none; } }

/* loading animation: four pixel squares chasing each other until the clip is playing */
.tl-load { position: absolute; inset: 0; display: none; place-items: center; background: rgba(6,6,12,.78); z-index: 3; }
.tl-lcd.loading .tl-load { display: grid; }
.tl-load { grid-template-columns: repeat(2, 14px); grid-auto-rows: 14px; gap: 6px; align-content: center; justify-content: center; }
.tl-load i { background: #f0c860; opacity: .25; animation: tlld 1s steps(1) infinite; }
.tl-load i:nth-child(2) { animation-delay: .25s; } .tl-load i:nth-child(4) { animation-delay: .5s; } .tl-load i:nth-child(3) { animation-delay: .75s; }
@keyframes tlld { 0% { opacity: 1; } 25% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .tl-load i { animation: none; opacity: .7; } }
