/* KØS SEJL — css/live.css : live race lobby */

/* layout */
.live-wrap { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter) 24px; display: flex; flex-direction: column; gap: 16px; }
.live-intro { color: var(--text-dim); font-size: 1.05rem; }
.live-big-btns { display: grid; grid-template-columns: 1fr; gap: 12px; }
.live-big-btns .btn { width: 100%; justify-content: center; }
.live-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.live-form { padding: 16px; border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 12px; }
.live-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.live-label { font-weight: 800; min-width: 120px; color: var(--text-dim); }
.live-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.live-cico { width: 1.25em; height: 1.25em; vertical-align: -.25em; margin-right: .35em; }
.live-hint { font-size: .85rem; color: var(--text-dim); }
.live-err { color: #ffb3bb; min-height: 1.4em; font-weight: 700; }

/* join: who you are */
.live-me { display: flex; align-items: center; gap: 10px; }
.live-me-av { width: 48px; height: 48px; flex: none; border-radius: 50%; overflow: hidden; }
.live-me-av svg { width: 100%; height: 100%; display: block; }
.live-me small { display: block; color: var(--text-dim); font-size: .8rem; }
.live-me b { font-size: 1.05rem; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; border: 2px solid rgba(255,255,255,.7); }

/* join: the code */
.live-code-input {
  font-size: 2rem; letter-spacing: .4em; text-align: center; text-transform: uppercase; font-weight: 900;
  padding: 12px; width: 100%; max-width: 320px; border-radius: 16px; border: 2px solid var(--glass-border);
  background: rgba(0,0,0,.3); color: var(--text); transition: border-color .15s;
}
.live-code-input:focus { border-color: var(--primary); outline: none; }

/* the trainer talks */
.live-trainer { display: flex; flex-direction: row; gap: 14px; align-items: center; padding: 14px; }
.live-trainer-av { width: 72px; height: 72px; flex: none; border-radius: 18px; overflow: hidden; }
.live-trainer-av svg { width: 100%; height: 100%; display: block; }
.live-trainer-bubble { flex: 1; min-width: 0; }
.live-trainer-text { margin: 4px 0 0; font-size: 1.1rem; }

/* room: code + players */
.live-room { display: grid; grid-template-columns: 1fr; gap: 16px; }
.live-codebox { padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; border-radius: var(--radius-lg); max-width: 340px; width: 100%; }
.live-code { font-size: clamp(2.6rem, 10vw, 4.6rem); font-weight: 900; letter-spacing: .25em; padding-left: .25em; color: var(--primary); line-height: 1; }
.live-link { font-size: .8rem; color: var(--text-dim); }
.live-link code { word-break: break-all; font-size: .8rem; color: var(--text-dim); }
.live-qr { background: #fff; padding: 6px; border-radius: 12px; line-height: 0; }
.live-qr svg { max-width: 100%; height: auto; }
.live-side { padding: 16px; display: flex; flex-direction: column; gap: 12px; border-radius: var(--radius-lg); }
.live-side h2 { margin: 0; font-size: 1.1rem; }
.live-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.live-player { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(255,255,255,.06); border-radius: 14px; min-height: 48px; }
.live-player b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-player.is-lost { opacity: .55; }
.live-tag { background: var(--primary); color: #1a0f05; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 800; }
.live-ready { display: flex; gap: 4px; align-items: center; color: var(--good); font-weight: 700; font-size: .85rem; }
.live-ready .ico { width: 18px; height: 18px; }
.live-sum { color: var(--text-dim); font-size: .85rem; }
/* each player's game version, shown to the host; a different version gets a small amber warning */
.live-ver { font-size: .72rem; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-ver.is-diff { color: #ffcf6b; font-weight: 800; background: rgba(255,170,0,.14); border-radius: 999px; padding: 2px 8px; }
.live-ver i { font-style: normal; }

/* reconnecting banner */
.live-banner { /* at the bottom: the screen title and the code field stay readable; under dialogs (z 70) */
  position: fixed; bottom: calc(var(--safe-b) + 12px); left: 50%; transform: translateX(-50%); z-index: 30;
  background: #7a4a00; color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 800;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); text-align: center; box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.live-banner.is-away { padding: 6px 6px 6px 16px; }
.live-banner .btn { flex: none; min-height: 44px; }
.live-banner[hidden] { display: none; }
.live-banner .nb-short { display: none; }
@media (max-width: 480px) { .live-banner .nb-long { display: none; } .live-banner .nb-short { display: inline; } }
/* the way back into a race this phone still holds: first on the entry view */
.live-seatgo span { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.live-seatgo small { font-size: .85rem; font-weight: 700; opacity: .85; }
.live-big-btns .live-seatgo { grid-column: 1 / -1; }

/* countdown */
.live-start { padding: 24px; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; border-radius: var(--radius-lg); }
.live-count { font-size: clamp(2rem, 9vw, 4rem); font-weight: 900; color: var(--primary); min-height: 1.2em; }

/* results */
.live-results { list-style: none; margin: 0; padding: 12px 16px; border-radius: var(--radius-lg); }
.live-results li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--glass-border); }
.live-results li span { flex: 1; }
.live-results li em { font-style: normal; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.live-results li b { min-width: 2.2em; font-variant-numeric: tabular-nums; }
.live-results li.is-me { margin: 0 -10px; padding: 10px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 18%, transparent); font-weight: 700; }
.live-results li.is-me b, .live-results li.is-me span { color: var(--primary); }
.live-metag { font-style: normal; font-size: 0.75em; font-weight: 800; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: var(--primary); color: var(--ink); vertical-align: 1px; }

/* hub entry card */
.live-card.is-closed { opacity: .6; }
.live-card .act-ico { background: linear-gradient(180deg, #49c6f2, #2b6cb0); }

/* wide screens */
@media (min-width: 560px) {
  .live-big-btns { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 700px) {
  .live-room { grid-template-columns: minmax(260px, 1fr) 1.2fr; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .live-code-input { transition: none; }
}
.live-link small { display: block; }
.live-rematch-wait { flex: 1 1 100%; order: -1; margin: 0 0 6px; text-align: center; }
.live-windnote { padding: 8px 12px; border-left: 3px solid var(--primary, #ffb547); border-radius: 6px; background: rgba(255,181,71,.12); color: var(--text, #fff); font-size: .92rem; font-weight: 600; }

/* ---- open race list, scheduled races (live-rules spec B/C) */
.live-chips .chip .ico { width: 1.1em; height: 1.1em; vertical-align: -.2em; margin-right: .3em; }
.live-listhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.live-listhead .live-intro { margin: 0; }
.live-loading { text-align: center; padding: 24px 0; }
.live-sect + .live-sect { margin-top: 18px; }
.live-h { margin: 0 0 10px; font-size: 1rem; font-weight: 900; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.live-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.live-item {
  width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; text-align: left; color: var(--text);
  border-radius: var(--radius-lg); min-height: 64px; font: inherit; transition: transform .15s var(--ease-pop), background .15s;
}
.live-item:hover:not(:disabled) { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.live-item:active:not(:disabled) { transform: scale(.98); }
.live-item:disabled { opacity: .55; cursor: default; }
.live-item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-item-name { flex: 1 1 auto; min-width: 0; font-size: 1.1rem; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-item-by { font-size: .82rem; color: var(--text-dim); margin-top: -4px; }
.live-item-bot { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.live-st { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-st .ico { width: 15px; height: 15px; }
.live-st.is-lobby { background: rgba(62,224,143,.16); color: var(--good); }
.live-st.is-go { background: rgba(255,181,71,.2); color: var(--primary); }
.live-st.is-open { background: rgba(62,224,143,.16); color: var(--good); }
.live-st.is-sched { background: rgba(73,198,242,.16); color: #8fdcff; }
.live-meta { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; font-size: .88rem; color: var(--text-dim); }
.live-meta > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.live-meta .ico, .live-meta .live-cico { width: 16px; height: 16px; margin: 0; }
.live-n { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; font-weight: 800; white-space: nowrap; }
.live-n .ico { width: 16px; height: 16px; }
.live-n.is-full { color: #ffb3bb; }
.live-empty { display: flex; flex-direction: column; gap: 16px; }

/* plan: the day + time pickers look like the code field, smaller */
.live-input {
  font: inherit; font-size: 1.1rem; font-weight: 800; padding: 10px 14px; min-height: 48px; border-radius: 14px;
  border: 2px solid var(--glass-border); background: rgba(0,0,0,.3); color: var(--text); color-scheme: dark; max-width: 100%;
}
.live-input:focus { border-color: var(--primary); outline: none; }
.live-plan-when { font-weight: 800; color: var(--good); min-height: 1.2em; }
.live-plan-when:empty { display: none; }
.live-err:empty { min-height: 0; }

/* my scheduled races */
.live-mitem { padding: 14px 16px; border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 8px; }
.live-mhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.live-mtxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.live-mtitle { font-size: 1.15rem; font-weight: 900; }
.live-mwhen { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-weight: 700; }
.live-mwhen .ico { width: 16px; height: 16px; color: var(--primary); }
.live-mcode { font-size: 1.7rem; font-weight: 900; letter-spacing: .18em; color: var(--primary); line-height: 1; padding-top: 2px; }
.live-mmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.live-mmeta .live-n { font-weight: 700; font-size: .85rem; color: var(--text-dim); }
.live-hint.is-open { color: var(--good); font-weight: 800; }
.live-mqr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.live-mqr .live-qr svg { width: 180px; height: 180px; }
.live-mbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.live-mbtns .btn.is-on { background: rgba(255,181,71,.22); border-color: var(--primary); }
.live-cancel { color: #ffb3bb; }

/* waiting for a scheduled race to open */
.live-waitbox { padding: 16px; border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.live-waitleft { font-size: clamp(1.5rem, 6vw, 2.4rem); font-variant-numeric: tabular-nums; }

/* a scheduled room in the lobby: title, the server's gun */
.live-schedbox { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; border-radius: 14px; background: rgba(73,198,242,.12); border: 1px solid rgba(73,198,242,.35); }
.live-schedbox > .ico { color: #8fdcff; }
.live-schedin { margin-left: auto; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; }

@media (min-width: 760px) {
  .live-big-btns:has(> :nth-child(3)) { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 900px) { .live-list:not(.live-mine) { grid-template-columns: 1fr 1fr; } } /* one column below 900 px: no staggered rows in landscape */
@media (prefers-reduced-motion: reduce) {
  .live-item { transition: none; }
}
.live-mine { max-width: 760px; width: 100%; margin: 0 auto; }
/* the plan form on a phone: the label above its chips (five race names do not fit beside a label) */
@media (max-width: 559px) {
  .live-plan .live-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .live-plan .live-label { min-width: 0; }
}

/* review round 1: nothing in the room may push past a 320 px screen; the visibility chips share their row */
.live-room > *, .live-side, .live-codebox { min-width: 0; }
.live-link code { overflow-wrap: anywhere; }
.live-vis { flex-direction: column; align-items: stretch; gap: 6px; }
.live-vis .live-label { min-width: 0; }
.live-vis .live-chips { flex-wrap: nowrap; }
.live-vis .chip { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; white-space: normal; }
.live-codebtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
/* a sailor waiting in a scheduled room: the schedule on top, then the players, then a smaller code box */
.live-schedtop { padding: 12px 14px; border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 10px; }
.live-schedtop .live-schedbox { background: none; border: 0; padding: 0; }
.live-schedtop .live-schedin { font-size: 1.3rem; }
.live-schedtop > .btn { align-self: flex-start; }
.live-codebox.is-small .live-code { font-size: clamp(2rem, 8vw, 3rem); }
@media (min-width: 700px) { .live-room.is-waiting, .live-room.is-sailor { grid-template-columns: 1.2fr minmax(260px, 1fr); } }
/* the list: the refresh button sits beside the intro; on a narrow phone it is an icon-only 44 px button */
.live-listhead { flex-wrap: nowrap; }
.live-listhead .live-intro { flex: 1 1 auto; min-width: 0; }
.live-refresh { flex: none; }
@media (max-width: 419px) {
  .live-refresh { width: 44px; height: 44px; min-width: 44px; padding: 0; justify-content: center; }
  .live-refresh span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-height: 500px) { .live-listhead .live-intro { font-size: .9rem; } }
.live-list { align-items: start; }
/* my scheduled races: two buttons per row on a phone; "Aflys" alone below, quieter, still a 44 px target */
.live-mitem, .live-mine { min-width: 0; }
.live-mbtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.live-mbtns .btn { justify-content: center; min-height: 44px; min-width: 0; white-space: normal; padding-left: 8px; padding-right: 8px; }
.live-mbtns .live-mgo { grid-column: 1 / -1; }
.live-mcancel { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--glass-border); }
.live-mcancel .live-cancel { background: none; border: 0; box-shadow: none; min-height: 44px; padding: 0 8px; }
@media (min-width: 560px) { .live-mbtns { display: flex; flex-wrap: wrap; } }
/* the plan form: the summary and any error repeated right above the button */
.live-plan-foot { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }

/* review round 2: list cards share one layout (title / status + sailors / class, course, wind / host); the list head is the screen head */
.live-item-name { display: block; width: 100%; }
.live-item-top { flex-wrap: nowrap; justify-content: space-between; }
.live-item-top .live-st { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.live-item-top .live-n { flex: none; }
.live-item-by { margin-top: 0; }
.live-hn { font-weight: 700; letter-spacing: 0; }
.live-more { margin-top: 10px; justify-content: center; }
.live-listintro { margin: 0 0 12px; }
@media (max-height: 500px) { .live-listintro { display: none; } } /* landscape phone: the cards themselves say "tap to join" */
/* who can join: the hint for a listed race says plainly that strangers see the nickname */
.live-vishint.is-open { color: var(--text); font-weight: 700; padding: 6px 10px; border-left: 3px solid var(--primary, #ffb547); border-radius: 6px; background: rgba(255,181,71,.12); }
/* the schedule form: summary + button stick to the bottom of the screen; the summary in the normal text colour, 15 px+ */
.live-plan-bar {
  position: sticky; bottom: 0; z-index: 2; margin-top: 12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: rgba(8, 24, 44, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--glass-border);
}
.live-plan-bar .live-actions { margin: 0; }
.live-plan-when { color: var(--text); font-size: max(15px, .95rem); font-weight: 800; }
.live-pmore { align-self: flex-start; }

/* review round 3: a list card is never wider than the screen (the nowrap status pill used to set the grid column's minimum width:
   1fr = minmax(auto, 1fr)); the pill wraps, and the opening time moves under it when both do not fit */
.live-list { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .live-list:not(.live-mine) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.live-list > li { min-width: 0; }
.live-item-top { flex-wrap: wrap; }
.live-item-top .live-st { white-space: normal; max-width: 100%; overflow: visible; }
/* the plan bar is one row: the summary on the left, the button on the right (it used to take a third of a landscape phone);
   on a short screen it is not sticky at all, so the day and time pickers are never hidden behind it */
.live-plan-bar { flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); }
.live-plan-bar .live-plan-foot { flex: 1 1 auto; min-width: 0; align-items: flex-start; text-align: left; }
.live-plan-bar .live-actions { flex: none; flex-wrap: nowrap; }
.live-plan-bar .btn-big { min-height: 48px; padding: 10px 16px; font-size: 1.02rem; }
@media (max-height: 450px) { .live-plan-bar { position: static; } }
.live-plan-when2 { display: none; }
@media (max-width: 479px) { /* a narrow phone: the summary sits under the pickers, the bar is just the full-width button (about 64 px) */
  .live-plan .live-plan-when2:not(:empty) { display: block; }
  .live-plan-bar .live-plan-foot .live-plan-when { display: none; }
  .live-plan-bar { flex-direction: column; align-items: stretch; }
  .live-plan-bar .live-plan-foot:has(.live-err:empty) { display: none; }
  .live-plan-bar .live-actions .btn { width: 100%; justify-content: center; }
}
.live-plan-dt { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px 12px; max-width: 460px; }
.live-plan-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.live-plan-f .live-label { min-width: 0; }
.live-plan-f .live-input { width: 100%; min-width: 0; }
@media (max-width: 419px) { .live-plan-dt { grid-template-columns: minmax(0, 1fr); } .live-plan-f .live-input { max-width: 240px; } } /* a native date field needs ~200 px */
/* the wait card: smaller code and countdown on a short screen; on a landscape phone the trainer + buttons sit beside the code */
.live-waitwrap { display: flex; flex-direction: column; gap: 16px; }
@media (max-height: 600px) {
  .live-waitbox { padding: 12px; gap: 4px; }
  .live-waitbox .live-code { font-size: clamp(2rem, 9vw, 2.6rem); }
  .live-waitleft { font-size: clamp(1.2rem, 5vw, 1.6rem); }
}
@media (max-height: 450px) and (min-width: 600px) {
  .live-waitwrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; align-items: start; }
  .live-waitwrap > .live-trainer { grid-column: 1; grid-row: 1; padding: 10px; }
  .live-waitwrap .live-trainer-av { width: 48px; height: 48px; border-radius: 12px; }
  .live-waitwrap .live-trainer-text { font-size: 1rem; }
  .live-waitwrap > .live-waitbox { grid-column: 2; grid-row: 1 / span 2; }
  .live-waitwrap > .live-actions { grid-column: 1; grid-row: 2; justify-content: flex-start; }
}

/* review round 3: the host's Start sticks to the bottom of the screen (with the player count and why it cannot start yet), as the plan
   form's button does: below the QR code, the players and the visibility row it used to be off screen on a phone */
.live-startbar {
  position: sticky; bottom: 0; z-index: 2; margin-top: 12px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: row; align-items: center; gap: 10px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: rgba(8, 24, 44, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--glass-border);
}
.live-startinfo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--text); font-size: max(15px, .95rem); }
.live-startinfo .live-hint { margin: 0; font-size: max(13px, .85rem); }
.live-startbar .btn-big { flex: none; min-height: 48px; padding: 10px 16px; font-size: 1.02rem; }
@media (max-height: 450px) { .live-startbar { position: static; } }

/* the host and plan forms (round 4): each label above its control, segmented controls instead of wrapping chip clouds, the weather and
   the rules in cards that open on tap and show their choices as one line while closed */
.live-form .live-field { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; }
.live-field > .live-label { min-width: 0; }
.live-sublabel { font-size: .85rem; font-weight: 800; color: var(--text-dim); }
.live-seg { display: flex; gap: 0; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--glass-border); width: 100%; min-width: 0; }
.live-seg .chip { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; border: 0; background: none; padding: 8px 6px; white-space: normal; line-height: 1.15; }
.live-seg .chip.on { background: linear-gradient(180deg, var(--primary-hi), var(--primary-2)); }
.live-boats { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.live-boats .chip { padding: 8px 6px; justify-content: center; text-align: center; white-space: nowrap; }
.live-courses { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.live-courses .chip { display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 16px; padding: 10px 8px; min-height: 84px; }
.live-courses .live-cico { width: 40px; height: 40px; margin: 0; }
.live-laps { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.live-laps .live-seg { max-width: 220px; }
.live-presets { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--glass-border); }
.live-grp { border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); }
.live-grp-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px; background: none; border: 0; color: var(--text); text-align: left; font: inherit; cursor: pointer; border-radius: 16px; }
.live-grp-head > .ico { width: 24px; height: 24px; flex: none; color: var(--primary); }
.live-grp-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.live-grp-txt b { font-size: 1.02rem; }
.live-grp-txt small { color: var(--text-dim); font-size: .85rem; line-height: 1.3; }
.live-grp.is-open .live-grp-txt small { display: none; }
.live-grp-chev { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.live-grp-chev .ico { width: 18px; height: 18px; }
.live-grp-body { display: flex; flex-direction: column; gap: 14px; padding: 0 14px 14px; }
.live-wind { display: flex; align-items: center; gap: 14px; }
.live-windval { flex: none; min-width: 4.6em; font-size: 1.35rem; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; }
.live-range { flex: 1 1 auto; min-width: 0; height: 44px; accent-color: var(--primary); background: none; }
.live-compass { position: relative; width: 176px; height: 176px; margin: 0 auto; color: var(--text); }
.live-compass-rose { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); }
.live-compass .live-cdir {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; justify-content: center; font-size: .82rem;
  transform: rotate(var(--a)) translateY(-66px) rotate(calc(-1 * var(--a))); margin: -22px 0 0 -22px;
}
.live-compass .live-cdir.pressed { transform: rotate(var(--a)) translateY(-66px) rotate(calc(-1 * var(--a))) scale(.94); }
.live-switches { display: grid; grid-template-columns: 1fr; gap: 8px; }
.live-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 14px;
  background: rgba(0,0,0,.2); border: 1px solid var(--glass-border); color: var(--text); font: inherit; font-weight: 800; text-align: left; cursor: pointer;
}
.live-switch i { flex: none; position: relative; width: 46px; height: 28px; border-radius: 999px; background: rgba(255,255,255,.18); transition: background .15s; }
.live-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.live-switch.on i { background: var(--good); }
.live-switch.on i::after { transform: translateX(18px); }
.live-hostbar {
  position: sticky; bottom: 0; z-index: 2; display: flex; gap: 10px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: rgba(8, 24, 44, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--glass-border);
}
.live-hostbar .btn-big { min-height: 52px; padding: 10px 16px; font-size: 1.05rem; justify-content: center; }
.live-hostbar [data-act="create"] { flex: 1 1 auto; }
.live-hostbar [data-act="planview"] { flex: none; }
@media (max-height: 450px) { .live-hostbar { position: static; } }
@media (min-width: 560px) { .live-switches { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .live-form.live-host, .live-form.live-plan { max-width: 720px; width: 100%; margin: 0 auto; } .live-hostbar { max-width: 720px; width: 100%; margin: 0 auto; } }
@media (prefers-reduced-motion: reduce) { .live-switch i, .live-switch i::after { transition: none; } }
.live-boats .chip { padding: 8px 4px; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; }
/* "who can join" in the forms: the same segmented look as the other choices */
.live-host .live-vis .live-chips, .live-plan .live-vis .live-chips { gap: 0; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--glass-border); }
.live-host .live-vis .chip, .live-plan .live-vis .chip { border: 0; background: none; padding: 6px 8px; line-height: 1.15; }
.live-host .live-vis .chip.on, .live-plan .live-vis .chip.on { background: linear-gradient(180deg, var(--primary-hi), var(--primary-2)); }
.live-courses .live-cico { width: 48px; height: 48px; }
@media (max-width: 379px) {
  .live-seg .chip { font-size: .82rem; padding: 8px 2px; }
  .live-hostbar [data-act="planview"] { width: 52px; min-width: 52px; padding: 0; }
  .live-hostbar [data-act="planview"] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
