/* Список матчей, команды и счёт в карточках. Адаптивные правила расположены рядом с компонентами. */
.match-grid { display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 12px; }
.match-card { border: 1px solid #3a181c; border-radius: 14px; background: #16080c; padding: 18px 19px; cursor: default; transition: border-color 0.15s; min-width: 0px; }
.match-card:hover { border-color: #4a282c; background: #1c0c10; }
.match-card.is-lineup-saved, .match-card.is-lineup-saved:hover { border-color: #f5d76e; box-shadow: inset 0 0 0 1px #f5d76e; }
.pos-board.is-locked button:disabled, .pos-board.is-locked select:disabled { opacity: 1; cursor: default; }
.pos-save input:disabled:checked { background: #36c977; border-color: #36c977; opacity: 1; cursor: default; }
.teams { display: grid; grid-template-columns: minmax(0px, 1fr) auto minmax(0px, 1fr); gap: 14px; align-items: center; }
.team { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 16px; font-weight: 750; }
.team-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team.right { justify-content: flex-end; text-align: right; }
.score-stack { display: flex; flex-direction: column; align-items: center; }
.score-stack .mark-btn { margin-bottom: 4px; }
.mark-btn:disabled { opacity: 0.4; cursor: default; }
.match-card .prank-layer { position: absolute; inset: 0; z-index: 4; overflow: hidden; border-radius: inherit; pointer-events: none; }
.prank-sprite { position: absolute; top: 0; left: 0; height: 148px; width: auto; pointer-events: auto; cursor: pointer; user-select: none; -webkit-user-drag: none; will-change: transform; }
.map-length { margin-top: 2px; color: #c9b0b6; font-size: 12px; font-weight: 650; letter-spacing: 0.04em; line-height: 1; }
.map-result { flex: none; border: 1px solid #36c977; color: #36c977; border-radius: 4px; padding: 1px 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; line-height: 16px; }
.map-result.loss { border-color: #f45d5d; color: #f45d5d; }
.map-tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.map-tab { background: #1a0c0e; color: #9a8a88; border: 1px solid #3a181c; border-radius: 6px; padding: 2px 8px; font: inherit; font-size: 11px; cursor: pointer; }
.map-tab.is-active { color: #f2ece8; border-color: #f5d76e; background: #32161a; }
.draft-empty { margin: 8px 0 0; color: #9a8a88; font-size: 12px; }
.score { font-size: 22px; font-weight: 850; white-space: nowrap; }
.score em { color: rgb(101, 116, 135); font-style: normal; padding: 0px 4px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 15px; color: var(--muted); font-size: 12px; }
.meta-row .match-id { margin-left: auto; color: #c9b0b6; letter-spacing: 0.02em; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.pill.live { color: var(--red); border-color: rgb(116, 61, 66); background: rgb(42, 27, 32); }
.pill.pause { color: #f0c36a; border-color: #8a6a32; background: #2a2114; }
.map-length.is-paused { color: #f0c36a; }
.pill.done { color: var(--green); border-color: rgb(40, 94, 67); background: rgb(21, 39, 30); }
@media (max-width: 900px) {
  .match-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .match-card { padding: 14px; }
  .team { font-size: 13px; }
  .score { font-size: 18px; }
}
.detail-top .teams { gap: 8px !important; margin-top: 5px !important; }
.detail-top .team { font-size: 14px; line-height: 1.2; }
.pill.stale { color: var(--amber); }
.match-card { display: block; text-decoration: none; color: inherit; }
.score-label { font-size: 11px; color: var(--muted); }
.match-grid.finished-list { grid-template-columns: 1fr; }
.match-grid.layout-single:not(.has-tape),
.match-grid.finished-list.layout-single:not(.has-tape) { grid-template-columns: minmax(0, 1040px); justify-content: center; }
.match-grid.layout-pair:not(.has-tape),
.match-grid.finished-list.layout-pair:not(.has-tape) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.match-grid.layout-pair:not(.has-tape) > .match-card.has-draft,
.match-grid.layout-pair:not(.has-tape) > .match-card.is-collapsed,
.match-grid.layout-pair:not(.has-tape) > .match-card-placeholder { grid-column: auto; }
.shell:has(#matches.layout-pair:not(.has-tape)) { max-width: 1680px; }
.shell:has(#matches.has-tape) { max-width: none; }
.match-grid.has-tape,
.match-grid.finished-list.has-tape { grid-template-columns: minmax(0, 1fr) var(--tape-a, 0px) minmax(0, 1fr) var(--tape-b, 0px); align-items: start; }
.match-grid.has-tape > .match-card:nth-of-type(odd) { grid-column: 1; }
.match-grid.has-tape > .match-card:nth-of-type(even) { grid-column: 3; }
#matches > .poly-tape { display: none; }
#matches.has-tape > .poly-tape.is-open { display: flex; position: relative; top: auto; left: auto; grid-column: 2; width: auto; min-width: 0; align-self: start; z-index: 2; transform: none; opacity: 1; pointer-events: auto; }
#matches.has-tape > .poly-tape.is-open.is-right { grid-column: 4; }
.match-grid.layout-single.has-tape,
.match-grid.finished-list.layout-single.has-tape { grid-template-columns: minmax(0, 1040px) minmax(340px, 380px); justify-content: center; }
.match-grid.layout-single.has-tape > .match-card:nth-of-type(odd),
.match-grid.layout-single.has-tape > .match-card:nth-of-type(even) { grid-column: 1; }
#matches.layout-single.has-tape > .poly-tape.is-open,
#matches.layout-single.has-tape > .poly-tape.is-open.is-right { grid-column: 2; }
.match-grid.has-tape .draft-head,
.match-grid.has-tape .draft-pair { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.match-grid.has-tape .team-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.match-grid.has-tape .kill-odds,
.match-grid.has-tape .poly-outs { grid-template-columns: 1fr; }
.match-grid.has-tape .poly-line { grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
.match-grid.has-tape .draft-team .hero-list { flex-wrap: nowrap; }
.match-grid.has-tape .draft-team .hero-list:first-of-type .draft-hero { width: calc((100% - 32px) / 5); max-width: 84px; min-width: 0; }
#matches .poly-tape-cols,
#matches .poly-tape-row { grid-template-columns: 46px minmax(0, 1.4fr) minmax(0, 1fr) 44px 34px minmax(64px, 1fr); column-gap: 6px; }
@media (max-width: 1100px) {
  .match-grid.has-tape,
  .match-grid.finished-list.has-tape,
  .match-grid.layout-single.has-tape,
  .match-grid.finished-list.layout-single.has-tape { grid-template-columns: minmax(0, 1fr); }
  .match-grid.has-tape > .match-card:nth-of-type(odd),
  .match-grid.has-tape > .match-card:nth-of-type(even) { grid-column: 1 !important; grid-row: auto !important; }
  #matches.has-tape > .poly-tape.is-open,
  #matches.has-tape > .poly-tape.is-open.is-right,
  #matches.layout-single.has-tape > .poly-tape.is-open,
  #matches.layout-single.has-tape > .poly-tape.is-open.is-right { grid-column: 1; grid-row: auto !important; position: relative; top: auto; height: auto !important; max-height: 70vh !important; }
}
@media (max-width: 900px) {
  .match-grid.layout-pair:not(.has-tape),
  .match-grid.finished-list.layout-pair:not(.has-tape) { grid-template-columns: minmax(0, 1fr); }
}
.match-card.has-draft, .match-card.is-collapsed { grid-column: 1 / -1; }
.match-card { position: relative; cursor: grab; padding-right: 52px; }
.match-card .teams { margin-right: -33px; }
.match-card .team.right { padding-right: 64px; }
.match-card.is-dragging { position: fixed; z-index: 40; margin: 0; cursor: grabbing; border-color: #f5d76e; user-select: none; pointer-events: none; box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55); transition: none; }
.match-card-placeholder { grid-column: 1 / -1; border: 1px dashed rgba(245, 215, 110, 0.35); border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.match-card.is-collapsed { padding-top: 12px; padding-bottom: 12px; }
.match-card.is-collapsed .card-draft { display: none; }
.match-card.is-collapsed .meta-row { margin-top: 8px; }
.card-collapse { position: absolute; top: 10px; right: 10px; z-index: 2; width: 28px; height: 28px; padding: 0; border: 1px solid #4a282c; border-radius: 6px; background: #1a0c0e; color: #f2ece8; font: 700 18px/1 "Segoe UI", sans-serif; cursor: pointer; }
.card-collapse:hover { border-color: #f5d76e; color: #f5d76e; }
.card-poly { position: absolute; top: 42px; right: 10px; z-index: 2; width: 28px; height: 28px; padding: 0; border: 1px solid #4a282c; border-radius: 6px; background: #1a0c0e; color: #f2ece8; font: 700 13px/1 "Segoe UI", sans-serif; letter-spacing: 0; cursor: pointer; }
.card-poly:hover, .card-poly.is-on { border-color: #f5d76e; color: #f5d76e; }
.poly-tape { position: fixed; z-index: 30; display: flex; flex-direction: column; min-width: 0; border: 1px solid rgba(245, 215, 110, 0.55); border-radius: 14px; background: #12060a; color: #f2ece8; overflow: hidden; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55); transform: translateX(28px); opacity: 0; pointer-events: none; transition: transform 220ms ease, opacity 180ms ease; }
.poly-tape.is-open { transform: translateX(0); opacity: 1; pointer-events: auto; }
.poly-tape-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 4px; }
.poly-tape-title { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; }
.poly-tape-tools { display: flex; align-items: center; gap: 6px; }
.poly-tape-close { width: 26px; height: 26px; padding: 0; border: 1px solid #3a181c; background: #1a0c0e; color: #9a8a88; border-radius: 8px; cursor: pointer; font: inherit; font-size: 16px; line-height: 1; }
.poly-tape-close:hover { border-color: #f5d76e; color: #f5d76e; }
.poly-tape-sub { margin: 0; padding: 0 12px 8px; color: #9a8a88; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poly-tape-cols, .poly-tape-row { display: grid; grid-template-columns: 52px minmax(0, 2.4fr) 54px 44px 32px minmax(0, 1fr); column-gap: 14px; align-items: baseline; }
.poly-tape-cols { padding: 0 8px 6px; color: #9a8a88; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.poly-tape-body { min-height: 0; flex: 1; overflow: auto; padding: 0 0 10px; }
.poly-tape-row { padding: 6px 8px; font-size: 12px; border-top: 1px solid rgba(58, 24, 28, 0.85); }
.poly-tape-row:hover { background: rgba(255, 255, 255, 0.03); }
.poly-tape-row b, .poly-tape-row span { min-width: 0; }
.tape-wallet, .tape-outcome { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tape-wallet b, .tape-outcome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape-time, .tape-usd, .tape-odds { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tape-usd, .tape-odds { text-align: right; }
.tape-odds { color: #f5d76e; }
.tape-act { font-weight: 750; }
.tape-act.is-buy { color: #7eb6ff; }
.tape-act.is-sell { color: #f5d76e; }
.tape-note { margin-left: 4px; color: #c9b0b6; font-style: normal; font-weight: 600; }
.poly-tape-empty { margin: 8px 12px; color: #9a8a88; font-size: 12px; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) {
  .poly-tape { transition: none; }
}
.match-card .card-draft.draft-section { max-width: none; margin: 16px 0 0; padding: 14px 0 0; background: transparent; border: 0; border-top: 1px solid #3a181c; border-radius: 0; }
.match-card .draft-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.85fr); gap: 22px; align-items: end; margin-bottom: 6px; }
.match-card .card-draft.is-spectator .draft-head,
.match-card .card-draft.is-spectator .draft-pair { grid-template-columns: minmax(0, 1fr); }
.match-card .draft-head h2 { margin: 0; letter-spacing: 0.04em; }
.match-card .draft-head .pos-save-slot { margin: 0; justify-content: center; }
.match-card .draft-pairs { display: flex; flex-direction: column; gap: 16px; }
.match-card .draft-pair { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.85fr); gap: 22px; align-items: start; }
.match-card .draft-pair .draft-team h3,
.match-card .draft-pair .pos-row h3 { margin: 0 0 6px; min-height: 16px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-roster { margin: -2px 0 6px; font-size: 11px; line-height: 14px; color: #c9b0b6; }
.match-card .draft-team .hero-list:first-of-type .draft-hero { width: 84px; }
.match-card .draft-team .hero-list:first-of-type .draft-hero-img,
.match-card .draft-team .hero-list:first-of-type .draft-hero-img-fallback { height: 48px; }
.match-card .draft-hero.lineup .draft-nick { display: block; min-height: 0; margin-top: 3px; padding: 0 2px; font-size: 10px; line-height: 1.2; font-weight: 600; letter-spacing: 0; color: #f2ece8; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-row { min-width: 0; }
.pos-cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pos-cell { min-height: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; border: 1px dashed #4a282c; border-radius: 7px; background: #1a0c0e; color: #9a8a88; overflow: hidden; }
.pos-cell span { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-align: center; padding: 4px 2px 6px; }
.pos-cell.filled { border-style: solid; }
.pos-portrait { position: relative; }
.pos-hero { display: block; width: 100%; height: 48px; object-fit: cover; background: #120608; }
.pos-hero-fallback { height: 48px; display: grid; place-items: center; font-weight: 800; }
.pos-votes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.pos-vote { display: flex; align-items: center; justify-content: center; gap: 2px; min-height: 22px; }
.pos-vote button { width: 18px; height: 18px; padding: 0; border-radius: 4px; border: 1px solid #4a282c; background: #14080a; color: #9a8a88; cursor: pointer; line-height: 16px; }
.pos-vote.is-yes .pos-yes { color: #14301f; background: #36c977; border-color: #36c977; }
.pos-vote.is-no .pos-no { color: #3a1014; background: #f45d5d; border-color: #f45d5d; }
.pos-role { display: none; width: 52px; max-width: 100%; background: #14080a; color: #f2ece8; border: 1px solid #4a282c; border-radius: 4px; font-size: 9px; padding: 1px; }
.pos-vote.is-no .pos-role { display: block; }
.pos-save-slot { display: flex; justify-content: center; margin: 0 0 10px; }
.pos-save { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; max-width: 240px; color: #c9b0b6; font-size: 12px; line-height: 1.3; text-align: center; cursor: pointer; }
.pos-save input { appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 4px; border: 1px solid #4a282c; background: #14080a; cursor: pointer; display: grid; place-items: center; }
.pos-save input:checked { background: #36c977; border-color: #36c977; }
.pos-save input:checked::after { content: "✓"; color: #14301f; font-size: 14px; font-weight: 800; line-height: 1; }
.pos-save-note { margin: 0; }
.pos-save-note:empty { display: none; }
.pos-save:has(.pos-save-note:not(:empty)) .pos-save-caption { display: none; }
@media (max-width: 800px) {
  .match-card .draft-head,
  .match-card .draft-pair { grid-template-columns: 1fr; }
}
.poly-odds { margin-top: 16px; padding-top: 14px; border-top: 1px solid #3a181c; }
.poly-odds-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: #f5d76e; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.poly-odds-link { color: #c9b0b6; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; text-decoration: none; }
.poly-odds-link:hover { color: #f5d76e; }
.poly-odds-title { margin: 6px 0 10px; color: #e7d6d8; font-size: 12px; line-height: 1.35; }
.poly-odds-empty { margin: 8px 0 0; color: #9a8a88; font-size: 12px; }
.poly-line { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px 16px; align-items: center; margin-top: 8px; }
.poly-line-title { color: #c9b0b6; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.poly-outs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.poly-out { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: baseline; min-width: 0; padding: 8px 10px; border: 1px solid #3a181c; border-radius: 8px; background: #1a0c0e; }
.poly-odds .poly-out { position: relative; grid-template-columns: minmax(0, 1fr) 4.8em 3.5em; align-items: center; padding-bottom: 22px; overflow: hidden; }
.poly-odds .poly-out-name { grid-column: 1; grid-row: 1; align-self: center; }
.poly-odds .poly-out-odd { grid-column: 2; grid-row: 1; justify-self: end; width: 4.8em; text-align: right; }
.poly-odds .poly-out-price { grid-column: 3; grid-row: 1; justify-self: end; width: 3.5em; text-align: right; }
.poly-out-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.poly-out-odd { color: #f5d76e; font-size: 16px; font-variant-numeric: tabular-nums; }
.poly-out-price { color: #c9b0b6; font-size: 12px; font-variant-numeric: tabular-nums; }
.poly-odds .poly-out-delay { position: absolute; right: 10px; bottom: 4px; width: 8.8em; margin: 0; text-align: right; pointer-events: none; }
.poly-out-delay { color: #9a8a88; font-size: 11px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 800px) {
  .poly-line { grid-template-columns: 1fr; gap: 6px; }
  .poly-outs { grid-template-columns: 1fr; }
}
.kill-odds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #3a181c; }
.kill-book { min-width: 0; padding: 10px; border: 1px solid #3a181c; border-radius: 10px; background: #16080c; }
.kill-book .poly-line { margin-top: 10px; }
.kill-book .poly-out { position: relative; padding-bottom: 22px; }
.kill-book .poly-out-delay, .kill-line .poly-out-delay { position: absolute; right: 10px; bottom: 4px; width: 8.8em; margin: 0; text-align: right; pointer-events: none; }
.kill-title { margin: 12px 0 6px; color: #e7d6d8; font-size: 12px; font-weight: 700; }
.kill-line { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; padding-bottom: 16px; }
.kill-cell { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 8px 10px; border: 1px solid #3a181c; border-radius: 8px; background: #1a0c0e; }
.kill-cell span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9b0b6; font-size: 12px; font-weight: 700; }
.kill-cell b { color: #f5d76e; font-size: 16px; font-variant-numeric: tabular-nums; }
.kill-cell.under { background: #2a1214; }
.kill-cell.over { background: #122a18; }
.kill-line.is-main .kill-cell.under { background: #3a181c; }
.kill-line.is-main .kill-cell.over { background: #1a3a22; }
.kill-line.is-main .kill-cell b { color: #fff6c8; }
@media (max-width: 800px) {
  .kill-odds { grid-template-columns: 1fr; }
}
