
.tq-app, .tq-app * { box-sizing: border-box; }
.tq-app { --tq-cut: 8px; --gs-ink: #f8fafc; --gs-muted: #c4b5fd; --gs-line: #5b3d99; --gs-accent: #facc15; --gs-accent-ink: #1c1003;
  --gs-panel: #1a1033; --gs-bg: #07060f; --gs-chip: rgba(15, 10, 30, .92);
  position: relative; display: flex; flex-direction: column; color: #f8fafc; font: 16px/1.4 "Segoe UI", system-ui, Arial, sans-serif;
  overflow: clip; -webkit-tap-highlight-color: transparent; }
.tq-app.tq-embedded { height: clamp(520px, calc(100svh - 110px), 920px); border: 1px solid #5b3d99; background: #07060f;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.tq-app.gs-fs { background: #07060f; }
.tq-app .gs-stage, .tq-app .gs-main { min-height: 0; }
.tq-app.gs-wide .gs-stage { align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.tq-app .gs-side { min-height: 0; overflow: auto; }
.tq-app .gs-main { display: flex; flex-direction: column; }
.tq-cut { clip-path: polygon(var(--tq-cut) 0, 100% 0, 100% calc(100% - var(--tq-cut)), calc(100% - var(--tq-cut)) 100%, 0 100%, 0 var(--tq-cut)); }
.tq-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 0 0 env(safe-area-inset-bottom, 0); }
.tq-modes { display: flex; gap: 6px; flex: 0 0 auto; }
.tq-modebtn { flex: 1 1 0; min-height: 42px; padding: 6px 8px; border: 1px solid rgba(250, 204, 21, .3); background: rgba(15, 10, 30, .85);
  color: #a99ccf; font: 700 14px system-ui, sans-serif; cursor: pointer; --tq-cut: 10px; }
.tq-modebtn[aria-pressed="true"] { color: #fff; border-color: #facc15; background: rgba(76, 29, 149, .85); }
.tq-modebtn:hover, .tq-modebtn:focus-visible { border-color: #facc15; outline: none; }
.tq-modebtn i { font-style: normal; margin-left: 6px; color: #86efac; }
.tq-top5 { list-style: none; margin: 8px 0 0; padding: 0; text-align: left; }
.tq-top5 li { --tq-cut: 6px; display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; background: rgba(0, 0, 0, .28); margin-bottom: 3px; font-size: 14px; }
.tq-top5 li.me { background: rgba(250, 204, 21, .18); }
.tq-top5 b { width: 22px; color: #fde68a; } .tq-top5 span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-top5 em { font-style: normal; color: #ddd6fe; white-space: nowrap; }
.tq-hud { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.tq-chipbox { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 8px; background: rgba(26, 16, 51, .9); border: 1px solid rgba(250, 204, 21, .3); --tq-cut: 6px; }
.tq-chipbox small { font: 700 9px/1 monospace; letter-spacing: 1.3px; color: #c4b5fd; }
.tq-chipbox b { font: 800 14px/1 monospace; color: #fff; white-space: nowrap; }
#tqSpC b { color: #fde047; }
.tq-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; --tq-cut: 14px;
  display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 12px 12px 12px 10px;
  border: 1px solid #5b3d99; background: radial-gradient(ellipse at 50% 115%, #3b1d5e 0%, #1a1033 45%, #07060f 85%); }
.tq-stage.off { background: radial-gradient(ellipse at 50% 20%, #1c1830 0%, #10101f 60%, #07060f 100%); }
.tq-beams { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tq-stage.off .tq-beams { display: none; }
.tq-beams i { position: absolute; top: -40%; width: 46%; height: 170%; left: 27%; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(253, 230, 138, .20), rgba(253, 230, 138, .05) 55%, transparent 80%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); filter: blur(2px); }
.tq-beams i:nth-child(1) { transform: rotate(24deg); }
.tq-beams i:nth-child(2) { transform: rotate(-22deg);
  background: linear-gradient(180deg, rgba(196, 181, 253, .20), rgba(196, 181, 253, .05) 55%, transparent 80%); }
.tq-beams i:nth-child(3) { transform: rotate(0deg);
  background: linear-gradient(180deg, rgba(147, 197, 253, .14), rgba(147, 197, 253, .03) 55%, transparent 80%); }
.tq-rail { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; justify-content: space-between; gap: 4px; }
.tq-rail li { flex: 1; min-height: 22px; max-height: 40px; display: flex; align-items: center; justify-content: center;
  font: 800 13px system-ui, sans-serif; background: rgba(255, 255, 255, .06); color: #94a3b8; border: 1px solid rgba(255, 255, 255, .08); --tq-cut: 5px;
  clip-path: polygon(var(--tq-cut) 0, 100% 0, 100% calc(100% - var(--tq-cut)), calc(100% - var(--tq-cut)) 100%, 0 100%, 0 var(--tq-cut)); }
.tq-rail li.now { background: rgba(250, 204, 21, .18); color: #fde68a; border-color: #facc15; }
.tq-rail li.right { background: #15803d; color: #dcfce7; border-color: #22c55e; }
.tq-rail li.half { background: #a16207; color: #fef9c3; border-color: #eab308; }
.tq-rail li.wrong, .tq-rail li.timeout { background: #7f1d1d; color: #fecaca; border-color: #ef4444; }
.tq-rail li.skip { background: #334155; color: #cbd5e1; }
.tq-main { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 8px; }
.tq-top { display: flex; align-items: center; gap: 8px; }
.tq-bandchip { border: 1px solid currentColor; background: rgba(15, 10, 30, .75); padding: 5px 12px; font: 800 13px system-ui, sans-serif;
  letter-spacing: .05em; min-height: 32px; display: inline-flex; align-items: center; --tq-cut: 6px; }
.tq-worth { flex: 1; min-width: 0; font: 700 13px system-ui, sans-serif; color: #fde68a; line-height: 1.25; }
.tq-clock { position: relative; width: 52px; height: 52px; flex: none; }
.tq-clock svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tq-ring-bg { fill: rgba(15, 10, 30, .7); stroke: rgba(255, 255, 255, .12); stroke-width: 4; }
.tq-ring { fill: none; stroke: #facc15; stroke-width: 4; stroke-linecap: butt; stroke-dasharray: 119.38; stroke-dashoffset: 0; }
.tq-clock.low .tq-ring { stroke: #f87171; }
.tq-clock b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 17px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.tq-q { font: 700 clamp(17px, 2.4vw, 22px)/1.4 system-ui, sans-serif; background: rgba(15, 10, 30, .72); border: 1px solid rgba(250, 204, 21, .35);
  padding: 12px 14px; min-height: 64px; text-wrap: pretty; overflow: auto; --tq-cut: 10px; }
.tq-q small { display: block; font: 700 11px system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #facc15; margin-bottom: 4px; }
.tq-class { display: none; font-size: 13px; color: #c7d2fe; }
.tq-class.show { display: block; }
.tq-bottom { margin-top: auto; display: grid; gap: 8px; }
.tq-answers { display: grid; gap: 8px; }
.tq-ans { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid rgba(196, 181, 253, .4); background: linear-gradient(160deg, rgba(76, 29, 149, .6), rgba(30, 27, 75, .85));
  color: #f5f3ff; padding: 8px 12px; font: 600 16px/1.3 system-ui, sans-serif; overflow: hidden; --tq-cut: 9px; }
.tq-ans b { flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  background: #facc15; color: #1c1003; font: 800 14px system-ui, sans-serif; }
.tq-ans i { margin-left: auto; font-style: normal; font: 800 13px system-ui, sans-serif; color: #c7d2fe; }
.tq-ans .bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(129, 140, 248, .25); pointer-events: none; }
.tq-ans:hover:not(:disabled) { border-color: #facc15; }
.tq-ans:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.tq-ans:disabled { cursor: default; }
.tq-ans.gone { opacity: .25; text-decoration: line-through; }
.tq-ans.right { background: linear-gradient(160deg, #16a34a, #166534); border-color: #4ade80; }
.tq-ans.wrong { background: linear-gradient(160deg, #dc2626, #7f1d1d); border-color: #f87171; }
.tq-ans.sent { border-color: #facc15; box-shadow: 0 0 0 2px rgba(250, 204, 21, .5) inset; }
.tq-lifelines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tq-life { min-height: 44px; border: 1px solid rgba(253, 230, 138, .35); background: rgba(15, 10, 30, .7); color: #fde68a;
  font: 700 13px system-ui, sans-serif; cursor: pointer; padding: 4px 6px; line-height: 1.15; --tq-cut: 7px; }
.tq-life small { display: block; font-weight: 600; font-size: 11px; color: #cbd5e1; }
.tq-life:disabled { opacity: .35; cursor: default; }
.tq-life:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.tq-msg { min-height: 20px; font-size: 14px; color: #e9d5ff; }
.tq-stage.shake { animation: tqShake .35s; }
@keyframes tqShake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.tq-stage.flash-ok { box-shadow: inset 0 0 0 3px #4ade80; } .tq-stage.flash-bad { box-shadow: inset 0 0 0 3px #f87171; }
.tq-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.tq-fx i { position: absolute; top: -12px; width: 8px; height: 12px; animation: tqFall 1.5s ease-in forwards; }
@keyframes tqFall { to { transform: translate(var(--dx), 640px) rotate(var(--r)); opacity: 0; } }
.tq-over { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 12px; background: rgba(5, 3, 14, .74); z-index: 5; }
.tq-over.show { display: flex; }
.tq-card { background: linear-gradient(160deg, #2e1065, #111827); border: 1px solid rgba(250, 204, 21, .4); padding: 16px 18px; --tq-cut: 14px;
  max-width: 480px; width: 100%; color: #f5f3ff; max-height: 100%; overflow: auto; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); text-align: center; }
.tq-kick { font: 700 12px system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #facc15; }
.tq-title { font: 800 24px/1.25 system-ui, sans-serif; margin: 4px 0 8px; overflow-wrap: anywhere; }
.tq-title.bad { color: #fecaca; } .tq-title.good { color: #bbf7d0; }
.tq-sub { font-size: 14px; color: #ddd6fe; margin: 6px 0 10px; line-height: 1.45; }
.tq-fact, .tq-word { text-align: left; background: rgba(0, 0, 0, .28); padding: 9px 11px; margin: 8px 0; font-size: 14px; line-height: 1.45; --tq-cut: 8px; }
.tq-word b { color: #fde68a; font-size: 16px; } .tq-word em { color: #a5b4fc; font-style: normal; font-size: 12px; }
.tq-word q { display: block; margin-top: 4px; color: #e0e7ff; font-style: italic; }
.tq-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.tq-go { background: linear-gradient(135deg, #facc15, #f97316); color: #1c1003; border: 0; padding: 11px 24px; min-height: 44px;
  font: 800 16px system-ui, sans-serif; cursor: pointer; --tq-cut: 9px; }
.tq-alt { background: rgba(196, 181, 253, .15); color: #ede9fe; border: 1px solid rgba(196, 181, 253, .35); padding: 9px 14px; min-height: 44px;
  font: 700 14px system-ui, sans-serif; cursor: pointer; --tq-cut: 8px; }
.tq-go:focus-visible, .tq-alt:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tq-bandtag { display: inline-block; margin-left: 8px; font-size: 14px; padding: 2px 9px; background: rgba(255, 255, 255, .08); color: var(--b); vertical-align: 4px; }
.tq-sum { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.tq-sum i { width: 22px; height: 22px; background: #334155; }
.tq-sum i.right { background: #22c55e; } .tq-sum i.half { background: #eab308; }
.tq-sum i.wrong, .tq-sum i.timeout { background: #ef4444; }
.tq-list { margin: 0; padding-left: 18px; line-height: 1.5; }
.tq-list li { margin: 4px 0; }
@media (max-width: 760px) {
  .tq-stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding: 8px; gap: 6px; }
  .tq-rail { flex-direction: row; gap: 3px; }
  .tq-rail li { min-height: 22px; max-height: none; font-size: 11px; }
  .tq-ans { min-height: 48px; }
  .tq-q { min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
}
.tq-stage, .tq-q, .tq-ans, .tq-life, .tq-card, .tq-word, .tq-fact, .tq-go, .tq-alt, .tq-bandchip, .tq-chipbox, .tq-modebtn, .tq-top5 li {
  clip-path: polygon(var(--tq-cut) 0, 100% 0, 100% calc(100% - var(--tq-cut)), calc(100% - var(--tq-cut)) 100%, 0 100%, 0 var(--tq-cut)); }
