/* 7arif Versus shell styles (retro magazine kit: web/games/retro/kit.css). Phone first (320 px up), then the big
   screen (body.vs-screen: laptop / TV / spectator) and streamer mode (body.vs-stream: large type, flat background
   for OBS, nothing animated). Game styles live in games/<id>/game.css, prefixed .vs-<id>. */

.vs .r-poster { padding-bottom: calc(40px + var(--ib)); }
.vs-app { display: block; }
.vs-sub { color: var(--paper); font-weight: 800; text-align: center; margin: 0 0 12px; }
.vs-h { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--paper); margin: 14px 0 8px; }
.vs-h small { font: 700 14px/1.2 var(--font-ui); }
.vs-error { background: var(--red); color: var(--paper-clip); font-weight: 800; padding: 8px 12px; border: 2px solid var(--ink); margin: 0 0 10px; }
.vs-banner { position: sticky; top: 0; z-index: 30; background: var(--yellow); color: var(--ink); font-weight: 800; text-align: center; padding: 6px 10px; border: 2px solid var(--ink); }
.vs-toast { position: fixed; inset-inline: 12px; bottom: calc(16px + var(--ib)); z-index: 90; max-width: 480px; margin: 0 auto; background: var(--ink); color: var(--paper-clip);
  font-weight: 800; text-align: center; padding: 10px 14px; border: 2px solid var(--paper); opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 160ms ease-out, transform 160ms ease-out; }
.vs-toast.is-on { opacity: 1; transform: none; }
.vs-wait { color: var(--ink); font-weight: 800; text-align: center; }
.vs-note { margin: 8px 0 0; font-weight: 800; color: var(--red-ink); text-align: center; }
.vs-link { display: block; width: 100%; min-height: var(--tap); margin-top: 8px; background: none; border: 0; color: var(--blue); font-weight: 800; text-decoration: underline; }
.vs-lobby.is-phone .vs-link, .vs-privacy { color: var(--paper); }
.vs-small { min-height: var(--tap); font-size: 14px; padding: 0 12px; }
.vs-noscript { color: var(--paper); text-align: center; }

/* ---- home ---- */
.vs-join { display: grid; gap: 10px; }
.vs-field { display: grid; gap: 4px; font-weight: 800; }
.vs-field input { min-height: 52px; padding: 0 12px; border: 2px solid var(--ink); background: #fff; font-size: 20px; font-weight: 800; border-radius: 2px; width: 100%; }
#vsCode { font-family: var(--font-display); font-weight: 400; font-size: 30px; letter-spacing: .12em; text-transform: uppercase; text-align: center; padding-top: 6px; }
.vs-go { width: 100%; font-size: 20px; }
.vs-create { display: grid; gap: 10px; margin-top: 14px; }
.vs-bigbtn { flex-direction: column; align-items: stretch; text-align: start; min-height: 72px; padding: 10px 14px; gap: 2px; }
.vs-bigbtn b { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.vs-bigbtn small { font-size: 13px; font-weight: 700; line-height: 1.35; }
.vs-privacy { font-size: 13px; text-align: center; margin: 14px 0 0; }

/* ---- code card ---- */
.vs-codecard { background: var(--paper-clip); border: 3px solid var(--ink); box-shadow: var(--shadow-hard); padding: 10px 12px; text-align: center; }
.vs-codecard__k { margin: 0; font-weight: 800; color: var(--ink-meta); }
.vs-codecard__k b { color: var(--ink); unicode-bidi: isolate; }
.vs-code { margin: 2px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 64px; line-height: 1.05; padding-top: 6px; letter-spacing: .1em;
  color: var(--red); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; unicode-bidi: isolate; }
.vs-qr { width: min(240px, 60vw); margin: 4px auto; background: #fff; border: 2px solid var(--ink); }
.vs-qr svg { display: block; width: 100%; height: auto; }
.vs-audience { margin: 8px 0 0; font-weight: 800; word-break: break-all; }

/* ---- seats ---- */
.vs-seats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vs-seat { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 10px; background: var(--paper-clip); border: 2px solid var(--ink); }
.vs-seat.is-me { background: var(--yellow); }
.vs-seat.is-off { opacity: .6; }
.vs-seat.is-empty { background: transparent; border-style: dashed; border-color: var(--paper); color: var(--paper); justify-content: center; font-weight: 700; }
.vs-seat__n { font-family: var(--font-display); font-size: 22px; min-width: 1.4em; text-align: center; padding-top: 3px; }
.vs-seat__name { flex: 1 1 auto; min-width: 0; font-weight: 800; font-size: 18px; overflow-wrap: anywhere; }
.vs-seat__name small { font-weight: 700; font-size: 12px; }
.vs-seat__total { font-family: var(--font-display); font-size: 22px; padding-top: 3px; }
.vs-hosttag { background: var(--ink); color: var(--paper-clip); padding: 0 5px; border-radius: 2px; }
.vs-kick { min-height: var(--tap); min-width: var(--tap); padding: 0 8px; border: 2px solid var(--ink); background: var(--paper); font-weight: 800; font-size: 13px; }

/* ---- host controls ---- */
.vs-controls { margin-top: 12px; display: grid; gap: 10px; }
.vs-controls .r-h2 { margin: 0; }
.vs-gamecards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vs-gamecard { color: var(--ink); display: grid; gap: 2px; align-content: start; text-align: start; min-height: 64px; padding: 8px 10px; background: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow-hard); border-radius: 2px; }
.vs-gamecard.is-on { background: var(--navy); color: var(--paper-clip); grid-column: 1 / -1; }
.vs-gamecard.is-soon { opacity: .55; box-shadow: none; cursor: default; }
.vs-gamecard__name { font-family: var(--font-display); font-weight: 400; font-size: 21px; line-height: 1.2; }
.vs-gamecard__meta { font-size: 12px; font-weight: 800; }
.vs-gamecard__blurb { font-size: 13px; font-weight: 600; line-height: 1.4; }
.vs-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vs-seg { display: inline-flex; border: 2px solid var(--ink); }
.vs-seg button { min-height: var(--tap); padding: 0 14px; border: 0; background: #fff; color: var(--ink); font-weight: 800; }
.vs-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper-clip); }
.vs-toggle { display: inline-flex; gap: 8px; align-items: center; min-height: var(--tap); padding: 0 12px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font-weight: 800; }
.vs-toggle[aria-pressed="true"] { background: var(--yellow); }
.vs-sets { gap: 10px; }
.vs-set { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.vs-set select { min-height: var(--tap); min-width: 64px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: inherit; padding: 0 8px; }
.vs-start { width: 100%; font-size: 22px; min-height: 60px; }

/* ---- game bar: the score strip, and on the big screen the join tag + the host menu at its end ---- */
.vs-gamebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 10px; }
.vs-gamebar.is-results { margin-top: 0; }
.vs-gamebar__end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.vs-gamebar__end:empty { display: none; }
.vs-strip { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.vs-num { unicode-bidi: isolate; white-space: nowrap; }
.vs-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 2px 8px; background: var(--paper-clip); border: 2px solid var(--ink); font-weight: 800; }
.vs-chip.is-me { background: var(--yellow); }
.vs-chip.is-off { opacity: .55; }
.vs-chip small { font-weight: 700; font-size: 11px; }
.vs-chip__score { font-family: var(--font-display); font-weight: 400; font-size: 20px; padding-top: 3px; }
.vs-hostbar { margin-top: 14px; text-align: center; }
.vs-game { min-height: 200px; }

/* ---- results ---- */
.vs-results { background: var(--paper); border: 3px solid var(--ink); box-shadow: var(--shadow-hard); padding: 14px; text-align: center; }
.vs-gname { margin: 0; }
.vs-winner { margin: 4px 0 8px; font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 1.15; padding-top: 6px; color: var(--red); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; overflow-wrap: anywhere; }
.vs-winner small { display: block; font: 800 14px/1.3 var(--font-ui); color: var(--ink); -webkit-text-stroke: 0; }
.vs-line { font-weight: 800; margin: 0 0 8px; }
.vs-table { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; text-align: start; }
.vs-table li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 10px; background: var(--paper-clip); border: 2px solid var(--ink); }
.vs-table li:first-child { background: var(--yellow); }
.vs-table li.is-me { outline: 3px solid var(--blue); outline-offset: -5px; }
.vs-table__r, .vs-table__s { font-family: var(--font-display); font-size: 24px; padding-top: 3px; }
.vs-table__n { flex: 1 1 auto; font-weight: 800; font-size: 18px; overflow-wrap: anywhere; }
.vs-total { font-weight: 700; }

/* ---- join tag (screen + stream): how to join, in the score row during a game and on the results ---- */
.vs-jointag { display: flex; align-items: center; gap: 10px; padding: 4px 12px; background: var(--paper-clip); border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard); font-weight: 800; direction: ltr; unicode-bidi: isolate; }
.vs-jointag__url { font-size: 14px; }
/* the host screen's menu (stop, back to the lobby): a small button; its pop-up opens under it only when asked */
.vs-menu { position: relative; }
.vs-menu > summary { list-style: none; cursor: pointer; }
.vs-menu > summary::-webkit-details-marker { display: none; }
.vs-menu__pop { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 45; padding: 8px; background: var(--paper-clip);
  border: 3px solid var(--ink); box-shadow: var(--shadow-hard); white-space: nowrap; }
.vs-code-txt { font-family: var(--font-display); font-weight: 400; font-size: 30px; padding-top: 4px; letter-spacing: .08em; color: var(--red); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }

/* ================================================================== big screen (laptop / TV / spectator) */
body.vs-screen .r-poster { max-width: 1400px; --maxw: 1400px; background: transparent; padding-inline: 24px; }
body.vs-screen { font-size: 18px; }
body.vs-screen .vs-lobby.is-screen { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; }
body.vs-screen .vs-code { font-size: clamp(72px, 11vw, 168px); -webkit-text-stroke-width: 8px; }
body.vs-screen .vs-codecard { padding: 18px; }
body.vs-screen .vs-codecard__k { font-size: 20px; }
body.vs-screen .vs-qr { width: clamp(180px, 22vw, 320px); }
body.vs-screen .vs-seat { min-height: 60px; }
body.vs-screen .vs-seat__name { font-size: 24px; }
body.vs-screen .vs-chip { min-height: 52px; font-size: 22px; padding: 4px 14px; }
body.vs-screen .vs-chip__score { font-size: 32px; }
body.vs-screen .vs-results { max-width: 900px; margin: 0 auto; }
body.vs-screen .vs-winner { font-size: clamp(48px, 6vw, 96px); }
body.vs-screen .vs-table__n { font-size: 26px; }
body.vs-screen .vs-table__r, body.vs-screen .vs-table__s { font-size: 34px; }
body.vs-screen .vs-game { min-height: 50vh; }
@media (max-width: 760px) { body.vs-screen .vs-lobby.is-screen { grid-template-columns: 1fr; } }
body.vs-spectator .vs-hostbar { display: none; }

/* ================================================================== streamer mode: flat, big, calm (OBS capture) */
body.vs-stream { background: var(--navy-deep) !important; font-size: 21px; }
body.vs-stream .r-poster { background: transparent; }
body.vs-stream .vs-top .r-masthead { font-size: 40px; }
body.vs-stream .vs-jointag { padding: 4px 16px; }
body.vs-stream .vs-jointag__url { font-size: 20px; }
body.vs-stream .vs-code-txt { font-size: 40px; }
body.vs-stream * { animation: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce) { .vs-toast { transition: none; } }
@media (max-width: 360px) { .vs-code { font-size: 52px; } .vs-gamecards { grid-template-columns: 1fr; } }

.vs [hidden] { display: none !important; }

/* ---- home: the two ways to play (phones only | big screen), side by side when there is room ---- */
.vs-create .vs-h { margin-top: 4px; }
.vs-ways { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.vs-way { min-height: 112px; justify-content: flex-start; }
.vs-way b { font-size: 28px; }

/* ---- coming soon (no server yet) ---- */
.vs-soon__card p:last-child { margin-bottom: 0; font-weight: 700; line-height: 1.5; }
.vs-soon__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.vs-soon__list li { display: grid; gap: 2px; padding: 8px 12px; background: var(--paper-clip); border: 2px solid var(--ink); color: var(--ink); }
.vs-soon__list b { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.2; }
.vs-soon__list span { font-size: 14px; font-weight: 700; line-height: 1.4; }
.vs-soon__btns { margin-top: 14px; }
