/* Rocket Liga
   Éjszakai aréna: navy alap, a kék és a narancs csak a csapatokat jelenti,
   a toxikus sárgászöld csak a toxicmérőben jelenik meg, az arany csak az elsőt. */

/* ---------------------------------------------------------------- betűk */
@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  src: url("fonts/anybody-latin-standard-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  src: url("fonts/anybody-latin-ext-standard-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anybody";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  src: url("fonts/anybody-latin-standard-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anybody";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  src: url("fonts/anybody-latin-ext-standard-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Next";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Next";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------- tokenek */
:root {
  color-scheme: dark;
  --night: #0c1433;
  --night-2: #101a3e;
  --stand: #141e45;
  --stand-2: #1b2756;
  --stand-3: #22306a;
  --line: #26346a;
  --line-2: #3a4c8e;
  --line-soft: rgba(157, 169, 212, 0.14);
  --chalk: #ecf0ff;
  --mist: #9da9d4;
  --dim: #6f7ba8;
  --ink: #0b1230;
  --blue: #4a93ff;
  --orange: #f2761a;
  --tox: #c6f432;
  --gold: #ffce4f;
  --danger: #ff6b85;
  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --body: "Atkinson Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: 20px;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239da9d4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1100px 420px at 40% -180px, rgba(74, 147, 255, 0.11), transparent 70%), var(--night);
  color: var(--chalk);
  font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
a { color: var(--chalk); }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--mist); }
.noscript { padding: 20px; text-align: center; }

/* --------------------------------------------------------------- gombok */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--stand-2); color: var(--chalk);
  font: 600 14px/1.1 var(--body); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--stand-3); border-color: var(--line-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--chalk); border-color: var(--chalk); color: var(--ink); }
.btn--primary:hover { background: #fff; border-color: #fff; }
.btn--ghost { background: transparent; }
.btn--danger { background: transparent; border-color: rgba(255, 107, 133, 0.45); color: var(--danger); }
.btn--danger:hover { background: rgba(255, 107, 133, 0.1); border-color: var(--danger); }
.btn--sm { min-height: 30px; padding: 5px 11px; font-size: 13px; }
.btn--icon { width: 38px; padding: 0; font-size: 18px; letter-spacing: 1px; }
.btn--block { width: 100%; min-height: 44px; font-size: 15px; }
.link {
  padding: 0; border: 0; background: none; color: var(--mist);
  font: 600 13px var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link:hover { color: var(--chalk); }
.link:disabled { opacity: 0.5; cursor: progress; }

/* --------------------------------------------------------------- elrendezés */
.app {
  max-width: 1480px; margin: 0 auto; padding: 0 var(--pad) 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  grid-template-areas: "top top" "banner banner" "main tox";
  column-gap: 24px;
}
.topbar { grid-area: top; }
.banner-slot { grid-area: banner; display: grid; gap: 8px; margin-bottom: 18px; }
.banner-slot:empty { display: none; }
.tox { grid-area: tox; align-self: start; position: sticky; top: 16px; }
@media (min-width: 980px) {
  /* asztali nézetben a panel kifér a képernyőre, a napló a saját helyén görgethető */
  .tox { display: flex; flex-direction: column; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
  .tox > * { flex: none; }
  .tox .tox-recent { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 150px; }
  .tox .tox-feed { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}
.main { grid-area: main; display: grid; gap: 24px; align-content: start; min-width: 0; }
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.col { display: grid; gap: 24px; min-width: 0; }

/* --------------------------------------------------------------- fejléc */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--chalk); text-decoration: none; }
.brand .logo { width: 40px; height: 40px; flex: none; }
.brand-name { font: italic 900 24px/1 var(--display); font-stretch: 140%; letter-spacing: -0.01em; }
.net {
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 107, 133, 0.12); color: var(--danger); font-size: 13px; font-weight: 600;
}
.t-picker { display: flex; align-items: center; gap: 8px; min-width: 0; }
.select {
  appearance: none; -webkit-appearance: none;
  min-height: 38px; max-width: 300px; padding: 7px 34px 7px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--stand) var(--chevron) no-repeat right 11px center / 12px 8px;
  color: var(--chalk); font: 600 14px var(--body); text-overflow: ellipsis; cursor: pointer;
  min-width: 0;
}
.select:disabled { color: var(--mist); cursor: default; }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
  display: grid; min-width: 220px; padding: 6px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--stand);
  box-shadow: 0 16px 40px rgba(3, 6, 20, 0.55);
}
.menu-pop button,
.menu-pop a {
  display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 6px;
  background: none; color: var(--chalk); font: 500 14px var(--body);
  text-align: left; text-decoration: none; cursor: pointer;
}
.menu-pop button:hover,
.menu-pop a:hover { background: var(--stand-2); }
.menu-pop .is-danger { color: var(--danger); }
.me {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 13px 4px 5px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--stand);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.me:hover { border-color: var(--line-2); }

.av {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--stand-2); color: var(--chalk);
  font: italic 800 12px/1 var(--display); font-stretch: 110%;
}
.av--sys { font-style: normal; color: var(--mist); }

.banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 10px 14px; border: 1px solid rgba(255, 206, 79, 0.35); border-radius: 10px;
  background: rgba(255, 206, 79, 0.07); font-size: 14px;
}
.banner--muted { border-color: var(--line); background: var(--stand); }
.banner > span:first-child { flex: 1 1 420px; }
.banner-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* --------------------------------------------------------------- panelek */
.panel { min-width: 0; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--stand); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-bottom: 12px; }
.panel-head h3 { font: italic 850 19px/1.1 var(--display); font-stretch: 125%; }
.hint { margin-top: 12px; color: var(--mist); font-size: 13px; }
.sheet .hint--tight { margin-top: -10px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--night-2); }
.seg button {
  min-height: 28px; padding: 3px 11px; border: 0; border-radius: 999px;
  background: none; color: var(--mist); font: 600 12.5px var(--body); cursor: pointer;
}
.seg button:hover { color: var(--chalk); }
.seg button.is-on { background: var(--chalk); color: var(--ink); }
.tabs { display: flex; gap: 18px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.tabs button {
  position: relative; padding: 6px 0 9px; border: 0; background: none;
  color: var(--mist); font: 600 14px var(--body); cursor: pointer;
}
.tabs button:hover { color: var(--chalk); }
.tabs button.is-on { color: var(--chalk); }
.tabs button.is-on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  border-radius: 2px; background: var(--chalk);
}

/* ------------------------------------------- pálya: az aktuális forduló */
.pitch {
  --ch: 22px;
  position: relative; padding: 1.5px; scroll-margin-top: 140px;
  background: linear-gradient(90deg, rgba(74, 147, 255, 0.7), var(--line) 28%, var(--line) 72%, rgba(242, 118, 26, 0.7));
  clip-path: polygon(var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch), 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
}
.pitch-in {
  --ch: 21.4px;
  position: relative; padding: 20px 28px 20px;
  background:
    linear-gradient(90deg, rgba(74, 147, 255, 0.17), rgba(74, 147, 255, 0) 34%, rgba(242, 118, 26, 0) 66%, rgba(242, 118, 26, 0.17)),
    var(--night-2);
  clip-path: polygon(var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch), 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
}
.pitch-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.pitch-status { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 5px; color: var(--mist); font-size: 13px; font-weight: 600; }
.pitch-status.is-live { color: var(--chalk); }
.pitch-status.is-live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--chalk); box-shadow: 0 0 0 3px rgba(236, 240, 255, 0.18);
}
.pitch-head h2 { font: italic 900 clamp(22px, 2.5vw, 30px)/1.05 var(--display); font-stretch: 128%; }
.pitch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rest {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(12, 20, 51, 0.6);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.swap-btn { color: var(--chalk); cursor: pointer; }
.swap-btn:hover { border-color: var(--line-2); background: var(--stand-2); }
.swap-btn:disabled { opacity: 0.5; cursor: progress; }
.swap-btn .ico { width: 16px; height: 16px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: rgba(12, 20, 51, 0.6); }
.stepper button {
  width: 32px; height: 30px; border: 0; border-radius: 999px; background: none;
  color: var(--chalk); font-size: 18px; line-height: 1; cursor: pointer;
}
.stepper button:hover:not(:disabled) { background: var(--stand-2); }
.stepper button:disabled { color: var(--dim); cursor: default; }
.stepper span { min-width: 52px; color: var(--mist); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }

.arena {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  margin: 16px -28px 0; padding: 26px 30px;
}
.pitch-lines { position: absolute; inset: 0; pointer-events: none; }
.pitch-lines::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(236, 240, 255, 0.12); }
.pitch-lines::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 170px; height: 170px;
  border: 1px solid rgba(236, 240, 255, 0.12); border-radius: 50%; transform: translate(-50%, -50%);
}
.arena::before,
.arena::after { content: ""; position: absolute; top: 50%; width: 9px; height: 76px; border-radius: 3px; transform: translateY(-50%); }
.arena::before { left: 0; background: var(--blue); box-shadow: 0 0 26px rgba(74, 147, 255, 0.55); }
.arena::after { right: 0; background: var(--orange); box-shadow: 0 0 26px rgba(242, 118, 26, 0.55); }

.side { position: relative; z-index: 1; display: grid; gap: 8px; min-width: 0; transition: opacity 0.3s; }
.side--blue { --team: var(--blue); }
.side--orange { --team: var(--orange); justify-items: end; text-align: right; }
.side-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--mist); font-size: 13px; font-weight: 700; }
.side-tag::before { content: ""; width: 18px; height: 4px; border-radius: 2px; background: var(--team); }
.side--orange .side-tag { flex-direction: row-reverse; }
.side-names { display: grid; gap: 2px; min-width: 0; font: italic 800 clamp(22px, 2.3vw, 32px)/1.08 var(--display); font-stretch: 116%; }
.side-names span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side.is-loser { opacity: 0.42; }
.side.is-winner .side-tag { color: var(--chalk); }

.board { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; padding: 0 4px; }
.score { display: flex; align-items: baseline; gap: 10px; font: italic 900 clamp(56px, 6.6vw, 92px)/0.9 var(--display); font-stretch: 150%; letter-spacing: -0.02em; }
.score i { color: var(--dim); font-style: normal; font-weight: 300; }
.score span:first-child { text-shadow: 0 0 30px rgba(74, 147, 255, 0.5); }
.score span:last-child { text-shadow: 0 0 30px rgba(242, 118, 26, 0.5); }
.mchips { display: flex; gap: 6px; }
.mchip {
  display: inline-flex; align-items: baseline; justify-content: center; gap: 5px; min-width: 60px;
  padding: 4px 10px; border: 1.5px solid rgba(236, 240, 255, 0.22); border-radius: 999px;
  background: rgba(12, 20, 51, 0.6); color: var(--mist); font: 600 12px/1.2 var(--body);
}
.mchip b { color: var(--chalk); font: italic 850 14px/1.1 var(--display); font-stretch: 112%; font-variant-numeric: tabular-nums; }
button.mchip { cursor: pointer; }
button.mchip:hover { background: var(--stand-2); }
.mchip--blue { border-color: var(--blue); box-shadow: 0 0 12px rgba(74, 147, 255, 0.35); }
.mchip--orange { border-color: var(--orange); box-shadow: 0 0 12px rgba(242, 118, 26, 0.35); }
.mchip--next { border-color: var(--chalk); color: var(--chalk); }
.mchip--skip { border-style: dotted; opacity: 0.35; }
.bo3 { color: var(--mist); font-size: 12.5px; }

.pitch-actions { margin-top: 16px; }
.ask { margin-bottom: 10px; color: var(--mist); font-size: 14px; text-align: center; }
.ask b { color: var(--chalk); }
.result { display: grid; gap: 12px; }
.goal-row { display: flex; align-items: flex-end; justify-content: center; gap: 22px; }
.gbox { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.gbox--blue { --team: var(--blue); }
.gbox--orange { --team: var(--orange); }
.gbox-label { display: inline-flex; align-items: center; gap: 8px; color: var(--mist); font-size: 13px; font-weight: 700; }
.gbox-label::before { content: ""; width: 18px; height: 4px; border-radius: 2px; background: var(--team); }
.gstep {
  display: inline-flex; align-items: stretch; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--night);
  box-shadow: inset 0 -3px 0 var(--team);
}
.gstep:focus-within { border-color: var(--chalk); }
.gstep button { width: 46px; border: 0; background: var(--stand-2); color: var(--chalk); font-size: 22px; line-height: 1; cursor: pointer; }
.gstep button:hover { background: var(--stand-3); }
.gstep input {
  width: 74px; height: 58px; border: 0; background: transparent; color: var(--chalk);
  font: italic 900 32px/1 var(--display); font-stretch: 130%; text-align: center;
  -moz-appearance: textfield; appearance: textfield;
}
.gstep input::placeholder { color: var(--dim); }
.gstep input:focus { outline: none; background: rgba(236, 240, 255, 0.06); }
.gstep input::-webkit-outer-spin-button,
.gstep input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.goal-sep { padding-bottom: 13px; color: var(--dim); font: italic 900 28px var(--display); }

.extra { border: 1px solid var(--line); border-radius: 10px; background: rgba(12, 20, 51, 0.45); }
.extra > summary {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  font-size: 14px; font-weight: 700; list-style: none; cursor: pointer;
}
.extra > summary::-webkit-details-marker { display: none; }
.extra > summary::before { content: "▸"; color: var(--mist); transition: transform 0.15s; }
.extra[open] > summary::before { transform: rotate(90deg); }
.extra .muted { font-weight: 500; }
.sg {
  display: grid; grid-template-columns: minmax(0, 1fr) repeat(5, minmax(0, 64px));
  align-items: center; gap: 6px 8px; padding: 2px 14px 4px;
}
.sg-h { color: var(--mist); font-size: 12px; font-weight: 600; text-align: center; }
.sg-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; font-weight: 700; }
.sg-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-name .mark { flex: none; width: 3px; height: 14px; border-radius: 2px; }
.sg-sep { grid-column: 1 / -1; height: 1px; margin: 2px 0; background: var(--line-soft); }
.sg input {
  width: 100%; min-width: 0; min-height: 36px; padding: 5px 4px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--night-2); color: var(--chalk); font: 600 15px var(--body); text-align: center;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.sg input::-webkit-outer-spin-button,
.sg input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sg input:focus { border-color: var(--chalk); outline: none; }
.extra .hint { margin: 8px 14px 12px; }

/* scoreboard fotó: feltöltés, AI olvasat, névpárosítás */
.ico { width: 18px; height: 18px; flex: none; }
.shot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; }
.shot-btn { min-height: 40px; }
.shot-hint { flex: 1 1 260px; max-width: 520px; color: var(--mist); font-size: 13px; }
.shot--busy {
  justify-content: flex-start; padding: 12px 14px;
  border: 1px dashed var(--line-2); border-radius: 10px; background: rgba(12, 20, 51, 0.45); font-size: 14px;
}
.spin {
  flex: none; width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--chalk);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.shot-thumb {
  display: block; flex: none; width: 112px; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--night);
}
.shot-thumb img { display: block; width: 100%; height: 72px; object-fit: cover; }
.shot--done {
  align-items: flex-start; justify-content: flex-start; padding: 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: rgba(12, 20, 51, 0.5);
}
.scan { display: grid; flex: 1 1 300px; gap: 8px; min-width: 0; }
.scan-title { font-weight: 700; }
.scan-title .muted { font-weight: 500; }
.scan-note { color: var(--mist); font-size: 13px; }
.scan-note--err { color: var(--danger); font-weight: 600; }
.scan-rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.scan-rows li {
  display: grid; grid-template-columns: 3px minmax(0, 1fr) auto minmax(118px, auto);
  align-items: center; gap: 4px 10px; font-size: 13.5px;
}
.scan-rows .mark { width: 3px; height: 16px; border-radius: 2px; }
.scan-rows li.is-bot { opacity: 0.6; }
.scan-name { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.scan-num { color: var(--mist); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scan-rows select {
  appearance: none; -webkit-appearance: none; min-height: 32px; padding: 4px 28px 4px 10px;
  border: 1px solid var(--line-2); border-radius: 7px;
  background: var(--night-2) var(--chevron) no-repeat right 9px center / 10px 7px;
  color: var(--chalk); font: 600 13.5px var(--body); cursor: pointer;
}
.scan-rows select:focus-visible { outline: 2px solid var(--chalk); outline-offset: 1px; }
.scan-rows select.is-guess { border-style: dashed; border-color: var(--mist); }
.scan-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.link--file { display: inline-flex; align-items: center; gap: 6px; }
.link--file .ico { width: 15px; height: 15px; }
.result.is-drop { outline: 2px dashed var(--chalk); outline-offset: 6px; border-radius: 10px; }
.mchip-cam {
  align-self: center; width: 6px; height: 6px; margin-left: 1px; border-radius: 50%;
  background: var(--chalk); opacity: 0.75;
}

.save {
  --c: 12px;
  display: grid; justify-items: center; align-content: center; gap: 3px; width: 100%; min-height: 62px;
  padding: 10px 16px; border: 0; background: var(--stand-2); color: var(--ink); cursor: pointer;
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
  transition: filter 0.15s;
}
.save--blue { background: linear-gradient(180deg, #6eaaff, var(--blue)); }
.save--orange { background: linear-gradient(180deg, #ff9750, var(--orange)); }
.save:not(:disabled):hover { filter: brightness(1.07); }
.save:disabled { background: var(--stand-2); color: var(--mist); font: 600 14.5px var(--body); cursor: default; }
.save:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 5px var(--chalk); }
.save-main { font: italic 900 19px/1.05 var(--display); font-stretch: 118%; }
.modal .save-main { font-size: 16px; font-stretch: 108%; }
.save-sub { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.verdict {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(12, 20, 51, 0.55); font-size: 16px; text-align: center;
}
.verdict--wait { color: var(--mist); font-size: 15px; }
.verdict--blue { border-color: rgba(74, 147, 255, 0.6); }
.verdict--orange { border-color: rgba(242, 118, 26, 0.6); }
.verdict b { font-family: var(--display); font-style: italic; font-weight: 850; font-stretch: 115%; }
.pitch-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; color: var(--mist); font-size: 13px; }
.pitch-foot .push { margin-left: auto; }

.pitch-in--empty,
.pitch-in--final { display: grid; justify-items: center; gap: 14px; padding: 40px 28px; text-align: center; }
.pitch-in--empty p { max-width: 58ch; color: var(--mist); }
.pitch-in--empty h2,
.pitch-in--final h2,
.pitch-in--countdown h2 { font: italic 900 clamp(26px, 3vw, 38px)/1.05 var(--display); font-stretch: 130%; }
.pitch-in--countdown { display: grid; justify-items: center; gap: 10px; padding: 34px 28px 30px; text-align: center; }
.cd-when { color: var(--mist); font-size: 15px; }
.cd { display: flex; justify-content: center; gap: clamp(12px, 2.6vw, 32px); margin: 12px 0 6px; }
.cd-unit { display: grid; justify-items: center; gap: 6px; min-width: 2.2em; }
.cd-unit b {
  font: italic 900 clamp(46px, 6.2vw, 90px)/0.9 var(--display); font-stretch: 150%;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 30px rgba(74, 147, 255, 0.4);
}
.cd-unit:nth-child(n + 3) b { text-shadow: 0 0 30px rgba(242, 118, 26, 0.4); }
.cd-unit span { color: var(--mist); font-size: 13px; font-weight: 600; }
.cd-first { max-width: 62ch; color: var(--mist); }
.cd-first b { color: var(--chalk); }
.cd-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.series-final {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px;
  font-weight: 700;
}
.series-final b { font: italic 900 46px/1 var(--display); font-stretch: 125%; color: var(--chalk); }
.sf-team { display: inline-flex; align-items: center; gap: 6px; color: var(--mist); font-size: 17px; }
.sf-team--win { color: var(--gold); }
.sf-team .crown { width: 20px; height: 16px; }
.tiles--one { grid-template-columns: minmax(0, 320px); }
.podium .p1 .pn { display: grid; justify-items: center; gap: 2px; color: var(--gold); }
.podium .p1 .crown { width: 26px; height: 21px; margin: 0; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 140px)); align-items: end; gap: 10px; margin: 4px 0; padding: 0; list-style: none; }
.podium li { display: grid; justify-items: center; gap: 4px; }
.podium .block {
  display: grid; place-items: center; width: 100%;
  border: 1px solid var(--line); border-radius: 8px 8px 0 0; background: var(--stand-2);
  font: italic 900 26px var(--display); font-stretch: 140%;
}
.podium .p1 .block { height: 112px; border-color: rgba(255, 206, 79, 0.6); background: linear-gradient(180deg, rgba(255, 206, 79, 0.2), var(--stand-2)); color: var(--gold); }
.podium .p2 .block { height: 82px; }
.podium .p3 .block { height: 60px; }
.podium .pn { font-weight: 700; }
.podium .pp { color: var(--mist); font-size: 13px; }

@media (prefers-reduced-motion: no-preference) {
  .pitch.is-entering .pitch-in { animation: pitch-enter 0.35s ease-out; }
}
@keyframes pitch-enter {
  from { opacity: 0.35; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- fordulók */
.progress { height: 4px; margin: -2px 0 12px; overflow: hidden; border-radius: 2px; background: var(--line); }
.progress i { display: block; height: 100%; border-radius: 2px; background: var(--chalk); transition: width 0.4s; }
.stages { display: grid; margin: 0; padding: 0; list-style: none; }
.stage { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.stage:first-child { padding-top: 4px; border-top: 0; }
.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.stage-name { font: italic 800 15px var(--display); font-stretch: 115%; }
.stage.is-done .stage-name { color: var(--mist); }
.stage .rest { padding: 3px 10px; font-size: 12.5px; }
.rest-pick select {
  appearance: none; -webkit-appearance: none;
  padding: 4px 28px 4px 10px; border: 1px dashed var(--line-2); border-radius: 999px;
  background: transparent var(--chevron) no-repeat right 9px center / 10px 7px;
  color: var(--chalk); font: 600 12.5px var(--body); cursor: pointer;
}
.rest-pick select:hover { border-color: var(--mist); }
.rest-pick select option { background: var(--stand); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tile {
  position: relative; display: grid; gap: 3px; min-width: 0; padding: 8px 9px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--night-2);
  color: var(--chalk); font-size: 13px; line-height: 1.25; text-align: left; cursor: pointer;
}
.tile:hover { border-color: var(--line-2); background: #132049; }
.tile.is-current { border-color: rgba(236, 240, 255, 0.55); }
.tile.is-selected { border-color: var(--chalk); box-shadow: inset 0 0 0 1px var(--chalk); }
.tile-team { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--mist); }
.tile-team.is-win { color: var(--chalk); font-weight: 700; }
.tile .mark { flex: none; width: 3px; height: 12px; border-radius: 2px; }
.mark--blue { background: var(--blue); }
.mark--orange { background: var(--orange); }
.tile-names { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-team b { font-variant-numeric: tabular-nums; }
.tile-flag {
  position: absolute; top: -9px; right: 8px; padding: 0 7px; border-radius: 999px;
  background: var(--chalk); color: var(--ink); font-size: 11px; font-weight: 700; line-height: 17px;
}

/* --------------------------------------------------------------- tabella */
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th {
  padding: 7px 8px; border-bottom: 1px solid var(--line);
  color: var(--mist); font-size: 12.5px; font-weight: 600; text-align: left; white-space: nowrap;
}
.table td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
/* a tabella a panel szélességéhez igazodik: a két hasábos elrendezésben keskenyebb, mint a képernyő */
#standings { container-type: inline-size; }
.tscroll { overflow-x: auto; }
@container (max-width: 480px) {
  #standings .table th,
  #standings .table td { padding-left: 5px; padding-right: 5px; }
}
@container (max-width: 430px) {
  #standings .hide-sm { display: none; }
}
@container (max-width: 340px) {
  #standings .hide-xs { display: none; }
}
@container (max-width: 310px) {
  #standings .table { font-size: 13px; }
  #standings .table th,
  #standings .table td { padding-left: 3px; padding-right: 3px; }
}
.c-rank { width: 30px; color: var(--mist); font: italic 800 14px var(--display); font-stretch: 110%; }
.c-pts { font: italic 900 18px var(--display); font-stretch: 125%; }
.who-cell { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.bar { display: block; height: 3px; margin-top: 6px; border-radius: 2px; background: var(--line-soft); }
.bar i { display: block; height: 100%; border-radius: 2px; background: rgba(236, 240, 255, 0.55); }
tr.is-top .c-rank { color: var(--gold); }
.crown { display: inline-block; width: 16px; height: 13px; margin-left: 2px; vertical-align: -1px; }
/* a tabella alja: a csicska */
:root { --straw: #e8bf62; }
tr.is-shame .c-rank { color: var(--straw); }
/* a név alatt, mint egy titulus: a sor nem lesz szélesebb, a tabella nem csúszik ki */
.shame {
  display: block; width: max-content; margin: 3px 0 0 34px; padding: 0 8px;
  border: 1px solid rgba(232, 191, 98, 0.45); border-radius: 999px; background: rgba(232, 191, 98, 0.08);
  color: var(--straw); font: italic 800 11.5px/1.5 var(--display); font-stretch: 110%; cursor: help;
}
.broom { display: inline-block; width: 15px; height: 15px; flex: none; vertical-align: -2px; }
.shame-line {
  display: flex; align-items: center; gap: 10px; max-width: 52ch; padding: 9px 14px;
  border: 1px dashed rgba(232, 191, 98, 0.5); border-radius: 10px; background: rgba(232, 191, 98, 0.06);
  color: var(--mist); font-size: 14px; text-align: left;
}
.shame-line b { color: var(--straw); }
.shame-line .broom { width: 26px; height: 26px; }
.empty-note { padding: 18px 0 6px; color: var(--mist); }

/* ----------------------------------------------------------------- napló */
.log { display: grid; margin: 0; padding: 0; list-style: none; }
.log-item {
  display: grid; grid-template-columns: 52px 26px minmax(0, 1fr); align-items: start; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13.5px;
}
.log-item:first-child { border-top: 0; }
.log-item time { padding-top: 4px; color: var(--mist); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.log-item p { padding-top: 2px; color: var(--mist); overflow-wrap: anywhere; }
.log-item b { color: var(--chalk); font-weight: 700; }
.log--full { max-height: min(60vh, 560px); overflow: auto; }

/* ---------------------------------------------------- toxicmérő (kémcsövek) */
.tox {
  overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px;
  background:
    radial-gradient(260px 200px at 50% 38%, rgba(198, 244, 50, 0.07), transparent 70%),
    linear-gradient(180deg, #131d44, #0f1736);
}
.tox-hazard { height: 6px; background: repeating-linear-gradient(-45deg, #e9c21f 0 9px, #10142a 9px 18px); }
.tox-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; padding: 14px 16px 2px; }
.tox-title { display: flex; align-items: center; gap: 8px; font: italic 900 21px/1 var(--display); font-stretch: 132%; }
.tox-sym { color: var(--tox); font-style: normal; font-size: 0.95em; }
.tox-mini { display: none; }
.tox-mini-go {
  flex: none; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--chalk); font-size: 12px; font-weight: 700;
}

.tox-rack {
  --th: 196px; --tw: 44px; --crown: 30px; --top: 12px;
  position: relative;
  display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
  padding: var(--top) 10px 4px;
}
.tox-rack .tox-col { container-type: inline-size; }
/* ha a kémcső oszlopa túl keskeny a három gombhoz (6+ játékos), csak a +1 marad;
   a +2 és a +3 a kémcsőre kattintva is megadható */
@container (max-width: 64px) {
  .tp--2, .tp--3 { display: none; }
  .tox-plus .tp { width: 34px; }
}
.tox-rack--many { --tw: 34px; }
.tox-rack--many .tox-name { font-size: 12px; }
.tox-rack--many .tox-count { font-size: 22px; }
.tox-rack::after {
  /* polc, amibe a kémcsövek állnak */
  content: ""; position: absolute; z-index: 2; left: 12px; right: 12px;
  top: calc(var(--top) + var(--crown) + var(--th) - 5px); height: 9px; border-radius: 4px;
  background: linear-gradient(180deg, #4a5ba0, #1d2856 70%);
  box-shadow: 0 8px 16px rgba(3, 6, 20, 0.45); pointer-events: none;
}
.tox-col {
  --liq-top: #f0ffb4; --liq: #b8ec37; --liq-deep: #47861a; --liq-glow: rgba(184, 236, 55, 0.35);
  position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0;
}
.tox-col.lv3 { --liq: #c6f432; --liq-glow: rgba(198, 244, 50, 0.45); }
.tox-col.lv4 { --liq-top: #f7ffc4; --liq: #d6ff3d; --liq-deep: #5b9e12; --liq-glow: rgba(214, 255, 61, 0.55); }
.tox-col.lv5 { --liq-top: #fbffd6; --liq: #e5ff52; --liq-deep: #6aaf0c; --liq-glow: rgba(229, 255, 82, 0.7); }
.tox-crown {
  display: grid; place-items: end center; height: var(--crown); padding-bottom: 3px;
  opacity: 0; transform: translateY(8px) scale(0.6); transition: opacity 0.35s, transform 0.35s;
}
.tox-crown svg { width: 28px; height: 22px; }
.tox-col.is-leader .tox-crown { opacity: 1; transform: none; }

.tube {
  position: relative; z-index: 1; display: block; flex: none;
  width: var(--tw); height: var(--th); padding: 0; border: 0; background: none;
  cursor: pointer; transform-origin: 50% 100%;
}
.tube:focus-visible { outline-offset: 6px; border-radius: 6px; }
div.tube { cursor: default; }
.tube-rim {
  position: absolute; top: 0; left: -5px; right: -5px; height: 9px;
  border: 2px solid rgba(214, 236, 255, 0.42); border-radius: 5px; background: rgba(255, 255, 255, 0.06);
}
.tube-glass {
  position: absolute; inset: 7px 0 0; overflow: hidden;
  border: 2px solid rgba(214, 236, 255, 0.3); border-top: 0;
  border-radius: 0 0 calc(var(--tw) / 2) calc(var(--tw) / 2);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015) 42%, rgba(255, 255, 255, 0.06) 86%, rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 -12px 24px rgba(3, 6, 20, 0.35);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.tube-ticks i { position: absolute; left: 0; width: 36%; height: 1px; background: rgba(214, 236, 255, 0.26); }
.liquid {
  position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden;
  height: calc(var(--fill, 0) * 100%);
  background: linear-gradient(180deg, var(--liq-top) 0, var(--liq) 16%, var(--liq-deep) 100%);
  box-shadow: 0 0 20px var(--liq-glow);
  transition: height 0.9s cubic-bezier(0.2, 1.25, 0.35, 1);
}
.liquid::before {
  /* a folyadék felszíne */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.55);
}
.tube-shine {
  position: absolute; top: 14px; bottom: 16px; left: 24%; width: 4px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
}
.bubble { display: none; }
.tox-col.is-leader .tube-glass { border-color: rgba(214, 255, 140, 0.65); box-shadow: inset 0 -12px 24px rgba(3, 6, 20, 0.35), 0 0 22px rgba(198, 244, 50, 0.35); }

.tox-count { margin-top: 14px; font: italic 900 26px/1 var(--display); font-stretch: 125%; }
.tox-name { max-width: 100%; margin-top: 4px; overflow: hidden; font-size: 13.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tox-level { margin-top: 1px; color: var(--mist); font-size: 11.5px; white-space: nowrap; }
.tox-plus {
  display: flex; margin-top: 9px; overflow: hidden;
  border: 1px solid rgba(198, 244, 50, 0.4); border-radius: 8px;
}
.tp {
  --a: 0.06;
  width: 21px; height: 30px; padding: 0; border: 0;
  background: rgba(198, 244, 50, var(--a)); color: var(--chalk);
  font: 800 11px/1 var(--body); cursor: pointer; transition: background-color 0.15s;
}
.tp + .tp { border-left: 1px solid rgba(198, 244, 50, 0.28); }
.tp--2 { --a: 0.14; }
.tp--3 { --a: 0.26; }
.tp:hover { background: rgba(198, 244, 50, calc(var(--a) + 0.16)); }
.tp:disabled { opacity: 0.5; cursor: progress; }

.tox-leader {
  margin: 14px 16px 0; padding: 10px 12px;
  border: 1px solid rgba(198, 244, 50, 0.28); border-radius: 8px; background: rgba(198, 244, 50, 0.06);
  font-size: 14px;
}
.tox-recent { padding: 14px 16px 16px; }
.tox-recent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tox-recent h3 { color: var(--mist); font-size: 13px; font-weight: 700; }
.tox-feed { display: grid; align-content: start; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.tox-feed li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 10px;
  padding: 6px 0; border-top: 1px solid var(--line-soft); color: var(--mist);
}
.tox-feed li:first-child { border-top: 0; padding-top: 0; }
.tox-feed b { color: var(--chalk); font-weight: 700; }
.tox-feed time { font-size: 12px; font-variant-numeric: tabular-nums; }
.tf-main { min-width: 0; overflow-wrap: anywhere; }
.tf-pts { color: var(--tox); font-weight: 800; }
.tf-ctx { grid-column: 1 / -1; margin-top: 1px; color: var(--mist); font-size: 11.5px; line-height: 1.35; }
.tf-teams { display: none; }
.tox-feed--full { max-height: min(64vh, 620px); overflow-y: auto; font-size: 14px; }
.tox-feed--full .tf-ctx { font-size: 12.5px; }
.tox-feed--full .tf-teams { display: inline; }
.tf-empty { display: block !important; }

.tox-float {
  position: absolute; z-index: 4; left: 50%; top: calc(var(--crown) + 30px);
  font: italic 900 20px var(--display); font-stretch: 120%; color: var(--chalk);
  text-shadow: 0 0 12px rgba(198, 244, 50, 0.95); pointer-events: none;
  animation: tox-float 1.2s ease-out forwards;
}

@media (prefers-reduced-motion: no-preference) {
  /* csak a vezető kémcsöve forr: a mozgás egyetlen jelentése, hogy ki a legtoxikusabb */
  .tox-col.is-leader .bubble {
    display: block; position: absolute; bottom: -8px; left: var(--x);
    width: var(--s); height: var(--s); border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), rgba(240, 255, 200, 0.55) 55%, rgba(240, 255, 200, 0) 72%);
    animation: tox-rise var(--t) ease-in var(--d) infinite;
  }
  .tox-col.is-leader .tox-crown svg { animation: tox-bob 2.6s ease-in-out infinite; }
  .tox-col.is-hit .tube { animation: tox-shake 0.55s ease-in-out; }
}
@keyframes tox-rise {
  0% { bottom: -8px; opacity: 0; transform: translateX(0); }
  15% { opacity: 1; }
  55% { transform: translateX(2px); }
  88% { opacity: 0.85; }
  100% { bottom: calc(100% - 6px); opacity: 0; transform: translateX(-1px); }
}
@keyframes tox-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes tox-shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-5deg); }
  45% { transform: rotate(4deg); }
  70% { transform: rotate(-2deg); }
}
@keyframes tox-float {
  from { opacity: 0; transform: translate(-50%, 12px) scale(0.8); }
  20% { opacity: 1; }
  to { opacity: 0; transform: translate(-50%, -46px) scale(1.15); }
}

/* --------------------------------------------------------- toast, modal */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border: 1px solid var(--line); border-left: 4px solid var(--chalk); border-radius: 8px;
  background: #18234d; color: var(--chalk); font-size: 14px;
  box-shadow: 0 12px 34px rgba(3, 6, 20, 0.5);
  opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; pointer-events: auto;
}
.toast.is-in { opacity: 1; transform: none; }
.toast--win { border-left-color: var(--gold); }
.toast--tox { border-left-color: var(--tox); }
.toast--error { border-left-color: var(--danger); }
.toast-act {
  flex: none; margin-left: auto; padding: 6px 11px; border: 1px solid var(--chalk); border-radius: 7px;
  background: transparent; color: var(--chalk); font: 700 13px var(--body); cursor: pointer;
}
.toast-act:hover { background: var(--chalk); color: var(--ink); }

/* torna mód választó (új torna, beállítások) */
.opts-field { display: grid; gap: 7px; }
.opts-field legend { margin-bottom: 7px; color: var(--mist); font-size: 13.5px; font-weight: 600; }
.opts { display: grid; gap: 8px; }
.opts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt {
  position: relative; display: grid; align-content: start; gap: 3px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--night-2); cursor: pointer;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-title { font-size: 14px; font-weight: 700; }
.opt-sub { color: var(--mist); font-size: 12.5px; line-height: 1.35; }
.opt:hover { border-color: var(--line-2); }
.opt:has(input:checked) { border-color: var(--chalk); background: var(--stand-2); box-shadow: inset 0 0 0 1px var(--chalk); }
.opt:has(input:focus-visible) { outline: 2px solid var(--chalk); outline-offset: 2px; }
.opt:has(input:disabled) { cursor: not-allowed; opacity: 0.6; }
.opt:has(input:disabled:checked) { opacity: 1; }
.mode-line { margin: -4px 0 10px; color: var(--mist); font-size: 13px; }

.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0;
  border: 1px solid var(--line); border-radius: 14px; background: var(--stand); color: var(--chalk);
  box-shadow: 0 30px 80px rgba(2, 4, 16, 0.7); overflow: auto;
}
.modal--sm { width: min(420px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(5, 9, 26, 0.72); backdrop-filter: blur(3px); }
.sheet { display: grid; gap: 16px; padding: 20px 22px 22px; }
.sheet > p { color: var(--mist); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2,
.sheet--sm h2 { font: italic 900 23px/1.1 var(--display); font-stretch: 128%; }
.sheet-sub { margin-bottom: 4px; color: var(--mist); font-size: 13.5px; font-weight: 700; }
.sheet-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.x {
  flex: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%;
  background: none; color: var(--mist); font-size: 20px; line-height: 1; cursor: pointer;
}
.x:hover { background: var(--stand-2); color: var(--chalk); }
.field { display: grid; gap: 6px; color: var(--mist); font-size: 13.5px; font-weight: 600; }
.field input {
  min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--night-2); color: var(--chalk); font: 500 15px var(--body);
}
.field input:focus { border-color: var(--chalk); outline: none; box-shadow: 0 0 0 3px rgba(236, 240, 255, 0.15); }
.note { padding: 10px 12px; border: 1px solid rgba(255, 206, 79, 0.3); border-radius: 8px; background: rgba(255, 206, 79, 0.08); font-size: 14px; }
.form-error { color: var(--danger); font-size: 14px; font-weight: 600; }

.kind-part { display: grid; gap: 16px; }
.kind-part[hidden] { display: none; }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { position: relative; cursor: pointer; }
.pchip input { position: absolute; opacity: 0; pointer-events: none; }
.pchip > span {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--night-2);
  color: var(--mist); font-size: 14px; font-weight: 700;
}
.pchip .av { width: 26px; height: 26px; font-size: 12px; opacity: 0.55; }
.pchip:hover > span { border-color: var(--line-2); }
.pchip input:checked + span { border-color: var(--chalk); background: var(--stand-2); color: var(--chalk); box-shadow: inset 0 0 0 1px var(--chalk); }
.pchip input:checked + span .av { opacity: 1; }
.pchip input:focus-visible + span { outline: 2px solid var(--chalk); outline-offset: 2px; }
.select--narrow { width: 96px; }
.teams-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.team-pick { display: grid; gap: 8px; min-width: 0; }
.team-pick legend { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--mist); font-size: 13.5px; font-weight: 600; }
.team-pick .mark { width: 3px; height: 14px; border-radius: 2px; }
.team-pick .select { max-width: none; width: 100%; }
/* játékosok ablak */
.plist { display: grid; margin: 0; padding: 0; list-style: none; }
.plist li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px;
  padding: 9px 0; border-top: 1px solid var(--line-soft);
}
.plist li:first-child { border-top: 0; }
.plist li.is-off .who-cell > span:not(.tag-off):not(.av) { color: var(--mist); text-decoration: line-through; text-decoration-thickness: 1px; }
.plist .who-cell .muted { font-size: 12.5px; font-weight: 600; }
.tag-off { padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--mist); font-size: 12px; font-weight: 700; }
.plist-acts { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.prename { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; }
.prename input,
.padd-row input {
  flex: 1 1 160px; min-width: 0; min-height: 38px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--night-2); color: var(--chalk); font: 500 15px var(--body);
}
.prename input:focus,
.padd-row input:focus { border-color: var(--chalk); outline: none; }
.padd { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.padd h3 { font-size: 15px; font-weight: 700; }
.padd-row { display: flex; flex-wrap: wrap; gap: 8px; }
.order { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.order li {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--night-2);
  color: var(--chalk); font-size: 14px; font-weight: 600;
}
.order .ord { width: 22px; color: var(--mist); font: italic 800 14px var(--display); }
.order .ord-who { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; column-gap: 10px; min-width: 0; }
.order .sp { color: var(--mist); font-size: 13px; font-weight: 500; }
.order button {
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--stand); color: var(--chalk); cursor: pointer;
}
.order button:disabled { opacity: 0.3; cursor: default; }
.order-tools { display: flex; justify-content: flex-start; margin-top: 4px; }

.alias-list { display: grid; margin: 0; padding: 0; list-style: none; }
.alias-list li {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: start; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--line-soft);
}
.alias-list .who-cell { padding-top: 4px; }
.alias-right { display: grid; gap: 7px; min-width: 0; }
.alias-list li:first-child { border-top: 0; }
.achips { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; }
.achip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--night-2); font-weight: 600;
}
.achip button {
  width: 22px; height: 22px; border: 0; border-radius: 50%; background: none;
  color: var(--mist); font-size: 15px; line-height: 1; cursor: pointer;
}
.achip button:hover { background: var(--stand-3); color: var(--chalk); }
.alias-row-add { display: flex; gap: 6px; }
.alias-row-add input {
  flex: 1 1 auto; min-width: 0; min-height: 34px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--night-2); color: var(--chalk); font: 500 14.5px var(--body);
}
.alias-row-add input:focus { border-color: var(--chalk); outline: none; }

.tox-sheet-top { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px 24px; }
.tox-solo { --th: 150px; --tw: 56px; --crown: 0px; position: relative; padding: 0 6px; }
.tox-solo .tox-col { --crown: 0px; }
.tox-stats { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.tox-stats dt { color: var(--mist); font-size: 13px; padding-top: 4px; }
.tox-stats dd { margin: 0; font: italic 900 22px/1.1 var(--display); font-stretch: 122%; }
.tox-give { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(198, 244, 50, 0.28); border-radius: 10px; background: rgba(198, 244, 50, 0.04); }
.tox-give legend { padding: 0 6px; font-size: 14px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--night-2); color: var(--chalk); font-size: 13px; cursor: pointer;
}
.chip:hover,
.chip.is-on { border-color: rgba(198, 244, 50, 0.6); background: rgba(198, 244, 50, 0.1); }
.give-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.qty3 { display: inline-flex; overflow: hidden; border: 1px solid rgba(198, 244, 50, 0.4); border-radius: 8px; }
.qopt {
  min-width: 48px; height: 44px; padding: 0 10px; border: 0; background: var(--night-2);
  color: var(--chalk); font: italic 900 18px var(--display); font-stretch: 115%; cursor: pointer;
}
.qopt + .qopt { border-left: 1px solid rgba(198, 244, 50, 0.28); }
.qopt:hover { background: var(--stand-2); }
.qopt.is-on { background: rgba(198, 244, 50, 0.22); box-shadow: inset 0 -3px 0 var(--tox); }
.btn--tox {
  flex: 1; min-height: 44px; border: 0;
  background: linear-gradient(180deg, #ddff73, var(--tox)); color: #172400; font-size: 15px; font-weight: 800;
}
.btn--tox:hover { background: linear-gradient(180deg, #e8ff94, #d2fa52); }
.tox-history { display: grid; max-height: 240px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.tox-history li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px;
  padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13.5px;
}
.tox-history li:first-child { border-top: 0; }
.tox-history .meta { grid-column: 1; color: var(--mist); font-size: 12.5px; }
.tox-history .del { grid-row: 1 / span 2; grid-column: 2; }
.tox-history .meta { line-height: 1.4; }
.del {
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: none; color: var(--mist); font-size: 12.5px; cursor: pointer;
}
.del:hover { color: var(--chalk); border-color: var(--line-2); }
.del.is-armed { border-color: var(--danger); color: var(--danger); }

/* ---------------------------------------------------------------- belépés */
.login-body {
  display: grid; place-items: center; padding: 28px 16px;
  background:
    radial-gradient(640px 420px at 0% 55%, rgba(74, 147, 255, 0.17), transparent 70%),
    radial-gradient(640px 420px at 100% 55%, rgba(242, 118, 26, 0.14), transparent 70%),
    var(--night);
}
.login { display: grid; gap: 22px; width: min(460px, 100%); }
.login-brand { display: grid; justify-items: center; gap: 10px; text-align: center; }
.login-brand .logo { width: 64px; height: 64px; }
.login-brand h1 { font: italic 900 clamp(34px, 9vw, 46px)/1 var(--display); font-stretch: 145%; letter-spacing: -0.01em; }
.login-brand p { color: var(--mist); }
.login-next {
  display: grid; justify-items: center; gap: 4px; margin-top: 8px; padding: 10px 18px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(20, 30, 69, 0.7);
}
.login-brand .login-next span { color: var(--mist); font-size: 13.5px; }
.login-next b { color: var(--chalk); font: italic 900 26px/1.1 var(--display); font-stretch: 130%; font-variant-numeric: tabular-nums; }
.login-alt { text-align: center; font-size: 14px; }
.login-alt a { color: var(--mist); text-underline-offset: 3px; }
.login-alt a:hover { color: var(--chalk); }
.login-card { display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--stand); }
.who-legend { margin-bottom: 10px; font-weight: 700; }
.who-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 8px; }
.who {
  display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 10px 2px 9px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--night-2);
  color: var(--chalk); font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.who span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who:hover { border-color: var(--line-2); }
.who[aria-pressed="true"] { border-color: var(--chalk); background: var(--stand-2); box-shadow: inset 0 0 0 1px var(--chalk); }
.who .av { width: 36px; height: 36px; font-size: 16px; }

/* ------------------------------------------------------------- reszponzív */
@media (max-width: 1240px) {
  .main-grid { grid-template-columns: minmax(0, 1fr); }
  .col { display: contents; }
  #standings { order: 1; }
  #rounds { order: 2; }
  #log { order: 3; }
}

@media (max-width: 979px) {
  :root { --pad: 14px; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "tox" "banner" "main"; }
  .topbar { padding: 12px 0; }
  .brand-name { font-size: 21px; }
  .brand .logo { width: 34px; height: 34px; }
  .menu--user { order: 2; }
  .t-picker { order: 3; width: 100%; }
  .t-picker .select { flex: 1 1 0; width: 0; max-width: none; }
  .net { order: 4; }

  /* a toxicmérő tömör, ragadós sávként mindig látszik */
  .tox {
    position: sticky; top: 0; z-index: 30;
    margin: 0 calc(-1 * var(--pad)) 16px;
    border-width: 0 0 1px; border-radius: 0;
    box-shadow: 0 10px 24px rgba(3, 6, 20, 0.45);
  }
  .tox-hazard { height: 4px; }
  .tox-head { flex-wrap: nowrap; padding: 7px 14px 0; }
  .tox-title { font-size: 15px; }
  .tox-mini {
    display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 0;
    border: 0; background: none; color: var(--mist); font: 600 12.5px var(--body); cursor: pointer;
  }
  .tox-mini > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tox-head .seg,
  .tox-leader,
  .tox-recent,
  .tox-level,
  .tox-plus,
  .tube-shine { display: none; }
  .tox-rack { --th: 42px; --tw: 16px; --crown: 14px; --top: 4px; padding: var(--top) 8px 8px; }
  .tox-rack::after { left: 8px; right: 8px; top: calc(var(--top) + var(--crown) + var(--th) - 3px); height: 5px; border-radius: 3px; }
  .tox-col {
    display: grid; grid-template-columns: auto auto;
    grid-template-areas: "crown crown" "tube count" "name name";
    justify-content: center; align-items: end; column-gap: 7px;
  }
  .tox-crown { grid-area: crown; padding-bottom: 1px; }
  .tox-crown svg { width: 15px; height: 12px; }
  .tube { grid-area: tube; }
  .tube-rim { left: -3px; right: -3px; height: 5px; border-width: 1.5px; border-radius: 3px; }
  .tube-glass { inset: 4px 0 0; border-width: 1.5px; }
  .tube-ticks i { width: 50%; }
  .liquid::before { height: 3px; }
  .tox-count { grid-area: count; margin: 0 0 2px; font-size: 18px; }
  .tox-name { grid-area: name; margin-top: 6px; font-size: 11.5px; text-align: center; }
  .tox-float { top: 6px; left: 70%; font-size: 16px; }

  .pitch { scroll-margin-top: 104px; }
}

@media (max-width: 640px) {
  .pitch { --ch: 14px; }
  .pitch-in { --ch: 13.4px; padding: 16px 16px; }
  .pitch-head h2 { font-size: 20px; font-stretch: 112%; }
  .arena { gap: 8px; margin: 12px -16px 0; padding: 18px 18px; }
  .pitch-lines::after { width: 108px; height: 108px; }
  .arena::before,
  .arena::after { width: 6px; height: 54px; }
  .side-names { font-size: 18px; }
  .side-tag { font-size: 12px; }
  .side-tag::before { width: 12px; }
  .score { gap: 6px; font-size: 46px; }
  .bo3 { display: none; }
  .mchips { gap: 4px; }
  .mchip { min-width: 0; padding: 3px 7px; }
  .mchip b { font-size: 13px; }
  .goal-row { gap: 6px; }
  .gstep button { width: 36px; font-size: 20px; }
  .gstep input { width: 52px; height: 52px; font-size: 26px; }
  .goal-sep { padding-bottom: 10px; font-size: 22px; }
  .sg { grid-template-columns: minmax(0, 1fr) repeat(5, minmax(0, 46px)); gap: 6px 5px; padding: 2px 10px 4px; }
  .sg-h { font-size: 11px; }
  .sg-name { font-size: 13px; gap: 5px; }
  .sg input { min-height: 38px; padding: 4px 2px; font-size: 14px; }
  .desk-only { display: none; }
  .shot-hint { flex-basis: 100%; text-align: center; }
  .shot--done .shot-hint { text-align: left; }
  .shot-thumb { width: 100%; }
  .shot-thumb img { height: auto; max-height: 180px; object-fit: contain; }
  .scan-rows li { grid-template-columns: 3px minmax(0, 1fr) auto; }
  .scan-rows select { grid-column: 2 / -1; width: 100%; }
  .alias-list li { grid-template-columns: 1fr; gap: 6px; }
  .save { min-height: 56px; }
  .save-main { font-size: 16px; font-stretch: 105%; }
  .pitch-in--countdown { padding: 26px 16px 22px; }
  .pitch-in--countdown h2 { font-size: 23px; font-stretch: 112%; }
  .cd { gap: 10px; }
  .cd-unit b { font-size: 36px; font-stretch: 130%; }
  .panel { padding: 16px 14px; }
  .tiles { gap: 5px; }
  .tile { padding: 7px 7px; font-size: 12px; }
  .tile .mark { height: 10px; }
  .table { font-size: 13.5px; }
  .table th,
  .table td { padding-left: 5px; padding-right: 5px; }
  .hide-sm { display: none; }
  .who-list { gap: 6px; }
  .tox-sheet-top { grid-template-columns: 1fr; justify-items: center; }
  .opts--3,
  .opts--2 { grid-template-columns: 1fr; }
  .teams-pick { grid-template-columns: 1fr; }
  .series-final b { font-size: 38px; }
  .podium { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
