

@font-face {
  font-family: "TeMono";
  src: url("../../assets/fonts/temono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "TeMono";
  src: url("../../assets/fonts/temono-700.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: block;
}

@font-face { font-family: "FxSans";   src: url("../../assets/fonts/fx-sans-900.woff2")   format("woff2"); font-weight: 900; font-style: normal; font-display: block; }
@font-face { font-family: "FxArch";   src: url("../../assets/fonts/fx-arch-900.woff2")   format("woff2"); font-weight: 900; font-style: normal; font-display: block; }
@font-face { font-family: "FxButter"; src: url("../../assets/fonts/fx-butter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "FxBebas";  src: url("../../assets/fonts/fx-bebas-700.woff2")  format("woff2"); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: "FxHappy";  src: url("../../assets/fonts/fx-happy-400.woff2")  format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "Fxgrot";   src: url("../../assets/fonts/fx-grot-700.woff2")   format("woff2"); font-weight: 700; font-style: normal; font-display: block; }

:root {

  --accent: #22d3ee;
  --acc-rgb: 34, 211, 238;
  --faint-rgb: 126, 136, 163;

  --zone-c: #22d3ee;
  --zone-c-rgb: 34, 211, 238;

  --zone-g: #ffd479;
  --zone-a: #ffa34d;
  --zone-r: #ff5d5d;

  --zone-g-rgb: 255, 212, 121;
  --zone-a-rgb: 255, 163, 77;
  --zone-r-rgb: 255, 93, 93;

  --board: #0a0e1c;
  --bg: #05060f;
  --board-shadow: rgba(0, 0, 0, 0.95);
  --acc-halo: rgba(34, 211, 238, 0.04);
  --acc-line: rgba(34, 211, 238, 0.3);
  --ov-bg: rgba(5, 8, 16, 0.92);
  --top-h: 44px;


  --mono: "TeMono", ui-monospace, "SF Mono", Consolas, "Cascadia Mono", monospace;


  --fxm: "FxHappy", "Fxgrot", "Microsoft YaHei", sans-serif;
  --fxs: "FxHappy", "Fxgrot", "Microsoft YaHei", sans-serif;


  --b-freeze: 300ms;
  --b-row: 100ms;
  --b-drop: 120ms;
  --b-roll: 1100ms;
  --b-float: 1100ms;
  --b-sweep: 220ms;

  --fx: 1;
  --f-bump: calc(220ms * var(--fx));
  --f-pop: calc(180ms * var(--fx));
  --f-ton: calc(180ms * var(--fx));
  --f-best: calc(700ms * var(--fx));
  --f-pulse: calc(420ms * var(--fx));
  --f-roll: calc(140ms * var(--fx));
  --f-flt-in: calc(90ms * var(--fx));
  --f-flt-out: calc(420ms * var(--fx));
  --f-bw-in: calc(500ms * var(--fx));
  --f-bw-d: calc(200ms * var(--fx));
  --f-zblast: calc(240ms * var(--fx));
  --f-znm: calc(300ms * var(--fx));
  --f-ztip: calc(300ms * var(--fx));
  --f-zgold: calc(400ms * var(--fx));
  --f-zburn: calc(420ms * var(--fx));
  --f-breath: calc(1.2s * var(--fx));
  --f-spin: calc(2.4s * var(--fx));
  --f-flicker: calc(1.06s * var(--fx));
  color-scheme: dark;
}

:root[data-fxskin="0"] {
  --fxm: system-ui, -apple-system, "Microsoft YaHei", sans-serif;
  --fxs: system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
:root[data-fxskin="A"] {
  --fxm: "FxSans", "FxArch", "Microsoft YaHei", sans-serif;
  --fxs: "FxSans", "FxArch", "Microsoft YaHei", sans-serif;
}
:root[data-fxskin="B"] {
  --fxm: "FxButter", "FxBebas", "Microsoft YaHei", sans-serif;
  --fxs: "FxButter", "FxBebas", "Microsoft YaHei", sans-serif;
}
:root[data-fxskin="C"] {
  --fxm: "FxHappy", "Fxgrot", "Microsoft YaHei", sans-serif;
  --fxs: "FxHappy", "Fxgrot", "Microsoft YaHei", sans-serif;
}

.te-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.te-top {
  display: flex;
  align-items: center;
  height: var(--top-h);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 28, 0.6);
}

.te-top-in {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.te-pause {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.te-pause:disabled { opacity: 0.3; cursor: default; }
.te-pause svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.te-pause .te-pause-i--play { display: none; }
.te-pause.is-paused .te-pause-i--pause { display: none; }
.te-pause.is-paused .te-pause-i--play { display: block; }

.te-brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.te-mark {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 2.5px;
  background: linear-gradient(150deg, #d5ffef 0%, #4ce3b0 42%, #0f9d70 100%);
  box-shadow:
    inset 0.5px 0.5px 0 rgba(255, 255, 255, 0.5),
    inset -0.5px -0.5px 0 rgba(0, 0, 0, 0.28);
  transform: rotate(45deg);
}

.te-brand-en {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.te-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.te-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--top-h));
  min-height: calc(100dvh - var(--top-h));
  padding: 20px 16px;
}

.te-grid {
  display: grid;
  grid-template-columns: 200px auto 200px;
  gap: 24px;
  align-items: stretch;

  position: relative;
  margin: auto;
}

.te-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0;
  position: relative;
}

.te-side--l::after,
.te-side--r::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(var(--faint-rgb), 0) 0%,
    rgba(var(--faint-rgb), 0.3) 14%,
    rgba(var(--faint-rgb), 0.3) 86%,
    rgba(var(--faint-rgb), 0) 100%
  );
}

.te-side--l::after { right: -13px; }
.te-side--r::after { left: -13px; }

.te-side--l > .te-seg--read,
.te-side--l > .te-seg--best { margin-bottom: auto; }

.te-battle .te-side--l > .te-seg--zone { margin-bottom: auto; }

.te-grid .te-seg--sprite,
.te-grid .te-speed { display: none; }

@media (min-width: 721px) {

body.te-battle .te-grid { grid-template-columns: 240px auto 240px; }

body.te-rogue .te-grid { grid-template-columns: 240px auto 240px; }

body.te-battle .te-side--l,
body.te-battle .te-side--r {
  justify-content: flex-start;

  gap: 14px;

  min-height: var(--te-col-h, calc(100dvh - var(--top-h) - 40px));
}

body.te-battle .te-side--l > .te-seg--sprite { order: 1; }
body.te-battle .te-side--l > .te-seg--read   { order: 2; }
body.te-battle .te-side--l > .te-seg--zone   { order: 3; }
body.te-battle .te-side--l > .te-seg--next   { order: 4; }
body.te-battle .te-side--l > .te-seg--hold   { order: 5; }
body.te-battle .te-side--l > .te-seg--best   { order: 6; }
body.te-battle .te-side--l > .te-key--bar    { order: 7; }

body.te-battle .te-side--l > .te-seg--read,
body.te-battle .te-side--l > .te-seg--zone,
body.te-battle .te-side--l > .te-seg--best { margin-bottom: 0; }

body.te-battle .te-seg--sprite { display: flex; }

.te-sprite {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;

  border: 1px solid rgba(var(--faint-rgb), 0.14);
  background: #11131a;

  overflow: hidden;
}

.te-sprite-cv { display: block; width: 240px; height: 160px; }

.te-sprite-nm {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 6px 0 6px;
  border-radius: 0 0 9px 9px;

  background: linear-gradient(to top, rgba(5, 6, 15, 0.94) 62%, rgba(5, 6, 15, 0));
  text-align: center;

  font: 700 14px/1 "TeMono", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei",
         "Noto Sans SC", ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: rgba(var(--faint-rgb), 0.9);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.te-sprite-nm::before {
  content: '';
  position: absolute;
  left: 15%; right: 15%; top: 0;
  height: 1px;
  background: linear-gradient(to right,
    rgba(var(--faint-rgb), 0), rgba(var(--faint-rgb), 0.26), rgba(var(--faint-rgb), 0));
}

.te-sprite-nm--you {
  color: #c9d5e6;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-shadow: 0 0 8px rgba(201, 213, 230, 0.26), 0 1px 0 rgba(0, 0, 0, 0.55);
}

.te-sprite-nm--lv0 {
  color: #9fb0c4;
  text-shadow: 0 0 7px rgba(159, 176, 196, 0.22), 0 1px 0 rgba(0, 0, 0, 0.55);
}
.te-sprite-nm--lv1 {
  color: #d9a441;
  text-shadow: 0 0 7px rgba(217, 164, 65, 0.28), 0 1px 0 rgba(0, 0, 0, 0.55);
}
.te-sprite-nm--lv2 {
  color: #ff6b4a;
  text-shadow: 0 0 8px rgba(255, 107, 74, 0.38), 0 1px 0 rgba(0, 0, 0, 0.55);
}

body.te-battle .te-seg--read > .te-kpi--lead,
body.te-battle .te-seg--read > .te-kpi { display: none; }
body.te-battle .te-seg--read .te-kpi-row {
  grid-template-columns: 1fr;
  gap: 0;
}
body.te-battle .te-seg--read .te-kpi-row > .te-kpi:first-child { display: none; }
body.te-battle .te-seg--read .te-num--clock { font-size: 27px; letter-spacing: 0.01em; }

body.te-battle .te-seg--next .te-pv-i[data-q="3"] { display: none; }

body.te-battle .te-seg--next.te-pv--one .te-pv-i[data-q="2"] { display: none; }

body.te-battle .te-side--l .te-pv-i {
  box-sizing: border-box;
  height: var(--pv-h, 52px);
}
body.te-battle .te-side--l .te-pv-i--big {
  box-sizing: border-box;
  height: var(--pv-h, 96px);
}

body.te-battle .te-seg--next .te-pv {
  gap: 8px;
  border-radius: 10px;
  background: var(--board);
  box-shadow: 0 0 0 1px var(--line);

  overflow: hidden;
}
body.te-battle .te-seg--next .te-pv > .te-pv-i {
  border: 0;
  border-radius: 0;
  background: none;
}

body.te-battle .te-side--l > .te-seg--hold { margin-top: -6px; }

body.te-battle .te-seg--hold .te-pv-i,
body.te-rogue .te-seg--hold .te-pv-i {

  --hc: rgba(var(--faint-rgb), 0.4);
  border: 0;

  border-bottom: 2px solid var(--line);
  border-radius: 0;

  background-color: transparent;
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, var(--hc) 62%, var(--hc) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, var(--hc) 62%, var(--hc) 100%);
  background-size: 2px 38px, 2px 38px;
  background-position: left bottom, right bottom;
  background-repeat: no-repeat;
  outline: 0;
}

body.te-battle .te-seg--hold .te-pv-i--hold.has-block,
body.te-rogue .te-seg--hold .te-pv-i--hold.has-block {
  border-bottom-color: var(--accent);
  --hc: rgba(var(--acc-rgb), 0.5);
}

body.te-battle .te-seg--hold .te-pv-i--hold.has-block::before,
body.te-rogue .te-seg--hold .te-pv-i--hold.has-block::before { display: none; }

body.te-battle .te-side--l .te-zone-slot { height: 44px; }

body.te-battle .te-seg--next,
body.te-battle .te-seg--hold,
body.te-rogue .te-seg--next,
body.te-rogue .te-seg--hold { position: relative; }
body.te-battle .te-seg--next > .te-nm,
body.te-battle .te-seg--hold > .te-nm,
body.te-rogue .te-seg--next > .te-nm,
body.te-rogue .te-seg--hold > .te-nm {
  position: absolute;
  top: 9px;
  left: 11px;
  z-index: 2;
  color: var(--text-dim);
  pointer-events: none;
}

body.te-battle .te-side--l .te-pv-i::after,
body.te-rogue .te-side--l .te-pv-i::after {
  left: auto;
  right: 7px;
  top: 7px;
  opacity: 0.7;
}

body.te-battle .te-speed { display: block; margin-top: 6px; }
.te-speed {
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(var(--faint-rgb), 0.16);
}
.te-speed-fill {
  display: block;
  height: 100%;
  width: 5%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 500ms ease;
}

body.te-battle .te-seg--rival .te-nm--tight { display: none; }

body.te-battle .te-side--r { order: 0; }

.te-stage { align-self: start; }

}

.te-side--r { justify-content: flex-start; }

.te-seg { display: flex; flex-direction: column; gap: 8px; }

.te-seg--rival { gap: 6px; }

.te-seg--rival[hidden] { display: none; }

.te-battle .te-seg--keys,
.te-battle .te-seg--best { display: none; }

body.te-rogue .te-seg--best,
body.te-rogue .te-seg--zone { display: none; }

body.te-idle .te-seg--zone { display: none; }

body.te-old .te-seg--hold,
body.te-old .te-seg--zone { display: none; }

body.te-old .te-seg--next .te-pv-i[data-q="2"],
body.te-old .te-seg--next .te-pv-i[data-q="3"] { display: none; }

.te-rghud { display: none; }

.te-seg--mon { flex-direction: column; gap: 8px; }

.te-mon-fig {
  position: relative;
  border-radius: 9px;
  overflow: hidden;
  background: radial-gradient(120% 92% at 50% 12%,
    rgba(56, 70, 94, 0.55), rgba(7, 10, 18, 0.92) 72%);
  box-shadow: inset 0 0 0 1px rgba(var(--faint-rgb), 0.14);
}

.te-mon-fig canvas { display: block; width: 240px; height: 160px; margin: 0 auto; }

.te-mon-nm {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 5px 0 6px;
  background: linear-gradient(to top, rgba(5, 6, 15, 0.94) 64%, rgba(5, 6, 15, 0));
  text-align: center;
  font: 700 13px/1 "TeMono", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei",
        "Noto Sans SC", ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: #c9d5e6;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.te-mon-hp { display: flex; flex-direction: column; gap: 4px; }
.te-mon-hpbar {
  height: 7px;
  border-radius: 4px;
  background: rgba(var(--faint-rgb), 0.16);
  overflow: hidden;
}
.te-mon-hpbar > i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff5d5d, #ff9a5d);
  transition: width 0.18s ease;
}
.te-mon-hptx {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.06em;
  color: rgba(var(--faint-rgb), 0.92);
}

.te-mon-hptx em {
  font-style: normal;
  color: #22d3ee;
}

.te-mon-act { display: flex; align-items: center; gap: 9px; }
.te-mon-actnm {
  flex: none;
  font: 700 13px/1 "TeMono", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei",
        "Noto Sans SC", ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 0.14em;
  color: #e8eef7;
  transition: color 0.1s linear;
}
.te-mon-pips { display: flex; flex: 1; gap: 2px; }
.te-mon-pips i {
  flex: 1;
  height: 6px;
  border-radius: 1px;
  background: rgba(var(--faint-rgb), 0.18);
  transition: background 0.12s linear;
}
.te-mon-pips i.is-on { background: #4aa8ff; }
.te-mon-pips.is-red i.is-on { background: #ff5d5d; }

.te-mon-pips.is-near i.is-on { filter: brightness(1.85) saturate(1.35); }

.te-mon-pips.is-armed i.is-on { filter: brightness(2.1) saturate(1.4); }

@keyframes mon-jolt {
  0%   { transform: translate(0, 0); }
  18%  { transform: translate(-4px, 2px); }
  36%  { transform: translate(4px, -1px); }
  54%  { transform: translate(-3px, 1px); }
  72%  { transform: translate(2px, 0); }
  100% { transform: translate(0, 0); }
}
.te-seg--mon.is-fire .te-mon-fig { animation: mon-jolt 300ms ease-out; }

.te-seg--mon.is-fire .te-mon-actnm { color: #ffd166; }

.te-seg--mon.is-stun .te-mon-fig { filter: grayscale(0.55) brightness(0.72); }
.te-seg--mon.is-stun .te-mon-pips i.is-on { background: #7c8798; }
.te-seg--mon.is-stun .te-mon-actnm { color: #8b98ab; }
.te-seg--mon.is-stun .te-mon-txt { color: #8b98ab; }

.te-mon-dmg {
  position: absolute;
  left: 0; right: 0;
  top: 52%;
  text-align: center;
  font: 800 21px/1 "TeMono", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei",
        "Noto Sans SC", ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 0.04em;
  color: #ffd166;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
}
.te-mon-dmg.is-shield { color: #22d3ee; }
@keyframes mon-dmg {
  0%   { opacity: 0; transform: translateY(8px) scale(0.86); }
  16%  { opacity: 1; transform: translateY(0) scale(1.04); }
  30%  { transform: translateY(-2px) scale(1); }
  68%  { opacity: 1; transform: translateY(-18px); }
  100% { opacity: 0; transform: translateY(-30px); }
}
.te-mon-dmg.is-pop { animation: mon-dmg 640ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }

.te-mon-txt {
  min-height: 17px;

  white-space: pre-line;
  font: 600 12px/1.4 "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei",
        "Noto Sans SC", system-ui, sans-serif;
  letter-spacing: 0.04em;
  color: rgba(var(--faint-rgb), 0.92);
}
.te-mon-txt.is-did { color: #c9d5e6; }

@media (min-width: 721px) {

  body.te-rogue .te-rghud { display: flex; flex-direction: column; gap: 10px; }
  body.te-rogue .te-side--r { justify-content: flex-start; gap: 14px; }
}

body.te-rogue .te-seg--read,
body.te-rogue .te-seg--keys { display: none; }

body.te-rogue .te-side--l { justify-content: flex-start; gap: 12px; }

body.te-rogue .te-side--l > .te-seg--read,
body.te-rogue .te-side--l > .te-seg--best,
body.te-rogue .te-side--l > .te-seg--hold,
body.te-rogue .te-side--l > .te-seg--zone { margin: 0; }

body.te-rogue .te-side--l > .te-seg--sprite { order: 1; }
body.te-rogue .te-side--l > .te-seg--next   { order: 2; }
body.te-rogue .te-side--l > .te-seg--hold   { order: 3; }
body.te-rogue .te-side--l > .te-seg--relic  { order: 4; }
body.te-rogue .te-side--l > .te-key--bar    { order: 5; }

body.te-rogue .te-side--l > .te-seg--next { gap: 8px; }

.te-grid .te-seg--relic { display: none; }

.te-seg-head { display: flex; align-items: baseline; justify-content: space-between; }
.te-seg-tx {
  font: 700 11px/1 "TeMono", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei",
        "Noto Sans SC", ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 0.06em;
  color: rgba(var(--faint-rgb), 0.92);
}

body.te-rogue #teSpriteP .te-sprite {
  background: radial-gradient(120% 92% at 50% 14%,
    rgba(74, 92, 124, 0.62), rgba(9, 13, 24, 0.96) 72%);
}

.te-seg--relic { gap: 6px; }
.te-relic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.te-relic-grid i {
  position: relative;
  height: 76px;
  border-radius: 6px;
  border: 1px dashed rgba(var(--faint-rgb), 0.34);
  background: rgba(var(--faint-rgb), 0.06);
}

.te-relic-grid i.is-on {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: solid;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.10);
  color: #22d3ee;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.te-relic-grid i::before {
  content: attr(data-n);
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(var(--faint-rgb), 0.55);
}

.te-relic-grid i.is-multi::after {
  content: attr(data-left);
  position: absolute;
  top: 2px;
  right: 5px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: #22d3ee;
  opacity: .85;
}
.te-relic-grid i.is-on::before { color: rgba(34, 211, 238, 0.55); }

.te-relic-grid i.is-used {
  border-color: rgba(var(--faint-rgb), 0.30);
  background: rgba(var(--faint-rgb), 0.05);
  color: rgba(var(--faint-rgb), 0.62);
  box-shadow: none;
}
.te-relic-grid i.is-used::before { color: rgba(var(--faint-rgb), 0.34); }

.te-relic-grid i.is-pass {
  border-style: dashed;
  border-color: rgba(34, 211, 238, 0.30);
  background: rgba(34, 211, 238, 0.05);
  color: rgba(34, 211, 238, 0.55);
}
.te-relic-grid i.is-pass::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.55);
}

.te-relic-grid i.is-lock {
  border-style: dashed;
  border-color: rgba(var(--faint-rgb), 0.34);
  background: rgba(var(--faint-rgb), 0.05);
}
.te-relic-grid i.is-lock::after {
  content: "锁";
  position: absolute;
  right: 5px;
  bottom: 4px;
  font-size: 10px;
  line-height: 1;
  font-style: normal;
  color: rgba(var(--faint-rgb), 0.45);
}
.te-relic-grid i.is-sel {
  border-color: rgba(34, 211, 238, 0.95);
  box-shadow: 0 0 0 1.5px rgba(34, 211, 238, 0.55), 0 0 12px rgba(34, 211, 238, 0.22);
}
.te-relic-grid i.is-used.is-sel {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 1.5px rgba(34, 211, 238, 0.22);
}

.te-relic-grid i.is-no { animation: teRelicNo .32s ease-out; }
@keyframes teRelicNo {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  55% { transform: translateX(3px); }
  80% { transform: translateX(-1px); }
}

@media (min-width: 721px) {

  body.te-rogue #teSpriteP { display: flex; }

  body.te-rogue .te-grid .te-seg--relic { display: flex; }
}

.te-rival { position: relative; display: block; width: fit-content; align-self: center; }

.te-rival-board { display: block; width: 240px; height: 480px; }

.te-rival-hit {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ff5d5d;
  text-shadow: 0 0 8px rgba(255, 59, 78, 0.55);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.te-rival-hit.is-on { animation: te-rival-hit 1.5s ease-out both; }

@keyframes te-rival-hit {
  0%   { opacity: 0; transform: translate(-50%, -30%); }
  14%  { opacity: 1; transform: translate(-50%, -50%); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -78%); }
}

.te-nm {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.te-nm--tight {
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.te-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.te-kpi--lead { gap: 7px; }

.te-fig {
  font-family: var(--mono);
  font-size: 46px;
  font-weight: 800;
  line-height: 0.92;
  color: var(--text);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(var(--acc-rgb), 0.14);
}

.te-num {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.te-num b { font-weight: 600; }

.te-kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.te-num--clock { align-items: center; gap: 6px; }

.te-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
  flex: none;
}

.te-dot.on { background: var(--accent); animation: teDot 2.4s ease-in-out infinite; }

@keyframes teDot {
  0%, 100% { opacity: 0.22; }
  50% { opacity: 1; }
}

.te-best {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  transition: color 220ms var(--ease);
}

.te-best b {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-dim);
  transition: color 220ms var(--ease);
}

.te-best--tight {
  letter-spacing: 0.1em;
  font-size: 9px;
}

.te-best.is-new, .te-best.is-new b { color: var(--accent); }

.te-best.is-new::after {
  content: "";
  position: absolute;
  left: -4px;
  top: -2px;
  bottom: -2px;
  width: 34px;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(var(--acc-rgb), 0) 0%,
    rgba(var(--acc-rgb), 0.55) 50%,
    rgba(var(--acc-rgb), 0) 100%
  );
  animation: teBestSweep var(--f-best) var(--ease) 1 forwards;
}

@keyframes teBestSweep {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateX(96px); opacity: 0; }
}

.te-fig.is-bump { animation: teBump var(--f-bump) var(--ease); }

@keyframes teBump {
  0% { transform: translateY(0); }
  40% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

.te-num.is-pop { animation: tePop var(--f-pop) var(--ease); }

@keyframes tePop {
  0% { transform: scale(1); }
  42% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.te-seg--zone { gap: 0; }

.te-zone-nm {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + 0.1em), -50%);
  z-index: 2;
  display: block;
  padding: 2px 7px 1px;
  border-radius: 4px;
  background: rgba(4, 52, 44, 0.58);
  color: rgba(214, 236, 232, 0.92);
  text-shadow: 0 1px 3px rgba(2, 16, 14, 0.85);
  font-size: 10px;
  letter-spacing: 0.2em;
  line-height: 1.3;
  pointer-events: none;
  transition: color var(--f-ton) linear, text-shadow var(--f-ton) linear, background var(--f-ton) linear;
}

@property --te-slot-a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.te-zone-slot {
  position: relative;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;

  background: rgba(var(--faint-rgb), 0.22);
  box-shadow: inset 0 0 0 1px rgba(var(--faint-rgb), 0.45);
}

.te-zone-flow { display: block; width: 100%; height: 100%; }

.te-seg--zone.is-ready .te-zone-slot {
  box-shadow:
    inset 0 0 0 1px rgba(255, 212, 121, 0.75),
    0 0 12px rgba(255, 212, 121, 0.35);
}

.te-seg--zone.is-seg2 .te-zone-slot {
  animation: teZoneReady2 var(--f-breath) ease-in-out infinite;
}

@keyframes teZoneReady2 {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1.5px rgba(255, 212, 121, 0.78),
      0 0 16px rgba(255, 212, 121, 0.48);
  }
  50% {
    box-shadow:
      inset 0 0 0 1.5px rgba(255, 212, 121, 1),
      0 0 22px rgba(255, 212, 121, 0.68);
  }
}

.te-seg--zone.is-seg3 .te-zone-slot {
  animation:
    teZoneReady var(--f-breath) ease-in-out infinite,
    teZoneFlicker var(--f-flicker) steps(2, end) infinite;
}

.te-seg--zone.is-seg3 .te-zone-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  padding: 1.5px;

  background: conic-gradient(
    from var(--te-slot-a),
    var(--zone-g), var(--zone-c), #a78bfa, var(--zone-r), var(--zone-g)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: teSlotSpin var(--f-spin) linear infinite;
  pointer-events: none;
  z-index: 3;
}

@keyframes teSlotSpin { to { --te-slot-a: 360deg; } }

@keyframes teZoneFlicker {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.16); }
  100% { filter: brightness(1); }
}

.te-seg--zone.is-ready .te-zone-nm {
  color: var(--zone-g);
  background: rgba(46, 30, 4, 0.9);
  text-shadow: 0 0 10px rgba(255, 212, 121, 0.55);
  animation: teZoneNmReady var(--f-breath) ease-in-out infinite;
}

@keyframes teZoneReady {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 212, 121, 0.55),
      0 0 8px rgba(255, 212, 121, 0.2);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 212, 121, 1),
      0 0 20px rgba(255, 212, 121, 0.6);
  }
}

@keyframes teZoneNmReady {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

.te-seg--zone.is-on .te-zone-nm {
  color: var(--zone-g);
  background: rgba(48, 26, 4, 0.72);
  animation: teZoneNmFever calc(var(--f-breath) * 0.55) ease-in-out infinite;
}

@keyframes teZoneNmFever {
  0%, 100% { opacity: 0.82; text-shadow: 0 0 6px rgba(255, 176, 88, 0.45); }
  50%      { opacity: 1;    text-shadow: 0 0 13px rgba(255, 196, 120, 0.9); }
}

.te-seg--zone.is-on .te-zone-slot {
  animation: teZoneFever calc(var(--f-breath) * 0.55) ease-in-out infinite;
}

@keyframes teZoneFever {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 212, 121, 0.42),
      0 0 5px rgba(255, 140, 60, 0.16);
  }
  50% {
    box-shadow:
      inset 0 0 0 1.5px rgba(255, 212, 121, 0.95),
      0 0 15px rgba(255, 150, 70, 0.5);
  }
}

.te-seg--zone.is-danger .te-zone-slot {
  box-shadow:
    inset 0 0 0 1px rgba(255, 93, 93, 0.6),
    0 0 10px rgba(255, 93, 93, 0.3);
}

.te-seg--zone.is-danger .te-zone-nm { color: var(--zone-r); }

.te-seg--zone.is-on.is-danger .te-zone-slot {
  animation: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 93, 93, 0.6),
    0 0 10px rgba(255, 93, 93, 0.3);
}

.te-seg--zone.is-blast .te-zone-slot { animation: teZoneBlast var(--f-zblast) ease-out; }
.te-seg--zone.is-blast .te-zone-nm { animation: teZoneNmBlast var(--f-znm) ease-out; }

@keyframes teZoneBlast {
  0% { box-shadow: inset 0 0 0 1px #fff, 0 0 0 rgba(255, 212, 121, 0); }
  35% { box-shadow: inset 0 0 0 2px #fff, 0 0 26px rgba(255, 212, 121, 0.85); }
  100% { box-shadow: inset 0 0 0 1px rgba(255, 212, 121, 0.35), 0 0 0 rgba(255, 212, 121, 0); }
}

@keyframes teZoneNmBlast {
  0% { color: #fff; text-shadow: 0 0 2px #fff; }
  30% { color: #fff; text-shadow: 0 0 16px #fff, 0 0 30px rgba(255, 212, 121, 0.9); }
  100% { color: var(--zone-g); text-shadow: 0 0 8px rgba(255, 212, 121, 0.4); }
}

.te-zone-slot::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 12px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0;
  pointer-events: none;
}

.te-seg--zone.is-tip .te-zone-slot::after { animation: teZoneTip var(--f-ztip) ease-out; }

@keyframes teZoneTip {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

.te-seg--zone.is-golden .te-zone-slot { animation: teZoneGolden var(--f-zgold) ease-out; }

@keyframes teZoneGolden {
  0% { background: rgba(255, 212, 121, 0.3); }
  100% { background: rgba(var(--faint-rgb), 0.22); }
}

@media (max-width: 720px) {
  .te-side--r > .te-seg--zone {
    display: block;
    position: absolute;
    top: calc(33.333% + 102px);
    right: 0;

    width: var(--rail-real, var(--rail-w));
    height: 112px;
    z-index: 2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }


  .te-side--r > .te-seg--zone .te-zone-nm {
    font-size: 9px;
    letter-spacing: 0.06em;
    padding: 2px 3px 1px;
  }

  .te-side--r > .te-seg--zone .te-zone-slot {
    width: 100%;
    height: 112px;
    border-radius: 6px;

    container-type: inline-size;
  }

  @supports (font-size: 1cqw) {
    .te-side--r > .te-seg--zone .te-zone-nm {
      font-size: clamp(8px, 21cqw, 10px);
    }
  }


  body.te-demo .te-side--r > .te-seg--zone { height: 112px; }


  .te-seg--zone.is-ready .te-zone-slot,
  .te-seg--zone.is-seg2 .te-zone-slot,
  .te-seg--zone.is-seg3 .te-zone-slot {
    animation: none;
    box-shadow:
      inset 0 0 0 1.5px rgba(255, 212, 121, 0.8),
      0 0 6px rgba(255, 212, 121, 0.3);
  }
  .te-seg--zone.is-seg2 .te-zone-slot {
    animation: none;
    box-shadow:
      inset 0 0 0 1.5px rgba(255, 212, 121, 0.92),
      0 0 9px rgba(255, 212, 121, 0.42);
  }
  .te-seg--zone.is-seg3 .te-zone-slot {
    animation: teZoneFlicker var(--f-flicker) steps(2, end) infinite;
  }
}

.te-pv { display: flex; flex-direction: column; gap: 6px; }

.te-pv-i {
  position: relative;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--board);
  overflow: hidden;
}

.te-pv > .te-pv-i:nth-child(2) { opacity: 0.8; }
.te-pv > .te-pv-i:nth-child(3) { opacity: 0.58; }

.te-pv-i canvas { display: block; width: 100%; height: 100%; }

.te-pv-i::after {
  content: attr(data-q);
  position: absolute;
  left: 5px;
  top: 2px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
  color: var(--text-faint);
  opacity: 0.5;
}

.te-pv-i--hold { border-style: solid; border-color: transparent; }

.te-pv-i--hold::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) left top / 9px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) left top / 1px 9px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) right top / 9px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) right top / 1px 9px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) left bottom / 9px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) left bottom / 1px 9px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) right bottom / 9px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) right bottom / 1px 9px no-repeat;
  transition: background 180ms var(--ease);
}

.te-pv-i--hold.has-block { border-color: var(--line); }

.te-pv-i--hold.has-block::before {
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left top / 1px 14px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 1px 14px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 1px 14px no-repeat;
}

.te-pv-i--empty { border-style: dashed; border-color: var(--line-strong); }

.te-pv-i--hold.te-pv-i--empty::before { display: none; }

.te-pv-i--hold::after { content: none; }

.te-pv-i--big { width: 100%; height: 96px; }

.te-pv-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.te-pv-i--empty .te-pv-empty { display: flex; }

.te-klist {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
}

.te-kr {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1.05fr;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-faint);
}

.te-kg {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.te-kr kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 3px;
  background: rgba(var(--faint-rgb), 0.13);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1;
  color: var(--text-dim);
}

.te-kr kbd.kbd-lg { min-width: 26px; }

.te-kr kbd.kbd-space { min-width: 34px; letter-spacing: 0.04em; }

.te-kr kbd.kbd-esc { min-width: 24px; letter-spacing: 0; }

.te-kr kbd.kbd-gold {
  color: var(--zone-g);
  background: rgba(255, 212, 121, 0.14);
}

.te-kr b {
  font-weight: 400;
  color: var(--text-faint);
  margin-right: 4px;
}

.te-stage {
  position: relative;
  line-height: 0;
  border: 1px solid var(--acc-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--board);
  box-shadow:
    0 0 0 4px var(--acc-halo),
    0 30px 70px -36px var(--board-shadow);
}

.te-stage canvas { display: block; touch-action: none; }

.te-fx {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.te-main { position: relative; overflow: hidden; }

.te-wide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

.te-wide-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  box-sizing: border-box;
  border-radius: 50%;
  border: 6px solid var(--zone-g);
  opacity: 0;
  transform: translate(-50%, -50%);
  will-change: width, height, opacity;
  box-shadow: 0 0 32px rgba(255, 212, 121, 0.85),
              inset 0 0 26px rgba(255, 212, 121, 0.5);
}
.te-wide-ring[data-r="1"] { border-width: 4px; }
.te-wide-ring[data-r="2"] { border-width: 2.5px; }

.te-wide-surge {
  position: absolute;
  border-radius: 12px;
  opacity: 0;
}
.te-wide-surge.is-on { animation: teWideSurge 720ms ease-out forwards; }
@keyframes teWideSurge {
  0%   { opacity: 0; box-shadow: inset 0 0 0 rgba(255, 212, 121, 0); }
  12%  { opacity: 1; box-shadow: inset 0 0 96px rgba(255, 212, 121, 0.9); }
  100% { opacity: 0; box-shadow: inset 0 0 0 rgba(255, 212, 121, 0); }
}

.te-wide-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  mix-blend-mode: screen;
}
.te-wide-flash.is-on { animation: teWideFlash 220ms linear forwards; }
@keyframes teWideFlash {
  0%   { opacity: 0.97; }
  27%  { opacity: 0.78; }
  100% { opacity: 0; }
}

.te-burst {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
.te-burst.is-on { display: block; }

.te-zone {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 550ms ease-out;
}

.te-zone--outer {
  z-index: 2;
  background: radial-gradient(
    ellipse 66% 60% at 50% 48%,
    rgba(0, 0, 0, 0.86) 0%,
    rgba(0, 0, 0, 0.90) 55%,
    rgba(0, 0, 0, 0.94) 100%
  );
}

body.te-zone-on .te-aura {
  --aura-pink: 168, 170, 176;
  --aura-cyan: 186, 190, 198;
  --aura-violet: 150, 152, 162;
}

body.te-zone-on .te-aura,
body.te-zone-on .te-aura i,
body.te-zone-on .te-aura span { animation-play-state: paused; }

body.te-zone-on .te-zone { opacity: 1; }

body.te-zone-on { --board: #05070d; }

body.te-zone-on .te-main { z-index: 5; }
body.te-zone-on .te-top { z-index: 7; }

body.te-zone-on .te-side,
body.te-zone-on .te-pad { position: relative; z-index: 39; }

.te-zone-frame {
  position: absolute;
  inset: 0;
  z-index: 41;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 212, 121, 0.85),
    inset 0 0 26px rgba(255, 212, 121, 0.38),
    inset 0 0 64px rgba(255, 163, 77, 0.18);
  transition: opacity 550ms ease-out;
}
body.te-zone-on .te-zone-frame {
  animation: teZonePulse 2s ease-in-out infinite;
}
body.te-zone-hot .te-zone-frame {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.95),
    inset 0 0 14px rgba(255, 255, 255, 0.30),
    inset 0 0 38px rgba(226, 236, 255, 0.10);
  animation-duration: 1.35s;
}
@keyframes teZonePulse {
  0%, 100% { opacity: 0.42; }
  50%      { opacity: 0.95; }
}

.te-zone-flash {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 42;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.te-zone-flash.is-on { display: block; animation: teZoneHotFlash 120ms ease-out forwards; }
@keyframes teZoneHotFlash {
  0%   { opacity: 0.92; }
  35%  { opacity: 0.55; }
  100% { opacity: 0; }
}

body.te-zone-back .te-zone,
body.te-zone-back .te-zone-frame { transition-duration: 900ms; }
body.te-zone-back .te-side { transition-duration: 900ms; }

.te-side { transition: opacity 160ms linear; }
.te-grid.is-away .te-side { opacity: 0.12; }
body.te-zone-on .te-side { opacity: 0.78; }
body.te-zone-on .te-grid.is-away .te-side { opacity: 0.12; }

body.te-battle.te-zone-on .te-side { opacity: 0.92; }
body.te-battle.te-zone-on .te-grid.is-away .te-side { opacity: 0.92; }

body.te-burst-dark .te-side { opacity: 0.34; }
body.te-burst-dark .te-aura { opacity: 0.55; }
body.te-burst-dark .te-zone-frame { opacity: 0.92; }

.te-ov {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  transition: opacity 200ms var(--ease);
}

.te-ov.is-off { opacity: 0; pointer-events: none; }

.te-ov-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 20px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--ov-bg);
  text-align: center;
  line-height: 1.6;
}

.te-ov-t { font-size: 18px; font-weight: 600; color: var(--text); }

.te-ov-s { font-size: 12.5px; color: var(--text-dim); }

.te-sess {
  display: none;
  width: 100%;
  margin: 4px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  flex-direction: column;
  gap: 5px;
}

.te-sess.is-on { display: flex; }

.te-sess > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.te-sess dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

.te-sess dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.te-ov-hint {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.te-ov-hint.is-off { display: none; }

.te-ov-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.te-ov-btn { min-width: 96px; }

.te-ov-btn.is-pick {
  border-color: var(--acc-line);
  color: var(--accent);
  background: rgba(var(--acc-rgb), 0.08);
  box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), 0.18);
}

.te-ov-btn2 {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  box-shadow: none;
}

.te-ov-btn2:hover {
  color: var(--text);
  border-color: var(--acc-line);
}

.te-ov-btn2.is-off { display: none; }

.te-ov-rank {
  display: block;
  width: fit-content;
  margin: 12px auto 0;
  padding: 5px 12px;

  appearance: none;
  -webkit-appearance: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 150ms var(--ease), background 150ms var(--ease),
              border-color 150ms var(--ease);
}
.te-ov-rank:hover,
.te-ov-rank:focus-visible {
  color: var(--accent);
  background: rgba(var(--acc-rgb), 0.08);
  border-color: var(--acc-line);
}
.te-ov-rank.is-off { display: none; }

.te-rk {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.te-rk.is-on { display: flex; }

.te-rk-mask {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.72);
}

.te-rk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  max-height: 80vh;
  padding: 0;
  border: 1px solid var(--ov-rule-2);
  border-radius: var(--ov-r);
  background: var(--ov-plate);
  box-shadow: var(--ov-edge);
  overflow: hidden;

  outline: none;
}

.te-rk-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 34px;
  padding: 0 14px;
}

.te-rk-x {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 2px 4px;
  border-radius: var(--ov-r);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  color: var(--ov-faint);
  cursor: pointer;
  transition: color 140ms var(--ease), background 140ms var(--ease);
}
.te-rk-x:hover,
.te-rk-x:focus-visible { color: var(--ov-sig); background: rgba(91, 215, 255, 0.08); }

.te-rk-tabs {
  margin-top: 12px;
  padding: 0 16px;
}
.te-rk-tabs--sub { display: none; }
.te-rk-tabs--sub.is-on { display: block; }

.te-rk-tab {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 6px 8px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
  color: var(--ov-dim);
  cursor: pointer;
  transition: background 150ms var(--ease), box-shadow 150ms var(--ease),
    color 150ms var(--ease);
}

.te-rk-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ov-rule);
}

.te-rk-tab:last-of-type::after { display: none; }

.te-rk-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ov-faint);
}
.te-rk-tab-nm {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.te-rk-go {
  justify-self: end;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ov-faint);
  transition: transform 150ms var(--ease), color 150ms var(--ease);
}

.te-rk-tab:hover,
.te-rk-tab:focus-visible {
  outline: none;
  background: rgba(91, 215, 255, 0.04);
  box-shadow: inset 2px 0 0 var(--ov-sig);
  color: var(--ov-ink);
}
.te-rk-tab:hover .te-rk-no { color: var(--ov-sig); }
.te-rk-tab:hover .te-rk-go { transform: translateX(4px); color: var(--ov-sig); }

.te-rk-tab.is-on {
  background: rgba(91, 215, 255, 0.06);
  box-shadow: inset 2px 0 0 var(--ov-sig);
  color: var(--ov-ink);
}
.te-rk-tab.is-on .te-rk-no { color: var(--ov-sig); }
.te-rk-tab.is-on .te-rk-go { color: var(--ov-sig); }

.te-rk-tab--sub {
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
}

.te-rk-body {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 4px;
  padding: 0 16px 8px;
  overflow-y: auto;
}

.te-rk-g {
  display: grid;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 8px;
}
.te-rk-g--score { grid-template-columns: 28px minmax(0, 1fr) 58px 66px; }
.te-rk-g--mix { grid-template-columns: 28px minmax(0, 1fr) 54px 62px 34px; }
.te-rk-g--pair { grid-template-columns: 28px minmax(0, 1fr) 68px; }

.te-rk-g--solo { grid-template-columns: 28px minmax(0, 1fr) 58px 46px; }

.te-rk-th {
  padding: 5px 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ov-faint);
  border-bottom: 1px solid var(--ov-rule);
}

.te-rk-th > span:nth-child(n+3) { text-align: right; }

.te-rk-tr {
  position: relative;
  border-bottom: 1px solid var(--ov-rule);
  font-size: 13px;
}

.te-rk-tr.is-top { background: rgba(91, 215, 255, 0.06); box-shadow: inset 2px 0 0 var(--ov-sig); }

.te-rk-i {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ov-faint);
}
.te-rk-tr.is-top .te-rk-i { color: var(--ov-sig); }

.te-rk-tr.is-abu .te-rk-i {
  position: relative;
  padding-right: 7px;
}
.te-rk-tr.is-abu .te-rk-i::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ov-sig);
  opacity: 0.75;
}

.te-rk-n {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--ov-ink);
  font-variant-numeric: tabular-nums;
}
.te-rk-tr.is-top .te-rk-n { color: var(--ov-sig); }

.te-rk-v {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ov-dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.te-rk-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ov-faint);
  text-align: right;
}

.te-rk-tr--sk { border-bottom-color: transparent; }
.te-rk-sk {
  justify-self: end;
  height: 7px;
  border-radius: 2px;
  background: rgba(150, 190, 225, 0.12);
}
.te-rk-tr--sk > .te-rk-sk:nth-child(2) { width: 58%; max-width: 150px; justify-self: start; }
.te-rk-tr--sk > .te-rk-sk:nth-child(3) { width: 62%; }
.te-rk-tr--sk > .te-rk-sk:nth-child(4) { width: 74%; }
.te-rk-tr--sk > .te-rk-sk:nth-child(5) { width: 34%; }

.te-rk-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 9px 16px 11px;
  border-top: 1px solid var(--ov-rule);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ov-faint);
}
.te-rk-foot b { font-family: var(--mono); font-weight: 400; }

@media (max-width: 640px) {
  .te-rk { padding: 0; align-items: flex-end; }
  .te-rk-card {
    max-width: none;
    max-height: 88vh;
    border-radius: var(--ov-r) var(--ov-r) 0 0;
    border-bottom: 0;
    padding: 0 0 calc(4px + env(safe-area-inset-bottom, 0px));
  }
  .te-rk-body { padding: 0 14px 6px; }
  .te-rk-foot { padding: 9px 14px 10px; }
  .te-rk-g { gap: 7px; padding: 8px 2px; }
  .te-rk-g--score { grid-template-columns: 24px minmax(0, 1fr) 46px 56px; }
  .te-rk-g--mix { grid-template-columns: 24px minmax(0, 1fr) 42px 52px 30px; }
  .te-rk-g--pair { grid-template-columns: 24px minmax(0, 1fr) 60px; }
  .te-rk-g--solo { grid-template-columns: 24px minmax(0, 1fr) 46px 36px; }
  .te-rk-tab { min-height: 42px; gap: 10px; grid-template-columns: 34px minmax(0, 1fr) 18px; font-size: 14px; }
  .te-rk-tab--sub { min-height: 38px; font-size: 13.5px; }
}

.te-ov-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 4px;
}

.te-ov-list[hidden],
.te-ov-btns[hidden] { display: none; }

.te-pg {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  margin-top: 10px;
}

.te-pg:first-child { margin-top: 4px; }

.te-pg-nm {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.te-pg-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.te-pg-opts > .te-pg-btn { width: 100%; }

.te-pg--row .te-pg-opts { flex-direction: row; flex-wrap: wrap; }

.te-pg--row .te-pg-opts > .te-pg-btn { width: auto; }

.t-btn.te-pg-btn {
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.t-btn.te-pg-btn.is-pick {
  border-color: var(--acc-line);
  color: var(--accent);
  background: rgba(var(--acc-rgb), 0.08);
  box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), 0.18);
}

.te-pg--ab {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.t-btn.te-pg-btn--ab { padding: 0 14px; }

#teOvParams {
  max-height: calc(100dvh - 190px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.te-top-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.te-top-tag {
  font-family: var(--mono);
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

.te-tops {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.te-tops li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.te-tops li:last-child { border-bottom: 0; padding-bottom: 0; }

.te-tops li:first-child i,
.te-tops li:first-child b { color: var(--accent); }

.te-tops i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.te-tops b {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.te-tops em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.te-top-empty {
  margin: 12px 0 0;
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--text-faint);
}

.te-tops--empty { opacity: 0.5; }

.te-tops--empty li { border-bottom: 0; padding-bottom: 0; }

.te-tops--empty u {
  display: block;
  align-self: center;
  height: 1px;
  text-decoration: none;
  background: repeating-linear-gradient(
    90deg,
    rgba(var(--faint-rgb), 0.34) 0 3px,
    rgba(var(--faint-rgb), 0) 3px 8px
  );
}

.te-tops--empty em { min-height: 0; }

.te-tops--empty li:first-child i { color: var(--text-faint); }

.te-pad { display: none; }

.te-key {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--text-dim);
  font-family: var(--font);
  line-height: 1;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transition: background 120ms var(--ease), border-color 120ms var(--ease), transform 80ms var(--ease);
}

.te-key:active { background: var(--bg-elev-2); transform: translateY(1px); }

.te-key--rot {
  color: var(--accent);
  border-color: rgba(var(--acc-rgb), 0.3);
  background: rgba(var(--acc-rgb), 0.07);
}

.te-key--rot:active { background: rgba(var(--acc-rgb), 0.14); }

.te-key--hold {
  border-style: dashed;
  color: var(--text-faint);
}

.te-key--bar { display: none; }

@media (max-width: 720px) {
  html {
    --top-h: 44px;
    --rail-w: 32px;
    --rail-gap: 4px;
    --bar-h: 96px;

    --pad-m: 8px;
    --read-h: 24px;
    --read-gap: 6px;

  }


  .te-page {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
  }


  .te-pad,
  .te-key,
  .te-stage,
  .te-stage canvas { touch-action: none; }

  .te-top { height: var(--top-h); }
  .te-top-in { padding: 0 10px; gap: 8px; }


  .te-pause { display: flex; margin-left: auto; }

  .te-main {
    min-height: calc(100vh - var(--top-h));
    min-height: calc(100dvh - var(--top-h));

    padding: var(--pad-m);
    padding-top: calc(var(--pad-m) + var(--read-h) + var(--read-gap));

    position: relative;
  }


  .te-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: var(--rail-gap);

    margin: auto 0 0;
    position: relative;
  }

  .te-side::after { display: none; }

  .te-side {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1 0 0;
    min-width: var(--rail-w);
    gap: 0;
    padding: 0;
  }
  .te-side--l { order: 1; }
  .te-side--r { order: 3; }


  .te-stage {
    order: 2;
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: auto;
  }


  .te-pad { flex-shrink: 0; }


  .te-seg--best,
  .te-seg--top,
  .te-seg--keys { display: none; }


  .te-side--l > .te-seg--read {
    position: absolute;
    top: calc(-1 * (var(--read-h) + var(--read-gap)));

    left: 0;
    right: 0;
    height: var(--read-h);
    flex: none;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 4px;
    padding: 0;
  }

  .te-seg--read .te-kpi {
    flex-direction: column;
    align-items: flex-start;
    justify-self: start;
    gap: 1px;
    padding: 0;
    min-width: 0;
  }

  .te-seg--read .te-kpi:last-child { justify-self: start; }


  .te-seg--read .te-kpi-row {
    display: contents;
  }

  .te-seg--read .te-nm {
    font-size: 7px;
    line-height: 1.1;
    letter-spacing: 0.12em;
  }

  .te-seg--read .te-kpi::before { display: none; }
  .te-seg--read .te-fig {
    font-size: 14px;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: none;
  }
  .te-seg--read .te-num {
    font-size: 13px;
    line-height: 1;
    letter-spacing: -0.01em;

    gap: 0;
  }

  .te-seg--read .te-num--clock { display: flex; align-items: center; gap: 4px; }

  .te-seg--read .te-dot { width: 3.5px; height: 3.5px; opacity: 0.6; }


  .te-side--r > .te-seg--next {
    position: absolute;
    right: 0;
    top: 33.333%;
    transform: translateY(-50%);

    width: var(--rail-real, var(--rail-w));
    flex: none;
    flex-direction: column;
    gap: 0;
  }

  .te-seg--next .te-nm,
  .te-seg--hold .te-nm {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 4px);
    font-size: 7px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-align: center;
    opacity: 0.72;
  }
  .te-pv { flex-direction: column; gap: 6px; }
  .te-pv > .te-pv-i { width: 100%; height: 56px; border-radius: 6px; }
  .te-pv-i::after { font-size: 7px; left: 2px; top: 1px; opacity: 0.42; }

  .te-pv > .te-pv-i:nth-child(2) { opacity: 0.82; }
  .te-pv > .te-pv-i:nth-child(3) { opacity: 0.62; }


  .te-side--l > .te-seg--hold {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);

    width: var(--rail-real, var(--rail-w));
    flex: none;
  }


  .te-side--l > .te-seg--rival {
    position: absolute;
    left: 0;
    top: 0;
    width: min(40px, calc(var(--rail-real, var(--rail-w)) - 4px));
    flex: none;
  }

  .te-seg--rival .te-nm { display: none; }
  .te-rival { width: 100%; }
  .te-rival-board { width: 100%; height: auto; }
  .te-rival-hit { font-size: 11px; }

  .te-pv-i--big { width: 100%; height: 56px; }


  .te-pv-i--empty .te-pv-empty { display: none; }


  .te-key--bar {
    display: flex;
    flex: none;
    width: 100%;
    height: var(--bar-h);
    font-size: 14px;
    letter-spacing: 0.06em;
  }
  .te-key--bar.te-key--hold { font-size: 11px; letter-spacing: 0; }


  .te-pad {
    display: grid;
    grid-template-columns: 1fr 1fr 20px 1fr 8px 1fr;
    grid-template-rows: 46px;
    order: 4;
    margin: 8px 0 auto;
  }
  .te-key[data-te="left"] { grid-area: 1 / 1; }
  .te-key[data-te="right"] { grid-area: 1 / 2; }
  .te-key[data-te="drop"] { grid-area: 1 / 4; }
  .te-key[data-te="rot"] { grid-area: 1 / 6; }


  .te-pad .te-key { height: 100%; font-size: 16px; }

  .te-ov { padding: 14px 10px; }
  .te-ov-panel { padding: 15px 16px; gap: 6px; }
  .te-ov-t { font-size: 15px; }
  .te-ov-s { font-size: 12px; }
  .te-ov-hint { font-size: 10px; line-height: 1.6; }

  .te-ov-btn { min-width: 74px; padding-left: 12px; padding-right: 12px; }
}

.te-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.te-top,
.te-main {
  position: relative;
  z-index: 1;
}

.te-top {
  border-bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(4, 6, 14, 0.9) 0%,
    rgba(4, 6, 14, 0.5) 62%,
    rgba(4, 6, 14, 0) 100%
  );
}

.te-side--l::after,
.te-side--r::after {
  display: none;
}

.te-stage {

  border-color: rgba(150, 180, 225, 0.16);

  box-shadow:
    0 0 38px -12px rgba(150, 180, 230, 0.24),
    0 0 96px -44px rgba(130, 160, 220, 0.26),
    0 40px 80px -60px #000;
}

@media (prefers-reduced-motion: reduce) {
  .te-mark { animation: none; }
}

@media (min-width: 721px) {
  .te-nm { letter-spacing: 0.34em; }
  .te-fig { text-shadow: 0 0 28px rgba(34, 211, 238, 0.22); }
  .te-kpi--lead .te-fig { color: #ffffff; }
}

body.te-page {
  background:
    radial-gradient(ellipse 94% 80% at 50% 36%, #0c1428 0%, #070c18 40%, #03050c 100%);
  background-attachment: fixed;
}

.te-stage {
  overflow: visible;
}

#teBoard {
  border-radius: 9px;
}

.te-refl {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: block;
  pointer-events: none;
  border-radius: 0 0 9px 9px;

  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.24) 46%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.24) 46%,
    rgba(0, 0, 0, 0) 100%
  );
}

@media (max-width: 720px) {
  .te-refl { display: none; }
}

body.te-page {

  background:
    radial-gradient(ellipse 128% 44% at 50% -10%, rgba(28, 46, 80, 0.62) 0%, rgba(0, 0, 0, 0) 72%),
    radial-gradient(ellipse 128% 38% at 50% 110%, rgba(22, 34, 62, 0.55) 0%, rgba(0, 0, 0, 0) 70%),
    #03050c;
  background-attachment: fixed;
}

.te-gear {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(9, 18, 30, 0.5);
  color: #8fa0bd;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 160ms, border-color 160ms, background 160ms;
}

.te-gear svg { display: block; width: 15px; height: 15px; }

.te-gear:hover {
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(14, 28, 44, 0.7);
}

@media (max-width: 720px) {
  .te-gear { display: none; }
}

.te-ov-set {
  display: none;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: transparent;
  color: #94a3bd;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 720px) {
  .te-ov-set {
    display: inline-flex;
    margin-top: 2px;
  }
  .te-ov-set[hidden] { display: none; }
}

.te-set[hidden] { display: none; }

.te-set {
  position: fixed;
  inset: 0;

  z-index: 100;
  display: flex;
  justify-content: flex-end;
}

.te-set-mask {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.6);
  opacity: 0;
  transition: opacity 220ms ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.te-set.is-open .te-set-mask { opacity: 1; }

.te-set-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 322px;
  max-width: 90vw;
  height: 100%;
  padding: 16px 18px 22px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0a1120 0%, #070c16 78%, #05080f 100%);
  border-left: 1px solid rgba(96, 212, 255, 0.16);
  box-shadow: -40px 0 90px -50px #000;
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(.3, 0, .2, 1);
  will-change: transform;
}

.te-set.is-open .te-set-panel { transform: translateX(0); }

.te-set-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
}

.te-set-t {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #eaf1ff;
}

.te-set-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8fa0bd;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.te-set-x svg { display: block; width: 16px; height: 16px; }
.te-set-x:hover { background: rgba(255, 255, 255, 0.06); color: #eaf1ff; }

.te-set-sec {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 13px 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.te-set-nm {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6f7f9c;
}

.te-set-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 22px;
}

.te-set-lb {
  flex: none;
  width: 58px;
  font-size: 12.5px;
  color: #c3cfe4;
}

.te-set-val {
  flex: none;
  width: 26px;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #8fa0bd;
}

.te-set-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
}

.te-set-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.65);
}

.te-set-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.65);
}

.te-set-sw {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 160ms, border-color 160ms;
}

.te-set-sw i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(228, 238, 255, 0.48);
  transition: transform 160ms ease, background 160ms;
}

.te-set-sw.is-on {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.5);
}

.te-set-sw.is-on i {
  transform: translateX(18px);
  background: var(--accent);
}

.te-set-ver {
  margin: auto 0 0;
  padding-top: 8px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #55637d;
}

.te-set [hidden] { display: none !important; }

@media (max-width: 720px) {
  .te-set {
    align-items: flex-end;
    justify-content: center;
  }

  .te-set-panel {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 78vh;
    padding: 14px 15px calc(18px + env(safe-area-inset-bottom));
    border-left: 0;
    border-top: 1px solid rgba(96, 212, 255, 0.16);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }

  .te-set.is-open .te-set-panel { transform: translateY(0); }

  .te-set-lb { width: 52px; }
  .te-set-sec { gap: 10px; padding: 12px 12px 14px; }
}

.te-burst-dim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--board);
  opacity: 0;

  transition: opacity calc(var(--b-freeze, 300ms) * 0.4) linear;
}

.te-burst-dim.is-on { opacity: 0.65; }

@keyframes teNukeBloom {

  0% {
    box-shadow: 0 0 0 7px rgba(4, 6, 14, 0.88),
                0 0 0 11px var(--acc-halo),
                0 0 130px 22px rgba(255, 212, 121, 0.9),
                0 0 280px 78px rgba(255, 212, 121, 0.46);
  }
  10% {
    box-shadow: 0 0 0 7px rgba(4, 6, 14, 0.88),
                0 0 0 11px var(--acc-halo),
                0 0 100px 16px rgba(255, 212, 121, 0.66),
                0 0 210px 52px rgba(255, 212, 121, 0.30);
  }
  55% {
    box-shadow: 0 0 0 7px rgba(4, 6, 14, 0.88),
                0 0 0 11px var(--acc-halo),
                0 0 66px 10px rgba(255, 212, 121, 0.34),
                0 0 150px 32px rgba(255, 212, 121, 0.15);
  }
  100% {
    box-shadow: var(--stage-ring);
  }
}
html.is-nuking .te-stage {
  animation: teNukeBloom var(--nuke-ms, 1600ms) cubic-bezier(0.1, 0.72, 0.2, 1) both;
}

.te-wipe-dim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms var(--ease);
  -webkit-backdrop-filter: saturate(0.42) brightness(1.06);
  backdrop-filter: saturate(0.42) brightness(1.06);
}
.te-wipe-dim.is-on { opacity: 1; }
html.is-stage-wipe .te-stage {
  transform: scale(1.02);
  transition: transform 320ms var(--ease);
}

.is-burst-pulse {
  animation: teBurstPulse var(--f-pulse) cubic-bezier(0.16, 0.9, 0.24, 1);
}

@keyframes teBurstPulse {
  0% { transform: scale(1); }
  18% { transform: scale(1.015); }
  60% { transform: scale(1.004); }
  100% { transform: scale(1); }
}

.te-zone-fire {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 3;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: 1px solid rgba(255, 212, 121, 0.65);
  border-radius: 999px;
  background: rgba(28, 20, 6, 0.86);
  color: var(--zone-g);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 18px rgba(255, 212, 121, 0.35);
  animation: teZoneFireBreath var(--f-breath) ease-in-out infinite;
}

.te-zone-fire:active { transform: translateX(-50%) scale(0.96); }

@keyframes teZoneFireBreath {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 212, 121, 0.28); opacity: 0.9; }
  50% { box-shadow: 0 0 24px rgba(255, 212, 121, 0.6); opacity: 1; }
}

@media (max-width: 720px) {
  .te-zone-fire.is-ready { display: inline-flex; }
}

.te-top,
.te-side,
.te-pad {
  transition: filter var(--f-flt-out) ease-out;
}

html.is-zone-burst .te-top,
html.is-zone-burst .te-side,
html.is-zone-burst .te-pad {
  filter: grayscale(1) saturate(0.5) brightness(0.88);
  transition-duration: var(--f-flt-in);
}

.te-num.is-roll,
#teScore.is-roll {
  color: var(--zone-g);
  animation: teScoreRoll var(--f-roll) linear infinite;
}

@keyframes teScoreRoll {
  0% { text-shadow: 0 0 10px rgba(255, 212, 121, 0.85), 0 0 22px rgba(255, 212, 121, 0.4); }
  50% { text-shadow: 0 0 16px rgba(255, 212, 121, 1), 0 0 32px rgba(255, 212, 121, 0.55); }
  100% { text-shadow: 0 0 10px rgba(255, 212, 121, 0.85), 0 0 22px rgba(255, 212, 121, 0.4); }
}

.te-burst-words {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}

.te-bw-big {
  font-family: var(--mono);

  font-size: clamp(34px, 8.2vh, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff8e6;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 18px rgba(255, 212, 121, 0.85),
    0 0 46px rgba(255, 163, 77, 0.45),
    0 2px 0 rgba(0, 0, 0, 0.45);
}

.te-bw-sub {
  font-family: var(--mono);
  font-size: clamp(11px, 1.5vh, 14px);
  font-weight: 500;
  letter-spacing: 0.24em;
  color: rgba(255, 236, 200, 0.82);
  text-shadow: 0 0 12px rgba(255, 212, 121, 0.4);
}

.te-burst-words.is-on {

  animation: teBwFloat var(--bw-ms, var(--b-float, 1400ms)) cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

.te-burst-words.is-on .te-bw-sub {
  animation: teBwSubIn var(--f-bw-in) ease-out var(--f-bw-d) backwards;
}

@keyframes teBwFloat {
  0%   { opacity: 0; transform: translateY(6px) scale(0.85); }
  11%  { opacity: 1; transform: translateY(0) scale(1); }
  86%  { opacity: 1; transform: translateY(-46px) scale(1); }
  100% { opacity: 0; transform: translateY(-56px) scale(1); }
}

@keyframes teBwSubIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

.te-fever {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
  font-family: var(--mono);
  font-size: clamp(30px, 7vh, 62px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
  color: #ffe9bd;
  text-shadow:
    0 0 18px rgba(255, 212, 121, 0.9),
    0 0 46px rgba(255, 163, 77, 0.5),
    0 2px 0 rgba(0, 0, 0, 0.45);
}

.te-fever.is-on {
  animation: teFeverIn var(--fw-ms, 800ms) cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

.te-ready {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  will-change: opacity;
}

.te-ready-num {
  font-family: var(--mono);
  font-size: clamp(64px, 18vh, 148px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #eaf4ff;
  text-shadow:
    0 0 22px rgba(150, 200, 255, 0.85),
    0 0 66px rgba(90, 150, 240, 0.55),
    0 4px 0 rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.te-ready.is-resume .te-ready-num { font-size: clamp(38px, 10vh, 84px); letter-spacing: 0.14em; }

.te-ready.is-on { opacity: 1; }

.te-ready-prev {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  opacity: 0;
}
.te-ready-prev.is-out { animation: teReadyHandoff 260ms ease-out forwards; }

.te-ready .te-ring {
  position: absolute;

  inset: 0;
  margin: auto;

  width: min(34vmin, 58%);
  height: min(34vmin, 58%);
  border-radius: 50%;
  border: 1.5px solid rgba(178, 212, 255, 0.72);
  opacity: 0;
  pointer-events: none;
}
.te-ready .te-scan {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 62vmin;
  max-width: 92%;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg,
    rgba(190, 225, 255, 0) 0%,
    rgba(190, 225, 255, 0.9) 50%,
    rgba(190, 225, 255, 0) 100%);
}
.te-ready .te-shut {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 2px;
  opacity: 0;
  transform: scaleX(0);
  background: linear-gradient(90deg,
    rgba(255, 225, 170, 0) 0%,
    rgba(255, 225, 170, 0.95) 50%,
    rgba(255, 225, 170, 0) 100%);
}

.te-ready.is-beat .te-ready-num:not(.te-ready-prev) { animation: teReadyNumIn 160ms cubic-bezier(0.16, 0.9, 0.24, 1) both; }
.te-ready.is-beat .te-ring--1 { animation: teReadyRing 520ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.te-ready.is-beat .te-ring--2 { animation: teReadyRing 520ms cubic-bezier(0.2, 0.7, 0.3, 1) 120ms forwards; }
.te-ready.is-beat .te-ring--3 { animation: teReadyRing 520ms cubic-bezier(0.2, 0.7, 0.3, 1) 240ms forwards; }
.te-ready.is-beat .te-scan { animation: teReadyScan 420ms ease-out forwards; }

.te-ready.is-go .te-ready-num {
  color: #ffe9bd;
  text-shadow:
    0 0 24px rgba(255, 212, 121, 0.95),
    0 0 72px rgba(255, 163, 77, 0.6),
    0 4px 0 rgba(0, 0, 0, 0.5);
}

.te-ready.is-go .te-ready-num:not(.te-ready-prev) {
  animation: teReadyGo 620ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.te-ready.is-go .te-ring--1 { animation: teReadyRing 520ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.te-ready.is-go .te-ring--2 { animation: teReadyRing 520ms cubic-bezier(0.2, 0.7, 0.3, 1) 90ms forwards; }
.te-ready.is-go .te-ring--3 { animation: teReadyRing 520ms cubic-bezier(0.2, 0.7, 0.3, 1) 180ms forwards; }
.te-ready.is-go .te-shut { animation: teReadyShut 260ms cubic-bezier(0.16, 0.9, 0.24, 1) forwards; }

.te-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.te-flash.is-on { animation: teFlash 120ms ease-out; }

@keyframes teReadyNumIn {
  0%   { opacity: 0; transform: scale(2.4); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes teReadyHandoff {
  0%   { opacity: 0.4; transform: translateY(0); }
  100% { opacity: 0;   transform: translateY(-12px); }
}

@keyframes teReadyRing {
  0%   { opacity: 0.9; transform: scale(0.35); }
  100% { opacity: 0;   transform: scale(1.9); }
}

@keyframes teReadyScan {
  0%   { opacity: 0;    transform: translateY(-64px); }
  12%  { opacity: 1;    transform: translateY(-40px); }
  100% { opacity: 0;    transform: translateY(64px); }
}

@keyframes teReadyShut {
  0%   { opacity: 0;   transform: scaleX(0); }
  25%  { opacity: 0.95; transform: scaleX(1); }
  100% { opacity: 0;   transform: scaleX(1); }
}

@keyframes teReadyGo {
  0%   { opacity: 0;   transform: scale(0.86, 1.25); }
  18%  { opacity: 1;   transform: scale(1.04, 0.98); }
  45%  { opacity: 1;   transform: scale(1, 1); }
  100% { opacity: 0;   transform: translateY(-18px) scale(1, 1); }
}

@keyframes teFlash {
  0%   { opacity: 0; }
  30%  { opacity: 0.06; }
  100% { opacity: 0; }
}

@keyframes teFeverIn {
  0%   { opacity: 0; transform: scale(0.88); letter-spacing: 0.3em; }
  13%  { opacity: 1; transform: scale(1); }
  72%  { opacity: 1; transform: translateY(-12px); }
  100% { opacity: 0; transform: translateY(-28px); }
}

.te-seg--read.is-bursting .te-kpi:not(.te-kpi--lead) { opacity: 0.4; transition: opacity 200ms linear; }

.te-lv {
  font-size: 26px;
  position: relative;
  overflow: hidden;

  align-self: flex-start;
}

.te-lv b {
  display: inline-block;
  font-weight: 600;
  transition: color 400ms linear, text-shadow 400ms linear;
}

.te-lv.is-lv0 b { color: #4a5568; }
.te-lv.is-lv1 b { color: #7b8794; }
.te-lv.is-lv2 b { color: var(--text); }
.te-lv.is-lv3 b {
  color: #b8e4f2;
  text-shadow: 0 0 8px rgba(var(--acc-rgb), 0.18);
}
.te-lv.is-lv4 b {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(var(--acc-rgb), 0.4);
  animation: teLvBreath 3.2s ease-in-out infinite;
}
.te-lv.is-lv5 b {
  color: #9df4ff;
  text-shadow: 0 0 12px rgba(var(--acc-rgb), 0.55), 0 0 26px rgba(var(--acc-rgb), 0.2);
  animation: teLvBreath 2.4s ease-in-out infinite;
}

.te-lv.is-lv6 b {
  color: #f2feff;
  text-shadow:
    0 0 12px rgba(var(--acc-rgb), 0.7),
    0 0 30px rgba(var(--acc-rgb), 0.35),
    1px 0 0 rgba(var(--acc-rgb), 0.9),
    -1px 0 0 rgba(var(--acc-rgb), 0.9);
  animation: teLvBreath 1.8s ease-in-out infinite;
}

@keyframes teLvBreath {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

.te-lv::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, transparent 18%, rgba(255, 255, 255, 0.9) 50%, transparent 82%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.te-lv.is-sweep::after { animation: teLvSweep 380ms ease-out; }

@keyframes teLvSweep {
  0% { opacity: 1; transform: translateX(-70%); }
  100% { opacity: 0; transform: translateX(70%); }
}

.te-fig { position: relative; display: inline-block; }

.te-fig.is-big { animation: teScoreBig 300ms var(--ease); }

@keyframes teScoreBig {
  0% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.te-fig.is-big::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 28%, rgba(255, 255, 255, 0.6) 50%, transparent 72%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: teScoreSweep 340ms ease-out;
}

@keyframes teScoreSweep {
  0% { transform: translateX(70%); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translateX(-70%); opacity: 0; }
}

body.te-demo {
  --top-h: 0px;
  overflow: hidden;
}

body.te-demo .te-top { display: none; }

body.te-demo .te-main {
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 8px;
}

body.te-demo .te-grid {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

body.te-demo .te-side--r,
body.te-demo .te-pad,
body.te-demo .te-seg--hold,
body.te-demo .te-seg--best,
body.te-demo .te-key--bar,
body.te-demo .te-kpi-row { display: none; }

body.te-demo .te-side--l {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  height: 40px;
  padding: 0;
}

body.te-demo .te-seg--read {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  margin: 0;
}

body.te-demo .te-kpi {
  flex-direction: row;
  align-items: baseline;
  gap: 7px;
}

body.te-demo .te-fig { font-size: 26px; letter-spacing: -0.02em; }
body.te-demo .te-lv b { font-size: 24px; }
body.te-demo .te-nm { font-size: 9px; letter-spacing: 0.26em; }

body.te-demo .te-seg--zone {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
}

body.te-demo .te-seg--read.is-bursting .te-kpi:not(.te-kpi--lead) { opacity: 1; }

.te-lv-sweep {
  position: absolute;
  z-index: 3;
  overflow: hidden;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
}

.te-lv-sweep::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 120px;
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0) 0%,
    rgba(34, 211, 238, 0.35) 34%,
    rgba(255, 255, 255, 0.72) 50%,
    rgba(34, 211, 238, 0.35) 66%,
    rgba(34, 211, 238, 0) 100%
  );
  mix-blend-mode: screen;
  transform: translateY(-120px);
}

.te-lv-sweep.is-on { opacity: 1; }

.te-lv-sweep.is-on::before {
  animation: teLvBand var(--b-sweep, 220ms) cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
}

@keyframes teLvBand {
  0%   { transform: translateY(-120px); }
  100% { transform: translateY(var(--sweep-h, 300px)); }
}

.zlab {
  flex: 0 0 320px;
  width: 320px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid rgba(150, 180, 225, 0.14);
  background: #070b14;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(206, 218, 240, 0.86);
  -webkit-font-smoothing: antialiased;
}

.zlab.is-fold {
  flex-basis: 56px;
  width: 56px;
}

.zlab.is-gone { display: none; }

.zlab-fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(150, 180, 225, 0.24);
  border-radius: 10px;
  background: rgba(7, 11, 20, 0.92);
  color: rgba(206, 218, 240, 0.8);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.zlab-fab:hover { color: #fff; border-color: rgba(34, 211, 238, 0.55); }
.zlab-fab[hidden] { display: none; }

.zlab-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 34px;
  padding: 0 8px 0 12px;
  border-bottom: 1px solid rgba(150, 180, 225, 0.1);
}

.zlab-t {
  flex: 1 1 auto;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  font-weight: 700;
  color: rgba(126, 136, 163, 0.85);
  white-space: nowrap;
  overflow: hidden;
}

.zlab.is-fold .zlab-t { display: none; }

.zlab-r {
  flex: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(126, 136, 163, 0.7);
  white-space: nowrap;
  cursor: help;
}

.zlab.is-fold .zlab-r { display: none; }

.zlab-fold {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(150, 180, 225, 0.18);
  border-radius: 4px;
  background: transparent;
  color: rgba(206, 218, 240, 0.7);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.zlab-fold:hover { color: #fff; border-color: rgba(150, 180, 225, 0.4); }

.zlab-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zlab.is-fold .zlab-body {
  padding: 6px 6px 10px;
  gap: 6px;
  overflow-y: auto;
}

.zlab.is-fold .zlab-meas,
.zlab.is-fold .zlab-h,
.zlab.is-fold .zlab-row,
.zlab.is-fold .zlab-defrow,
.zlab.is-fold .zlab-rate,
.zlab.is-fold .zlab-reset,
.zlab.is-fold .zlab-snd { display: none; }

.zlab-meas {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(150, 180, 225, 0.12);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 10.5px;
  line-height: 34px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
}

.zlab-meas b {
  font-size: 14px;
  font-weight: 700;
  color: #d8e6ff;
}

.zlab-meas i {
  font-style: normal;
  color: rgba(126, 136, 163, 0.9);
}

.zlab-meas .zlab-diff { margin-left: auto; color: rgba(126, 136, 163, 0.9); }
.zlab-meas .zlab-diff.is-off { color: #ffa34d; }

.zlab-grid {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.zlab.is-fold .zlab-grid {
  grid-template-columns: 1fr;
  gap: 4px;
}

.zlab-key {
  height: 32px;
  padding: 0 2px;
  border: 1px solid rgba(150, 180, 225, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(216, 230, 255, 0.9);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
}

.zlab.is-fold .zlab-key {
  height: 26px;
  font-size: 9px;
  letter-spacing: 0;
}

.zlab-key:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.5);
  color: #fff;
}

.zlab-key:active { transform: translateY(1px); }

.zlab-key.is-ghost {
  border-style: dashed;
  border-color: rgba(150, 180, 225, 0.12);
  background: transparent;
  color: rgba(126, 136, 163, 0.4);
  cursor: default;
}

.zlab-key.is-ghost:hover { background: transparent; border-color: rgba(150, 180, 225, 0.12); color: rgba(126, 136, 163, 0.4); }

.zlab-h {
  flex: none;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: rgba(126, 136, 163, 0.8);
  border-top: 1px solid rgba(150, 180, 225, 0.1);
  padding-top: 8px;
}

.zlab-defrow {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: -2px;
  font-size: 9px;
  letter-spacing: 0.02em;

  color: rgba(150, 162, 184, 0.9);
  line-height: 1.3;
}

.zlab-defrow b {
  font-weight: 600;
  color: rgba(198, 210, 232, 0.98);
  font-variant-numeric: tabular-nums;
}

.zlab-defrow .is-off b { color: #e8b25c; }

.zlab-def-b {
  margin-left: auto;
  flex: none;
  padding: 1px 6px;
  border: 1px solid rgba(150, 180, 225, 0.22);
  border-radius: 4px;
  background: transparent;
  color: rgba(150, 165, 195, 0.85);
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.zlab-def-b:hover { border-color: rgba(34, 211, 238, 0.5); color: #22d3ee; }
.zlab-def-b:active { transform: translateY(1px); }

.zlab-row {
  flex: none;
  display: grid;
  grid-template-columns: 56px 1fr 52px;
  align-items: center;
  gap: 8px;
  height: 22px;
  font-size: 10.5px;
}

.zlab-row > span { color: rgba(126, 136, 163, 0.95); white-space: nowrap; }

.zlab-row > b {
  font-weight: 600;
  font-size: 11px;
  text-align: right;
  color: #d8e6ff;
  font-variant-numeric: tabular-nums;
}

.zlab-row > b.is-auto { color: rgba(126, 136, 163, 0.95); font-weight: 400; }

.zlab-rate {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.zlab-rate-b {
  position: relative;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(150, 180, 225, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(206, 218, 240, 0.86);
  font: inherit;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.zlab-rate-b:hover { border-color: rgba(150, 180, 225, 0.42); color: #fff; }
.zlab-rate-b:active { transform: translateY(1px); }

.zlab-rate-b.is-on {
  border-color: rgba(34, 211, 238, 0.65);
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.1);
}

.zlab-rate-b.is-def::after {
  content: '';
  position: absolute;
  right: 3px;
  top: 3px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(126, 136, 163, 0.85);
  pointer-events: none;
}

.zlab-skin .zlab-rate-b { font-size: 12px; line-height: 1; }
.zlab-skin [data-s="A"] { font-family: "FxSans", "FxArch", sans-serif; font-weight: 900; }
.zlab-skin [data-s="B"] { font-family: "FxButter", "FxBebas", sans-serif; }
.zlab-skin [data-s="C"] { font-family: "FxHappy", "Fxgrot", sans-serif; }

#zlabLang { grid-template-columns: repeat(3, 1fr); }
#zlabLang .zlab-rate-b { font-size: 11px; letter-spacing: 0; }

.zlab-row input[type="range"] {
  width: 100%;
  height: 14px;
  margin: 0;
  accent-color: #22d3ee;
  background: transparent;
  cursor: pointer;
}

.zlab-reset,
.zlab-snd {
  flex: none;
  height: 28px;
  border: 1px solid rgba(150, 180, 225, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(206, 218, 240, 0.86);
  font: inherit;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.zlab-reset:hover,
.zlab-snd:hover { border-color: rgba(150, 180, 225, 0.42); color: #fff; }

.zlab-snd.is-on { color: #22d3ee; border-color: rgba(34, 211, 238, 0.45); }

.zlab-note {
  flex: none;
  margin: 0;
  font-size: 9.5px;
  line-height: 1.7;
  color: rgba(126, 136, 163, 0.7);
}

:root {

  --id-max: #E8B74A;
  --id-hell: #c1272d;
  --id-glow: transparent;
  --id-glow-far: transparent;

  --id: transparent;

  --clk-p: 0.86;
}

body.te-id-max {
  --id: var(--id-max);
  --id-glow: rgba(232, 183, 74, 0.45);
  --id-glow-far: rgba(232, 183, 74, 0.20);
}
body.te-id-hell {
  --id: var(--id-hell);
  --id-glow: rgba(193, 39, 45, 0.48);
  --id-glow-far: rgba(193, 39, 45, 0.22);
}

body.te-id-max .te-stage::after,
body.te-id-hell .te-stage::after {
  content: none;
}

@media (prefers-reduced-motion: reduce) {

  #teOv[data-layer="welcome"] #teOvBtn { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.te-id-max .te-stage::after,
  body.te-id-hell .te-stage::after {
    opacity: 0.92;
  }
}

#teBoard,
#teRefl,
#teFx {
  transition: filter 160ms var(--ease);
}

body.te-blur #teBoard,
body.te-blur #teRefl,
body.te-blur #teFx {
  filter: blur(8px);
}

@media (prefers-reduced-motion: reduce) {
  #teBoard,
  #teRefl,
  #teFx {
    transition: none;
  }
}

body.te-blur #teOv.te-ov {
  background: rgba(5, 8, 16, 0.96);

  transition: opacity 200ms var(--ease), background-color 200ms var(--ease);
}

body.te-blur .te-pv-i::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: rgba(5, 8, 16, 0.94);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  body.te-blur .te-ov { transition: none; }
}

@media (min-width: 721px) {
  body.te-sprint .te-kpi--lead .te-fig {
    font-size: 38px;
    letter-spacing: -0.05em;
  }
}

.te-aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;

  --aura-i: 1;
  --aura-pink: 255, 96, 176;
  --aura-cyan: 64, 226, 255;
  --aura-violet: 128, 84, 255;
  --aura-dx: -1;
}

.te-aura-lm {
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(58% 46% at -4% 10%, rgba(var(--aura-pink), 0.50) 0%, rgba(var(--aura-pink), 0.15) 46%, transparent 72%),
    radial-gradient(54% 46% at 104% 24%, rgba(var(--aura-cyan), 0.46) 0%, rgba(var(--aura-cyan), 0.14) 48%, transparent 74%),
    radial-gradient(50% 42% at 2% 94%, rgba(var(--aura-violet), 0.42) 0%, transparent 72%),
    radial-gradient(48% 40% at 98% 90%, rgba(var(--aura-cyan), 0.32) 0%, transparent 72%),
    radial-gradient(76% 60% at 50% 52%, rgba(96, 72, 208, 0.20) 0%, transparent 74%),
    linear-gradient(168deg, #0d0a26 0%, #070912 44%, #060814 100%);
  opacity: calc(0.96 * var(--aura-i));
}

.te-aura-lm::after {
  content: "";
  position: absolute;
  inset: -10% -6%;
  display: block;
  background:
    repeating-linear-gradient(78deg,
      transparent 0 250px,
      rgba(150, 245, 255, 0.045) 250px 296px,
      rgba(150, 245, 255, 0.10) 296px 324px,
      rgba(150, 245, 255, 0.045) 324px 370px,
      transparent 370px 620px);
  animation: auraBeam 11s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes auraBeam {
  from { transform: translate3d(-30px, 0, 0); }
  to   { transform: translate3d(30px, 0, 0); }
}

.te-aura-grid {
  position: absolute;
  inset: -8% 0;
  display: block;
  background-image:
    linear-gradient(to right, rgba(var(--aura-cyan), 0.075) 0 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--aura-cyan), 0.058) 0 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(130% 108% at 50% 46%, #000 22%, rgba(0, 0, 0, 0.62) 62%, transparent 96%);
  mask-image: radial-gradient(130% 108% at 50% 46%, #000 22%, rgba(0, 0, 0, 0.62) 62%, transparent 96%);
  animation: auraGridFlow 14s linear infinite;
  opacity: calc(0.95 * var(--aura-i));
  will-change: transform;
}

@keyframes auraGridFlow {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, 48px, 0); }
}

.te-aura-scan {
  position: absolute;
  left: -5%;
  right: -5%;
  top: -34vh;
  height: 30vh;
  display: block;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(var(--aura-cyan), 0.06) 26%,
    rgba(150, 245, 255, 0.26) 58%,
    rgba(var(--aura-pink), 0.16) 74%,
    transparent 100%);
  animation: auraScanSweep 7.5s linear infinite;
  opacity: calc(0.95 * var(--aura-i));
  will-change: transform;
}

@keyframes auraScanSweep {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, 176vh, 0); }
}

.te-aura-l0 {
  position: absolute;
  display: block;
  top: -12%;
  height: 124%;
  width: min(44vw, 760px);
  opacity: calc(0.94 * var(--aura-i));
  animation: auraBreath 7s ease-in-out infinite alternate;
  transition: transform 0.28s ease;
  will-change: opacity, transform;
}

.te-aura-l0--l {
  left: 0;
  background:
    radial-gradient(52% 38% at -6% 34%, rgba(var(--aura-pink), 0.56) 0%, rgba(var(--aura-pink), 0.16) 44%, transparent 74%),
    radial-gradient(44% 32% at -4% 72%, rgba(var(--aura-violet), 0.42) 0%, transparent 72%),
    radial-gradient(90% 120% at -10% 48%, rgba(var(--aura-pink), 0.24) 0%, transparent 70%),
    radial-gradient(38% 26% at 6% 88%, rgba(var(--aura-cyan), 0.18) 0%, transparent 74%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 44%, rgba(0, 0, 0, 0.62) 76%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 44%, rgba(0, 0, 0, 0.62) 76%, transparent 100%);
}

.te-aura-l0--r {
  right: 0;
  transform: scaleX(-1);
  background:
    radial-gradient(52% 38% at -6% 34%, rgba(var(--aura-cyan), 0.56) 0%, rgba(var(--aura-cyan), 0.16) 44%, transparent 74%),
    radial-gradient(44% 32% at -4% 72%, rgba(var(--aura-violet), 0.42) 0%, transparent 72%),
    radial-gradient(90% 120% at -10% 48%, rgba(var(--aura-cyan), 0.24) 0%, transparent 70%),
    radial-gradient(38% 26% at 6% 88%, rgba(var(--aura-pink), 0.18) 0%, transparent 74%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 44%, rgba(0, 0, 0, 0.62) 76%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 44%, rgba(0, 0, 0, 0.62) 76%, transparent 100%);
}

@keyframes auraBreath {
  from { opacity: calc(0.80 * var(--aura-i)); }
  to   { opacity: calc(1 * var(--aura-i)); }
}

.te-aura-l0::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.te-aura-l0--l::before {
  background: radial-gradient(64% 46% at -2% 32%, rgba(var(--aura-pink), 0.46) 0%, rgba(var(--aura-violet), 0.20) 50%, transparent 78%);
}
.te-aura-l0--r::before {
  background: radial-gradient(64% 46% at -2% 32%, rgba(var(--aura-cyan), 0.46) 0%, rgba(var(--aura-violet), 0.20) 50%, transparent 78%);
}

.te-aura-l1 {
  position: absolute;
  display: block;
  top: -20%;
  height: 140%;
  width: min(46vw, 760px);
  opacity: calc(0.95 * var(--aura-i));
  animation: auraDrift 9s linear infinite;
  will-change: transform;
}

.te-aura-l1--l {
  left: 0;
  background:
    repeating-linear-gradient(114deg,
      transparent 0 150px,
      rgba(var(--aura-pink), 0.05) 150px 186px,
      rgba(var(--aura-pink), 0.14) 186px 214px,
      rgba(var(--aura-pink), 0.05) 214px 250px,
      transparent 250px 420px);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 62%, rgba(0, 0, 0, 0.58) 86%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 62%, rgba(0, 0, 0, 0.58) 86%, transparent 100%);
}

.te-aura-l1--r {
  right: 0;
  --aura-dx: 1;
  background:
    repeating-linear-gradient(66deg,
      transparent 0 150px,
      rgba(var(--aura-cyan), 0.05) 150px 186px,
      rgba(var(--aura-cyan), 0.14) 186px 214px,
      rgba(var(--aura-cyan), 0.05) 214px 250px,
      transparent 250px 420px);
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 62%, rgba(0, 0, 0, 0.58) 86%, transparent 100%);
  mask-image: linear-gradient(to left, #000 0%, #000 62%, rgba(0, 0, 0, 0.58) 86%, transparent 100%);
}

@keyframes auraDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(-200px * var(--aura-dx)), -200px, 0); }
}

.te-aura-l2 {
  position: absolute;
  display: block;
  inset: 0;
}

.te-aura-l2 span {
  position: absolute;
  display: block;
  bottom: -4px;
  left: var(--x);
  width: 1.5px;
  height: 26px;
  border-radius: 1px;
  background: linear-gradient(to top, transparent, rgba(180, 245, 255, 0.55) 55%, rgba(230, 252, 255, 1));
  opacity: 0;
  animation: auraFloat var(--d) linear var(--dl) infinite;
  will-change: transform, opacity;
}

.te-aura-l2 span:nth-child(even) {
  left: auto;
  right: var(--x);
}

@keyframes auraFloat {
  0%   { transform: translate3d(0, 0, 0) scaleY(0.6); opacity: 0; }
  12%  { transform: translate3d(0, -8vh, 0) scaleY(1); opacity: calc(var(--o) * var(--aura-i)); }
  88%  { opacity: calc(var(--o) * var(--aura-i)); }
  100% { transform: translate3d(10px, -100vh, 0) scaleY(1.4); opacity: 0; }
}

.te-aura.is-row .te-aura-l0::before {
  opacity: calc(1 * var(--aura-i));
}
.te-aura.is-row .te-aura-l0--l { transform: scaleX(1.45); }
.te-aura.is-row .te-aura-l0--r { transform: scaleX(-1.45); }

.te-aura-wave {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 40vmax;
  height: 40vmax;
  margin: -20vmax 0 0 -20vmax;
  border-radius: 50%;
  border: 2px solid rgba(var(--aura-hit, var(--aura-cyan)), 0.85);
  box-shadow:
    0 0 40px rgba(var(--aura-hit, var(--aura-cyan)), 0.55),
    inset 0 0 50px rgba(var(--aura-pink), 0.35);
  opacity: 0;
  transform: scale(0.1);
  pointer-events: none;
}

.te-aura.is-row .te-aura-wave--a { animation: auraWave 560ms cubic-bezier(0.16, 0.72, 0.28, 1) both; }
.te-aura.is-row .te-aura-wave--b { animation: auraWave 560ms cubic-bezier(0.16, 0.72, 0.28, 1) 70ms both; }

@keyframes auraWave {
  0%   { opacity: 0; transform: scale(0.1); }
  12%  { opacity: calc(0.92 * var(--aura-i)); }
  68%  { opacity: calc(0.34 * var(--aura-i)); }
  100% { opacity: 0; transform: scale(2.8); }
}

.te-aura::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.38s ease;
  background:
    radial-gradient(58% 84% at -2% 50%, rgba(255, 190, 74, 0.55) 0%, transparent 68%),
    radial-gradient(58% 84% at 102% 50%, rgba(255, 190, 74, 0.55) 0%, transparent 68%);
}

.te-aura.is-zone::after {
  opacity: calc(1 * var(--aura-i));
}

.te-aura::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 100% at 50% 55%, rgba(255, 255, 255, 0.88) 0%, rgba(186, 242, 255, 0.5) 40%, transparent 80%);
}

.te-aura.is-nuke::before {
  animation: auraFlash 1300ms ease-out 1 both;
}

.te-aura.is-nuke::after {
  opacity: calc(1.25 * var(--aura-i));
  transition-duration: 0.16s;
}

.te-aura.is-nuke .te-aura-l0--l { transform: scaleX(1.75); }
.te-aura.is-nuke .te-aura-l0--r { transform: scaleX(-1.75); }

@keyframes auraFlash {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  18%  { opacity: 0.55; }
  100% { opacity: 0; }
}

@media (max-width: 1180px) {
  .te-aura-l1 { display: none; }
  .te-aura-l0 { width: min(66vw, 620px); }
}

@media (max-width: 720px) {
  .te-aura-l0 { width: 52vw; opacity: calc(0.7 * var(--aura-i)); }
  .te-aura-l2 span:nth-child(n + 23) { display: none; }
  .te-aura-grid { background-size: 34px 34px; opacity: calc(0.7 * var(--aura-i)); }
  .te-aura-scan { opacity: calc(0.7 * var(--aura-i)); }
  .te-aura.is-nuke .te-aura-l0--l { transform: scaleX(1.3); }
  .te-aura.is-nuke .te-aura-l0--r { transform: scaleX(-1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .te-aura * { animation: none !important; }
  .te-aura::before { animation: none !important; }
}

.te-stage {

  --stage-ring:
    0 0 0 7px rgba(4, 6, 14, 0.88),
    0 0 26px -2px rgba(4, 6, 14, 0.72),
    0 0 38px -4px rgba(64, 226, 255, 0.40),
    0 0 100px -18px rgba(128, 84, 255, 0.30),
    0 26px 60px -34px var(--board-shadow);

  border-color: #3d8fa8;
  box-shadow: var(--stage-ring);
}

.te-side .te-seg {
  background: rgba(5, 6, 15, 0.46);
  border-radius: 9px;
  box-shadow: 0 0 24px 15px rgba(5, 6, 15, 0.40);
}

.te-top {
  background: linear-gradient(to bottom, rgba(5, 6, 15, 0.78) 0%, rgba(5, 6, 15, 0.42) 68%, rgba(5, 6, 15, 0) 100%);
}

.te-seg--read {
  background: rgba(4, 6, 14, 0.52);
  border-radius: 9px;
  box-shadow: 0 0 26px 16px rgba(4, 6, 14, 0.46);
}

#teOv,
.te-rk {
  --ov-plate: rgba(7, 10, 20, 0.955);

  --ov-veil: rgba(4, 6, 13, 0.18);
  --ov-rule: rgba(150, 190, 225, 0.14);
  --ov-rule-2: rgba(150, 190, 225, 0.26);
  --ov-ink: #e8eef8;
  --ov-dim: #93a1b8;
  --ov-faint: #737f92;
  --ov-sig: #5bd7ff;
  --ov-sig-rgb: 91, 215, 255;
  --ov-r: 2px;
  --ov-t1: clamp(40px, min(7.6vw, 9.6vh), 84px);
  --ov-t2: clamp(26px, 3.6vw, 40px);
  --ov-t3: clamp(18px, 2.2vw, 24px);
  --ov-fig: clamp(56px, 9vw, 116px);
  --ov-num: clamp(22px, 2.8vw, 34px);
  --ov-body: 13.5px;
  --ov-note: 11.5px;

  --ov-edge:
    0 0 0 1px var(--ov-rule-2),
    0 0 0 5px rgba(91, 215, 255, 0.055),
    0 0 0 9px rgba(91, 215, 255, 0.022),
    0 40px 90px -50px rgba(0, 0, 0, 0.9);
}

#teOv {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;

  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;

  padding: 52px 18px 18px;
  background: var(--ov-veil);

  pointer-events: none;
  transition: opacity 200ms var(--ease);
}

#teOv .te-ov-panel {
  position: relative;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: min(94vw, 620px);
  height: auto;
  max-height: calc(100dvh - 70px);
  padding: 0;
  border: 1px solid var(--ov-rule-2);
  border-radius: var(--ov-r);
  background: var(--ov-plate);
  box-shadow: var(--ov-edge);
  text-align: left;
  line-height: 1.6;
  overflow: hidden;
}

#teOv[data-layer="pause"] .te-ov-panel {
  width: min(94vw, 520px);
  max-height: calc(100dvh - 36px);
}

@media (min-width: 721px) {
  #teOv .te-ov-panel.is-pinned {
    position: absolute;
    margin: 0;
    max-height: none;
  }
}

#teOv .te-pl-hd {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 30px;
  padding: 0 16px;
  border-bottom: 1px solid var(--ov-rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ov-dim);
  white-space: nowrap;
  overflow: hidden;
}

#teOv .te-pl-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 26px 32px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 190, 225, 0.28) transparent;
}

#teOv[data-layer="welcome"] .te-pl-body {
  justify-content: center;
  align-items: center;
  text-align: center;
}

#teOv[data-layer="pause"] .te-pl-body { flex: 0 0 auto; }

#teOv .te-ov-t {
  margin: 0;
  font-size: var(--ov-t2);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ov-ink);
}

#teOv[data-layer="welcome"] .te-ov-t {
  font-size: var(--ov-t1);
  line-height: 1.04;

  letter-spacing: 0.04em;

  color: #dce4f0;

}

#teOv .te-ov-s {
  margin: 12px 0 0;
  font-size: var(--ov-body);
  letter-spacing: 0.04em;
  color: var(--ov-dim);
}

#teOv[data-layer="welcome"] .te-ov-s {
  margin-top: 18px;
  max-width: 620px;
  font-size: 14px;
  letter-spacing: 0.08em;
}

#teOv .te-ov-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

#teOv[data-layer="welcome"] .te-ov-btns { margin-top: 52px; }

#teOv .te-ov-btn {
  min-width: 128px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ov-rule-2);
  border-radius: var(--ov-r);
  background: transparent;
  box-shadow: none;
  color: var(--ov-dim);
  font-size: 13.5px;

  font-weight: 700;
  letter-spacing: 0.06em;
  transition: color 160ms var(--ease), border-color 160ms var(--ease),
              background 160ms var(--ease);
}

#teOv .te-ov-btn:hover {
  color: var(--ov-ink);
  background: rgba(255, 255, 255, 0.03);
}

#teOv .te-ov-btn.t-btn--go {
  min-width: 240px;
  height: 48px;
  border-color: var(--ov-sig);
  background: rgba(91, 215, 255, 0.06);
  color: var(--ov-ink);
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: none;
}

#teOv .te-ov-btn.t-btn--go:hover { background: rgba(91, 215, 255, 0.13); }

#teOv[data-layer="welcome"] .te-ov-btn .te-pl-no,
#teOv[data-layer="welcome"] .te-ov-btn .te-pl-go { display: none; }

#teOv[data-layer="over"] .te-ov-btns,
#teOv[data-layer="pause"] .te-ov-btns {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  margin-top: 20px;
}

#teOv[data-layer="over"] .te-ov-btn,
#teOv[data-layer="pause"] .te-ov-btn {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  height: auto;
  padding: 12px 8px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ov-ink);
  font-size: var(--ov-t3);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: left;
  transition: background 150ms var(--ease), box-shadow 150ms var(--ease);
}

#teOv[data-layer="over"] .te-ov-btn::after,
#teOv[data-layer="pause"] .te-ov-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ov-rule);
}

#teOv[data-layer="over"] .te-ov-btn .te-pl-no {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ov-faint);
}

#teOv .te-ov-row-nm {
  display: block;
  font-size: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
}

#teOv[data-layer="over"] .te-ov-btn:hover,
#teOv[data-layer="pause"] .te-ov-btn:hover,
#teOv[data-layer="over"] .te-ov-btn:focus-visible,
#teOv[data-layer="pause"] .te-ov-btn:focus-visible {
  outline: none;
  background: rgba(91, 215, 255, 0.04);
  box-shadow: inset 2px 0 0 var(--ov-sig);
  color: var(--ov-ink);
}

#teOv[data-layer="over"] .te-ov-btn:hover .te-pl-no,
#teOv[data-layer="pause"] .te-ov-btn:hover .te-pl-no { color: var(--ov-sig); }

#teOv[data-layer="over"] .te-ov-btn .te-pl-go,
#teOv[data-layer="pause"] .te-ov-btn .te-pl-go {
  justify-self: end;
  font-size: 13px;
  color: var(--ov-faint);
  transition: transform 150ms var(--ease), color 150ms var(--ease);
}

#teOv[data-layer="over"] .te-ov-btn:hover .te-pl-go,
#teOv[data-layer="pause"] .te-ov-btn:hover .te-pl-go {
  transform: translateX(4px);
  color: var(--ov-sig);
}

#teOv[data-layer="over"] .te-ov-btn.t-btn--go,
#teOv[data-layer="pause"] .te-ov-btn.t-btn--go {
  background: rgba(91, 215, 255, 0.06);
  box-shadow: inset 2px 0 0 var(--ov-sig);
  border: 0;
  border-radius: 0;
}

#teOv[data-layer="over"] .te-ov-btn.t-btn--go .te-pl-no { color: var(--ov-sig); }

#teOv[data-layer="over"] .te-ov-btn.t-btn--go:hover,
#teOv[data-layer="pause"] .te-ov-btn.t-btn--go:hover {
  background: rgba(91, 215, 255, 0.1);
  box-shadow: inset 2px 0 0 var(--ov-sig);
}

#teOv[data-layer="over"] .te-ov-btn2,
#teOv[data-layer="pause"] .te-ov-btn2 {
  color: var(--ov-dim);
}

#teOv[data-layer="over"] .te-ov-rank {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  margin: 0;
  padding: 12px 8px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ov-dim);
  font-family: inherit;
  font-size: var(--ov-t3);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: left;
  transition: background 150ms var(--ease), box-shadow 150ms var(--ease);
}

#teOv[data-layer="over"] .te-ov-rank:hover,
#teOv[data-layer="over"] .te-ov-rank:focus-visible {
  outline: none;
  background: rgba(91, 215, 255, 0.04);
  border-bottom: 0;
  box-shadow: inset 2px 0 0 var(--ov-sig);
  color: var(--ov-ink);
}

#teOv[data-layer="over"] .te-ov-rank:hover .te-pl-no { color: var(--ov-sig); }

#teOv[data-layer="over"] .te-ov-rank:hover .te-pl-go {
  transform: translateX(4px);
  color: var(--ov-sig);
}

#teOv[data-layer="over"] .te-pl-body {
  justify-content: center;
  align-items: stretch;
  text-align: left;
}

#teOv .te-ov-hint {
  margin: 26px 0 0;
  max-width: 620px;
  font-size: var(--ov-note);
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: var(--ov-faint);
}

@media (min-width: 721px) {
  #teOv[data-layer="welcome"] .te-pl-body { position: relative; }
  #teOv[data-layer="welcome"] .te-ov-hint {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 18px;
    margin: 0;
    max-width: none;
  }
}

#teOv .te-ov-rank {

  margin: 26px auto 0;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: none;
  font-family: var(--mono);
  font-size: var(--ov-note);

  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ov-dim);
}

#teOv .te-ov-rank:hover,
#teOv .te-ov-rank:focus-visible {
  color: var(--ov-sig);
  background: none;
  border-bottom-color: var(--ov-sig);
}

#teOv .te-ov-list { gap: 0; margin-top: 6px; }

#teOv .te-pl-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 14px 6px;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms var(--ease), box-shadow 150ms var(--ease);
}

#teOv .te-pl-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ov-rule);
  transform-origin: left center;
}

#teOv .te-pl-row:last-of-type::after { display: none; }

#teOv .te-pl-row[hidden] { display: none; }

#teOv .te-pl-row:hover,
#teOv .te-pl-row:focus-visible {
  outline: none;
  background: rgba(91, 215, 255, 0.04);
  box-shadow: inset 2px 0 0 var(--ov-sig);
}

#teOv .te-pl-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ov-faint);
}

#teOv .te-pl-row:hover .te-pl-no { color: var(--ov-sig); }

#teOv .te-pl-nm {
  display: block;
  font-size: var(--ov-t3);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ov-ink);
}

#teOv .te-ov-diff {
  display: none;
  font-size: var(--ov-t3);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ov-ink);
}

#teOv .te-ov-diff--lv0 { color: #5bd7ff; }
#teOv .te-ov-diff--lv1 { color: #ffc233; }
#teOv .te-ov-diff--lv2 { color: #ff3b4e; }
#teOv[data-layer="pause"] .te-ov-diff,
#teOv[data-layer="over"] .te-ov-diff { display: block; }
#teOv .te-ov-diff:empty { display: none; }

#teOv .te-pl-ds {
  display: block;
  margin-top: 4px;
  font-size: var(--ov-body);
  letter-spacing: 0.01em;
  color: var(--ov-dim);
}

#teOv .te-ab-tag {
  display: inline-block;
  margin-left: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ov-faint);
  vertical-align: 2px;
}

#teOv .te-pl-go {
  justify-self: end;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ov-faint);
  transition: transform 150ms var(--ease), color 150ms var(--ease);
}

#teOv .te-pl-row:hover .te-pl-go {
  transform: translateX(4px);
  color: var(--ov-sig);
}

#teOv .te-pg {
  grid-template-columns: 92px minmax(0, 1fr);
  column-gap: 18px;
  align-items: baseline;
  margin-top: 0;
  padding: 13px 0;
  border-top: 1px solid var(--ov-rule);
}

#teOv .te-pg:first-child { margin-top: 0; }

#teOv .te-pg-nm {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ov-faint);
}

#teOv .te-pg-opts { gap: 4px; }

#teOv .t-btn.te-pg-btn {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ov-dim);
  font-size: 13.5px;
  letter-spacing: 0.02em;
}

#teOv .t-btn.te-pg-btn:hover {
  color: var(--ov-ink);
  background: rgba(255, 255, 255, 0.03);
}

#teOv .t-btn.te-pg-btn.is-pick {
  border-bottom-color: var(--ov-sig);
  background: none;
  box-shadow: none;
  color: var(--ov-ink);
}

#teOv .te-pg--ab {
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  margin-top: 0;
  padding-top: 13px;
  border-top: 1px solid var(--ov-rule);
}

#teOv .te-pg--ab .te-pg-opts {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

#teOv .t-btn.te-pg-btn--ab {
  flex: 1 1 132px;
  height: 58px;
  padding: 8px 12px;
  border: 1px solid var(--ov-rule-2);
  border-radius: var(--ov-r);
  background: none;
  box-shadow: none;
  color: var(--ov-dim);
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
}

#teOv .t-btn.te-pg-btn--ab.is-pick {
  border-color: var(--ov-sig);
  background: rgba(91, 215, 255, 0.06);
  color: var(--ov-ink);
}

#teOv .te-pl-ab {
  display: block;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.14em;
  color: var(--ov-faint);
}

#teOv .t-btn.te-pg-btn--ab.is-pick .te-pl-ab { color: var(--ov-sig); }

#teOv #teOvParams { max-height: none; overflow: visible; }

#teOv .te-pl-grp,
.te-rk .te-pl-grp {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ov-faint);
}

#teOv .te-pl-grp::after,
.te-rk .te-pl-grp::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--ov-rule);
}

#teOv .te-pl-grp:first-child,
.te-rk .te-pl-grp:first-child { margin-top: 0; }

#teOv .te-pl-row--pick {
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 62px;
  padding: 10px 8px 10px 10px;
}

#teOv .te-pl-row--pick .te-pl-nm { font-size: clamp(16px, 1.6vw, 20px); }

#teOv .te-pl-row--pick.te-pl-row--slim {
  min-height: 46px;
  padding-top: 4px;
  padding-bottom: 4px;
}

#teOv .te-pl-row--pick .te-pl-ds { line-height: 1.5; }

#teOv .te-pl-row--pick.is-pick {
  background: rgba(91, 215, 255, 0.06);
  box-shadow: inset 2px 0 0 var(--ov-sig);
}

#teOv .te-pl-row--pick.is-pick .te-pl-no { color: var(--ov-sig); }

#teOv .te-pl-row--pick[data-g="diff"][data-v="0"].is-pick .te-pl-nm { color: #5bd7ff; }

#teOv .te-pl-row--pick[data-g="diff"][data-v="1"].is-pick .te-pl-no,
#teOv .te-pl-row--pick[data-g="diff"][data-v="1"].is-pick .te-pl-nm { color: #ffc233; }

#teOv .te-pl-row--pick[data-g="diff"][data-v="2"].is-pick .te-pl-no,
#teOv .te-pl-row--pick[data-g="diff"][data-v="2"].is-pick .te-pl-nm { color: #ff3b4e; }

#teOv .te-pl-row--pick[data-g="diff"][data-v="2"].is-pick .te-pl-nm {
  -webkit-text-stroke: 0.8px rgba(255, 255, 255, 0.95);
  paint-order: stroke fill;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}

@media (max-width: 720px) {
  #teOv .te-pl-row--pick[data-g="diff"][data-v="2"].is-pick .te-pl-nm {
    -webkit-text-stroke: 0.6px rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
  }
}

#teOv .te-pl-row--pick.is-dev,
#teOv .te-pl-row--pick.is-dev:hover {
  background: none;
  box-shadow: none;
  cursor: default;
}

#teOv .te-pl-row--pick.is-dev .te-pl-nm { color: var(--ov-dim); }
#teOv .te-pl-row--pick.is-dev .te-pl-no { color: var(--ov-faint); }
#teOv .te-pl-row--pick.is-dev:hover .te-pl-no { color: var(--ov-faint); }
#teOv .te-pl-row--pick.is-dev .te-ab-tag { color: var(--ov-faint); }

#teOv .te-ab-dev {
  display: inline-block;
  margin-left: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ov-faint);
  vertical-align: 2px;
}

#teOv .te-ov-btns--left {
  justify-content: flex-start;
  margin-top: 26px;
}

#teOv .te-ov-btns--left .te-ov-btn.t-btn--go {
  min-width: 132px;
  height: 44px;
}

#teOv.is-launch { transition-duration: 520ms; }

#teOv.is-launch .te-ov-panel {
  animation: tePlLaunch 620ms cubic-bezier(0.45, 0, 0.55, 1) both;
}

@keyframes tePlLaunch {
  from { transform: none; opacity: 1; filter: blur(0); }
  55%  { opacity: 0.85; }
  to   { transform: scale(1.38); opacity: 0; filter: blur(9px); }
}

#teOv.is-return .te-ov-panel {
  animation: tePlReturn 560ms cubic-bezier(0.16, 0.9, 0.3, 1) both;
}

@keyframes tePlReturn {
  from { transform: scale(0.84); opacity: 0; filter: blur(10px); }
  to   { transform: none; opacity: 1; filter: blur(0); }
}

#teBoard,
#teRefl { transition: filter 640ms var(--ease); }

body.te-idle #teBoard {
  filter: brightness(0.8) saturate(0.94);
}

body.te-idle #teRefl {
  filter: brightness(0.7);
}

#teOv .te-sess {
  margin-top: 22px;
  padding-top: 14px;
  border-top-color: var(--ov-rule);
  width: 100%;
}

#teOv .te-sess dt { color: var(--ov-faint); font-size: 10px; letter-spacing: 0.18em; }
#teOv .te-sess dd { color: var(--ov-ink); font-size: 14px; }

#teOv .te-sess dd {
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}

#teOv .te-sess.is-hold dd {
  opacity: 0;
  transform: translateY(5px);
}

#teOv .te-ov-fx {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

#teOv[data-layer="over"] .te-ov-fx { display: block; }

#teOv .te-orf { position: absolute; }

#teOv .te-orf-band {
  left: 0;
  right: 0;
  top: 0;
  height: 96px;
  background: linear-gradient(to bottom,
    rgba(91, 215, 255, 0) 0%,
    rgba(91, 215, 255, 0.22) 45%,
    rgba(91, 215, 255, 0.05) 100%);
  transform: translateY(-110%);
  opacity: 0;
  animation: teOrfBand 780ms cubic-bezier(0.3, 0, 0.4, 1) 140ms both;
}

@keyframes teOrfBand {
  from { transform: translateY(-110%); opacity: 0; }
  18%  { opacity: 1; }
  to   { transform: translateY(1050%); opacity: 0; }
}

#teOv .te-orf-ring {
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 2px solid rgba(91, 215, 255, 0.5);
  border-radius: 50%;
  opacity: 0;
  animation: teOrfRing 620ms var(--ease) both;
}

@keyframes teOrfRing {
  from { opacity: 0; transform: scale(0.3); }
  30%  { opacity: 1; }
  to   { opacity: 0; transform: scale(1.6); }
}

#teOv .te-orf-rec {
  left: 50%;
  top: 40%;
  font-family: var(--mono);
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: 0.3em;
  white-space: nowrap;
  color: #ffd479;
  text-shadow: 0 0 18px rgba(255, 212, 121, 0.45);
  opacity: 0;
  animation: teOrfRec 1150ms var(--ease) 420ms both;
}

@keyframes teOrfRec {
  from { opacity: 0; transform: translate(-50%, 14px); }
  25%  { opacity: 1; }
  70%  { opacity: 1; }
  to   { opacity: 0; transform: translate(-50%, -26px); }
}

#teOv.is-boot .te-ov-panel {
  animation: tePlOn 320ms cubic-bezier(0.16, 0.9, 0.3, 1) both;
}

#teOv.is-boot .te-pl-body { animation: tePlIn 200ms var(--ease) 100ms both; }

#teOv.is-boot[data-layer="welcome"] .te-ov-t {
  animation: tePlTitle 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 260ms both;
}

#teOv.is-boot .te-pl-row::after { animation: tePlGrow 260ms var(--ease) both; }
#teOv.is-boot .te-pl-row:nth-of-type(1)::after { animation-delay: 140ms; }
#teOv.is-boot .te-pl-row:nth-of-type(2)::after { animation-delay: 180ms; }
#teOv.is-boot .te-pl-row:nth-of-type(3)::after { animation-delay: 220ms; }
#teOv.is-boot .te-pl-row:nth-of-type(4)::after { animation-delay: 260ms; }

#teOv.is-turn .te-pl-body { animation: tePlIn 240ms var(--ease) 40ms both; }

@keyframes tePlOn {
  from { clip-path: inset(50% 0 50% 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes tePlType {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes tePlIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes tePlGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes tePlTitle {
  from {

    opacity: 1;
    transform: translateY(8px);
    text-shadow: 12px 0 rgba(255, 96, 176, 0.5), -12px 0 rgba(91, 215, 255, 0.5);
  }
  to {
    opacity: 1;
    transform: none;

    text-shadow: 1px 0 rgba(255, 96, 176, 0.34), -1px 0 rgba(91, 215, 255, 0.42);
  }
}

@media (max-width: 720px) {
  #teOv { padding: 52px 8px 8px; }

  #teOv .te-ov-panel,
  #teOv[data-layer="welcome"] .te-ov-panel,
  #teOv[data-layer="modes"] .te-ov-panel,
  #teOv[data-layer="params"] .te-ov-panel,
  #teOv[data-layer="over"] .te-ov-panel {
    width: 100%;

    height: auto;
    max-height: calc(100dvh - 60px);
  }

  #teOv[data-layer="pause"] .te-ov-panel { width: 100%; height: auto; }

  #teOv .te-pl-hd { padding: 0 12px; font-size: 10px; letter-spacing: 0.12em; }
  #teOv .te-pl-body { padding: 20px 18px; }

  #teOv[data-layer="welcome"] .te-ov-t { font-size: clamp(40px, 13vw, 62px); }
  #teOv[data-layer="welcome"] .te-ov-s { font-size: 13px; letter-spacing: 0.04em; }

  #teOv .te-pl-row {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 10px;
    min-height: 64px;
    padding: 12px 4px;
  }

  #teOv .te-pl-nm { font-size: 17px; }
  #teOv .te-ov-diff { font-size: 17px; }
  #teOv .te-pl-ds { font-size: 12.5px; }


  #teOv .te-pl-row--pick {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 48px;
    padding: 6px 6px 6px 8px;
  }

  #teOv .te-pl-row--pick.te-pl-row--slim { min-height: 44px; padding: 6px 6px 6px 8px; }


  #teOv .te-pl-row--pick .te-pl-ds {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #teOv .te-pl-grp { margin: 12px 0 0; padding-bottom: 4px; }

  #teOv .te-ov-btns--left { margin-top: 16px; }

  #teOv .te-pl-row--pick .te-pl-nm { font-size: 16px; }


  #teOv .te-ov-btns--left { flex-wrap: nowrap; }
  #teOv .te-ov-btns--left .te-ov-btn,
  #teOv .te-ov-btns--left .te-ov-btn.t-btn--go {
    width: auto;
    min-width: 0;
    padding: 0 18px;
  }

  #teOv .te-ov-btns { margin-top: 22px; }
  #teOv .te-ov-btn.t-btn--go { min-width: 0; width: 100%; }
  #teOv .te-ov-hint { font-size: 10.5px; line-height: 1.75; }


  #teOv[data-layer="over"] .te-ov-btn,
  #teOv[data-layer="pause"] .te-ov-btn,
  #teOv[data-layer="over"] .te-ov-rank {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 10px;
    min-height: 52px;
  }

  #teOv .te-pg { grid-template-columns: 72px minmax(0, 1fr); column-gap: 12px; }
  #teOv .t-btn.te-pg-btn--ab { flex: 1 1 100%; height: 52px; }
}

body.te-plate-open .te-top { z-index: 85; }

#teOv .te-pl-back {
  align-self: flex-start;
  margin-top: 18px;
  min-width: 96px;
  height: 40px;
}

#teOv.is-off .te-ov-panel { pointer-events: none; }

#teOv .te-ov-btns[hidden] { display: none; }

.te-spd {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 2px 0;
}

.te-spd-r {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;

  background:
    linear-gradient(90deg,
      var(--ov-sig, #5bd7ff) 0%,
      var(--ov-sig, #5bd7ff) var(--sp-fill, 0%),
      rgba(255, 255, 255, 0.17) var(--sp-fill, 0%),
      rgba(255, 255, 255, 0.17) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(160, 200, 240, 0.3),
    inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.te-spd-r::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ov-ink, #fff);
  border: 2px solid var(--ov-sig, #5bd7ff);
  box-shadow: 0 0 10px rgba(var(--acc-rgb, 91, 215, 255), 0.55);
}
.te-spd-r::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ov-ink, #fff);
  border: 2px solid var(--ov-sig, #5bd7ff);
  box-shadow: 0 0 10px rgba(var(--acc-rgb, 91, 215, 255), 0.55);
}

.te-spd-tk {
  position: relative;
  height: 15px;
  margin: 3px 10px 14px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--ov-faint);
}
.te-spd-tk span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  transition: color 140ms var(--ease), opacity 140ms var(--ease);
  opacity: 0.75;
}
.te-spd-tk span:first-child { transform: none; }
.te-spd-tk .is-max { transform: translateX(-88%); }
.te-spd-tk .is-hell { transform: translateX(-100%); }
.te-spd-tk span.is-on { opacity: 1; font-weight: 700; }
.te-spd-tk span.is-on { color: var(--ov-sig); }
.te-spd-tk .is-max.is-on { color: #ffc233; }
.te-spd-tk .is-hell.is-on { color: #ff3b4e; }

#teOv[data-tint="max"] {
  --ov-sig: #ffc233;
  --acc-rgb: 255, 194, 51;

  --ov-rule: rgba(255, 194, 51, 0.16);
  --ov-rule-2: rgba(255, 194, 51, 0.3);
}
#teOv[data-tint="hell"] {
  --ov-sig: #ff3b4e;
  --acc-rgb: 255, 59, 78;
  --ov-rule: rgba(255, 59, 78, 0.16);
  --ov-rule-2: rgba(255, 59, 78, 0.32);
}

body.te-tint-max {
  --accent: #ffc233;
  --acc-rgb: 255, 194, 51;
  --acc-halo: rgba(255, 194, 51, 0.05);
  --acc-line: rgba(255, 194, 51, 0.32);
}
body.te-tint-hell {
  --accent: #ff3b4e;
  --acc-rgb: 255, 59, 78;
  --acc-halo: rgba(255, 59, 78, 0.06);
  --acc-line: rgba(255, 59, 78, 0.34);
}

#teOv[data-layer="welcome"] .te-ov-t,
#teOv[data-layer="over"] .te-ov-t {
  text-shadow: 1px 0 rgba(255, 96, 176, 0.34), -1px 0 rgba(91, 215, 255, 0.42);
}

#teOv .te-ov-t {
  position: relative;
  isolation: isolate;
}

#teOv[data-layer="welcome"] .te-ov-t {
  filter:
    drop-shadow(0 0.03em 0 rgba(169, 183, 201, 0.8))
    drop-shadow(0 0.03em 0 rgba(122, 141, 167, 0.5))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.75));
}

#teOv .te-ov-t::before,
#teOv .te-ov-t::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

#teOv .te-ov-t::before {
  color: #5bd7ff;
  clip-path: inset(6% 0 62% 0);
}

#teOv .te-ov-t::after {
  color: #ff60b0;
  clip-path: inset(58% 0 6% 0);
}

#teOv[data-layer="over"] .te-ov-t.is-ko {
  font-size: clamp(38px, 5vw, 56px);
  animation: teKoIn 420ms cubic-bezier(0.16, 0.9, 0.3, 1) both;
  will-change: transform, filter;
}

@keyframes teKoIn {

  0%   { transform: scale(1.15); filter: brightness(2.6) blur(3px); }
  40%  { transform: scale(1.06); filter: brightness(1.7) blur(0); }
  100% { transform: scale(1);    filter: none; }
}

@media (prefers-reduced-motion: reduce) {

  #teOv[data-layer="over"] .te-ov-t.is-ko { animation: none; }
}

#teOv .te-ov-t.is-glitch,
#teOv.is-boot[data-layer="welcome"] .te-ov-t.is-glitch {


  animation: teGlitchMain 620ms steps(20, end) both;
  will-change: transform, text-shadow;
}

#teOv .te-ov-t.is-glitch::before { animation: teSliceA 620ms steps(16, end) both; }
#teOv .te-ov-t.is-glitch::after  { animation: teSliceB 620ms steps(16, end) both; }

@keyframes teGlitchMain {

  0%, 100% {
    transform: none;
    text-shadow: 1px 0 rgba(255, 96, 176, 0.34), -1px 0 rgba(91, 215, 255, 0.42);
    opacity: 1;
  }
  6%  { transform: translate(-26px, 1px); text-shadow: 12px 0 rgba(255, 96, 176, 0.72), -12px 0 rgba(91, 215, 255, 0.82); opacity: 1; }
  12% { transform: translate(23px, -2px) skewX(-6deg); text-shadow: -14px 0 rgba(255, 96, 176, 0.64), 14px 0 rgba(91, 215, 255, 0.74); opacity: 1; }
  20% { transform: translate(-11px, 0); opacity: 1; }
  28% { transform: translate(16px, 2px) skewX(3deg); text-shadow: 9px 0 rgba(255, 96, 176, 0.58), -9px 0 rgba(91, 215, 255, 0.68); opacity: 1; }
  40% { transform: translate(-21px, -1px); text-shadow: -11px 0 rgba(255, 96, 176, 0.62), 11px 0 rgba(91, 215, 255, 0.72); opacity: 1; }
  52% { transform: translate(19px, 1px) skewX(-4deg); opacity: 1; }
  64% { transform: translate(-8px, 2px); text-shadow: 7px 0 rgba(255, 96, 176, 0.5), -7px 0 rgba(91, 215, 255, 0.6); opacity: 1; }
  76% { transform: translate(12px, 0); opacity: 1; }
  88% { transform: translate(-5px, -1px); text-shadow: 3px 0 rgba(255, 96, 176, 0.42), -3px 0 rgba(91, 215, 255, 0.5); opacity: 1; }
}

@keyframes teSliceA {
  0%, 100% { opacity: 0; transform: translateX(0); }
  6%  { opacity: 0.92; transform: translateX(-34px); }
  22% { opacity: 0.85; transform: translateX(26px); }
  40% { opacity: 0.9;  transform: translateX(-18px); }
  58% { opacity: 0.7;  transform: translateX(30px); }
  76% { opacity: 0.8;  transform: translateX(-12px); }
  92% { opacity: 0;   transform: translateX(4px); }
}

@keyframes teSliceB {
  0%, 100% { opacity: 0; transform: translateX(0); }
  10% { opacity: 0.9;  transform: translateX(30px); }
  26% { opacity: 0.86; transform: translateX(-28px); }
  44% { opacity: 0.92; transform: translateX(20px); }
  62% { opacity: 0.74; transform: translateX(-34px); }
  80% { opacity: 0.82; transform: translateX(14px); }
  94% { opacity: 0;   transform: translateX(-4px); }
}

.te-rk-tabs {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-top: 12px;
  padding: 0 16px;
}

.te-rk-tabs:first-of-type { padding: 0 46px 0 16px; }

.te-rk-tabs .te-rk-tab {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 34px;
  min-height: 34px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-bottom: 1px solid var(--ov-rule);
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--ov-dim);
  cursor: pointer;
  transition: color 140ms var(--ease), background 140ms var(--ease),
              border-color 140ms var(--ease);
}

.te-rk-tabs .te-rk-tab::after { display: none; }
.te-rk-tabs .te-rk-no,
.te-rk-tabs .te-rk-go { display: none; }
.te-rk-tabs .te-rk-tab-nm {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.te-rk-tabs .te-rk-tab:hover,
.te-rk-tabs .te-rk-tab:focus-visible {
  outline: none;
  background: rgba(91, 215, 255, 0.05);
  box-shadow: none;
  color: var(--ov-ink);
}

.te-rk-tabs .te-rk-tab.is-on {
  background: rgba(91, 215, 255, 0.09);
  box-shadow: inset 0 -1px 0 var(--ov-sig);
  border-bottom-color: transparent;
  color: var(--ov-ink);
}

.te-rk-tabs--mini {
  display: none;
  margin-top: 6px;
  gap: 4px;
}
.te-rk-tabs--mini.is-on { display: flex; }
.te-rk-tabs--mini .te-rk-tab {
  height: 24px;
  min-height: 24px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  color: var(--ov-faint);
}
.te-rk-tabs--mini .te-rk-tab.is-on {
  color: var(--ov-ink);
  background: rgba(91, 215, 255, 0.07);
}

.te-rk-head {
  height: 0;
  padding: 0;
  border: 0;
}
.te-rk-x {
  position: absolute;
  top: 20px;
  right: 16px;
  z-index: 5;
}

#teOv .te-fin {
  display: none;
  width: 100%;
  margin-top: 20px;
}

#teOv[data-layer="over"] .te-fin { display: block; }

.te-fin-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 52px;
}

.te-fin-v {
  font-family: var(--mono);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ov-ink);
}

.te-fin-u {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ov-dim);
  transform: translateY(-4px);
}

.te-fin-rec {
  align-self: flex-start;
  margin-left: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 212, 121, 0.5);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.16em;
  color: #ffd479;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.te-fin-rec.is-on { opacity: 1; transform: none; }

.te-fin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--ov-rule);
}

.te-fin-cell { min-width: 0; }

.te-fin-cell dt {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ov-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.te-fin-cell dd {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ov-ink);
}

.te-fin-note {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: var(--ov-note);
  line-height: 1.55;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--ov-dim);
}
.te-fin-note:empty { display: none; }

.te-fin-cell { opacity: 0; transition: opacity 200ms var(--ease); }
.te-fin-cell.is-lit { opacity: 1; }

#teOv .te-fin.is-hold .te-fin-v { opacity: 0; }
#teOv .te-fin.is-hold .te-fin-main { transform: translateY(6px); }
#teOv .te-fin .te-fin-main {
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}

#teOv[data-layer="pause"] .te-ov-btn.is-off { display: none; }

body.te-id-max .te-stage,
body.te-id-hell .te-stage {

  border-color: var(--id);
  --stage-ring:
    0 0 0 7px rgba(4, 6, 14, 0.88),
    0 0 26px -2px rgba(4, 6, 14, 0.72),
    0 0 40px -4px var(--id-glow),
    0 0 110px -18px var(--id-glow-far),
    0 26px 60px -34px var(--board-shadow);
}

@media (min-width: 721px) {
  #teOv { padding: 12px 18px; }
}

#teOv, .te-rk { --ov-veil: rgba(4, 6, 13, 0.35); }

#teOv[data-layer="over"] { --ov-veil: rgba(4, 6, 13, 0.10); }

@media (max-width: 720px) {
  #teOv { padding: 0; }

  #teOv[data-layer] .te-ov-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  #teOv .te-pl-body {
    padding-top: calc(env(safe-area-inset-top, 0px) + 56px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  }

  #teOv[data-layer="pause"] .te-pl-body {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  }


  .te-fin-v { font-size: 44px; }
  .te-fin-grid { gap: 8px; }
  .te-fin-cell dd { font-size: 19px; }
}

.te-rk-tabs--sub.is-on { display: flex; }

#teOv[data-layer="welcome"] .te-ov-rank {
  margin: 12px auto 0;
  min-width: 240px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ov-rule-2);
  border-radius: var(--ov-r);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ov-dim);
  background: transparent;
}

#teOv[data-layer="welcome"] .te-ov-rank:hover,
#teOv[data-layer="welcome"] .te-ov-rank:focus-visible {
  color: var(--ov-ink);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--ov-rule-2);
}

#teOv[data-layer="welcome"] #teOvBtn {
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: var(--mono);
  font-size: 56px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.3em;


  color: #8ae6ff;
  text-shadow:
    0 0 2px rgba(210, 246, 255, 0.9),
    0 0 14px rgba(91, 215, 255, 0.75),
    0 0 40px rgba(80, 200, 255, 0.5),
    0 0 96px rgba(48, 160, 255, 0.32);
  animation: teStartBreath 2600ms ease-in-out infinite;
  transition: color 180ms var(--ease);
}

@keyframes teStartBreath {

  0%, 100% {
    text-shadow:
      0 0 2px rgba(210, 246, 255, 0.62),
      0 0 12px rgba(91, 215, 255, 0.5),
      0 0 32px rgba(80, 200, 255, 0.3),
      0 0 72px rgba(48, 160, 255, 0.18);
  }
  50% {
    text-shadow:
      0 0 3px rgba(214, 248, 255, 1),
      0 0 22px rgba(91, 215, 255, 0.95),
      0 0 58px rgba(80, 200, 255, 0.7),
      0 0 140px rgba(48, 160, 255, 0.46);
  }
}

#teOv[data-layer="welcome"] #teOvBtn .te-ov-row-nm { padding-left: 0.3em; }

#teOv[data-layer="welcome"] #teOvBtn .te-pl-no,
#teOv[data-layer="welcome"] #teOvBtn .te-pl-go { display: none; }

#teOv[data-layer="welcome"] #teOvBtn:hover,
#teOv[data-layer="welcome"] #teOvBtn:focus-visible {

  animation: none;

  color: #cdefff;
  text-shadow:
    0 0 3px rgba(226, 250, 255, 1),
    0 0 26px rgba(91, 215, 255, 1),
    0 0 64px rgba(80, 200, 255, 0.8),
    0 0 150px rgba(48, 160, 255, 0.55);
  outline: none;
}

#teOv[data-layer="welcome"] .te-ov-rank {
  position: absolute;
  right: 32px;
  bottom: 20px;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;

  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--ov-dim);
}

#teOv[data-layer="welcome"] .te-ov-rank:hover,
#teOv[data-layer="welcome"] .te-ov-rank:focus-visible {
  color: var(--ov-ink);
  border: 0;
}

@media (max-width: 720px) {
  #teOv[data-layer="welcome"] #teOvBtn { font-size: 42px; letter-spacing: 0.24em; }
  #teOv[data-layer="welcome"] #teOvBtn .te-ov-row-nm { padding-left: 0.24em; }
  #teOv[data-layer="welcome"] .te-ov-rank { right: 22px; bottom: 24px; }
}

#teOv[data-layer] .te-ov-btn.is-off,
#teOv[data-layer] .te-ov-btn2.is-off { display: none; }

#teOv[data-layer] .te-ov-rank.is-off { display: none; }

@media (max-width: 720px) {
  .te-gear { display: flex; margin-left: auto; }
  .te-pause { margin-left: 0; }
}

@media (max-width: 720px) {
  #teOv[data-layer="pause"] .te-ov-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
  }
}

.te-seg--keys > .te-klist--pad { display: none; }
body.te-pad .te-seg--keys > .te-klist:not(.te-klist--pad) { display: none; }
body.te-pad .te-seg--keys > .te-klist--pad { display: flex; }

.te-kr kbd.pad-sym {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: rgba(var(--faint-rgb), 0.92);
}

body.te-pad :is(button, input[type="range"], .te-pl-row).is-pad-focus {
  outline: 2px solid var(--ov-sig, #5bd7ff) !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(91, 215, 255, 0.14) !important;
}

.te-floor {
  position: absolute;
  inset: 0;
  z-index: 88;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: rgba(6, 8, 12, 0.72);
}
.te-floor.is-on { display: flex; }

.te-floor-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 246px;
  padding: 20px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--ov-bg);
  text-align: center;
  line-height: 1.55;
}
.te-floor-no {
  margin: 0;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--text-faint);
}
.te-floor-tt {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text);
}
.te-floor-rl {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
  padding: 10px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.te-floor-rl[hidden] { display: none; }
.te-floor-rl-tag {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--text-faint);
}
.te-floor-rl-nm { font-size: 15px; color: #22d3ee; }
.te-floor-rl-ds { font-size: 12px; color: var(--text-dim); }

.te-floor-rep {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding: 11px 20px;
  border: 1px solid rgba(var(--faint-rgb), 0.22);
  border-radius: 10px;
  min-width: 208px;
}
.te-floor-rep[hidden] { display: none; }
.te-floor-rep-row {
  display: flex;
  justify-content: center;
  gap: 26px;
}
.te-floor-rep-row span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.te-floor-rep-row em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--text-faint);
}
.te-floor-rep-row b {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.te-floor-rep-used {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}
.te-floor-rep-used b { color: #22d3ee; font-weight: 600; }

.te-map {
  position: relative;
  width: 210px;
  height: 340px;
  margin: 4px auto 2px;
}
.te-map-l {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.te-map-l line { stroke: rgba(var(--faint-rgb), 0.30); stroke-width: 1; }

.te-map-l line.is-open { stroke: rgba(34, 211, 238, 0.85); stroke-width: 1.8; }
.te-map-n {
  position: absolute;
  width: 34px;
  height: 22px;
  margin: -11px 0 0 -17px;
  padding: 0;
  border: 1px solid rgba(var(--faint-rgb), 0.34);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  font-family: inherit;
  cursor: default;
}

.te-map-n.is-done {
  background: rgba(255, 255, 255, 0.09);
  border-color: transparent;
  color: var(--text-faint);
}

.te-map-n.is-here {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--text);
}

.te-map-n.is-open {
  border-color: rgba(34, 211, 238, 0.55);
  color: #22d3ee;
  cursor: pointer;
}
.te-map-n.is-open:hover { background: rgba(34, 211, 238, 0.12); }

.te-map-n.is-sel {
  background: rgba(34, 211, 238, 0.20);
  border-color: rgba(34, 211, 238, 0.95);
  color: #fff;
  box-shadow: 0 0 0 1.5px rgba(34, 211, 238, 0.40);
}

.te-map-n.is-event { border-style: dashed; }
.te-map-n[disabled] { pointer-events: none; }

.te-floor-bag {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--faint-rgb), 0.22);
  border-radius: 10px;
}
.te-floor-bag[hidden] { display: none; }
.te-floor-bag-tt {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-faint);
}
.te-floor-bag-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.te-floor-bag-row span {
  padding: 4px 3px;
  border: 1px solid rgba(var(--faint-rgb), 0.26);
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.te-floor-bag-row span.is-tier-e { border-color: rgba(255, 196, 92, 0.45); color: rgba(255, 196, 92, 0.92); }
.te-floor-bag-row span.is-tier-L { border-color: rgba(255, 147, 92, 0.50); color: rgba(255, 147, 92, 0.95); }
.te-floor-bag-row span.is-pick {
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.te-floor-prep {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding: 11px 18px;
  border: 1px solid rgba(var(--faint-rgb), 0.22);
  border-radius: 10px;
  min-width: 224px;
}
.te-floor-prep[hidden] { display: none; }
.te-floor-prep-foe {
  margin: 0;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--text-faint);
}
.te-floor-prep-tt {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}
.te-floor-prep-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.te-floor-prep-row span {
  flex: 1 1 0;
  padding: 6px 4px;
  border: 1px solid rgba(var(--faint-rgb), 0.26);
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.te-floor-prep-row span.is-on {
  border-color: rgba(34, 211, 238, 0.60);
  background: rgba(34, 211, 238, 0.10);
  color: #22d3ee;
}
.te-floor-prep-row span.is-empty { border-style: dashed; opacity: .55; }

.te-floor-prep-row span.is-sel {
  border-color: rgba(34, 211, 238, 0.95);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.55) inset;
  color: #22d3ee;
}

.te-prep-foe {
  display: flex;
  align-items: center;
  gap: 8px;
}
.te-prep-pic {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.55), rgba(34, 211, 238, 0.10));
}
.te-prep-foe-tx { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.te-prep-foe-tx b { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.te-prep-foe-tx small {
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--text-faint);
}

.te-prep-acts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.te-prep-acts li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
}
.te-prep-acts li i {
  flex: 0 0 auto;
  width: 13px;
  font-style: normal;
  font-size: 10px;
  color: var(--text-faint);
}
.te-prep-acts li b { font-weight: 600; min-width: 0; }
.te-prep-acts li small {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-faint);
  white-space: nowrap;
}

.te-prep-bag {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.te-prep-bag span {
  padding: 3px 2px;
  border: 1px solid rgba(var(--faint-rgb), 0.20);
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.te-prep-bag span.is-tier-empty { border-style: dashed; opacity: .40; cursor: default; }
.te-prep-bag span.is-tier-e { border-color: rgba(255, 196, 92, 0.45); color: rgba(255, 196, 92, 0.92); }
.te-prep-bag span.is-tier-L { border-color: rgba(255, 147, 92, 0.50); color: rgba(255, 147, 92, 0.95); }
.te-prep-bag span.is-sel {
  border-color: rgba(34, 211, 238, 0.95);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.55) inset;
  color: #22d3ee;
}
.te-floor-prep-hint {
  margin: 0;
  font-size: 11px;
  color: var(--text-faint);
}

.te-floor-sort {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
  padding: 11px 18px;
  border: 1px solid rgba(var(--faint-rgb), 0.22);
  border-radius: 10px;
  min-width: 252px;
}
.te-floor-sort[hidden] { display: none; }
.te-floor-sort-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.te-floor-sort-row span {
  flex: 1 1 0;
  padding: 7px 4px;
  border: 1px solid rgba(var(--faint-rgb), 0.30);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.te-floor-sort-row span.is-done {
  border-color: rgba(var(--faint-rgb), 0.14);
  color: rgba(var(--faint-rgb), 0.50);
}
.te-floor-sort-out {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-dim);
}

.te-floor-pick {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--faint-rgb), 0.22);
  border-radius: 10px;
  background: rgba(var(--faint-rgb), 0.05);
}
.te-floor-pick[hidden] { display: none; }
.te-floor-pick-tt {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.te-floor-pick-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.te-floor-pick-row span {
  flex: 1 1 0;
  padding: 5px 4px;
  border: 1px solid rgba(var(--faint-rgb), 0.26);
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.te-floor-pick-row span.is-new {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(34, 211, 238, 0.12);
  color: #22d3ee;
}
.te-floor-pick-row span.is-old { color: var(--text-dim); }

.te-floor-pick-row span { cursor: pointer; }
.te-floor-pick-row span.is-pick {
  border-color: rgba(34, 211, 238, 0.95);
  background: rgba(34, 211, 238, 0.16);
  color: #22d3ee;
  box-shadow: 0 0 0 1.5px rgba(34, 211, 238, 0.45);
}

.te-floor-pick-row span.is-lock {
  border-style: dashed;
  border-color: rgba(var(--faint-rgb), 0.22);
  color: rgba(var(--faint-rgb), 0.55);
  cursor: not-allowed;
}

.te-floor-path {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--faint-rgb), 0.22);
  border-radius: 10px;
  background: rgba(var(--faint-rgb), 0.05);
}
.te-floor-path[hidden] { display: none; }
.te-floor-path-tt {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.te-floor-path-row {
  display: flex;
  gap: 6px;
}
.te-floor-path-row span {
  flex: 1 1 0;
  padding: 8px 6px;
  border: 1px solid rgba(var(--faint-rgb), 0.26);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-dim);
  text-align: center;
  cursor: pointer;
}

.te-floor-path-row span[hidden] { display: none; }
.te-floor-path-row span b {
  display: block;
  margin-bottom: 2px;
  font-size: 12.5px;
  color: var(--text);
}
.te-floor-path-row span em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-dim);
}

.te-floor-path-row span.is-pick {
  border-color: rgba(34, 211, 238, 0.95);
  background: rgba(34, 211, 238, 0.16);
  box-shadow: 0 0 0 1.5px rgba(34, 211, 238, 0.35);
}
.te-floor-path-row span.is-pick b { color: #22d3ee; }
.te-floor-path-hint {
  margin: 0;
  font-size: 11px;
  color: rgba(var(--faint-rgb), 0.7);
}

.te-floor-go {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

.te-fx-sweep {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  z-index: 42;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.5);
}
.te-fx-sweep.is-on { animation: teFxSweep 320ms cubic-bezier(0.25, 0.8, 0.3, 1); }
@keyframes teFxSweep {
  0%   { opacity: 0; top: 0; }
  10%  { opacity: 1; }
  100% { opacity: 0; top: calc(100% - 2px); }
}

.te-amp-frame {
  position: absolute;
  inset: 0;
  z-index: 41;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 212, 121, 0.8),
    inset 0 0 24px rgba(255, 212, 121, 0.26),
    inset 0 0 60px rgba(255, 163, 77, 0.12);
  transition: opacity 260ms ease-out;
}
.te-amp-frame.is-on {
  opacity: 1;
  animation: teAmpPulse 1.5s ease-in-out infinite;
}
@keyframes teAmpPulse {
  0%, 100% { opacity: 0.34; }
  50%      { opacity: 0.86; }
}

.te-warn-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 42;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(255, 93, 93, 0), rgba(255, 93, 93, 0.95), rgba(255, 93, 93, 0));
  box-shadow: 0 0 12px rgba(255, 93, 93, 0.5);
}
.te-warn-line.is-on { animation: teWarnPulse 900ms ease-in-out infinite; }
@keyframes teWarnPulse {
  0%, 100% { opacity: 0.28; }
  50%      { opacity: 0.85; }
}
.te-warn-line.is-fire { animation: teWarnFire 300ms ease-out; }
@keyframes teWarnFire {
  0%   { opacity: 0.2; box-shadow: 0 0 12px rgba(255, 93, 93, 0.5); }
  25%  { opacity: 1;   box-shadow: 0 0 26px rgba(255, 93, 93, 0.95); }
  100% { opacity: 0;   box-shadow: 0 0 12px rgba(255, 93, 93, 0.5); }
}

.te-mon-pips.is-break i.is-on {
  animation: tePipBreak 260ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: var(--bd, 0ms);
}
@keyframes tePipBreak {
  0%   { transform: scaleY(1);   opacity: 1; }
  35%  { transform: scaleY(2.2); opacity: 1;
         background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.85); }
  100% { transform: scaleY(0.1); opacity: 0; }
}

html.te-topout-dim .te-top,
html.te-topout-dim .te-side { filter: brightness(0.38); }

.rt {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: flex;
  flex-direction: column;
  background: rgba(4, 7, 13, 0.975);
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(206, 218, 240, 0.88);
  -webkit-font-smoothing: antialiased;
}
.rt[hidden] { display: none; }

.rt-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(150, 180, 225, 0.16);
  background: #070b14;
}
.rt-hd b {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #e8eefc;
}
.rt-sub {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(126, 136, 163, 0.95);
}
.rt-x {
  flex: none;
  height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(150, 180, 225, 0.24);
  border-radius: 5px;
  background: transparent;
  color: rgba(206, 218, 240, 0.8);
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}
.rt-x:hover { color: #fff; border-color: rgba(34, 211, 238, 0.55); }

.rt-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 38px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(150, 180, 225, 0.1);
  flex-wrap: wrap;
}
.rt-lab {
  color: rgba(126, 136, 163, 0.95);
  letter-spacing: 0.04em;
}
.rt-b {
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(150, 180, 225, 0.2);
  border-radius: 4px;
  background: transparent;
  color: rgba(206, 218, 240, 0.78);
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}
.rt-b:hover { color: #fff; border-color: rgba(34, 211, 238, 0.5); }
.rt-b.is-on { color: #22d3ee; border-color: rgba(34, 211, 238, 0.5); }
.rt-sel {
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(150, 180, 225, 0.2);
  border-radius: 4px;
  background: #0b111d;
  color: rgba(206, 218, 240, 0.86);
  font-family: inherit;
  font-size: 10px;
}

.rt-main {
  flex: 1;
  min-height: 0;
  display: flex;
}
.rt-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border-right: 1px solid rgba(150, 180, 225, 0.1);
}
.rt-pane:last-child { border-right: 0; }
.rt-pane.is-relic { flex: 0 0 38%; }
.rt-pane.is-act   { flex: 0 0 30%; }
.rt-pane.is-log   { flex: 1 1 auto; }

.rt-ph {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(150, 180, 225, 0.1);
  background: rgba(11, 17, 29, 0.6);
  color: rgba(126, 136, 163, 0.95);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.rt-ph em { color: rgba(34, 211, 238, 0.9); font-style: normal; }
.rt-ph span { margin-left: auto; }

.rt-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rt-grp {
  margin: 6px 0 2px;
  color: rgba(126, 136, 163, 0.8);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.rt-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(11, 17, 29, 0.5);
  color: rgba(206, 218, 240, 0.86);
  font-family: inherit;
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
}
.rt-item:hover { border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.08); }
.rt-item i {
  flex: none;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 3px;
  background: rgba(150, 180, 225, 0.12);
  font-style: normal;
  font-size: 9.5px;
  color: rgba(206, 218, 240, 0.9);
}
.rt-item em { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.rt-item small {
  flex: none;
  color: rgba(126, 136, 163, 0.85);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.rt-item.is-e small { color: rgba(255, 196, 92, 0.9); }
.rt-item.is-L { border-color: rgba(255, 147, 92, 0.3); }
.rt-item.is-L small { color: rgba(255, 147, 92, 0.95); }
.rt-item.is-off { opacity: 0.5; border-style: dashed; }

.rt-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 6px 10px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rt-log li {
  padding: 2px 0;
  border-bottom: 1px dotted rgba(150, 180, 225, 0.08);
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(206, 218, 240, 0.82);
  white-space: pre-wrap;
  word-break: break-all;
}
.rt-log li.is-ok  { color: rgba(126, 231, 175, 0.92); }
.rt-log li.is-no  { color: rgba(255, 147, 92, 0.92); }
.rt-log li.is-act { color: rgba(34, 211, 238, 0.92); }
.rt-log time { color: rgba(126, 136, 163, 0.75); margin-right: 6px; }

.zlab-rt {
  flex: none;
  height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 4px;
  background: transparent;
  color: rgba(34, 211, 238, 0.9);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.zlab-rt:hover { color: #fff; border-color: rgba(34, 211, 238, 0.7); }
.zlab.is-fold .zlab-rt { display: none; }

.te-floor-bag {
  align-self: center;
  margin-top: 2px;
  padding: 5px 12px;
  border: 1px dashed rgba(var(--faint-rgb), 0.3);
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  cursor: pointer;
}
.te-floor-bag:hover {
  border-color: rgba(34, 211, 238, 0.6);
  color: #22d3ee;
}
.te-floor-bag b { font-weight: 600; color: inherit; }

.te-floor-bag[disabled] { opacity: 0.4; cursor: default; }
.te-floor-bag[disabled]:hover { border-color: rgba(var(--faint-rgb), 0.3); color: var(--text-dim); }

.te-bag {
  position: fixed;
  inset: 0;
  z-index: 74;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 6, 10, 0.72);
}
.te-bag[hidden] { display: none; }
.te-bag-panel {
  width: min(420px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(var(--faint-rgb), 0.26);
  border-radius: 12px;
  background: var(--bg-2, #0b111d);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.te-bag-tt {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.te-bag-tt b { color: #22d3ee; }
.te-bag-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
}
.te-bag-list {
  flex: 1;
  min-height: 60px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px;
  border-block: 1px solid rgba(var(--faint-rgb), 0.12);
}
.te-bag-empty {
  padding: 18px 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-dim);
}
.te-bag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(var(--faint-rgb), 0.16);
  border-radius: 7px;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.te-bag-item:hover { border-color: rgba(34, 211, 238, 0.5); }
.te-bag-item i {
  flex: none;
  width: 17px;
  height: 17px;
  line-height: 17px;
  text-align: center;
  border-radius: 4px;
  background: rgba(var(--faint-rgb), 0.14);
  font-style: normal;
  font-size: 10px;
}
.te-bag-item b { font-weight: 600; }
.te-bag-item small {
  margin-left: auto;
  flex: none;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.te-bag-item.is-e small { color: rgba(255, 196, 92, 0.92); }
.te-bag-item.is-L small { color: rgba(255, 147, 92, 0.95); }
.te-bag-item.is-sel {
  border-color: rgba(34, 211, 238, 0.8);
  background: rgba(34, 211, 238, 0.12);
}
.te-bag-sub {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.te-bag-slots {
  display: flex;
  gap: 6px;
}
.te-bag-slots span {
  flex: 1 1 0;
  padding: 8px 4px;
  border: 1px solid rgba(var(--faint-rgb), 0.26);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.te-bag-slots span:hover { border-color: rgba(34, 211, 238, 0.6); }

.te-bag-slots.is-ready span { border-style: dashed; border-color: rgba(34, 211, 238, 0.4); }
.te-bag-x {
  align-self: flex-end;
  padding: 5px 12px;
  border: 1px solid rgba(var(--faint-rgb), 0.26);
  border-radius: 7px;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
}
.te-bag-x:hover { border-color: rgba(34, 211, 238, 0.55); color: #22d3ee; }
