/* LYGO Arena — shell styles.
   Same stone-and-cyan family as the rest of chatagent.ca, laid out for spectating: two
   team panels that stay readable while the fight happens, and a ring that keeps the ring. */
:root {
  --bg: #07080e; --panel: #0c1018ee; --panel-2: #0a0e16;
  --line: #1e2a3a; --line-2: #2b3a4f;
  --cyan: #5eead4; --gold: #fbbf24; --red: #f87171; --green: #4ade80;
  --mute: #94a3b8; --text: #e8eef5;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: "Source Sans 3", system-ui, sans-serif; overflow: hidden; }
body { display: grid; grid-template-rows: auto 1fr auto; }
.hidden { display: none !important; }
b, strong { color: var(--text); }
button { font: inherit; color: inherit; }
h1, h2, h3, .brand, .kicker, .btn { font-family: Syne, sans-serif; }

/* ------------------------------------------------------------------- boot --- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; gap: .4rem;
  background: radial-gradient(ellipse at 50% 30%, #1a1428 0%, #07080e 70%); z-index: 60; }
.boot h1 { margin: 0; letter-spacing: .06em; font-size: clamp(2rem, 6vw, 3.2rem); }
.kicker { letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); font-size: .72rem; margin: 0 0 .2rem; }
.boot-msg { color: var(--mute); }

/* -------------------------------------------------------------------- top --- */
.top { display: flex; align-items: center; gap: .5rem; padding: .4rem .7rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); background: #080a10; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; font-size: .95rem; }
.games-mini { color: var(--gold); text-decoration: none; font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 700; }
.grow { flex: 1 1 auto; }
.phase-pill { font-family: "IBM Plex Mono", monospace; font-size: .72rem; letter-spacing: .14em;
  padding: .26rem .7rem; border: 1px solid var(--cyan); color: var(--cyan); border-radius: 999px; }
.paypal-mini { color: #fff; background: #0070ba; text-decoration: none; font-size: .7rem;
  padding: .26rem .55rem; border-radius: 7px; font-weight: 700; }
.speed { display: flex; gap: .22rem; }
.btn { border: 1px solid var(--line-2); background: #0d141f; color: var(--text); border-radius: 9px;
  padding: .34rem .7rem; cursor: pointer; font-weight: 700; font-size: .8rem; letter-spacing: .03em;
  transition: border-color .14s ease, transform .12s ease, background .14s ease; }
.btn:hover { border-color: var(--cyan); transform: translateY(-1px); }
.btn.ghost { background: transparent; font-size: .72rem; padding: .3rem .55rem; color: var(--mute); }
.btn.ghost:hover, .btn.ghost.on { color: var(--text); border-color: var(--cyan); }
.btn.gold { background: linear-gradient(180deg, #fde68a, #f59e0b); color: #1a1206; border-color: #f59e0b; }
.btn.big { padding: .6rem 1.1rem; font-size: .95rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ----------------------------------------------------------------- battle --- */
.battle { min-height: 0; }
.stage { display: grid; grid-template-columns: 268px minmax(0, 1fr) 268px; height: 100%; min-height: 0; }
.viewport { position: relative; min-width: 0; min-height: 0; background: #05060a; }
#arena { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.team { background: var(--panel-2); border: 0 solid var(--line); overflow: hidden auto; padding: .5rem; }
.team.left { border-right-width: 1px; }
.team.right { border-left-width: 1px; }
.theading { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; margin-bottom: .4rem; }
.theading h3 { margin: 0; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.theading .tag { font-family: "IBM Plex Mono", monospace; font-size: .66rem; color: var(--cyan); }
.trows { display: flex; flex-direction: column; gap: .38rem; }
.trow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .45rem; align-items: center;
  padding: .34rem; border: 1px solid var(--line); border-radius: 10px; background: #080c14; }
.trow.down { opacity: .42; filter: grayscale(.7); }
.tart { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: #0d121c;
  image-rendering: pixelated; }
.tname { display: flex; align-items: baseline; justify-content: space-between; gap: .3rem; font-size: .82rem; }
.tname b { font-weight: 600; }
.tname .tpw { font-family: "IBM Plex Mono", monospace; font-size: .62rem; color: var(--mute); }
.tbar { position: relative; height: 7px; margin: .22rem 0 .2rem; background: #16202e; border-radius: 99px; overflow: hidden; }
.tbar .hp { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #34d399, #5eead4); }
.tbar .hp.foe { background: linear-gradient(90deg, #f87171, #fb923c); }
.tbar .hp.low { background: linear-gradient(90deg, #ef4444, #f59e0b); }
.tbar .shd { position: absolute; inset: 0 auto 0 0; width: 0; background: #60a5fa88; box-shadow: inset 0 0 6px #93c5fd; }
.tstatus { display: flex; flex-wrap: wrap; gap: .2rem; min-height: 13px; }
.tstatus .st { font-style: normal; font-size: .58rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .05rem .3rem; border-radius: 5px; background: #1b2432; color: var(--mute); }
.tstatus .st.burn, .tstatus .st.bleed { color: #fdba74; }
.tstatus .st.stun, .tstatus .st.root, .tstatus .st.silence { color: #fca5a5; }
.tstatus .st.regen, .tstatus .st.swift, .tstatus .st.haste, .tstatus .st.rage { color: #86efac; }
.tstatus .st.shield, .tstatus .st.ward { color: #93c5fd; }
.tcds { display: flex; gap: .2rem; }
.tcds .cd { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px;
  font-family: "IBM Plex Mono", monospace; font-size: .56rem; font-style: normal; letter-spacing: 0;
  border: 1px solid var(--line); color: var(--mute); background:
    linear-gradient(90deg, #1f2b3d var(--p, 0%), #0b1017 0); }
.tcds .cd.ready { color: #0b1017; background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.tcds .cd.off { opacity: .3; }
.announce { position: absolute; left: 50%; top: 20%; transform: translate(-50%, -50%);
  font: 800 clamp(2rem, 7vw, 4.4rem) Syne, sans-serif; color: var(--gold);
  text-shadow: 0 3px 0 #000, 0 0 26px #fbbf2488; pointer-events: none; opacity: 0; letter-spacing: .04em;
  transition: opacity .18s ease; }
.announce.show { opacity: 1; }
.meters { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center;
  gap: .5rem; background: #05070ce8; border: 1px solid var(--line); border-radius: 999px; padding: .22rem .6rem;
  width: min(460px, 84%); }
.meters i { height: 6px; border-radius: 99px; display: block; }
.meters .mo { background: linear-gradient(90deg, #34d399, #5eead4); width: 50%; }
.meters .mf { background: linear-gradient(90deg, #fb923c, #f87171); width: 50%; margin-left: auto; }
.meters span { font-family: "IBM Plex Mono", monospace; font-size: .74rem; color: var(--text); flex: 0 0 auto; }
.feed { position: absolute; left: 10px; bottom: 10px; width: min(330px, 56%); max-height: 40%;
  overflow: hidden; display: flex; flex-direction: column; gap: .18rem; pointer-events: none; }
.feed p { margin: 0; font-size: .76rem; line-height: 1.25; color: var(--text);
  background: #05070cd0; border-left: 2px solid var(--line-2); padding: .18rem .4rem; border-radius: 0 6px 6px 0;
  animation: feed-in .2s ease; }
.feed p span { font-family: "IBM Plex Mono", monospace; font-size: .64rem; color: var(--mute); margin-right: .35rem; }
.feed p.kill { border-left-color: var(--red); }
.feed p.move { border-left-color: var(--cyan); color: var(--cyan); }
.feed p.over { border-left-color: var(--gold); color: var(--gold); }
@keyframes feed-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------- dock --- */
.dock { display: flex; align-items: center; gap: .6rem; padding: .35rem .7rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); background: #080a10; position: relative; z-index: 35; }
.radio-inline { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.radio-inline button {
  background: #13202c; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: .28rem .55rem; cursor: pointer; font: 650 .72rem Syne, sans-serif;
}
.radio-title-inline { font-family: "IBM Plex Mono", monospace; font-size: .68rem; color: var(--mute);
  max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-vol { display: inline-flex; align-items: center; gap: .28rem;
  font: 650 .62rem "IBM Plex Mono", monospace; color: var(--mute); }
.radio-vol input { width: 88px; accent-color: var(--gold); cursor: pointer; }
.radio-dsp { font-size: .68rem; color: var(--mute); }
.radio-dsp a { color: var(--cyan); }
.dock-note { font-size: .74rem; color: var(--mute); }

/* ------------------------------------------------------------- title screen --- */
.menu { position: fixed; inset: 0; z-index: 30; background: #07080e; overflow: auto; }
.title-screen { min-height: 100%; display: grid; grid-template-columns: 1.15fr minmax(320px, 520px); }
.title-art { position: relative; min-height: 42vh; background: #05060a; }
.title-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.title-panel { padding: 1rem 1.1rem 4.4rem; overflow: auto; border-left: 1px solid var(--line);
  max-height: 100vh; background: #080b12; }
.menu-tabs { display: flex; gap: .35rem; flex-wrap: wrap; position: sticky; top: 0;
  background: #080b12; padding: .1rem 0 .55rem; z-index: 2; }
.name-block { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 200px; }
.name-block span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.hall-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .6rem;
  padding: .42rem .05rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
.hall-line b { font-family: Syne, sans-serif; }
.hall-line em { grid-column: 1 / -1; font-style: normal; color: var(--mute); font-size: .76rem; }
.hall-line.local em::before { content: "this browser · "; color: var(--gold); }
.donate-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 .25rem; }
.donate-row a { text-decoration: none; font: 700 .78rem Syne, sans-serif; padding: .5rem .75rem; border-radius: 8px; }
.donate-paypal { background: #0070ba; color: #fff; }
.donate-patreon { background: #f96854; color: #111; }
.how ol { margin: .2rem 0 .4rem; padding-left: 1.15rem; color: #c7d3e0; }
.how li { margin: .35rem 0; font-size: .86rem; line-height: 1.4; }

/* ---------------------------------------------------------------- overlay --- */
.overlay { position: fixed; inset: 0; z-index: 40; display: none; align-items: flex-start; justify-content: center;
  padding: 2.2vh 1rem; overflow-y: auto; background: #04060bf2; backdrop-filter: blur(3px); }
.overlay.show { display: flex; }
.sheet { width: min(1160px, 100%); background: linear-gradient(180deg, #0d121ce6, #080c14f5);
  border: 1px solid var(--line-2); border-radius: 16px; padding: 1.1rem 1.2rem 1.3rem;
  box-shadow: 0 24px 60px #000b; }
.sheet h1 { margin: .1rem 0 .5rem; font-size: clamp(1.6rem, 4.4vw, 2.6rem); letter-spacing: .02em; }
.lede { color: #c7d3e0; font-size: .9rem; line-height: 1.45; margin: 0 0 .9rem; max-width: 96ch; }
.lede.center { text-align: center; margin-inline: auto; }
.muted { color: var(--mute); font-size: .84rem; margin: 0; }

/* mode cards */
.modes { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.mode-card { flex: 1 1 150px; min-width: 140px; text-align: left; border: 1px solid var(--line-2);
  background: #0a1018; border-radius: 12px; padding: .5rem .6rem; cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease; }
.mode-card:hover { transform: translateY(-1px); border-color: var(--cyan); }
.mode-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px #fbbf2455 inset, 0 6px 18px #fbbf2422; }
.mode-card b { display: block; font-family: Syne, sans-serif; font-size: 1.02rem; }
.mode-card span { display: block; color: var(--mute); font-size: .72rem; line-height: 1.25; margin-top: .12rem; }

/* builder */
.builder { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .7rem; }
.builder-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; justify-content: space-between; }
.builder-head h2 { margin: 0; font-size: 1rem; letter-spacing: .04em; }
.builder-head h2 span { font-family: "IBM Plex Mono", monospace; font-size: .78rem; color: var(--gold); margin-left: .3rem; }
.filters { display: flex; flex-wrap: wrap; gap: .28rem; }
.tab { border: 1px solid var(--line); background: #0a0f18; color: var(--mute); border-radius: 8px;
  padding: .26rem .55rem; font-size: .72rem; cursor: pointer; letter-spacing: .05em; text-transform: uppercase; }
.tab:hover { color: var(--text); border-color: var(--line-2); }
.tab.on { color: #08130f; background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.tray { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .55rem 0 .6rem;
  min-height: 46px; border: 1px dashed var(--line-2); border-radius: 12px; padding: .4rem; }
.slot { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--gold); background: #12100a;
  border-radius: 10px; padding: .18rem .5rem .18rem .18rem; cursor: pointer; }
.slot img { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; image-rendering: pixelated; }
.slot b { font-size: .8rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem;
  max-height: 44vh; overflow-y: auto; padding-right: .2rem; }
.fcard { display: grid; gap: .28rem; text-align: left; border: 1px solid var(--line); background: #080c14;
  border-radius: 12px; padding: .45rem; cursor: pointer;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease; }
.fcard:hover { transform: translateY(-2px); border-color: var(--cyan); }
.fcard.picked { border-color: var(--gold); box-shadow: 0 0 0 1px #fbbf2455 inset; }
.fart { position: relative; aspect-ratio: 5 / 4; border-radius: 9px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 38%, #1b2233 0%, #0a0e16 72%); }
.fart img { width: 100%; height: 100%; object-fit: cover; }
.fart img.spr { width: auto; height: 68%; object-fit: contain; image-rendering: pixelated; }
.fart .cls { position: absolute; left: 5px; top: 5px; font-family: "IBM Plex Mono", monospace; font-size: .56rem;
  letter-spacing: .1em; text-transform: uppercase; padding: .1rem .32rem; border-radius: 5px;
  background: #05070cd0; color: var(--mute); border: 1px solid var(--line); }
.fart .cls.champ { color: var(--gold); border-color: #fbbf2455; }
.fart .cls.beast { color: #86efac; border-color: #4ade8055; }
.fart .cls.pet { color: #93c5fd; border-color: #60a5fa55; }
.fmeta { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; }
.fmeta b { font-family: Syne, sans-serif; font-size: .92rem; }
.fmeta u { text-decoration: none; color: var(--mute); font-size: .7rem; }
.fmeta .pw { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: .66rem; color: var(--cyan); }
.fkit { display: flex; flex-wrap: wrap; gap: .2rem; }
.fkit em { font-style: normal; font-size: .66rem; color: var(--cyan); background: #0d1a1c;
  border: 1px solid #14343a; border-radius: 5px; padding: .06rem .3rem; }
.fcards { display: flex; flex-wrap: wrap; gap: .18rem; }
.fcards i { font-style: normal; font-size: .6rem; letter-spacing: .04em; text-transform: uppercase;
  color: #d8c9a3; background: #1a1508; border: 1px solid #4a3a14; border-radius: 5px; padding: .05rem .28rem; }
.fbio { font-size: .72rem; color: #b6c2d0; line-height: 1.3; }
.fcounter { font-size: .68rem; color: #8fa3b8; font-style: italic; line-height: 1.3; }
.menu-foot { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem;
  border-top: 1px solid var(--line); padding-top: .7rem; }
.tally { font-size: .84rem; color: var(--mute); }
.tally b { color: var(--text); }
.tally .wins { color: var(--green); font-family: "IBM Plex Mono", monospace; }
.tally .losses { color: var(--red); font-family: "IBM Plex Mono", monospace; }
.callsign { font-size: .74rem; color: var(--mute); display: flex; align-items: center; gap: .35rem; }
.name-block input, .callsign input { background: #0a0f18; border: 1px solid var(--line); border-radius: 7px; color: var(--text);
  padding: .45rem .55rem; font: inherit; font-size: .92rem; width: 100%; max-width: 240px; }
.how { margin-top: .7rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.how summary { cursor: pointer; color: var(--cyan); font-size: .8rem; letter-spacing: .04em; }
.how p { color: #b6c2d0; font-size: .82rem; line-height: 1.4; }

/* vs sheet */
.vs-sheet h1.vs { text-align: center; color: var(--gold); letter-spacing: .2em; }
.vsgrid { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: center; }
.vsmark { font-family: Syne, sans-serif; font-weight: 800; color: var(--mute); font-size: 1.1rem; }
.vside { display: grid; gap: .35rem; }
.vcard { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: .5rem; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; padding: .3rem; background: #080c14; }
.vside.foe .vcard { border-color: #3b2325; }
.vcard img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; image-rendering: pixelated; }
.vcard b { font-size: .88rem; }
.vcard u { text-decoration: none; display: block; color: var(--mute); font-size: .68rem; }
.vcard em { font-style: normal; display: inline-block; margin: .18rem .22rem 0 0; font-size: .64rem;
  color: var(--cyan); background: #0d1a1c; border: 1px solid #14343a; border-radius: 5px; padding: .05rem .28rem; }
.vcard .pw { display: block; font-family: "IBM Plex Mono", monospace; font-size: .64rem; color: var(--gold); margin-top: .12rem; }

/* results */
.res-sheet h1 { text-align: center; }
.res-sheet.won h1 { color: var(--cyan); }
.res-sheet.lost h1 { color: var(--red); }
.table { margin: .8rem 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.thead, .trowline { display: grid; grid-template-columns: minmax(0, 2fr) .6fr .8fr .6fr .8fr .6fr;
  gap: .4rem; padding: .32rem .6rem; font-size: .8rem; }
.thead { background: #10161f; color: var(--mute); font-family: "IBM Plex Mono", monospace;
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.trowline { border-top: 1px solid var(--line); }
.trowline.you { background: #0a1418; }
.trowline span:nth-child(n + 3) { font-family: "IBM Plex Mono", monospace; color: #cbd5e1; }
.res-sheet .modes { justify-content: center; }

/* -------------------------------------------------------------- responsive -- */
@media (max-width: 860px) {
  .title-screen { grid-template-columns: 1fr; }
  .title-art { min-height: 28vh; max-height: 36vh; }
  .title-art img { height: 36vh; }
  .title-panel { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
}
@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
  .team { max-height: 22vh; }
  .team.left { border-right-width: 0; border-bottom-width: 1px; }
  .team.right { border-left-width: 0; border-top-width: 1px; }
  .trows { flex-direction: row; flex-wrap: wrap; }
  .trow { flex: 1 1 200px; }
  .feed { width: min(280px, 72%); }
  .vsgrid { grid-template-columns: 1fr; }
  .vsmark { text-align: center; }
  .grid { max-height: 38vh; }
}
@media (max-width: 620px) {
  .top { gap: .34rem; padding: .34rem .45rem; }
  .dock-note { display: none; }
  .thead, .trowline { grid-template-columns: minmax(0, 1.6fr) .5fr .8fr; }
  .thead span:nth-child(n + 4), .trowline span:nth-child(n + 4) { display: none; }
}
