/* «Пляжный волейбол» (0.55 summer, beach-volley.js): the «Сезонное» row in «Игры в зале», the start dialog, the card — a
   beach at sunset on a canvas over the whole window, the scores above it, the big «Бей» pad below. */
.bv-card, .bv-modal, .bv-season { --bv-a: #2f9fd8; --bv-b: #e8553f; --bv-ink: #3b2f3f; --bv-sand: #f2d39d; --bv-dusk: #2a2040; }

/* The way in */
.bv-season { margin: 4px 0 12px; padding: 10px; border-radius: 14px; background: linear-gradient(180deg, rgba(249, 179, 94, .16), rgba(232, 85, 63, .05)); border: 1px solid rgba(253, 215, 126, .28); }
.bv-season[hidden] { display: none; }
.bv-season-l { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fdd77e; margin-bottom: 6px; }
.bv-entry-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bv-entry-btn:hover, .bv-entry-btn:focus-visible { border-color: #fdd77e; background: rgba(255, 255, 255, .08); }
.bv-entry-ico { font-size: 28px; line-height: 1; }
.bv-entry-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bv-entry-text small { color: var(--muted); font-size: 12px; }

/* The start dialog */
.bv-msheet { max-width: 560px; }
.bv-mhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 18px; }
.bv-x { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.bv-mart { border-radius: 12px; overflow: hidden; margin-bottom: 10px; border: 1px solid rgba(255, 255, 255, .1); }
.bv-mcanvas { display: block; width: 100%; height: auto; }
.bv-how { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.bv-mnote { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.bv-mwarn { margin: 0 0 8px; color: var(--bad, #e5484d); font-size: 13px; }
.bv-mbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.bv-mbtns button { min-height: 44px; padding: 0 18px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.bv-cancel { border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: var(--text); }
.bv-go { border: 0; background: var(--accent); color: #111; font-size: 15px; min-width: 120px; }

/* The card */
.bv-card { position: fixed; inset: 10px; margin: auto; z-index: 1800; width: min(1100px, calc(100vw - 20px)); height: min(760px, calc(100vh - 20px)); height: min(760px, calc(100dvh - 20px)); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--bv-dusk); border: 1px solid rgba(253, 215, 126, .25); box-shadow: 0 24px 70px rgba(0, 0, 0, .6); color: var(--text); }
.bv-card.hidden { display: none; }
.bv-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px 12px; background: #33264d; }
.bv-score { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bv-score-far { justify-content: flex-end; flex-direction: row-reverse; }
.bv-score .bv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bv-team); flex: none; }
.bv-score[data-team="a"] { --bv-team: var(--bv-a); } .bv-score[data-team="b"] { --bv-team: var(--bv-b); }
.bv-sname { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bv-snum { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; }
.bv-clock { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.bv-time { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bv-step { font-size: 11px; color: #fdd77e; white-space: nowrap; }
.bv-tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 6px; }
.bv-tools button { min-height: 36px; min-width: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(42, 32, 64, .62); backdrop-filter: blur(4px); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.bv-min { font-size: 18px !important; font-weight: 700; }
.bv-stage { position: relative; flex: 1 1 0; min-height: 0; touch-action: none; overflow: hidden; }
.bv-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bv-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(42, 32, 64, .3); pointer-events: none; }
.bv-over[hidden] { display: none; }
.bv-card[data-phase="podium"] .bv-over { pointer-events: auto; overflow: auto; align-items: flex-start; padding-top: 22px; background: rgba(34, 24, 52, .86); }
.bv-prep { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; width: min(620px, 100%); }
.bv-team { padding: 10px 12px; border-radius: 14px; background: rgba(255, 248, 232, .94); color: var(--bv-ink); box-shadow: 0 6px 20px rgba(40, 20, 50, .3); }
.bv-team b { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--bv-team); }
.bv-team .bv-dot, .bv-final .bv-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--bv-team); }
.bv-team[data-team="a"] { --bv-team: #1d6797; } .bv-team[data-team="b"] { --bv-team: #a3392b; }
.bv-team ul { margin: 0; padding: 0; list-style: none; font-size: 13px; display: grid; gap: 2px; }
.bv-team li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bv-count { font-size: 56px; font-weight: 900; color: #fff8e8; text-shadow: 0 3px 0 var(--bv-ink), 0 0 24px rgba(253, 215, 126, .7); min-width: 70px; text-align: center; }
.bv-big { font-size: 26px; font-weight: 900; color: #fff8e8; text-align: center; text-shadow: 0 2px 0 var(--bv-ink), 0 0 18px rgba(253, 215, 126, .6); }
.bv-podium { width: min(560px, 100%); display: grid; gap: 10px; }
.bv-final { text-align: center; font-size: 20px; font-weight: 800; color: #fff; }
.bv-final span { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: #ffe4c4; }
.bv-final span[data-team="a"] { --bv-team: var(--bv-a); } .bv-final span[data-team="b"] { --bv-team: var(--bv-b); }
.bv-final b { margin: 0 10px; }
.bv-titles { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.bv-titles li { padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .1); }
.bv-titles small { color: #fdd77e; }
.bv-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bv-rows li { display: grid; grid-template-columns: 24px 24px minmax(0, 1fr) auto; grid-template-areas: "p a n c" "p a s c"; column-gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); border-left: 3px solid var(--bv-team); }
.bv-rows li[data-team="a"] { --bv-team: var(--bv-a); } .bv-rows li[data-team="b"] { --bv-team: var(--bv-b); }
.bv-rows li.me { background: rgba(255, 255, 255, .13); }
.bv-rows .bv-place { grid-area: p; } .bv-rows img, .bv-rows .bv-ava { grid-area: a; width: 24px; height: 24px; border-radius: 50%; background: #4a3a66; }
.bv-rows b { grid-area: n; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bv-rows small { grid-area: s; color: var(--muted); font-size: 12px; }
.bv-rows em { grid-area: c; font-style: normal; font-weight: 800; color: var(--accent); }
.bv-why { margin: 0; text-align: center; color: #ffe4c4; font-size: 13px; }

/* The bar: the «Бей» pad (the field is a pad too), the hint, «Играю» / «Смотрю» */
.bv-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: #33264d; min-height: 72px; }
.bv-pad { flex: none; width: 260px; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .07); color: var(--text); font: inherit; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bv-pad[hidden] { display: none; }
.bv-pad-t { font-size: 18px; font-weight: 900; letter-spacing: .02em; }
.bv-pad-h { font-size: 11px; color: var(--muted); }
.bv-card.bv-mine .bv-pad { background: var(--accent); border-color: var(--accent); color: #111; }
.bv-card.bv-mine .bv-pad .bv-pad-h { color: rgba(17, 17, 17, .7); }
.bv-pad.on { background: #fff8e8; color: var(--bv-ink); border-color: #fff8e8; }
.bv-hint { flex: 1 1 auto; min-width: 0; font-size: 13px; color: #ffe4c4; line-height: 1.3; }
.bv-seat { flex: none; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.bv-seat[hidden] { display: none; }
.bv-card[data-phase="over"] .bv-bar, .bv-card[data-phase="podium"] .bv-bar { display: none; }
.bv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bv-pill { position: fixed; left: 14px; bottom: 90px; z-index: 1801; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #fdd77e; background: rgba(42, 32, 64, .96); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.bv-pill.hidden { display: none; }
body.bv-on { overflow: hidden; }

@media (max-width: 760px) {
  .bv-card { inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; z-index: 1900; }
  .bv-head { gap: 6px; padding: 6px 8px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
  .bv-score { gap: 4px 6px; }
  .bv-sname { font-size: 12px; }
  .bv-snum { font-size: 22px; }
  .bv-bar { flex-wrap: wrap; gap: 6px 10px; }
  .bv-pad { order: -1; flex: 1 0 100%; width: auto; min-height: 76px; }
  .bv-prep { grid-template-columns: 1fr 1fr; } .bv-count { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 340px) {
  .bv-hint { font-size: 12px; }
  .bv-pad { min-height: 68px; }
  .bv-sname { max-width: 72px; }
}
