:root{
  color-scheme: dark;

  --bg0:#06070d;
  --bg1:#0a0d18;
  --bg2:#0b1022;
  --panel0:rgba(16, 22, 44, .62);
  --panel1:rgba(12, 16, 32, .75);
  --stroke:rgba(150, 185, 255, .18);
  --stroke2:rgba(150, 185, 255, .26);

  --text:#e8eeff;
  --muted:rgba(232, 238, 255, .72);
  --muted2:rgba(232, 238, 255, .54);

  --cyan:#62d6ff;
  --violet:#9c7bff;
  --green:#38f3a3;
  --amber:#ffb55a;
  --red:#ff566b;

  --shadow:0 18px 60px rgba(0,0,0,.55);
  --shadow2:0 12px 30px rgba(0,0,0,.45);

  --rSm:10px;
  --rMd:14px;
  --rLg:18px;

  --gap:14px;
  --hudH:84px;

  --mono:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans:ui-sans-serif, system-ui, -apple-system, Segoe UI, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:
    radial-gradient(1200px 680px at 12% -10%, rgba(98,214,255,.18), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(156,123,255,.16), transparent 55%),
    radial-gradient(900px 700px at 30% 105%, rgba(56,243,163,.11), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  overflow-x:hidden;
}

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

.app{min-height:100%; display:flex; flex-direction:column;}

.hud{
  position:sticky;
  top:0;
  z-index:50;
  min-height:var(--hudH);
  display:grid;
  grid-template-columns: 1fr minmax(360px, 1.4fr) 1fr;
  gap:var(--gap);
  padding:12px 14px;
  background: linear-gradient(180deg, rgba(6,7,13,.72), rgba(6,7,13,.38));
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--stroke);
}
.hud__left,.hud__right{display:flex; align-items:center; gap:12px; min-width:0;}
.hud__right{justify-content:flex-end}
.hud__center{display:flex; align-items:center; min-width:0;}

.brand{
  display:inline-flex;
  gap:10px;
  align-items:center;
  min-width:0;
  padding:4px 6px;
  margin:-4px -6px;
  border-radius:14px;
  border:1px solid transparent;
  transition: transform .12s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.brand,
.brand:visited,
.brand:hover,
.brand:active{
  color: inherit;
  text-decoration: none;
}
.brand:hover{
  transform: translateY(-1px);
  border-color: rgba(98,214,255,.24);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: 0 10px 24px rgba(0,0,0,.24);
}
.brand:active{
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0,0,0,.22);
}
.brand:focus-visible{
  outline: 2px solid rgba(98,214,255,.6);
  outline-offset: 4px;
  border-radius: 12px;
}
.brand__mark{
  width:34px;
  height:34px;
  border-radius: 12px;
  background:
    radial-gradient(12px 12px at 30% 30%, rgba(255,255,255,.22), transparent 55%),
    radial-gradient(14px 14px at 72% 66%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(135deg, rgba(98,214,255,.95), rgba(156,123,255,.92));
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 10px 22px rgba(98,214,255,.18);
}
.brand__text{min-width:0}
.brand__title{font-weight:800; letter-spacing:.2px; line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.brand__subtitle{font-size:12px; color:var(--muted2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

.badge{
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  letter-spacing:.3px;
  text-transform:uppercase;
  color:rgba(232,238,255,.92);
  background: rgba(39, 50, 89, .55);
  border:1px solid rgba(150,185,255,.18);
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
}
.badge.online{
  background: rgba(56,243,163,.14);
  border-color: rgba(56,243,163,.28);
}

.topicBox{
  width:100%;
  min-width:0;
  position:relative;
  padding:10px 12px 10px;
  border-radius: var(--rLg);
  background: linear-gradient(180deg, rgba(16,22,44,.6), rgba(12,16,32,.75));
  border:1px solid var(--stroke);
  box-shadow: var(--shadow2);
}
.topicBox__input{
  width:100%;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(150,185,255,.18);
  background: rgba(6,7,13,.38);
  color:var(--text);
  outline:none;
  font-size:14px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.topicBox__input:focus{
  border-color: rgba(98,214,255,.55);
  box-shadow: 0 0 0 4px rgba(98,214,255,.12);
}
.topicBox__meta{
  display:flex;
  gap:8px;
  margin-top:8px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.progress{
  -webkit-appearance:none;
  appearance:none;
  display:block;
  width:100%;
  height:10px;
  margin-top:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  overflow:hidden;
}
.progress::-webkit-progress-bar{
  background: rgba(255,255,255,.06);
}
.progress::-webkit-progress-value{
  background: linear-gradient(90deg, rgba(98,214,255,.92), rgba(156,123,255,.92));
  box-shadow: 0 0 18px rgba(98,214,255,.35);
  border-radius:999px;
  transition: width .32s ease;
}
.progress::-moz-progress-bar{
  background: linear-gradient(90deg, rgba(98,214,255,.92), rgba(156,123,255,.92));
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  color:rgba(232,238,255,.92);
  background: rgba(255,255,255,.06);
  border:1px solid rgba(150,185,255,.16);
  white-space:nowrap;
}
.chip--round{
  background: rgba(98,214,255,.09);
  border-color: rgba(98,214,255,.22);
}
.chip--speaker{
  background: rgba(156,123,255,.09);
  border-color: rgba(156,123,255,.22);
}

.hudControls{display:flex; flex-direction:column; gap:8px;}
.hudControls__row{display:flex; align-items:end; gap:10px; justify-content:flex-end; flex-wrap:wrap;}
.hudControls__row--actions{align-items:center;}
.miniField{display:flex; flex-direction:column; gap:6px; min-width:140px;}
.miniField__label{font-size:11px; color:var(--muted2); letter-spacing:.4px; text-transform:uppercase;}
.miniField__control{
  height:38px;
  border-radius: 12px;
  border:1px solid rgba(150,185,255,.18);
  background: rgba(6,7,13,.34);
  color:var(--text);
  padding:0 10px;
  outline:none;
}
.miniField__control:focus{
  border-color: rgba(98,214,255,.55);
  box-shadow: 0 0 0 4px rgba(98,214,255,.12);
}
.miniField__control[type="number"]{
  appearance: textfield;
  -moz-appearance: textfield;
  font: inherit;
}
.miniField__control[type="number"]::-webkit-outer-spin-button,
.miniField__control[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

.btn{
  height:38px;
  padding:0 14px;
  border-radius: 12px;
  border:1px solid rgba(150,185,255,.18);
  background: rgba(255,255,255,.07);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
  letter-spacing:.2px;
  transition: transform .12s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
  box-shadow: 0 10px 22px rgba(0,0,0,.24);
}
.btn:hover{transform: translateY(-1px); border-color: rgba(98,214,255,.45); box-shadow: 0 16px 26px rgba(0,0,0,.32);}
.btn:active{transform: translateY(0px); box-shadow: 0 10px 18px rgba(0,0,0,.26);}
.btn:disabled{opacity:.55; cursor:not-allowed; transform:none;}
.btn--primary{
  background: linear-gradient(135deg, rgba(98,214,255,.92), rgba(156,123,255,.92));
  border-color: rgba(255,255,255,.18);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.btn--danger{
  background: linear-gradient(135deg, rgba(255,86,107,.9), rgba(255,181,90,.35));
  border-color: rgba(255,86,107,.35);
}
.btn--ghost{
  background: rgba(255,255,255,.04);
}
.button-row{display:flex; gap:10px; flex-wrap:wrap;}

.arenaGrid{
  display:grid;
  grid-template-columns: 320px minmax(480px, 1fr) 360px;
  gap:var(--gap);
  padding: 14px;
  align-items:start;
}
.leftCol{
  display:flex;
  flex-direction:column;
  gap:var(--gap);
  min-width:0;
}

.panel{
  border-radius: var(--rLg);
  background: linear-gradient(180deg, var(--panel0), var(--panel1));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow2);
  overflow:hidden;
  min-width:0;
}
.panel__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(150,185,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.panel__title{margin:0; font-size:13px; letter-spacing:.5px; text-transform:uppercase; color:rgba(232,238,255,.9);}
.panel__actions{display:flex; align-items:center; gap:10px;}
.panel__body{padding: 12px 14px;}

.panel--stage .panel__header{position:sticky; top:calc(var(--hudH) + 14px); z-index:2; backdrop-filter: blur(10px);}
.panel--stage{position:relative;}

.topoPanel .panel__header{
  padding-bottom: 11px;
}
.topo-body{
  position:relative;
  padding: 10px 10px 14px;
}
.topo-svg{
  display:block;
  width:100%;
  height:280px;
  border-radius: var(--rMd);
  border: 1px solid rgba(150,185,255,.12);
  background:
    radial-gradient(360px 220px at 15% 10%, rgba(98,214,255,.12), transparent 62%),
    radial-gradient(320px 220px at 90% 90%, rgba(156,123,255,.10), transparent 64%),
    linear-gradient(180deg, rgba(9,13,26,.78), rgba(7,10,20,.92));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 14px 32px rgba(0,0,0,.28);
}
.topo-grid{
  opacity:.45;
}
.topo-node{
  cursor:default;
  transition: filter .18s ease, opacity .18s ease;
}
.topo-node .avatar{
  width:36px;
  height:36px;
  pointer-events:none;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.topo-node__label{
  fill: rgba(232,238,255,.9);
  font-size: 10px;
  letter-spacing:.2px;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events:none;
}
.topo-node--speaking .avatar{
  animation: topoGlow 1.05s ease-in-out infinite;
}
.topo-node--speaking .avatarRing{
  opacity:1;
  border-color: rgba(98,214,255,.45);
  animation: avatarRing 1.2s ease-in-out infinite;
}
.topo-node--hit{
  animation: topoShake .3s ease;
}
.topo-node:hover .avatar{
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.topo-edge{
  fill:none;
  stroke-linecap:round;
  pointer-events:none;
}
.topo-edge--response{
  stroke: rgba(56,243,163,.86);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(56,243,163,.32));
}
.topo-edge--alliance{
  stroke-width: 4.2;
  filter: drop-shadow(0 0 12px rgba(98,214,255,.46));
  animation: allianceLinkPulse 1.9s ease-in-out infinite;
}
.topo-edge--alliance-support{
  stroke: rgba(98,214,255,.98);
}
.topo-edge--alliance-request{
  stroke: rgba(132,148,255,.92);
  stroke-dasharray: 10 6;
  filter: drop-shadow(0 0 10px rgba(132,148,255,.45));
}
.topo-edge--interrupt{
  stroke: rgba(255,86,107,.94);
  stroke-width: 2.4;
  stroke-dasharray: 6 5;
  filter: drop-shadow(0 0 6px rgba(255,86,107,.35));
}
.topo-edge--event{
  animation: edgeDraw .35s ease-out;
}
.topo-edge--fading{
  animation: edgeFade .8s ease forwards;
}
.topo-legend{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin-top:8px;
  padding:7px 10px;
  border-radius: var(--rSm);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(150,185,255,.12);
  width:fit-content;
}
.topo-legend__item{
  display:flex;
  align-items:center;
  gap:8px;
}
.topo-legend__line{
  width:36px;
  height:8px;
  flex-shrink:0;
  overflow:visible;
}
.topo-legend__item span{
  font-size:10px;
  letter-spacing:.3px;
  color: rgba(232,238,255,.62);
  white-space:nowrap;
}

.inline-check{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:12px;
}
.inline-check input{accent-color: rgba(98,214,255,.85);}

.fieldset{
  border:1px solid rgba(150,185,255,.14);
  border-radius: var(--rMd);
  padding: 12px;
  margin:0;
  background: rgba(255,255,255,.03);
}
.fieldset legend{
  padding: 0 8px;
  font-size:11px;
  letter-spacing:.4px;
  text-transform:uppercase;
  color:var(--muted2);
}
.model-list{display:grid; gap:10px; margin-top:10px;}
.model-list label{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 10px;
  border-radius: 14px;
  border:1px solid rgba(150,185,255,.14);
  background: rgba(6,7,13,.24);
  transition: border-color .18s ease, transform .12s ease, background .18s ease;
}
.model-list label:hover{
  border-color: rgba(98,214,255,.35);
  transform: translateY(-1px);
  background: rgba(6,7,13,.32);
}
.model-list input{margin-top:2px;}
.hint{
  margin-top:12px;
  color:var(--muted2);
  font-size:12px;
  line-height:1.35;
}
kbd{
  font-family:var(--mono);
  font-size:11px;
  padding:2px 6px;
  border-radius:8px;
  border:1px solid rgba(150,185,255,.18);
  background: rgba(255,255,255,.06);
}

.stage-wrapper{position:relative;}
.stage{
  position:relative;
  padding: 14px;
}

.arenaPulse{
  width:10px;
  height:10px;
  border-radius:999px;
  background: rgba(98,214,255,.95);
  box-shadow: 0 0 0 0 rgba(98,214,255,.35);
  animation: pulseDot 1.4s ease-in-out infinite;
  opacity:.7;
}
@keyframes pulseDot{
  0%{transform:scale(.9); box-shadow: 0 0 0 0 rgba(98,214,255,.34);}
  55%{transform:scale(1); box-shadow: 0 0 0 14px rgba(98,214,255,0);}
  100%{transform:scale(.9); box-shadow: 0 0 0 0 rgba(98,214,255,0);}
}

.interruption-banner{
  position:sticky;
  top:calc(var(--hudH) + 58px);
  z-index:10;
  margin: 12px 14px 0;
  padding: 10px 12px;
  border-radius: 14px;
  background:
    radial-gradient(120px 60px at 10% 20%, rgba(255,255,255,.18), transparent 65%),
    linear-gradient(135deg, rgba(255,86,107,.85), rgba(255,181,90,.25));
  border: 1px solid rgba(255,86,107,.35);
  box-shadow: 0 22px 60px rgba(255,86,107,.14);
  font-weight:800;
  letter-spacing:.4px;
}
.hidden{display:none}

.judgeCard{
  border-radius: var(--rLg);
  background:
    radial-gradient(400px 220px at 20% 0%, rgba(56,243,163,.16), transparent 55%),
    linear-gradient(180deg, rgba(12,16,32,.74), rgba(6,7,13,.38));
  border:1px solid rgba(56,243,163,.18);
  box-shadow: 0 18px 48px rgba(0,0,0,.45);
  overflow:hidden;
  margin-bottom: 14px;
}
.judgeCard__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.judgeCard__title{display:flex; gap:10px; align-items:center; min-width:0;}
.judgeBadge{
  width:34px;
  height:34px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(56,243,163,.95), rgba(98,214,255,.7));
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 16px 24px rgba(56,243,163,.12);
}
.judgeCard__name{font-weight:900; letter-spacing:.2px;}
.judgeCard__sub{font-size:12px; color:var(--muted2);}
.judgeCard__body{padding: 12px 14px;}

.verdict{display:grid; gap:12px;}
.verdict__top{display:flex; gap:12px; flex-wrap:wrap; align-items:stretch;}
.winnerCard{
  flex: 1;
  min-width: 260px;
  border-radius: 18px;
  padding: 12px 12px;
  border: 1px solid rgba(56,243,163,.22);
  background:
    radial-gradient(300px 140px at 20% 20%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(135deg, rgba(56,243,163,.16), rgba(98,214,255,.10));
  box-shadow: 0 18px 44px rgba(56,243,163,.08), 0 12px 24px rgba(0,0,0,.22);
}
.winnerCard__label{
  font-size:11px;
  letter-spacing:.5px;
  text-transform:uppercase;
  font-weight:900;
  color: rgba(232,238,255,.80);
}
.winnerCard__name{
  margin-top:6px;
  font-weight:950;
  letter-spacing:.2px;
  font-size: 18px;
}
.winnerCard__sub{
  margin-top:6px;
  color: var(--muted2);
  font-size: 12px;
}
.verdict__sections{display:grid; gap:10px;}
.verdict__share{display:flex; justify-content:flex-end; padding-top:10px;}
.verdict__shareBtn{font-size:12px; padding:5px 12px;}
.verdictSection{
  border-radius: 18px;
  padding: 12px 12px;
  border: 1px solid rgba(150,185,255,.14);
  background: rgba(255,255,255,.04);
}
.verdictSection__title{
  font-size:11px;
  letter-spacing:.5px;
  text-transform:uppercase;
  font-weight:900;
  color: rgba(232,238,255,.80);
}
.verdictSection__body{
  margin-top:8px;
  color: rgba(232,238,255,.90);
  font-size: 13px;
  line-height: 1.42;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

.emptyState{padding: 4px 0 8px;}
.emptyState__title{font-weight:900; color:rgba(232,238,255,.92);}
.emptyState__sub{margin-top:6px; color:var(--muted2); font-size:13px; line-height:1.35;}

.indicator{
  font-size:12px;
  letter-spacing:.4px;
  text-transform:uppercase;
  color:rgba(232,238,255,.82);
}

.iconBtn{
  height:34px;
  min-width:34px;
  padding:0 10px;
  border-radius: 12px;
  border:1px solid rgba(150,185,255,.18);
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor:pointer;
  opacity:.9;
  transition: transform .12s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
}
.iconBtn:hover{transform: translateY(-1px); border-color: rgba(98,214,255,.45); background: rgba(255,255,255,.08); opacity:1;}
.iconBtn:active{transform: translateY(0px);}

.modelGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items:stretch;
}

.modelCard{
  border-radius: var(--rLg);
  overflow:hidden;
  border:1px solid rgba(150,185,255,.16);
  background:
    radial-gradient(420px 240px at 10% 0%, rgba(98,214,255,.14), transparent 58%),
    linear-gradient(180deg, rgba(16,22,44,.56), rgba(6,7,13,.28));
  box-shadow: 0 18px 48px rgba(0,0,0,.42);
  position:relative;
  min-width:0;
}
.modelCard::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0;
  background: radial-gradient(500px 200px at 50% 0%, rgba(98,214,255,.18), transparent 70%);
  transition: opacity .25s ease;
}
.modelCard:hover::after{opacity:1;}
.modelCard--active{
  border-color: rgba(98,214,255,.55);
  box-shadow: 0 24px 70px rgba(98,214,255,.12), 0 18px 48px rgba(0,0,0,.44);
}
.modelHeader{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.avatar{
  width:36px;
  height:36px;
  border-radius: 14px;
  flex:none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 18px 28px rgba(0,0,0,.25);
  position:relative;
}
.avatar--c0{background: linear-gradient(135deg, rgba(98,214,255,.95), rgba(156,123,255,.72));}
.avatar--c1{background: linear-gradient(135deg, rgba(56,243,163,.92), rgba(98,214,255,.74));}
.avatar--c2{background: linear-gradient(135deg, rgba(255,181,90,.92), rgba(255,86,107,.64));}
.avatar--c3{background: linear-gradient(135deg, rgba(156,123,255,.92), rgba(98,214,255,.70));}
.avatar--c4{background: linear-gradient(135deg, rgba(255,86,107,.92), rgba(98,214,255,.62));}
.avatar--c5{background: linear-gradient(135deg, rgba(56,243,163,.92), rgba(156,123,255,.62));}
.avatar--c6{background: linear-gradient(135deg, rgba(98,214,255,.92), rgba(56,243,163,.60));}
.avatar--c7{background: linear-gradient(135deg, rgba(255,181,90,.92), rgba(156,123,255,.62));}
.avatar--c8{background: linear-gradient(135deg, rgba(255,86,107,.92), rgba(255,181,90,.58));}
.avatar--c9{background: linear-gradient(135deg, rgba(156,123,255,.92), rgba(56,243,163,.58));}
.avatar--c10{background: linear-gradient(135deg, rgba(98,214,255,.92), rgba(255,181,90,.55));}
.avatar--c11{background: linear-gradient(135deg, rgba(56,243,163,.92), rgba(255,86,107,.52));}
.avatar::before{
  content:"";
  position:absolute;
  inset:-3px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.18);
  opacity:.55;
}
.avatarRing{
  position:absolute;
  inset:-6px;
  border-radius: 18px;
  border: 2px solid rgba(98,214,255,.0);
  box-shadow: 0 0 0 0 rgba(98,214,255,0);
  opacity:0;
}
.modelCard--active .avatarRing{
  opacity:1;
  border-color: rgba(98,214,255,.45);
  animation: avatarRing 1.2s ease-in-out infinite;
}
@keyframes avatarRing{
  0%{transform:scale(.96); box-shadow: 0 0 0 0 rgba(98,214,255,.24);}
  55%{transform:scale(1); box-shadow: 0 0 0 14px rgba(98,214,255,0);}
  100%{transform:scale(.96); box-shadow: 0 0 0 0 rgba(98,214,255,0);}
}
.modelMeta{min-width:0; flex:1;}
.modelName{font-weight:900; letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.modelSub{margin-top:2px; font-size:12px; color:var(--muted2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.modelBadges{display:flex; gap:8px; align-items:center;}
.livePip{
  width:10px;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(150,185,255,.16);
  box-shadow:none;
  opacity:.75;
}
.modelCard--active .livePip{
  background: rgba(98,214,255,.92);
  border-color: rgba(98,214,255,.45);
  box-shadow: 0 0 16px rgba(98,214,255,.35);
  animation: pipBlink .9s ease-in-out infinite;
}
@keyframes pipBlink{0%,100%{opacity:.55}50%{opacity:1}}

.modelStream{
  height: 360px;
  padding: 12px 14px 20px;
  overflow:auto;
  scroll-padding-bottom: 20px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(98,214,255,.72) rgba(255,255,255,.08);
}
.modelStream::-webkit-scrollbar{width:12px; height:12px}
.modelStream::-webkit-scrollbar-track{
  background: rgba(255,255,255,.06);
  border-radius: 999px;
}
.modelStream::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(98,214,255,.9), rgba(150,185,255,.78));
  border-radius:999px;
  border:2px solid rgba(7,10,18,.78);
}
.modelStream::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, rgba(98,214,255,1), rgba(150,185,255,.92));
}

.msg{
  margin: 0 0 12px;
  transform: translateY(6px);
  opacity: 0;
  animation: msgIn .18s ease forwards;
}
@keyframes msgIn{
  to{transform: translateY(0); opacity: 1;}
}
.msg__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
  color: var(--muted2);
  font-size:11px;
  letter-spacing:.35px;
  text-transform:uppercase;
}
.msg__metaLeft{display:flex; gap:8px; align-items:center; min-width:0;}
.badgeRound{
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(150,185,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(232,238,255,.88);
  white-space:nowrap;
}
.badgeRound--interrupt{border-color: rgba(255,181,90,.28); background: rgba(255,181,90,.10);}
.badgeRound--final{border-color: rgba(56,243,163,.28); background: rgba(56,243,163,.10);}
.msg__bubble{
  border-radius: 16px;
  padding: 10px 12px;
  background:
    radial-gradient(220px 120px at 18% 18%, rgba(255,255,255,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border:1px solid rgba(150,185,255,.14);
  box-shadow: 0 12px 24px rgba(0,0,0,.25);
  white-space: pre-wrap;
  overflow-wrap:anywhere;
  word-break: break-word;
  line-height:1.42;
  font-size:13.5px;
}
.msg--streaming .msg__bubble{
  border-color: rgba(98,214,255,.35);
  box-shadow: 0 18px 36px rgba(98,214,255,.08), 0 12px 24px rgba(0,0,0,.24);
}
.typingDots{
  display:inline-flex;
  gap:4px;
  align-items:center;
  height:12px;
  margin-left:8px;
  opacity:.75;
}
.typingDots span{
  width:4px;
  height:4px;
  border-radius:999px;
  background: rgba(98,214,255,.9);
  animation: dots 1.0s ease-in-out infinite;
}
.typingDots span:nth-child(2){animation-delay:.12s}
.typingDots span:nth-child(3){animation-delay:.24s}
@keyframes dots{0%,100%{transform:translateY(0); opacity:.5}50%{transform:translateY(-3px); opacity:1}}

.msg__streamHint{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color: var(--muted2);
  font-size:11px;
  letter-spacing:.35px;
}
.tokenBar{
  -webkit-appearance:none;
  appearance:none;
  display:block;
  flex:1;
  height:8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  overflow:hidden;
}
.tokenBar::-webkit-progress-bar{background: rgba(255,255,255,.06);}
.tokenBar::-webkit-progress-value{
  background: linear-gradient(90deg, rgba(98,214,255,.9), rgba(56,243,163,.7));
  border-radius:999px;
}
.tokenBar::-moz-progress-bar{
  background: linear-gradient(90deg, rgba(98,214,255,.9), rgba(56,243,163,.7));
}

.scorebar{
  margin: 12px 14px 14px;
  border-radius: var(--rLg);
  border:1px solid rgba(150,185,255,.14);
  background: rgba(6,7,13,.22);
  overflow:hidden;
}
.scorebar__header{
  padding: 10px 12px;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid rgba(150,185,255,.10);
}
.scorebar__title{margin:0; font-size:12px; letter-spacing:.5px; text-transform:uppercase;}
.scorebar__sub{font-size:12px; color:var(--muted2);}
.scorebar__rows{display:grid; gap:8px; padding: 10px 12px;}
.scoreRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 10px;
  border-radius: 14px;
  border:1px solid rgba(150,185,255,.12);
  background: rgba(255,255,255,.04);
}
.scoreRow__left{display:flex; align-items:center; gap:10px; min-width:0;}
.scoreRow__name{font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.scoreRow__value{font-family:var(--mono); font-size:12px; color:rgba(232,238,255,.82);}
.scoreDot{
  width:10px;
  height:10px;
  border-radius:999px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14);
  flex:none;
}
.scoreDot--c0{background: linear-gradient(135deg, rgba(98,214,255,.95), rgba(156,123,255,.72));}
.scoreDot--c1{background: linear-gradient(135deg, rgba(56,243,163,.92), rgba(98,214,255,.74));}
.scoreDot--c2{background: linear-gradient(135deg, rgba(255,181,90,.92), rgba(255,86,107,.64));}
.scoreDot--c3{background: linear-gradient(135deg, rgba(156,123,255,.92), rgba(98,214,255,.70));}
.scoreDot--c4{background: linear-gradient(135deg, rgba(255,86,107,.92), rgba(98,214,255,.62));}
.scoreDot--c5{background: linear-gradient(135deg, rgba(56,243,163,.92), rgba(156,123,255,.62));}
.scoreDot--c6{background: linear-gradient(135deg, rgba(98,214,255,.92), rgba(56,243,163,.60));}
.scoreDot--c7{background: linear-gradient(135deg, rgba(255,181,90,.92), rgba(156,123,255,.62));}
.scoreDot--c8{background: linear-gradient(135deg, rgba(255,86,107,.92), rgba(255,181,90,.58));}
.scoreDot--c9{background: linear-gradient(135deg, rgba(156,123,255,.92), rgba(56,243,163,.58));}
.scoreDot--c10{background: linear-gradient(135deg, rgba(98,214,255,.92), rgba(255,181,90,.55));}
.scoreDot--c11{background: linear-gradient(135deg, rgba(56,243,163,.92), rgba(255,86,107,.52));}

.scoreSpark{
  -webkit-appearance:none;
  appearance:none;
  display:block;
  width:60px;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  overflow:hidden;
}
.scoreSpark::-webkit-progress-bar{background: rgba(255,255,255,.06);}
.scoreSpark::-webkit-progress-value{
  background: linear-gradient(90deg, rgba(98,214,255,.9), rgba(156,123,255,.7));
  border-radius:999px;
}
.scoreSpark::-moz-progress-bar{
  background: linear-gradient(90deg, rgba(98,214,255,.9), rgba(156,123,255,.7));
}

body.isModalOpen{overflow:hidden;}

.copyTextarea{
  position: fixed;
  top: -9999px;
  left: -9999px;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.sideTabs{
  display:flex;
  gap:8px;
  padding: 10px;
  border-bottom:1px solid rgba(150,185,255,.14);
  background: rgba(255,255,255,.03);
}
.tab{
  flex:1;
  height:34px;
  border-radius: 12px;
  border:1px solid rgba(150,185,255,.14);
  background: rgba(6,7,13,.20);
  color: rgba(232,238,255,.9);
  cursor:pointer;
  font-weight:800;
  letter-spacing:.2px;
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}
.tab:hover{transform: translateY(-1px); border-color: rgba(98,214,255,.35);}
.tab--active{
  background: linear-gradient(135deg, rgba(98,214,255,.30), rgba(156,123,255,.22));
  border-color: rgba(98,214,255,.38);
}

.sidePanel{display:none; padding: 12px 14px 14px;}
.sidePanel--active{display:block;}
.sidePanel__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.sidePanel__meta{color:var(--muted2); font-size:12px;}

.list,.historyList{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}

.timeline-entry{
  padding: 10px 10px 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(150,185,255,.12);
  background: rgba(255,255,255,.03);
  font-size:13px;
  color: rgba(232,238,255,.88);
  position:relative;
  overflow:hidden;
}
.timeline-entry::before{
  content:"";
  position:absolute;
  inset:0;
  width:4px;
  background: rgba(150,185,255,.18);
}
.timeline-round::before{background: rgba(98,214,255,.65);}
.timeline-interrupt::before{background: rgba(255,181,90,.75);}
.timeline-judge::before{background: rgba(56,243,163,.75);}

/* Share link timeline entry */
.timeline-share{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  border-color: rgba(56,243,163,.22);
  background: rgba(56,243,163,.05);
}
.timeline-share::before{background: rgba(56,243,163,.75);}
.timeline-share__label{
  color: rgba(56,243,163,.9);
  font-weight:700;
  white-space:nowrap;
  flex-shrink:0;
}
.timeline-share__url{
  color: rgba(98,214,255,.9);
  font-family: monospace;
  font-size:12px;
  word-break:break-all;
  flex:1;
  min-width:0;
}
.timeline-share__copy{
  flex-shrink:0;
  background:transparent;
  border:1px solid rgba(56,243,163,.3);
  color: rgba(56,243,163,.9);
  border-radius:8px;
  padding:2px 8px;
  cursor:pointer;
  font-size:13px;
  transition: background .15s, border-color .15s;
}
.timeline-share__copy:hover{background: rgba(56,243,163,.1); border-color: rgba(56,243,163,.6);}

/* Share icon button in judge card header */
.iconBtn--share{
  border-color: rgba(56,243,163,.28);
  color: rgba(56,243,163,.9);
}
.iconBtn--share:hover{border-color: rgba(56,243,163,.6); background: rgba(56,243,163,.08);}

.historyCard{
  border-radius: var(--rLg);
  border:1px solid rgba(150,185,255,.14);
  background: rgba(6,7,13,.22);
  overflow:hidden;
  position:relative;
}
.historyItem{
  width:100%;
  text-align:left;
  padding: 10px 12px;
  background: transparent;
  border:0;
  color: var(--text);
  cursor:pointer;
}
.historyItem:hover{background: rgba(255,255,255,.04);}
.historyItem__copyLink{
  position:absolute;
  top:10px;
  right:8px;
  background:transparent;
  border:0;
  color:var(--muted2);
  cursor:pointer;
  font-size:14px;
  padding:2px 6px;
  border-radius:6px;
  opacity:0;
  transition:opacity .15s;
}
.historyCard:hover .historyItem__copyLink{opacity:1;}
.historyItem__copyLink:focus{opacity:1; outline:1px solid rgba(56,243,163,.4);}
.historyItem__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.historyItem__topic{
  font-weight:900;
  letter-spacing:.2px;
  line-height:1.2;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.historyItem__meta{
  margin-top:6px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  color: var(--muted2);
  font-size:12px;
}
.pill{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(150,185,255,.14);
  background: rgba(255,255,255,.05);
  color: rgba(232,238,255,.85);
}
.pill--ok{border-color: rgba(56,243,163,.22); background: rgba(56,243,163,.08);}
.pill--warn{border-color: rgba(255,181,90,.22); background: rgba(255,181,90,.08);}
.pill--bad{border-color: rgba(255,86,107,.22); background: rgba(255,86,107,.08);}

.replayListItem{
  padding: 8px 10px;
  border-radius: 14px;
  border:1px solid rgba(150,185,255,.10);
  background: rgba(255,255,255,.03);
  font-size:12px;
  color: rgba(232,238,255,.84);
  font-family: var(--mono);
}

.mobileNav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:120;
  display:none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:8px;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(6,7,13,.22), rgba(6,7,13,.90));
  border-top:1px solid rgba(150,185,255,.18);
  backdrop-filter: blur(12px);
}
.mobileNav__btn{
  min-height:48px;
  border-radius: 14px;
  border:1px solid rgba(150,185,255,.18);
  background: rgba(255,255,255,.05);
  color: rgba(232,238,255,.88);
  font: inherit;
  font-size:12px;
  font-weight:800;
  letter-spacing:.24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  cursor:pointer;
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}
.mobileNav__btn:hover{
  border-color: rgba(98,214,255,.42);
  transform: translateY(-1px);
}
.mobileNav__btn:active{transform: translateY(0);}
.mobileNav__btn--active{
  background: linear-gradient(135deg, rgba(98,214,255,.28), rgba(156,123,255,.22));
  border-color: rgba(98,214,255,.45);
  color: rgba(232,238,255,.98);
}
.mobileNav__icon{
  width:18px;
  height:18px;
}
.mobileNav__icon *{
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.mobileNav__label{
  line-height:1;
  white-space:nowrap;
}
.mobileTopicToggle{
  display:none;
  height:32px;
  padding:0 10px;
  border-radius: 999px;
  border:1px solid rgba(98,214,255,.28);
  background: rgba(98,214,255,.12);
  color: rgba(232,238,255,.92);
  font: inherit;
  font-size:11px;
  font-weight:800;
  letter-spacing:.3px;
  cursor:pointer;
  transition: background .18s ease, border-color .18s ease;
}
.mobileTopicToggle:hover{
  border-color: rgba(98,214,255,.55);
  background: rgba(98,214,255,.18);
}

@keyframes topoGlow{
  0%{transform:scale(1); filter: drop-shadow(0 0 4px rgba(98,214,255,.28));}
  50%{transform:scale(1.08); filter: drop-shadow(0 0 13px rgba(98,214,255,.62));}
  100%{transform:scale(1); filter: drop-shadow(0 0 4px rgba(98,214,255,.28));}
}
@keyframes topoShake{
  0%{transform:translateX(0)}
  25%{transform:translateX(-2px)}
  50%{transform:translateX(2px)}
  75%{transform:translateX(-1px)}
  100%{transform:translateX(0)}
}
@keyframes edgeDraw{
  from{opacity:.1; stroke-dashoffset: 20;}
  to{opacity:1; stroke-dashoffset: 0;}
}
@keyframes edgeFade{
  from{opacity:1}
  to{opacity:0}
}
@keyframes allianceLinkPulse{
  0%,100%{opacity:.8; stroke-width:4.1}
  50%{opacity:1; stroke-width:4.8}
}

.maximized-overlay{
  position:fixed;
  inset:0;
  z-index:200;
  background: rgba(6,7,13,.78);
  display:flex;
  align-items:center;
  justify-content:center;
  backdrop-filter: blur(14px);
}
.maximized-overlay.hidden{display:none}
.maximized-container{
  width:min(1180px, 92vw);
  height: min(92vh, 920px);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16,22,44,.75), rgba(6,7,13,.55));
  border: 1px solid rgba(98,214,255,.28);
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.maximized-header{
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid rgba(150,185,255,.14);
}
.maximized-title-group{display:flex; align-items:baseline; gap:10px; min-width:0;}
.maximized-title{
  font-weight:950;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.maximized-indicator{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.4px;
  color: var(--muted2);
}
.maximized-close{
  height:34px;
  padding:0 12px;
  border-radius: 12px;
  border:1px solid rgba(255,86,107,.30);
  background: rgba(255,86,107,.14);
  color: rgba(232,238,255,.95);
  cursor:pointer;
  font-weight:900;
}
.maximized-close:hover{background: rgba(255,86,107,.20);}
.maximized-stream{
  flex:1;
  margin:0;
  padding: 14px;
  overflow:auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
  word-break: break-word;
}

/* Responsive */
@media (max-width: 1180px){
  .arenaGrid{grid-template-columns: 300px 1fr 340px;}
}
@media (max-width: 980px){
  .hud{grid-template-columns: 1fr; gap:10px;}
  .hud__right{justify-content:flex-start}
  .arenaGrid{grid-template-columns: 1fr;}
  .panel--stage .panel__header{top:0;}
  .modelGrid{grid-template-columns: 1fr;}
  .modelStream{height: 320px;}
  .topo-svg{height:200px;}
}
@media (max-width: 768px){
  .mobileNav{display:grid;}
  .app{
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }
  .hud{
    min-height: 72px;
    grid-template-columns: 1fr;
    gap:8px;
    padding: 10px 10px;
  }
  .hud__left{
    justify-content:space-between;
    gap:8px;
  }
  .mobileTopicToggle{
    display:none;
    min-height:32px;
    margin-left:auto;
  }
  .app.mobileDebateActive .mobileTopicToggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .hud__center{
    display:flex;
    order:2;
    width:100%;
  }
  .hud__right{
    order:3;
    justify-content:flex-start;
    width:100%;
  }
  .hudControls{
    width:100%;
    gap:6px;
  }
  .hudControls__row{
    width:100%;
    justify-content:flex-start;
  }
  .hudControls__row:not(.hudControls__row--actions){
    display:none;
  }
  .hudControls__row--actions{
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width:100%;
    gap:8px;
  }
  .topicBox{
    padding:8px 10px 10px;
    border-radius:14px;
  }
  .topicBox__meta{
    margin-top:6px;
    gap:6px;
  }
  .progress{
    margin-top:8px;
    height:8px;
  }
  .app.mobileDebateActive:not(.mobileTopicExpanded) .topicBox{
    padding:8px 10px;
  }
  .app.mobileDebateActive:not(.mobileTopicExpanded) .topicBox__meta,
  .app.mobileDebateActive:not(.mobileTopicExpanded) .progress{
    display:none;
  }
  .app.mobileDebateActive:not(.mobileTopicExpanded) .topicBox__input{
    font-size:14px;
    padding:8px 10px;
    background: rgba(6,7,13,.28);
    color: rgba(232,238,255,.84);
  }
  .arenaGrid{
    grid-template-columns: 1fr;
    padding: 10px;
    gap:10px;
  }
  .leftCol,
  .panel--side{
    display:none;
  }
  .panel--stage{
    display:block;
  }
  .app.mobileView--config .leftCol{
    display:flex;
  }
  .app.mobileView--config .panel--stage,
  .app.mobileView--config .panel--side{
    display:none;
  }
  .app.mobileView--timeline .panel--side{
    display:block;
  }
  .app.mobileView--timeline .leftCol,
  .app.mobileView--timeline .panel--stage{
    display:none;
  }
  .panel--stage .panel__header{
    top:0;
  }
  .stage{padding: 10px;}
  .scorebar{
    margin: 10px 10px 12px;
  }
  .modelStream{
    height:auto;
    max-height:50vh;
    padding: 12px;
  }
  .msg__bubble{
    font-size:14.5px;
    line-height:1.5;
    padding:12px;
  }
  .topo-svg{
    height:210px;
  }
  .scoreRow{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
  .scoreSpark{
    width:100%;
  }
  .tab{
    min-height:44px;
    padding: 0 10px;
  }
  .btn,
  button,
  .iconBtn,
  .miniField__control{
    min-height:44px;
  }
  .topicBox__input{
    font-size:16px;
    padding:12px 12px;
  }
}
@media (max-width: 480px){
  .arenaGrid{
    padding: 8px;
    gap:8px;
  }
  .hud{
    padding: 8px;
  }
  .brand__subtitle{
    display:none;
  }
  .badge{
    padding:6px 9px;
    font-size:11px;
  }
  .panel__header,
  .panel__body{
    padding-left:10px;
    padding-right:10px;
  }
  .topicBox__meta{
    justify-content:flex-start;
  }
  .chip{
    font-size:11px;
    padding:5px 8px;
  }
  .progress{
    display:none;
  }
  .miniField{
    min-width:100%;
  }
  .btn{
    width:100%;
  }
  .hudControls__row--actions{
    grid-template-columns:1fr;
  }
  .modelHeader{
    padding:10px 12px;
  }
  .msg{
    margin-bottom:10px;
  }
  .mobileTopicToggle{
    font-size:10px;
    padding:0 8px;
  }
}

/* ── Auth Overlay ─────────────────────────────────────────── */
.auth-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(6,7,13,.88);
  backdrop-filter:blur(18px);
}
.auth-overlay.hidden{display:none}
.auth-card{
  width:min(400px,90vw);
  padding:32px 28px;
  border-radius:22px;
  background:
    radial-gradient(360px 200px at 30% 0%, rgba(98,214,255,.16), transparent 60%),
    linear-gradient(180deg, rgba(16,22,44,.82), rgba(6,7,13,.65));
  border:1px solid rgba(98,214,255,.22);
  box-shadow:0 30px 80px rgba(0,0,0,.65);
  text-align:center;
}
.auth-card__icon{
  width:48px;
  height:48px;
  margin:0 auto 16px;
  border-radius:16px;
  background:linear-gradient(135deg, rgba(98,214,255,.92), rgba(156,123,255,.88));
  box-shadow:0 0 0 1px rgba(255,255,255,.14), 0 18px 30px rgba(98,214,255,.16);
}
.auth-card__title{
  margin:0 0 6px;
  font-size:18px;
  font-weight:900;
  letter-spacing:.2px;
}
.auth-card__sub{
  margin:0 0 20px;
  color:var(--muted2);
  font-size:13px;
}
.auth-card__input{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(150,185,255,.22);
  background:rgba(6,7,13,.45);
  color:var(--text);
  font-size:14px;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}
.auth-card__input:focus{
  border-color:rgba(98,214,255,.55);
  box-shadow:0 0 0 4px rgba(98,214,255,.12);
}
.auth-card__btn{
  width:100%;
  margin-top:14px;
  height:42px;
  font-size:14px;
}
.auth-card__error{
  margin:12px 0 0;
  color:var(--red);
  font-size:13px;
  font-weight:700;
}

/* Intervention Panel - Sidebar (Desktop) / Bottom Sheet (Mobile) */
.intervention-panel{
  position:fixed;
  inset:0;
  z-index:9998;
  pointer-events:none;
}
.intervention-panel.hidden{
  display:none;
}
.intervention-panel__backdrop{
  position:absolute;
  inset:0;
  background:rgba(6,7,13,.6);
  backdrop-filter:blur(8px);
  opacity:0;
  transition:opacity .3s ease;
  pointer-events:auto;
}
.intervention-panel:not(.hidden) .intervention-panel__backdrop{
  opacity:1;
}
.intervention-panel__content{
  position:absolute;
  right:0;
  top:0;
  bottom:0;
  width:min(480px,85vw);
  max-width:100%;
  background:
    radial-gradient(360px 200px at 30% 0%, rgba(56,243,163,.12), transparent 60%),
    linear-gradient(180deg, rgba(16,22,44,.92), rgba(6,7,13,.85));
  border-left:1px solid rgba(56,243,163,.22);
  box-shadow:-8px 0 32px rgba(0,0,0,.4);
  display:flex;
  flex-direction:column;
  transform:translateX(100%);
  transition:transform .3s cubic-bezier(0.4,0,0.2,1);
  pointer-events:auto;
  overflow:hidden;
}
.intervention-panel:not(.hidden) .intervention-panel__content{
  transform:translateX(0);
}
.intervention-panel__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:20px 24px;
  border-bottom:1px solid rgba(150,185,255,.12);
  flex-shrink:0;
}
.intervention-panel__title{
  margin:0;
  font-size:18px;
  font-weight:900;
  letter-spacing:.2px;
  color:var(--green);
}
.intervention-panel__close{
  width:32px;
  height:32px;
  border-radius:8px;
  border:none;
  background:rgba(150,185,255,.08);
  color:var(--muted);
  font-size:24px;
  line-height:1;
  cursor:pointer;
  transition:background .18s ease, color .18s ease;
  display:flex;
  align-items:center;
  justify-content:center;
}
.intervention-panel__close:hover{
  background:rgba(150,185,255,.16);
  color:var(--text);
}
.intervention-panel__context{
  padding:16px 24px;
  border-bottom:1px solid rgba(150,185,255,.12);
  flex-shrink:0;
  max-height:200px;
  overflow-y:auto;
}
.intervention-context__section{
  margin-bottom:16px;
}
.intervention-context__section:last-child{
  margin-bottom:0;
}
.intervention-context__title{
  margin:0 0 8px;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--muted2);
}
.intervention-context__messages{
  font-size:12px;
  color:var(--muted);
  line-height:1.5;
  max-height:80px;
  overflow-y:auto;
}
.intervention-context__messages .msg-preview{
  margin-bottom:6px;
  padding:6px 8px;
  border-radius:6px;
  background:rgba(150,185,255,.05);
}
.intervention-context__messages .msg-preview:last-child{
  margin-bottom:0;
}
.intervention-context__scores{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.intervention-context__score-item{
  padding:6px 10px;
  border-radius:6px;
  background:rgba(150,185,255,.08);
  font-size:11px;
  color:var(--muted);
}
.intervention-panel__body{
  flex:1;
  padding:24px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
}
.intervention-panel__sub{
  margin:0 0 16px;
  color:var(--muted2);
  font-size:13px;
  line-height:1.5;
}
.intervention-panel__textarea{
  width:100%;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(150,185,255,.22);
  background:rgba(6,7,13,.45);
  color:var(--text);
  font-size:14px;
  font-family:var(--sans);
  line-height:1.6;
  resize:vertical;
  min-height:120px;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
  margin-bottom:12px;
  flex:1;
}
.intervention-panel__textarea:focus{
  border-color:rgba(56,243,163,.55);
  box-shadow:0 0 0 4px rgba(56,243,163,.12);
}
.intervention-panel__char-count{
  color:var(--muted2);
  font-size:12px;
  text-align:right;
}
.intervention-panel__footer{
  padding:20px 24px;
  border-top:1px solid rgba(150,185,255,.12);
  display:flex;
  gap:10px;
  flex-shrink:0;
}
.intervention-panel__footer .btn{
  flex:1;
  height:40px;
  font-size:14px;
}
.intervention-panel__error{
  margin:12px 24px 0;
  color:var(--red);
  font-size:13px;
  font-weight:700;
  text-align:center;
}

/* Intervene Button (FAB) */
.intervene-btn{
  position:fixed;
  bottom:24px;
  right:24px;
  z-index:9997;
  display:flex;
  align-items:center;
  gap:8px;
  padding:14px 20px;
  border-radius:28px;
  border:none;
  background:linear-gradient(135deg, rgba(56,243,163,.95), rgba(56,243,163,.85));
  color:#0a0d18;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(56,243,163,.3);
  transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  opacity:0;
  transform:scale(0.9);
  pointer-events:none;
}
.intervene-btn:not(.hidden){
  opacity:1;
  transform:scale(1);
  pointer-events:auto;
}
.intervene-btn:hover{
  transform:scale(1.05);
  box-shadow:0 12px 32px rgba(56,243,163,.4);
}
.intervene-btn:active{
  transform:scale(0.98);
}
.intervene-btn__icon{
  font-size:18px;
  line-height:1;
}
.intervene-btn__text{
  font-weight:700;
}

/* Mobile: Bottom Sheet Pattern */
@media (max-width:768px){
  .intervention-panel__content{
    right:0;
    left:0;
    top:auto;
    bottom:0;
    width:100%;
    max-width:100%;
    border-left:none;
    border-top:1px solid rgba(56,243,163,.22);
    border-radius:24px 24px 0 0;
    max-height:85vh;
    transform:translateY(100%);
  }
  .intervention-panel:not(.hidden) .intervention-panel__content{
    transform:translateY(0);
  }
  .intervention-panel__backdrop{
    background:rgba(6,7,13,.75);
  }
  .intervention-panel__context{
    max-height:150px;
  }
  .intervene-btn{
    bottom:80px;
    right:16px;
    left:16px;
    justify-content:center;
    border-radius:16px;
  }
}
