@import url('./features/games/strike/strike.css');
@import url('./features/aquarium/aquarium.css');
@import url('./features/games/football/football-ceremony.css');
@import url('./features/games/plinko/plinko.css');
@import url('./features/games/duel/duel.css');
@import url('./features/games/penalty/penalty.css');
@import url('./features/games/roach/roach.css');
@import url('./features/games/slot/slot.css');
@import url('./features/games/candy/candy.css');
@import url('./features/games/bass/bass.css');
@import url('./features/games/tombstone/tombstone.css');
@import url('./features/games/devil/devil.css');
@import url('./features/games/kingo/kingo.css');
@import url('./features/games/revolver/revolver.css');
@import url('./features/games/siper/siper.css');
@import url('./features/weekly/weekly.css');

/* Local Twemoji subset: country flags and England/Scotland/Wales flag sequences. */
@font-face {
  font-family: 'Country Flags';
  src: url('./assets/fonts/TwemojiCountryFlags.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
    U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
}

.footballCard { width: min(520px, 100%); box-sizing: border-box; margin: 8px 0; padding: 20px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--card-strong); color: var(--text); }
.footballCard [hidden] { display: none !important; }
.footballHeader { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footballHeader h2 { margin: 0; font-size: 20px; }
.footballMuted { color: var(--text-secondary); font-size: 12px; }
.footballState, .footballTime, .footballGoal { text-align: center; font-size: 13px; }
.footballState { margin-top: 22px; color: var(--text-secondary); }
.footballScoreboard { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; margin-top: 22px; }
.footballTeam { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.footballTeamName { font-weight: 600; overflow-wrap: anywhere; }
.footballTeamStars { margin-top: -6px; color: #e3b341; font-size: 11px; line-height: 1; letter-spacing: 1px; }
.footballTeamStars[hidden] { display: none; }
.footballTeamStrength { display: grid; gap: 4px; width: min(56px, 100%); margin-top: 2px; color: var(--text-secondary); font-size: 10px; font-weight: 400; }
.footballTeamStrength::after { content: ''; height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--text-secondary) var(--strength-fill), var(--border-hover) var(--strength-fill)); }
.footballTeamStrength[hidden] { display: none; }
.footballTeam[data-lineup="true"] { position: relative; cursor: help; border-radius: 6px; }
.footballTeam[data-lineup="true"]:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.footballLineup { display: none; position: absolute; top: calc(100% + 6px); left: 50%; z-index: 6; transform: translateX(-50%); width: max-content; min-width: 168px; max-width: min(240px, 70vw); margin: 0; padding: 8px 10px; list-style: none; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--card-strong); box-shadow: 0 8px 24px color-mix(in srgb, #000 28%, transparent); color: var(--text); font-size: 12px; font-weight: 400; text-align: left; }
.footballTeam:hover > .footballLineup:not([hidden]), .footballTeam:focus-within > .footballLineup:not([hidden]) { display: grid; gap: 3px; }
.footballScoreboard > .footballTeam:first-child .footballLineup { left: 0; transform: none; }
.footballScoreboard > .footballTeam:last-child .footballLineup { left: auto; right: 0; transform: none; }
.footballLineupRow { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 22px auto; align-items: center; gap: 6px; }
.footballLineupRating { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.footballLineupNumber { color: var(--text-secondary); font-variant-numeric: tabular-nums; text-align: right; }
.footballLineupName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footballLineupPosition { color: var(--text-secondary); font-size: 10.5px; }
.footballLineupNote { font-size: 11px; white-space: nowrap; }
.footballStatsToggle { display: block; margin: 2px auto 6px; padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.footballStatsToggle:hover { color: var(--text); border-color: var(--border-hover); }
.footballStatsToggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.footballStatsToggle[hidden] { display: none; }
.footballStats { display: grid; gap: 6px; margin: 4px 0 8px; font-size: 12px; }
.footballStats[hidden] { display: none; }
.footballStatsRow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; row-gap: 3px; }
.footballStatsLabel { margin: 0; color: var(--text-secondary); text-align: center; }
.footballStatsValue { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.footballStatsValue:last-of-type { text-align: right; }
.footballStatsBar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--home-color, var(--text-secondary)) var(--home-share, 50%), var(--away-color, var(--border-hover)) var(--home-share, 50%)); }
.footballSeasonLine { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; font-size: 12px; }
.footballSeasonLine[hidden] { display: none; }
.footballTableButton { font-size: 12px; padding: 5px 9px; }
.footballShorten { display: block; margin: 8px auto 0; font-size: 12px; padding: 5px 10px; }
.footballTableDialog { color: var(--text); background: var(--card-strong); border: 1px solid var(--border-strong); border-radius: 14px; padding: 22px; margin: auto; width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-sizing: border-box; }
.footballTableDialogWide { width: min(1120px, calc(100vw - 32px)); overflow: auto; }
.footballTableDialog::backdrop { background: rgb(0 0 0 / .65); }
.footballSharesConfirm { width: min(440px, calc(100vw - 32px)); }
.footballSharesConfirmSummary { line-height: 1.6; overflow-wrap: anywhere; }
.footballSharesConfirm .footballSharesActions { justify-content: flex-end; }
.footballTableDialog h2 { margin: 0 0 8px; font-size: 18px; }
.footballTableDialog .footballMuted { margin: 0 0 16px; }
.footballSquadHeading { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.footballSquadSummary { flex: 1 1 280px; min-width: 0; }
.footballTableDialog .footballSquadSummary .footballMuted { margin-bottom: 0; }
.footballFirstEleven { flex: 0 1 200px; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: 10px; font-variant-numeric: tabular-nums; }
.footballFirstEleven h3 { margin: 0 0 8px; font-size: 14px; }
.footballFirstEleven p { margin: 0 0 4px; font-size: 13px; }
.footballFirstEleven > span { font-size: 12px; }
.footballTableScroll { overflow: auto; max-height: 55vh; }
.footballStandingsTable { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.footballStandingsTable th, .footballStandingsTable td { padding: 9px 7px; border-bottom: 1px solid rgb(255 255 255 / .08); text-align: right; white-space: nowrap; }
.footballStandingsTable .footballStandingsTeam { text-align: left; font-weight: 500; }
.footballStandingsTable thead th { position: sticky; top: 0; z-index: 1; background: var(--card-strong); color: var(--text-secondary); font-weight: 500; }
/* Sortable headings: the whole label is the button; the active one shows its direction. */
.footballSortButton { display: inline-flex; align-items: center; gap: 3px; margin: -3px -5px; padding: 3px 5px; border: 0; border-radius: 5px; background: none; color: inherit; font: inherit; white-space: nowrap; cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out; }
.footballSortButton:hover { background: rgb(var(--surface-rgb) / 0.07); color: var(--text); }
.footballSortButton:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.footballStandingsTable th[aria-sort="ascending"] .footballSortButton, .footballStandingsTable th[aria-sort="descending"] .footballSortButton { color: var(--text); font-weight: 600; }
.footballSortIndicator { font-size: 8px; line-height: 1; }
.footballSortIndicator:empty { display: none; }
.footballAbbreviation { text-decoration: underline dotted rgb(var(--surface-rgb) / 0.4); text-underline-offset: 3px; }
.footballStandingsTable .footballStandingsWins { color: var(--success); }
.footballStandingsTable .footballStandingsLosses { color: var(--danger); }
.footballStandingsForm { display: inline-flex; align-items: center; gap: 5px; padding: 2px; vertical-align: middle; }
.footballStandingsFormResult { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%; background: #85858f; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.footballStandingsFormResult[data-result="W"] { background: #269f50; }
.footballStandingsFormResult[data-result="L"] { background: #e4443e; }
.footballStandingsFormResult[data-latest="true"] { outline: 1px solid currentColor; outline-offset: 2px; }
/* The two clubs of the current or next league match take the chosen accent. */
.footballStandingsTable .footballStandingsNext > * { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.footballStandingsTable .footballStandingsNext > :first-child { box-shadow: inset 3px 0 0 var(--accent); }
.footballTableTabs { display: flex; gap: 6px; margin: 0 0 14px; }
.footballTableTab { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.footballTableTab:hover, .footballTableTab:focus-visible { background: var(--surface-hover); color: var(--text); outline: none; }
.footballTableTab[aria-selected="true"] { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.footballFixtureNav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.footballFixtureRound { margin: 0; font-size: 14px; font-weight: 600; text-align: center; }
.footballFixtureList { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow: auto; font-size: 13px; font-variant-numeric: tabular-nums; }
.footballFixture { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 9px 10px; border-bottom: 1px solid rgb(255 255 255 / .08); }
.footballFixtureHome { text-align: right; overflow-wrap: anywhere; }
.footballFixtureAway { text-align: left; overflow-wrap: anywhere; }
.footballFixtureScore { min-width: 64px; text-align: center; font-weight: 600; color: var(--text-secondary); }
.footballFixture[data-status="PLAYED"] .footballFixtureScore { color: var(--text); }
.footballFixtureNext { border-radius: 8px; background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.footballFixtureNext .footballFixtureScore { color: var(--accent); }
.footballTableClose { margin-top: 18px; float: right; }
.footballStrengthBar { font-variant-numeric: tabular-nums; }
.footballTeamColors { display: block; width: 42px; height: 5px; border-radius: 3px; border: 1px solid rgb(255 255 255 / .3); background: linear-gradient(to right, var(--club-first) 0 50%, var(--club-second) 50% 100%); }
.footballTransferClub { display: inline-block; font-weight: 700; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .footballTransferClub { background: linear-gradient(to right, var(--club-first) 0 50%, var(--club-second) 50% 100%); background-clip: text; -webkit-background-clip: text; color: transparent; -webkit-text-stroke: .25px rgb(255 255 255 / .35); }
}
@media (forced-colors: active) {
  .footballTransferClub { background: none; color: CanvasText; -webkit-text-stroke: 0; }
}
.footballTeamColors[hidden] { display: none; }
.footballTeamFlag { display: block; font-size: 20px; line-height: 1; font-family: 'Country Flags', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; }
.footballTeamFlag[hidden], .footballCupBadge[hidden] { display: none; }
.footballCupBadge { width: fit-content; margin: 16px auto 0; padding: 6px 12px; border: 1px solid var(--accent); border-radius: 20px; color: var(--accent-text); background: var(--accent-soft); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.footballCard[data-match-type="WORLD_CUP"] { border-color: var(--accent); }
.footballScore { font-size: 32px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.footballTime { font-variant-numeric: tabular-nums; color: var(--text-secondary); margin: 10px 0; }
.footballStoppage { text-align: center; color: var(--text-secondary); font-size: 12px; margin: 6px 0; }
.footballGoal { min-height: 16px; color: var(--text); margin: 6px 0; white-space: pre-line; }
/* Moskova 2008 · CR7 set: the wearer's winning bet drops a heavy red SIUUU down the card, then it fades. */
.footballCard { position: relative; }
.footballSiuu { position: absolute; inset: 0; z-index: 2; display: grid; justify-items: center; overflow: hidden; border-radius: inherit; pointer-events: none; }
.footballSiuu > span { margin-top: 18%; font-size: clamp(44px, 14vw, 76px); font-weight: 900; font-style: italic; letter-spacing: .04em; color: #d4142c; -webkit-text-stroke: 2px #5a0410; text-shadow: 0 4px 0 #5a0410, 0 10px 24px rgb(0 0 0 / .45); animation: footballSiuuDrop 1.05s cubic-bezier(.2, .7, .35, 1) both; }
@keyframes footballSiuuDrop { 0% { opacity: 0; transform: translateY(-35%) scale(1.25); } 12% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(145%) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .footballSiuu > span { animation: footballSiuuFade .8s ease both; } }
@keyframes footballSiuuFade { 0% { opacity: 0; } 15%, 60% { opacity: 1; } 100% { opacity: 0; } }
.footballGoalsList { list-style: none; padding: 0; margin: 8px 0; font-size: 12px; }
.footballGoalRow { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.footballGoalRow[data-var="DISALLOWED"] > span:first-child { text-decoration: line-through; color: var(--text-secondary); }
.footballGoalRow[data-var="PENDING"] > span:first-child, .footballCard[data-var="pending"] .footballScore { color: var(--accent-text); }
.footballSoundToggle { flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text); font-size: 15px; line-height: 1; cursor: pointer; }
.footballSoundToggle:hover, .footballSoundToggle:focus-visible { background: var(--surface-hover); outline: none; border-color: var(--border-strong); }
.footballSoundToggle[aria-pressed="false"] { opacity: 0.7; }
.footballPitch { --pitch-line: color-mix(in srgb, var(--text) 28%, transparent); position: relative; height: 128px; margin: 12px 0 6px; border: 2px solid var(--pitch-line); border-radius: 8px; overflow: hidden; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--success) 30%, var(--card-strong)) 0 10%, color-mix(in srgb, var(--success) 22%, var(--card-strong)) 10% 20%); }
.footballPitch > span { position: absolute; pointer-events: none; }
/* Goal lines sit 4% in from each end (FOOTBALL_PITCH.goalLine) so the nets fit behind them. */
.footballPitchField { top: 0; bottom: 0; left: 4%; right: 4%; border-inline: 2px solid var(--pitch-line); }
.footballPitchHalfway { left: 50%; top: 0; bottom: 0; border-left: 2px solid var(--pitch-line); }
.footballPitchCircle { left: 50%; top: 50%; width: 28px; height: 28px; transform: translate(-50%, -50%); border: 2px solid var(--pitch-line); border-radius: 50%; }
.footballPitchBox { top: 26%; bottom: 26%; width: 10%; border: 2px solid var(--pitch-line); }
.footballPitchBoxHome { left: 4%; border-left: 0; }
.footballPitchBoxAway { right: 4%; border-right: 0; }
/* The goal mouth spans 38–62% (FOOTBALL_PITCH.mouthTop/mouthBottom). */
.footballPitchGoal { top: 38%; bottom: 38%; width: 4%; border: 2px solid color-mix(in srgb, var(--text) 60%, transparent); background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--text) 30%, transparent) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, color-mix(in srgb, var(--text) 30%, transparent) 0 1px, transparent 1px 3px), color-mix(in srgb, var(--card-strong) 35%, transparent); }
.footballPitchGoalHome { left: 0; border-left-width: 1px; border-right: 0; transform-origin: left center; }
.footballPitchGoalAway { right: 0; border-right-width: 1px; border-left: 0; transform-origin: right center; }
.footballPitchPressure { inset: 0; opacity: 0; --press-color: var(--accent); transition: opacity 0.5s ease; }
.footballPitch[data-side="HOME"] .footballPitchPressure { background: linear-gradient(90deg, transparent 40%, color-mix(in srgb, var(--press-color) 55%, transparent)); }
.footballPitch[data-side="AWAY"] .footballPitchPressure { background: linear-gradient(270deg, transparent 40%, color-mix(in srgb, var(--press-color) 55%, transparent)); }
.footballPitch[data-level="low"] .footballPitchPressure { opacity: 0.25; }
.footballPitch[data-level="mid"] .footballPitchPressure { opacity: 0.55; }
.footballPitch[data-level="high"] .footballPitchPressure { opacity: 0.85; }
.footballPitch[data-level="goal"] .footballPitchPressure { opacity: 1; animation: footballGoalFlash 0.45s ease-in-out 4 alternate; }
.footballPitch[data-level="goal"][data-side="HOME"] .footballPitchGoalAway, .footballPitch[data-level="goal"][data-side="AWAY"] .footballPitchGoalHome { animation: footballNetBulge 0.5s ease-out 0.2s 2; }
.footballBall { left: var(--ball-x, 50%); top: var(--ball-y, 50%); height: min(9px, 26%); aspect-ratio: 1; border-radius: 50%; background: url('assets/football-ball.svg') center / contain no-repeat; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(var(--shadow-rgb), 0.6); transform: translate(-50%, -50%); transition: left 0.7s cubic-bezier(0.45, 0.05, 0.55, 0.95), top 0.7s cubic-bezier(0.45, 0.05, 0.55, 0.95); }
.footballBall[data-motion="pass"] { transition-duration: 0.45s; transition-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); }
.footballBall[data-motion="shot"] { transition-duration: 0.3s; transition-timing-function: cubic-bezier(0.1, 0.75, 0.25, 1); }
.footballBall[data-motion="reset"] { transition: none; }
/* The 22 players: kit colours come from the clubs (--home-kit/--away-kit fill, --home-trim/--away-trim ring), shirt numbers sit on the dots. */
.footballPitchPlayer { left: var(--player-x, 50%); top: var(--player-y, 50%); width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; box-sizing: border-box; font: 800 8px/1 system-ui, sans-serif; letter-spacing: -0.3px; color: white; text-shadow: 0 0 1px black; background: var(--home-kit, var(--accent)); border: 1.5px solid var(--home-trim, var(--home-kit, var(--accent))); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bg-deep) 70%, transparent); transform: translate(-50%, -50%); transition: left 0.9s ease-in-out, top 0.9s ease-in-out, transform 0.3s ease; }
.footballPitchPlayer[data-side="AWAY"] { background: var(--away-kit, var(--text-secondary)); border-color: var(--away-trim, var(--away-kit, var(--text-secondary))); }
/* Light kits (white, yellow) carry black numbers with a light halo; footballKitInk decides per side. */
.footballPitch[data-home-ink="dark"] .footballPitchPlayer[data-side="HOME"], .footballPitch[data-away-ink="dark"] .footballPitchPlayer[data-side="AWAY"] { color: black; text-shadow: none; }
.footballPitchPlayer[data-position="GK"] { box-shadow: 0 0 0 1.5px var(--text); }
.footballPitchPlayer[data-carrier="true"] { z-index: 1; transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 0 1.5px white, 0 0 6px color-mix(in srgb, var(--text) 50%, transparent); }
/* Penalty: the taker strikes and the keeper dives quicker than open play; the dive stretches him toward the ball. */
.footballPitchPlayer[data-action="kick"], .footballPitchPlayer[data-action="dive"] { transition-duration: 0.3s, 0.3s, 0.3s; }
.footballPitchPlayer[data-action="dive"] { transform: translate(-50%, -50%) scale(0.85, 1.25); }
/* A brief card dispute: the existing pitch coordinates gather and release the five dots. */
.footballPitchPlayer[data-dispute-role]:not([data-dispute-role=""]) { z-index: 1; transition-duration: 0.4s, 0.4s, 0.3s; }
@media (prefers-reduced-motion: no-preference) {
  .footballPitchPlayer[data-dispute-role="booked"][data-dispute-phase="shove"],
  .footballPitchPlayer[data-dispute-role="opponent"][data-dispute-phase="shove"] { animation: footballDisputeShove 0.28s ease-in-out 2; }
  .footballPitchPlayer[data-dispute-role="booked"] { --dispute-nudge: 2px; }
  .footballPitchPlayer[data-dispute-role="opponent"] { --dispute-nudge: -2px; }
}
@keyframes footballDisputeShove {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(calc(-50% + var(--dispute-nudge)), -50%); }
}
.footballBall { z-index: 2; }
.footballMotm { margin: 6px 0 4px; font-weight: 600; color: var(--accent-text); overflow-wrap: anywhere; }
.footballGoalAssist { margin-left: auto; font-size: 12px; }
.footballNewsList { list-style: none; margin: 0; padding: 0 2px 0 0; max-height: 58vh; overflow: auto; display: grid; gap: 10px; }
.footballNewsItem { padding: 12px 14px; border: 1px solid var(--border); border-left: 4px solid var(--club-first, var(--accent)); border-radius: 12px; background: color-mix(in srgb, var(--card-strong) 92%, var(--text) 8%); }
.footballNewsMeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 11.5px; }
.footballNewsMeta .footballMuted { margin: 0; }
.footballNewsTime { margin-left: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.footballNewsLabel { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); font-weight: 700; }
/* Stories that concern the reader: their club (shares), their bet's match, or themselves. */
.footballNewsItem[data-personal="true"] { border-color: rgb(var(--warn-rgb) / 0.55); box-shadow: inset 0 0 0 1px rgb(var(--warn-rgb) / 0.18); }
.footballNewsPersonal { padding: 2px 8px; border-radius: 999px; background: rgb(var(--warn-rgb) / 0.16); color: var(--warn-text); font-weight: 700; }
/* The "+N" on Haberler entries: unread stories that concern the reader. */
.footballNewsBadge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: var(--on-danger); font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; animation: footballNewsBadgePop 260ms cubic-bezier(0.2, 0, 0, 1.4); }
.footballNewsBadge[hidden] { display: none; }
@keyframes footballNewsBadgePop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .footballNewsBadge { animation: none; } }
.footballNewsHeadline { margin: 0 0 4px; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.footballNewsBody { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
@keyframes footballGoalFlash { from { opacity: 0.45; } to { opacity: 1; } }
@keyframes footballNetBulge { 50% { transform: scaleX(1.35); } }
.footballCommentary { list-style: none; padding: 0; margin: 6px 0 8px; font-size: 12.5px; }
.footballCommentaryLine { display: flex; gap: 8px; padding: 3px 0; color: var(--text-secondary); overflow-wrap: anywhere; }
.footballCommentaryLine:first-child { color: var(--text); font-weight: 600; }
.footballCommentaryMinute { flex: none; min-width: 36px; font-variant-numeric: tabular-nums; color: var(--text-secondary); font-weight: 400; }
.footballCommentaryLine[data-kind="GOAL"] .footballCommentaryText { color: var(--accent-text); font-weight: 700; }
.footballCommentaryLine[data-kind="PENALTY"] .footballCommentaryText { color: var(--warn-text); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .footballBall, .footballPitchPressure, .footballPitchPlayer { transition: none; } .footballPitch[data-level="goal"] .footballPitchPressure, .footballPitch[data-level="goal"] .footballPitchGoal { animation: none; } }
.footballHistoryList { list-style: none; padding: 0; margin: 6px 0 0; }
.footballHistoryRow { padding: 3px 0; color: var(--text-secondary); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.footballPlayerHistory { margin: 14px 0 0; font-size: 12px; }
.footballTeamPicker { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.footballTeamChip { padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.footballTeamChip:hover, .footballTeamChip:focus-visible { background: var(--surface-hover); color: var(--text); outline: none; }
.footballTeamChip[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 18%, transparent); }
/* Kulüp hisseleri. Surfaces take depth from a 1px shadow ring; radii are concentric (20px card,
   12px inset, 8px tiles); numbers are tabular. Charts are plain boxes sized by --size / --at. */
.footballShares { display: grid; gap: 12px; margin: 0 0 14px; }
/* Share dialog type follows the macOS scale: 22 title, 17 club, 15 values, 13 body, 11-10 labels. */
.footballTableDialog:has(.footballShares) h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.footballTableDialog:has(.footballShares) > .footballMuted { font-size: 12px; }
.footballShares .btn, .footballSharesDetail .btn { transition-property: background-color, border-color, color, box-shadow, scale; transition-duration: 150ms; transition-timing-function: ease-out; }
.footballShares .btn:active:not(:disabled), .footballSharesDetail .btn:active:not(:disabled) { transform: none; scale: 0.96; }
.footballSharesBanner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 14px; background: rgb(var(--warn-rgb) / 0.1); box-shadow: 0 0 0 1px rgb(var(--warn-rgb) / 0.35); }
.footballSharesBanner p { margin: 0; font-size: 13px; }
.footballSharesActions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.footballSharesHero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 20px; background: linear-gradient(135deg, var(--accent-soft), transparent 65%), rgb(var(--surface-rgb) / 0.03); box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.08); }
.footballSharesHeroMain { display: grid; gap: 10px; min-width: 0; }
.footballSharesHeroSide { display: grid; justify-items: end; gap: 8px; }
/* The claim button doubles as a slider: the fill shows how much of the pending dividend a click takes. */
.footballSharesClaim:not(:disabled) { position: relative; isolation: isolate; overflow: hidden; min-width: 132px; touch-action: pan-y; font-variant-numeric: tabular-nums; }
.footballSharesClaim:not(:disabled)::before { content: ''; position: absolute; inset: 0 auto 0 0; z-index: -1; width: var(--claim, 0%); background: rgb(var(--success-rgb) / 0.38); pointer-events: none; }
.footballSharesEmptyTitle { font-size: 15px; }
/* Hisselerim: a small table; fixed numeric columns keep values aligned from row to row. */
.footballSharesHoldings { --holding-columns: minmax(0, 1fr) 64px 132px 104px 96px; grid-column: 1 / -1; display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid rgb(var(--surface-rgb) / 0.08); }
.footballSharesHoldings h4 { margin: 0 0 2px; }
.footballSharesHoldingsHead { display: grid; grid-template-columns: var(--holding-columns); gap: 12px; padding: 0 10px; color: var(--muted); font-size: 10px; font-weight: 500; }
.footballSharesHoldingsHead span:nth-child(n + 2) { text-align: right; }
.footballSharesHoldings ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.footballSharesHoldings li:nth-child(odd) .footballSharesHolding:not([aria-pressed="true"]) { background: rgb(var(--surface-rgb) / 0.035); }
.footballSharesHolding { display: grid; grid-template-columns: var(--holding-columns); align-items: center; gap: 12px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; text-align: left; cursor: pointer; transition-property: background-color, box-shadow; transition-duration: 150ms; transition-timing-function: ease-out; }
.footballSharesHolding:hover { background: rgb(var(--surface-rgb) / 0.07); }
.footballSharesHolding[aria-pressed="true"] { background: var(--accent-soft); }
.footballSharesHolding:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.footballSharesHolding .footballSharesClubName { grid-area: auto; }
.footballSharesHoldingNote { color: var(--muted); font-size: 11px; white-space: nowrap; }
.footballSharesHoldingCount { color: var(--text-secondary); text-align: right; white-space: nowrap; }
.footballSharesHoldingShare { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 11px; text-align: right; }
.footballSharesHoldingBar { position: relative; height: 4px; overflow: hidden; border-radius: 999px; background: rgb(var(--surface-rgb) / 0.08); }
.footballSharesHoldingValue { font-weight: 600; text-align: right; }
.footballSharesHoldingResult { color: var(--text-secondary); text-align: right; }
.footballSharesHoldingResult[data-tone="up"] { color: var(--success); }
.footballSharesHoldingResult[data-tone="down"] { color: var(--danger); }
.footballSharesStat { display: grid; gap: 2px; min-width: 0; }
.footballSharesStatLabel { color: var(--muted); font-size: 11px; font-weight: 500; }
.footballSharesStatValue { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.footballSharesStatSub { color: var(--text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }
.footballSharesStatMain .footballSharesStatValue { font-size: 26px; letter-spacing: -0.01em; }
.footballSharesStat[data-tone="up"] .footballSharesStatValue, .footballSharesStatSub[data-tone="up"] { color: var(--success); }
.footballSharesStat[data-tone="down"] .footballSharesStatValue, .footballSharesStatSub[data-tone="down"] { color: var(--danger); }
.footballSharesValueBar { position: relative; display: flex; height: 10px; border-radius: 999px; background: rgb(var(--surface-rgb) / 0.07); }
.footballSharesValueFill { width: var(--size); border-radius: 999px 0 0 999px; background: var(--accent); }
.footballSharesDividendFill { width: var(--size); background: var(--success); }
.footballSharesCostMark { position: absolute; top: -3px; bottom: -3px; left: var(--at); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); }
.footballSharesLegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; color: var(--text-secondary); font-size: 11px; }
.footballSharesLegend li { display: inline-flex; align-items: center; gap: 6px; }
.footballSharesLegend li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--seg); }
.footballSharesLegend strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.footballSharesLegend [data-series="value"] { --seg: var(--accent); }
.footballSharesLegend [data-series="dividend"] { --seg: var(--success); }
.footballSharesLegend [data-series="cost"]::before { width: 2px; height: 10px; border-radius: 1px; background: var(--text); }
.footballSharesRules { color: var(--text-secondary); font-size: 12px; }
.footballSharesRules summary { width: fit-content; cursor: pointer; }
.footballSharesRules ul { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 18px; }
.footballSharesBody { display: grid; gap: 14px; }
.footballSharesSide { display: grid; align-content: start; gap: 12px; min-width: 0; }
.footballSharesActivity { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgb(var(--surface-rgb) / 0.03); box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.08); }
.footballSharesActivity h4 { margin: 0; }
.footballSharesActivity ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.footballSharesActivity li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.footballSharesActivity li .footballMuted { margin: 0; font-size: 11px; }
.footballSharesActivity strong { font-variant-numeric: tabular-nums; }
.footballSharesActivity [data-kind="BUY"] strong { color: var(--success); }
.footballSharesActivity [data-kind="SELL"] strong { color: var(--danger); }
.footballSharesActivityName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footballSharesHolders { color: var(--text-secondary); font-size: 12px; }
.footballSharesHolders summary { width: fit-content; cursor: pointer; }
.footballSharesHolders ol { display: grid; gap: 4px; max-height: 220px; margin: 8px 0 0; padding: 0 4px 0 0; overflow: auto; list-style: none; }
.footballSharesHolders li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 72px auto; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; }
.footballSharesHolders li[data-me="true"] { background: var(--accent-soft); color: var(--text); }
.footballSharesHolders strong { color: var(--text); font-variant-numeric: tabular-nums; }
.footballSharesHolderRank { color: var(--muted); font-variant-numeric: tabular-nums; }
.footballSharesHolderName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footballSharesHolderBar { height: 4px; border-radius: 999px; background: var(--accent); width: var(--size); }
/* The club list reads as a sidebar: plain rows, one filled selection, no per-row frames. */
.footballSharesSide > .footballSharesChartTitle { margin: 0; padding: 0 10px; }
.footballSharesClubs { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.footballSharesClub { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name price" "bar bar" "meta meta"; gap: 4px 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; transition-property: background-color, box-shadow; transition-duration: 150ms; transition-timing-function: ease-out; }
.footballSharesClub:hover { background: rgb(var(--surface-rgb) / 0.06); }
.footballSharesClub[aria-pressed="true"] { background: var(--accent-soft); }
.footballSharesClub:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.footballSharesClubPrice strong { font-weight: 600; }
.footballSharesClubName { grid-area: name; display: flex; align-items: center; gap: 8px; min-width: 0; }
.footballSharesClubName .footballTeamColors, .footballSharesDetailTitle .footballTeamColors { flex: none; width: 18px; height: 6px; }
.footballSharesClubTitle { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.footballSharesClubPrice { grid-area: price; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.footballSharesOwnershipBar { grid-area: bar; position: relative; height: 4px; overflow: hidden; border-radius: 999px; background: rgb(var(--surface-rgb) / 0.07); }
.footballSharesSoldFill, .footballSharesMineFill { position: absolute; top: 0; bottom: 0; left: 0; width: var(--size); border-radius: inherit; }
.footballSharesSoldFill { background: rgb(var(--surface-rgb) / 0.26); }
.footballSharesMineFill { background: var(--accent); }
.footballSharesClubMeta { grid-area: meta; color: var(--muted); font-size: 11px; }
.footballSharesChip { display: inline-flex; align-items: center; color: var(--text-secondary); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.footballSharesChip[data-tone="up"] { color: var(--success); }
.footballSharesChip[data-tone="down"] { color: var(--danger); }
.footballSharesChips > :is(.footballSharesChip, .footballEconomyBadge) + .footballSharesChip::before { content: "·"; margin-inline-end: 6px; color: var(--muted); }
.footballSharesDetail { display: grid; align-content: start; gap: 12px; padding: 12px; border-radius: 20px; background: rgb(var(--surface-rgb) / 0.025); box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.08); }
.footballSharesDetailHead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; padding: 4px 4px 0; }
.footballSharesDetailTitle { display: flex; align-items: center; gap: 8px; min-width: 0; }
.footballSharesDetailTitle h3 { margin: 0; font-size: 17px; font-weight: 650; }
.footballSharesQuote { display: flex; align-items: center; gap: 8px; }
.footballSharesPrice { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.footballSharesChips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.footballSharesCharts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: start; gap: 8px; }
.footballSharesChart { display: grid; align-content: start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 8px; background: rgb(var(--surface-rgb) / 0.03); }
.footballSharesChartTitle { color: var(--muted); font-size: 11px; font-weight: 500; }
.footballSharesChartPlot { position: relative; display: flex; align-items: flex-end; gap: 8px; height: 104px; }
.footballSharesChartEmpty { margin: auto; color: var(--muted); font-size: 12px; }
.footballSharesChartPlot:has(.footballSharesChartEmpty) { height: auto; min-height: 36px; }
.footballSharesColumn { display: grid; grid-template-rows: auto 64px 14px; flex: 1; justify-items: center; gap: 4px; min-width: 0; }
.footballSharesBarTrack { display: flex; align-items: flex-end; width: 100%; max-width: 36px; height: 64px; }
.footballSharesBar { width: 100%; height: var(--size); min-height: 2px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--accent) 50%, transparent); }
.footballSharesColumn[data-current="true"] .footballSharesBar { background: var(--accent); }
.footballSharesColumn[data-muted="true"] .footballSharesBar { background: repeating-linear-gradient(135deg, rgb(var(--surface-rgb) / 0.24) 0 3px, rgb(var(--surface-rgb) / 0.08) 3px 6px); }
.footballSharesBarValue { color: var(--text-secondary); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.footballSharesBarLabel { color: var(--muted); font-size: 10px; line-height: 14px; font-variant-numeric: tabular-nums; }
.footballSharesReference { position: absolute; right: 0; bottom: calc(18px + var(--at) * 64px); left: 0; border-top: 1px dashed rgb(var(--border-rgb) / 0.35); pointer-events: none; }
.footballSharesOwnership { grid-column: 1 / -1; }
.footballSharesStack { display: flex; gap: 2px; height: 12px; overflow: hidden; border-radius: 999px; background: rgb(var(--surface-rgb) / 0.07); }
.footballSharesSegment { flex: none; width: var(--size); background: var(--seg); }
.footballSharesOwnership [data-rank="0"] { --seg: var(--accent); }
.footballSharesOwnership [data-rank="1"] { --seg: color-mix(in srgb, var(--accent) 72%, transparent); }
.footballSharesOwnership [data-rank="2"] { --seg: color-mix(in srgb, var(--accent) 52%, transparent); }
.footballSharesOwnership [data-rank="3"] { --seg: color-mix(in srgb, var(--accent) 38%, transparent); }
.footballSharesOwnership [data-rank="4"] { --seg: color-mix(in srgb, var(--accent) 28%, transparent); }
.footballSharesOwnership [data-rank="other"] { --seg: rgb(var(--surface-rgb) / 0.3); }
.footballSharesOwnership [data-rank="treasury"] { --seg: rgb(var(--surface-rgb) / 0.1); }
.footballSharesPosition { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.footballSharesPosition .footballSharesStat { padding: 10px 12px; border-radius: 8px; background: rgb(var(--surface-rgb) / 0.03); }
.footballSharesLots { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.footballSharesBoard { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid rgb(var(--surface-rgb) / 0.08); }
.footballSharesBoardHead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.footballSharesBoardHead h4 { margin: 0; font-size: 14px; }
.footballSharesCandidates { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.footballSharesCandidate { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 8px 12px; border-radius: 8px; background: rgb(var(--surface-rgb) / 0.03); font-size: 12px; font-variant-numeric: tabular-nums; }
.footballSharesCandidate[data-mine="true"] { box-shadow: inset 0 0 0 1px var(--accent); }
.footballSharesCandidateInfo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.footballSharesCandidateBar { grid-column: 1; height: 4px; border-radius: 999px; background: rgb(var(--surface-rgb) / 0.08); overflow: hidden; }
.footballSharesCandidateFill { display: block; height: 100%; width: var(--size); background: var(--accent); }
.footballSharesCandidateWeight { color: var(--text-secondary); }
.footballSharesCandidate .footballSharesVote { grid-column: 2; grid-row: 1; }
.footballTableDialog .footballSharesBoard > p { margin: 0; font-size: 12px; }
.footballSharesBoardLast { color: var(--text-secondary); }
.footballSharesLots li { display: grid; grid-template-columns: auto 72px auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: rgb(var(--surface-rgb) / 0.03); font-size: 12px; font-variant-numeric: tabular-nums; }
.footballSharesLots .footballMuted { margin: 0; justify-self: end; font-size: 11px; }
/* Teknik direktör tab: the coach card, the sacking options and the change history. */
.footballSharesCoachCard { display: grid; gap: 6px; padding: 10px 12px; border-radius: 8px; background: rgb(var(--surface-rgb) / 0.03); font-size: 12px; }
.footballSharesCoachCard .footballSharesChip { justify-self: start; }
.footballSharesCoachCard .footballSharesCandidateInfo { align-items: baseline; }
.footballSharesCoachCard .footballSharesCandidateInfo strong { font-size: 13px; }
.footballSharesCandidate[data-sack="true"] .footballSharesCandidateFill { background: var(--danger); }
.footballSharesCoachHistory { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 11.5px; }
.footballCoaches { margin: 4px 0 0; font-size: 12px; }
/* Portföyüm: income by season (stacked by source), the price line and the lot table. */
.footballSharesIncomeRows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.footballSharesIncomeRows li { display: grid; grid-template-columns: 40px minmax(0, 1fr) 64px; align-items: center; gap: 8px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.footballSharesIncomeRows strong { text-align: right; }
.footballSharesIncomeStack { display: flex; height: 8px; border-radius: 999px; background: rgb(var(--surface-rgb) / 0.08); overflow: hidden; }
.footballSharesIncomePart { width: var(--size); background: var(--seg); }
.footballSharesIncome [data-series="dividend"] { --seg: var(--accent); }
.footballSharesIncome [data-series="match"] { --seg: var(--success); }
.footballSharesIncome [data-series="season"] { --seg: color-mix(in srgb, var(--success) 50%, var(--accent)); }
.footballSharesIncome [data-series="award"] { --seg: color-mix(in srgb, var(--danger) 55%, var(--accent)); }
.footballSharesLinePlot { display: block; width: 100%; height: auto; overflow: visible; }
.footballSharesLinePath { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.footballSharesLineDot { fill: var(--accent); }
.footballSharesLineBuy { fill: var(--success); stroke: var(--card-strong); stroke-width: 1.5; }
.footballSharesLineAxis { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.footballSharesLine > .footballMuted { font-size: 11px; }
.footballSharesLotTable { display: grid; gap: 4px; }
.footballSharesLotTable h4 { margin: 0 0 2px; }
.footballSharesLotTable ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.footballSharesLotRow { display: grid; grid-template-columns: minmax(0, 1fr) 52px 46px 46px 50px; align-items: center; gap: 6px; padding: 6px 8px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.footballSharesLotRow .footballSharesClubName { grid-area: auto; gap: 6px; }
.footballSharesLotRow .footballSharesClubTitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footballSharesLotRow > span:nth-child(n + 2), .footballSharesLotRow > strong { text-align: right; }
.footballSharesLotTable li:nth-child(odd) { border-radius: 6px; background: rgb(var(--surface-rgb) / 0.035); }
.footballSharesLotHead { padding-block: 0; color: var(--muted); font-size: 10px; font-weight: 500; }
.footballSharesLotTable > .footballMuted { margin: 2px 0 0; font-size: 11px; }
.footballSharesMeter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.footballSharesMeterStep { height: 6px; border-radius: 999px; background: rgb(var(--surface-rgb) / 0.1); }
.footballSharesMeterStep[data-on="true"] { background: var(--accent); }
.footballSharesLotRate { font-weight: 600; }
.footballSharesTrade { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgb(var(--surface-rgb) / 0.03); }
.footballSharesStepper { display: inline-flex; align-items: center; border-radius: 10px; background: var(--input-bg); box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.1); }
.footballSharesDetail .footballSharesStep { min-width: 32px; padding: 6px 10px; border: 0; background: transparent; font-size: 16px; }
.footballSharesAmountInput { width: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--text); font: inherit; font-variant-numeric: tabular-nums; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.footballSharesAmountInput::-webkit-inner-spin-button, .footballSharesAmountInput::-webkit-outer-spin-button { margin: 0; appearance: none; }
.footballSharesDetail .footballSharesBuy { border-color: transparent; background: var(--accent); color: var(--accent-text); }
.footballSharesDetail .footballSharesBuy:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, var(--text)); }
.footballSharesHint { flex-basis: 100%; margin: 0; color: var(--warn); font-size: 12px; }
.footballSharesHint:empty { display: none; }
.footballSharesPremium { flex-basis: 100%; margin: 0; color: var(--text-secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.footballSharesPremium[hidden] { display: none; }
/* Club list extras: a held-shares badge, a price sparkline and the "Tümü / Hisselerim" filter. */
.footballSharesOwned { flex: none; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 10px; font-weight: 650; line-height: 16px; font-variant-numeric: tabular-nums; }
.footballSharesSpark { grid-area: spark; display: inline-flex; align-items: flex-end; justify-self: end; gap: 2px; height: 12px; }
.footballSharesSpark span { width: 3px; height: var(--size); border-radius: 1px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.footballSharesSpark span:last-child { background: var(--accent); }
.footballSharesFilter, .footballSharesTabs { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: rgb(var(--surface-rgb) / 0.06); }
.footballSharesFilterOption, .footballSharesTab { position: relative; flex: 1; min-height: 28px; padding: 4px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12px; font-weight: 550; white-space: nowrap; cursor: pointer; transition-property: background-color, color, box-shadow, scale; transition-duration: 150ms; transition-timing-function: ease-out; }
.footballSharesFilterOption:hover, .footballSharesTab:hover { color: var(--text); }
.footballSharesFilterOption[aria-pressed="true"], .footballSharesTab[aria-selected="true"] { background: var(--card-strong); color: var(--text); box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / 0.25), 0 0 0 1px rgb(var(--border-rgb) / 0.08); }
.footballSharesFilterOption:active, .footballSharesTab:active { scale: 0.96; }
.footballSharesTab[data-alert="true"]::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
/* A visible track makes additional club tabs discoverable. */
.footballSharesTabs { position: relative; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--text-secondary) var(--surface-muted); padding-bottom: 6px; }
.footballSharesTabs::-webkit-scrollbar { height: 6px; }
.footballSharesTabs::-webkit-scrollbar-track { background: var(--surface-muted); border-radius: 999px; }
.footballSharesTabs::-webkit-scrollbar-thumb { background: var(--text-secondary); border-radius: 999px; }
.footballSharesTabs::-webkit-scrollbar-thumb:hover { background: var(--text); }
.footballSharesTab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.footballSharesTab { flex: 1 0 auto; padding: 4px 8px; }
.footballSharesDialog .footballSharesClub { grid-template-areas: "name price" "bar spark" "meta meta"; }
.footballSharesTabPanel .footballSharesOwners + .footballSharesActivity { margin-top: 14px; }
/* Outlook: the next price move and the club's form, one quiet line each. */
.footballSharesOutlook { display: grid; gap: 6px; padding: 10px 12px; border-radius: 8px; background: rgb(var(--surface-rgb) / 0.03); }
.footballSharesOutlookRow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.footballSharesOutlookRow .footballMuted { margin: 0; font-size: 12px; }
.footballSharesOutlookLabel { min-width: 82px; color: var(--muted); font-size: 11px; font-weight: 500; }
.footballSharesForm { display: inline-flex; gap: 3px; }
.footballSharesFormResult { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: rgb(var(--surface-rgb) / 0.1); color: var(--text-secondary); font-size: 10px; font-weight: 700; }
.footballSharesFormResult[data-result="W"] { background: rgb(var(--success-rgb) / 0.18); color: var(--success); }
.footballSharesFormResult[data-result="L"] { background: rgb(var(--danger-rgb) / 0.16); color: var(--danger); }
/* Patronlar. */
.footballSharesOwners { display: grid; gap: 8px; }
.footballSharesOwners h4 { margin: 0; }
.footballSharesOwners ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.footballSharesOwners li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; grid-template-areas: "rank name value" "rank meta value"; align-items: center; gap: 0 8px; padding: 6px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.footballSharesOwners li[data-me="true"] { background: var(--accent-soft); }
.footballSharesOwners .footballSharesHolderRank { grid-area: rank; }
.footballSharesOwnerName { grid-area: name; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.footballSharesOwners li .footballMuted { grid-area: meta; margin: 0; font-size: 11px; }
.footballSharesOwners li strong { grid-area: value; }
.footballSharesMain, .footballSharesPanel { display: grid; align-content: start; gap: 12px; min-width: 0; }
.footballSharesTabPanel[hidden] { display: none; }
.footballSharesTabPanel .footballSharesCharts { grid-template-columns: 1fr; }
.footballSharesTabPanel .footballSharesHoldings { --holding-columns: minmax(0, 1fr) 40px 72px 64px; padding-top: 0; border-top: 0; }
.footballSharesTabPanel .footballSharesHoldingShare, .footballSharesTabPanel .footballSharesHoldingsHead span:nth-child(3),
.footballSharesTabPanel .footballSharesHoldingNote { display: none; }
.footballSharesTabPanel .footballSharesBoard { padding-top: 0; border-top: 0; }
.footballSharesTabPanel .footballSharesActivity { padding: 0; background: transparent; box-shadow: none; }
.footballSharesTabPanel .footballSharesRules summary { display: none; }
.footballSharesTabPanel .footballSharesRules ul { margin: 0; }
/* The share dialog fills the window; its columns scroll on their own, the dialog never does. */
.footballSharesDialog.footballTableDialogWide { width: min(1320px, calc(100vw - 32px)); }
.footballSharesDialog .footballSharesHero { gap: 6px 16px; padding: 10px 14px; border-radius: 16px; }
.footballSharesDialog .footballSharesHeroMain { gap: 6px; }
.footballSharesDialog .footballSharesStatMain .footballSharesStatValue { font-size: 22px; }
.footballSharesDialog .footballShares { margin-bottom: 10px; }
@media (min-width: 860px) and (min-height: 560px) {
  .footballSharesDialog[open] { display: flex; flex-direction: column; height: calc(100vh - 48px); overflow: hidden; }
  .footballSharesDialog > * { flex: none; }
  .footballSharesDialog > .footballSharesBody { flex: 1; min-height: 0; grid-template-columns: 280px minmax(0, 1fr); align-items: stretch; }
  .footballSharesDialog .footballSharesSide { position: static; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
  .footballSharesDialog .footballSharesClubs { flex: 1; max-height: none; min-height: 0; }
  .footballSharesDialog .footballSharesDetail { grid-template-columns: minmax(0, 1fr); min-height: 0; overflow: auto; align-content: start; }
  .footballSharesDialog .footballTableClose { margin-top: 10px; }
}
@media (min-width: 1100px) and (min-height: 560px) {
  .footballSharesDialog .footballSharesDetail { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); overflow: hidden; align-items: stretch; }
  .footballSharesDialog .footballSharesMain { min-height: 0; overflow: auto; padding-right: 2px; }
  .footballSharesDialog .footballSharesPanel { display: flex; flex-direction: column; min-height: 0; padding-left: 12px; box-shadow: inset 1px 0 0 rgb(var(--surface-rgb) / 0.08); }
  .footballSharesDialog .footballSharesTabPanel { flex: 1; min-height: 0; overflow: auto; }
}
@media (min-width: 860px) {
  .footballSharesBody { grid-template-columns: minmax(260px, 300px) minmax(0, 1fr); align-items: start; }
  /* The sidebar stays in view while the selected club's details scroll. */
  .footballSharesSide { position: sticky; top: 0; padding: 8px; border-radius: 14px; background: rgb(var(--surface-rgb) / 0.025); box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.08); }
  .footballSharesSide > .footballSharesChartTitle { padding-top: 4px; }
  .footballSharesClubs { max-height: 560px; overflow: auto; padding: 2px; scrollbar-gutter: stable; }
  .footballSharesSide .footballSharesActivity { box-shadow: none; background: transparent; padding: 8px 10px 4px; border-top: 1px solid rgb(var(--surface-rgb) / 0.08); border-radius: 0; }
}
@media (max-width: 560px) {
  .footballSharesHero { grid-template-columns: 1fr; }
  .footballSharesHeroSide { justify-items: start; }
  .footballSharesHoldings { --holding-columns: minmax(0, 1fr) 40px 72px 64px; }
  .footballSharesHoldingShare, .footballSharesHoldingsHead span:nth-child(3) { display: none; }
  .footballSharesHoldingNote { display: none; }
  .footballSharesLots li { grid-template-columns: auto 64px auto; }
  .footballSharesLots .footballMuted { grid-column: 1 / -1; justify-self: start; }
}
.footballAbsences { margin: 8px 0; font-size: 12px; overflow-wrap: anywhere; }
.footballAmountLabel { display: block; font-size: 12px; margin: 16px 0 8px; }
.footballBetForm > input { width: 100%; box-sizing: border-box; }
.footballChoices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.footballChoice { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 6px; border: 1px solid var(--border-hover); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 12px; }
.footballChoice[aria-pressed="true"] { border-color: var(--text-secondary); background: var(--surface-active); }
.footballChoice:disabled { cursor: default; opacity: .65; }
.footballTotals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.footballTotalSplit { position: relative; display: flex; min-width: 0; border: 1px solid var(--border-hover); border-radius: 10px; background: var(--surface); }
.footballTotalSplit[hidden], .footballTotals[hidden] { display: none; }
.footballTotalChoice { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 11px; cursor: pointer; }
.footballTotalChoice:first-child { padding-right: 16px; border-radius: 9px 0 0 9px; border-right: 1px solid var(--border-hover); }
.footballTotalChoice:nth-child(2) { padding-left: 16px; border-radius: 0 9px 9px 0; }
.footballTotalChoice:hover:not(:disabled) { background: var(--surface-hover); }
.footballTotalChoice[aria-pressed="true"] { background: var(--surface-active); box-shadow: inset 0 0 0 1px var(--text-secondary); }
.footballTotalChoice:disabled { cursor: default; opacity: .65; }
.footballTotalChoice .footballOdds { font-size: 12px; }
.footballBothScore { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--border-hover); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.footballBothScore[hidden] { display: none; }
.footballBothScore:hover:not(:disabled) { background: var(--surface-hover); }
.footballBothScore[aria-pressed="true"] { border-color: var(--text-secondary); background: var(--surface-active); }
.footballBothScore:disabled { cursor: default; opacity: .65; }
.footballBothScore .footballMuted { flex: 1; min-width: 0; }
.footballBothScoreBox { display: grid; place-items: center; flex: none; width: 16px; height: 16px; box-sizing: border-box; border: 1.5px solid var(--text-secondary); border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 1; }
.footballBothScore[aria-pressed="true"] .footballBothScoreBox { background: var(--text); border-color: var(--text); color: var(--bg); }
.footballBothScore[aria-pressed="true"] .footballBothScoreBox::after { content: '✓'; }
.footballBothScoreLabel { font-weight: 700; }
.footballScorers { margin: 0 0 14px; }
.footballScorers[hidden], .footballScorerChoice[hidden] { display: none; }
.footballScorersTitle { display: block; margin-bottom: 6px; font-size: 12px; }
.footballScorerColumns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.footballScorerColumn { display: grid; gap: 5px; min-width: 0; }
.footballScorerColumn > .footballMuted { font-size: 11px; }
.footballScorerChoice { display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 36px; padding: 7px 8px; border: 1px solid var(--border-hover); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.footballScorerName { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footballScorerNumber { color: var(--text-secondary); font-size: 10px; font-variant-numeric: tabular-nums; }
.footballScorerChoice .footballOdds { flex: none; font-size: 12px; }
.footballScorerChoice:hover:not(:disabled) { background: var(--surface-hover); }
.footballScorerChoice[aria-pressed="true"] { border-color: var(--text-secondary); background: var(--surface-active); }
.footballScorerChoice:focus-visible { outline: 2px solid var(--text-secondary); outline-offset: 2px; }
.footballScorerChoice:disabled { cursor: default; opacity: .65; }
.footballCoupon { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 8px 12px; border: 1px dashed var(--border-hover); border-radius: 10px; font-size: 12px; overflow-wrap: anywhere; }
.footballCoupon[data-kind="empty"] { color: var(--text-secondary); }
.footballCoupon[data-kind="combo"] { border-style: solid; border-color: var(--text-secondary); background: var(--surface-active); }
.footballCouponOdds { flex: none; }
.footballTotalLine { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 3px; border: 1px solid var(--border-hover); border-radius: 5px; background: var(--surface); color: var(--text-secondary); font-size: 10px; font-weight: 700; pointer-events: none; }
.footballChoice:focus-visible, .footballCard button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.footballSubmit { width: 100%; min-height: 40px; }
.footballResult { font-size: 14px; font-weight: 600; white-space: pre-line; }
.footballPublicBets { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; }
.footballBetsList { list-style: none; padding: 0; margin: 12px 0 0; max-height: 180px; overflow-y: auto; }
.footballBetRow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 8px 0; font-size: 12px; }
.footballBetPlayer { overflow-wrap: anywhere; min-width: 0; }
.footballBetDetail { color: var(--text-secondary); overflow-wrap: anywhere; }
.footballResult[data-result="WON"] { color: #6ED59D; }
@media (max-width: 420px) { .footballCard { padding: 16px; } .footballScoreboard { gap: 8px; } .footballScore { font-size: 26px; } .footballTeamName { font-size: 12px; } }

/* ─── APPLICATION APPEARANCE + ACCENT ─── */
/* Football economy follows the share dialog's theme and compact surfaces. */
/* Sponsorluk tab: the share dialog's hero, stats, chips and ringed surfaces. */
.footballEconomy { display: grid; gap: 12px; min-width: 0; }
.footballEconomy h3, .footballEconomy h4, .footballEconomy p { margin: 0; }
.footballTableDialog .footballEconomy .footballMuted { margin: 0; }
.footballEconomy .btn { transition-property: background-color, border-color, color, box-shadow, scale; transition-duration: 150ms; transition-timing-function: ease-out; }
.footballEconomy .btn:active:not(:disabled) { transform: none; scale: 0.96; }
.footballEconomyHero { align-items: start; }
.footballEconomyHeading { display: flex; align-items: center; gap: 8px; }
.footballEconomyHeading h3 { font-size: 17px; font-weight: 650; }
.footballEconomyChips { padding: 0; }
.footballEconomyBadge { display: inline-flex; align-items: center; color: var(--text); font-size: 12px; font-weight: 600; }
.footballEconomyBoost .footballSharesStatSub { max-width: 34ch; line-height: 1.5; }
.footballEconomyHero .footballFanCard { align-content: start; min-width: 148px; text-align: right; }
.footballEconomyHero .footballFanCard .footballSharesStat { justify-items: end; }
.footballEconomyHero .footballFanCard .footballSharesStatValue { font-size: 22px; }
.footballEconomySectionTitle { margin: 4px 0 -4px; padding: 0 4px; }
.footballEconomyNames, .footballEconomyAuctions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); align-items: start; gap: 8px; }
.footballEconomyCard { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 12px 14px; border-radius: 14px; background: rgb(var(--surface-rgb) / 0.03); box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.08); overflow-wrap: anywhere; transition-property: box-shadow, background-color; transition-duration: 150ms; transition-timing-function: ease-out; }
.footballEconomyCard h4 { font-size: 13px; font-weight: 600; }
.footballEconomyCardHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* Name plates: a quiet card until someone owns the name, then the accent ring. */
.footballEconomyPlate { gap: 6px; }
/* Prestige: what an account paid to be seen. A still, engraved double gold hairline; the name itself stays in text colour. */
.footballEconomyPlate[data-custom="true"], .footballGuest { position: relative; box-shadow: 0 0 0 1px color-mix(in srgb, var(--rarity-legendary) 60%, transparent); }
.footballEconomyPlate[data-custom="true"]::after, .footballGuest::after { content: ""; position: absolute; inset: 3px; border-radius: inherit; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rarity-legendary) 24%, transparent); pointer-events: none; }
.footballEconomyPlate[data-custom="true"] { padding: 16px 18px; }
.footballEconomyPlate[data-custom="true"]::after { border-radius: 11px; }
.footballEconomyPlate[data-custom="true"] .footballEconomyPlateLabel { color: var(--warn-text); font-size: 12px; }
.footballEconomyPlate[data-custom="true"] .footballEconomyPlateName { font-size: 20px; font-weight: 600; }
.footballEconomyPlateName { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
.footballEconomyPlate[data-custom="false"] .footballEconomyPlateName { color: var(--text-secondary); font-weight: 600; }
.footballEconomyPlateMeta { padding: 0; }
.footballEconomyRename summary { width: fit-content; color: var(--text-secondary); font-size: 12px; cursor: pointer; }
.footballEconomyRename[open] summary { margin-bottom: 8px; }
/* Auctions: the leading bid, a draining time bar and the bid form. */
.footballEconomyAuction[data-leading="true"] { box-shadow: 0 0 0 1px var(--success); }
.footballEconomyAuction[data-status="CLOSED"] { background: rgb(var(--surface-rgb) / 0.02); }
.footballEconomyBid .footballSharesStatValue { font-size: 22px; letter-spacing: -0.01em; }
.footballEconomyTimeBar { height: 4px; overflow: hidden; border-radius: 999px; background: rgb(var(--surface-rgb) / 0.08); }
.footballEconomyTimeFill { display: block; height: 100%; width: var(--size, 0%); border-radius: inherit; background: var(--accent); transition: width 900ms linear; }
.footballEconomyAuction[data-status="CLOSED"] .footballEconomyTimeBar { display: none; }
.footballEconomyMinimumRow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; color: var(--text-secondary); font-size: 12px; }
.footballEconomyQuick { min-height: 28px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-variant-numeric: tabular-nums; }
.footballEconomyForm { display: grid; gap: 8px; min-width: 0; margin: 0; }
.footballEconomyFields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 8px; }
.footballEconomyForm label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.footballEconomyForm input { width: 100%; min-width: 0; box-sizing: border-box; min-height: 40px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.footballEconomyForm button { min-height: 40px; white-space: normal; }
.footballEconomyForm small { font-size: 11px; }
.footballEconomyForm :focus-visible { outline: none; box-shadow: var(--focus-ring); }
.footballEconomyInline { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.footballEconomyInline .footballEconomyWarning { grid-column: 1 / -1; }
.footballEconomyWarning { padding: 8px 10px; border-radius: 10px; background: rgb(var(--danger-rgb) / 0.08); box-shadow: inset 0 0 0 1px rgb(var(--danger-rgb) / 0.25); color: var(--text); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.footballEconomyCountdown, .footballEconomyMinimum { font-variant-numeric: tabular-nums; }
.footballEconomyCountdown { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; white-space: nowrap; }
.footballEconomyCountdown::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.footballEconomyCountdown[data-urgent="true"] { background: rgb(var(--danger-rgb) / 0.14); color: var(--danger); }
.footballEconomyCountdown[data-urgent="true"]::before { animation: footballEconomyPulse 1s ease-in-out infinite; }
@keyframes footballEconomyPulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .footballEconomyCountdown::before { animation: none; } .footballEconomyTimeFill { transition: none; } }
.footballEconomyRules { padding: 0 4px; }
/* The bid form folds behind a summary that reads as the card's primary button. */
.footballEconomyBidToggle { display: grid; gap: 8px; }
.footballEconomyBidToggle > summary { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--accent); color: var(--accent-contrast, #fff); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; list-style: none; cursor: pointer; transition-property: background-color, scale; transition-duration: 150ms; transition-timing-function: ease-out; }
.footballEconomyBidToggle > summary::-webkit-details-marker { display: none; }
.footballEconomyBidToggle > summary:active { scale: 0.96; }
.footballEconomyBidToggle > summary:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.footballEconomyBidToggle[open] > summary { background: rgb(var(--surface-rgb) / 0.07); color: var(--text-secondary); }
.footballEconomyInfo { display: flex; gap: 6px; color: var(--text-secondary); font-size: 11.5px; line-height: 1.45; }
.footballEconomyInfo::before { content: 'ⓘ'; flex: none; color: var(--muted); }
.footballEconomyInfo[data-tone="down"] { color: var(--danger); }
.footballEconomyInfo[data-tone="down"]::before { color: currentColor; }
.footballSharesPriceChips { padding: 0 0 8px; }
/* Taraftar kampanyası: the raised amount, the goal bar and two figures. */
.footballCampaign[data-status="FUNDED"] { box-shadow: 0 0 0 1px var(--success); }
.footballCampaign[data-status="FUNDED"] .footballEconomyCountdown { background: rgb(var(--success-rgb) / 0.14); color: var(--success); }
.footballCampaign[data-status="FAILED"] .footballEconomyCountdown { background: rgb(var(--surface-rgb) / 0.08); color: var(--text-secondary); }
.footballEconomyRaised { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.footballEconomyFigures .footballSharesStatValue { font-size: 14px; }
.footballEconomyNote { font-size: 11px; line-height: 1.5; }
.footballGuestForm { margin: 10px 0; padding: 12px; border-radius: 10px; background: rgb(var(--surface-rgb) / 0.05); }
.footballGuestForm[hidden], .footballEconomy [hidden] { display: none; }
.footballPrestige { display: grid; justify-items: center; gap: 8px; margin: 10px 0; }
.footballPrestige[hidden], .footballVenue[hidden], .footballGuest[hidden] { display: none; }
.footballVenue { margin: 0; color: var(--text-secondary); font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.footballVenue[data-custom="true"] { color: var(--warn-text); font-size: 13px; font-weight: 600; }
.footballGuest { width: min(100%, 320px); padding: 11px 22px; border-radius: 10px; text-align: center; }
.footballGuest::after { border-radius: 7px; }
.footballGuestText { display: grid; gap: 1px; min-width: 0; }
.footballGuestLabel { color: var(--warn-text); font-size: 11px; font-weight: 500; }
.footballGuestName { color: var(--text); font-size: 16px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.footballGuestBuy { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rarity-legendary) 60%, transparent); }
@media (max-width: 480px) {
  .footballEconomyNames, .footballEconomyAuctions { grid-template-columns: minmax(0, 1fr); }
  .footballEconomyHero { grid-template-columns: minmax(0, 1fr); }
  .footballEconomyHero .footballFanCard { justify-items: start; text-align: left; }
  .footballEconomyHero .footballFanCard .footballSharesStat { justify-items: start; }
}

/* The campaign goal bar: the share dialog's value bar on a native progress element. */
.footballCampaignProgress { width: 100%; height: 10px; overflow: hidden; border: 0; border-radius: 999px; background: rgb(var(--surface-rgb) / 0.07); appearance: none; -webkit-appearance: none; }
.footballCampaignProgress::-webkit-progress-bar { border-radius: 999px; background: rgb(var(--surface-rgb) / 0.07); }
.footballCampaignProgress::-webkit-progress-value { border-radius: 999px; background: var(--accent); }
.footballCampaignProgress::-moz-progress-bar { border-radius: 999px; background: var(--accent); }
.footballCampaign[data-status="FUNDED"] .footballCampaignProgress::-webkit-progress-value { background: var(--success); }
.footballCampaign[data-status="FUNDED"] .footballCampaignProgress::-moz-progress-bar { background: var(--success); }

:root,
:root[data-app-theme="graphite"] {
  color-scheme: dark;
  --bg-rgb: 17 18 20;
  --bg-deep-rgb: 11 12 14;
  --sidebar-rgb: 21 22 25;
  --card-rgb: 24 25 29;
  --card-strong-rgb: 28 29 34;
  --elevated-rgb: 28 29 34;
  --border-rgb: 255 255 255;
  --surface-rgb: 255 255 255;
  --shadow-rgb: 0 0 0;
  --bg: #111214;
  --bg-deep: #0b0c0e;
  --sidebar-bg: #151619;
  --titlebar-bg: rgb(11 12 14 / 0.95);
  --topbar-bg: rgb(17 18 20 / 0.92);
  --bottombar-bg: rgb(11 12 14 / 0.94);
  --surface: rgb(255 255 255 / 0.035);
  --surface-subtle: rgb(255 255 255 / 0.025);
  --surface-hover: rgb(255 255 255 / 0.065);
  --surface-active: rgb(255 255 255 / 0.09);
  --surface-muted: rgb(255 255 255 / 0.055);
  --card: rgb(24 25 29 / 0.88);
  --card-strong: rgb(28 29 34 / 0.96);
  --input-bg: rgb(24 25 29 / 0.72);
  --menu-bg: rgb(28 29 34 / 0.98);
  --popover-bg: rgb(28 29 34 / 0.99);
  --panel-translucent: rgb(17 18 20 / 0.72);
  --text: #eeeeef;
  --text-secondary: #b8b8bd;
  --muted: #8b8c93;
  --border: rgb(255 255 255 / 0.075);
  --border-hover: rgb(255 255 255 / 0.13);
  --border-strong: rgb(255 255 255 / 0.2);
}

:root[data-app-theme="black"] {
  --bg-rgb: 5 5 5;
  --bg-deep-rgb: 0 0 0;
  --sidebar-rgb: 8 8 8;
  --card-rgb: 13 13 13;
  --card-strong-rgb: 20 20 20;
  --elevated-rgb: 20 20 20;
  --border-rgb: 255 255 255;
  --surface-rgb: 255 255 255;
  --bg: #050505;
  --bg-deep: #000000;
  --sidebar-bg: #080808;
  --titlebar-bg: rgb(0 0 0 / 0.98);
  --topbar-bg: rgb(5 5 5 / 0.96);
  --bottombar-bg: rgb(0 0 0 / 0.98);
  --surface: rgb(255 255 255 / 0.025);
  --surface-subtle: rgb(255 255 255 / 0.018);
  --surface-hover: rgb(255 255 255 / 0.06);
  --surface-active: rgb(255 255 255 / 0.09);
  --surface-muted: rgb(255 255 255 / 0.045);
  --card: rgb(13 13 13 / 0.94);
  --card-strong: rgb(20 20 20 / 0.98);
  --input-bg: rgb(13 13 13 / 0.9);
  --menu-bg: rgb(20 20 20 / 0.99);
  --popover-bg: rgb(20 20 20 / 0.99);
  --panel-translucent: rgb(5 5 5 / 0.88);
  --text: #f2f2f2;
  --text-secondary: #bcbcbc;
  --muted: #8c8c8c;
  --border: rgb(255 255 255 / 0.09);
  --border-hover: rgb(255 255 255 / 0.16);
  --border-strong: rgb(255 255 255 / 0.24);
}

:root[data-app-theme="blue"] {
  --bg-rgb: 11 15 26;
  --bg-deep-rgb: 6 10 20;
  --sidebar-rgb: 13 17 32;
  --card-rgb: 15 23 42;
  --card-strong-rgb: 15 23 42;
  --elevated-rgb: 12 16 28;
  --border-rgb: 148 163 184;
  --bg: #0b0f1a;
  --bg-deep: #060a14;
  --sidebar-bg: #0d1120;
  --titlebar-bg: rgb(6 10 20 / 0.95);
  --topbar-bg: rgb(6 10 20 / 0.92);
  --bottombar-bg: rgb(6 10 20 / 0.94);
  --surface: rgb(255 255 255 / 0.025);
  --surface-subtle: rgb(255 255 255 / 0.025);
  --surface-hover: rgb(255 255 255 / 0.055);
  --surface-active: rgb(255 255 255 / 0.09);
  --surface-muted: rgb(148 163 184 / 0.055);
  --card: rgb(15 23 42 / 0.72);
  --card-strong: rgb(15 23 42 / 0.9);
  --input-bg: rgb(15 23 42 / 0.72);
  --menu-bg: rgb(12 16 28 / 0.98);
  --popover-bg: rgb(12 16 28 / 0.99);
  --panel-translucent: rgb(11 15 26 / 0.72);
  --text: #e2e8f0;
  --text-secondary: #c1c9d6;
  --muted: #7c8ba5;
  --border: rgb(148 163 184 / 0.1);
  --border-hover: rgb(148 163 184 / 0.18);
  --border-strong: rgb(148 163 184 / 0.28);
}

:root[data-app-theme="dark-gray"] {
  --bg-rgb: 23 25 29;
  --bg-deep-rgb: 15 17 20;
  --sidebar-rgb: 27 29 34;
  --card-rgb: 34 37 43;
  --card-strong-rgb: 39 42 49;
  --elevated-rgb: 36 39 45;
  --border-rgb: 196 201 208;
  --bg: #17191d;
  --bg-deep: #0f1114;
  --sidebar-bg: #1b1d22;
  --titlebar-bg: rgb(15 17 20 / 0.95);
  --topbar-bg: rgb(23 25 29 / 0.94);
  --bottombar-bg: rgb(15 17 20 / 0.94);
  --surface: rgb(255 255 255 / 0.04);
  --surface-subtle: rgb(255 255 255 / 0.028);
  --surface-hover: rgb(255 255 255 / 0.075);
  --surface-active: rgb(255 255 255 / 0.1);
  --surface-muted: rgb(196 201 208 / 0.065);
  --card: rgb(34 37 43 / 0.88);
  --card-strong: rgb(39 42 49 / 0.96);
  --input-bg: rgb(34 37 43 / 0.72);
  --menu-bg: rgb(39 42 49 / 0.98);
  --popover-bg: rgb(39 42 49 / 0.99);
  --panel-translucent: rgb(23 25 29 / 0.74);
  --text: #f0f1f2;
  --text-secondary: #c5c8cd;
  --muted: #858991;
  --border: rgb(196 201 208 / 0.1);
  --border-hover: rgb(196 201 208 / 0.18);
  --border-strong: rgb(196 201 208 / 0.28);
}

:root[data-app-theme="petrol"] {
  --bg-rgb: 8 19 17;
  --bg-deep-rgb: 5 12 11;
  --sidebar-rgb: 10 25 22;
  --card-rgb: 16 33 30;
  --card-strong-rgb: 19 39 35;
  --elevated-rgb: 16 33 30;
  --border-rgb: 150 179 171;
  --surface-rgb: 218 242 235;
  --bg: #081311;
  --bg-deep: #050c0b;
  --sidebar-bg: #0a1916;
  --titlebar-bg: rgb(5 12 11 / 0.95);
  --topbar-bg: rgb(8 19 17 / 0.94);
  --bottombar-bg: rgb(5 12 11 / 0.94);
  --surface: rgb(218 242 235 / 0.035);
  --surface-subtle: rgb(218 242 235 / 0.025);
  --surface-hover: rgb(218 242 235 / 0.065);
  --surface-active: rgb(218 242 235 / 0.09);
  --surface-muted: rgb(150 179 171 / 0.06);
  --card: rgb(16 33 30 / 0.88);
  --card-strong: rgb(19 39 35 / 0.96);
  --input-bg: rgb(16 33 30 / 0.72);
  --menu-bg: rgb(19 39 35 / 0.98);
  --popover-bg: rgb(19 39 35 / 0.99);
  --panel-translucent: rgb(8 19 17 / 0.74);
  --text: #e7f0ed;
  --text-secondary: #b3c6c0;
  --muted: #718a83;
  --border: rgb(150 179 171 / 0.1);
  --border-hover: rgb(150 179 171 / 0.18);
  --border-strong: rgb(150 179 171 / 0.28);
}

:root[data-app-theme="crimson"] {
  --bg-rgb: 26 8 11;
  --bg-deep-rgb: 15 4 6;
  --sidebar-rgb: 36 11 15;
  --card-rgb: 48 16 21;
  --card-strong-rgb: 57 19 25;
  --elevated-rgb: 48 16 21;
  --border-rgb: 220 150 160;
  --surface-rgb: 255 220 225;
  --bg: #1a080b;
  --bg-deep: #0f0406;
  --sidebar-bg: #240b0f;
  --titlebar-bg: rgb(15 4 6 / 0.95);
  --topbar-bg: rgb(26 8 11 / 0.94);
  --bottombar-bg: rgb(15 4 6 / 0.94);
  --surface: rgb(255 220 225 / 0.035);
  --surface-subtle: rgb(255 220 225 / 0.025);
  --surface-hover: rgb(255 220 225 / 0.065);
  --surface-active: rgb(255 220 225 / 0.09);
  --surface-muted: rgb(220 150 160 / 0.06);
  --card: rgb(48 16 21 / 0.88);
  --card-strong: rgb(57 19 25 / 0.96);
  --input-bg: rgb(48 16 21 / 0.72);
  --menu-bg: rgb(57 19 25 / 0.98);
  --popover-bg: rgb(57 19 25 / 0.99);
  --panel-translucent: rgb(26 8 11 / 0.74);
  --text: #f7e9eb;
  --text-secondary: #d8b9be;
  --muted: #9c7179;
  --border: rgb(220 150 160 / 0.1);
  --border-hover: rgb(220 150 160 / 0.18);
  --border-strong: rgb(220 150 160 / 0.28);
}

:root[data-app-theme="espresso"] {
  --bg-rgb: 20 13 10;
  --bg-deep-rgb: 12 8 6;
  --sidebar-rgb: 28 18 14;
  --card-rgb: 36 25 20;
  --card-strong-rgb: 43 29 23;
  --elevated-rgb: 36 25 20;
  --border-rgb: 189 162 148;
  --surface-rgb: 246 229 218;
  --bg: #140d0a;
  --bg-deep: #0c0806;
  --sidebar-bg: #1c120e;
  --titlebar-bg: rgb(12 8 6 / 0.95);
  --topbar-bg: rgb(20 13 10 / 0.94);
  --bottombar-bg: rgb(12 8 6 / 0.94);
  --surface: rgb(246 229 218 / 0.035);
  --surface-subtle: rgb(246 229 218 / 0.025);
  --surface-hover: rgb(246 229 218 / 0.065);
  --surface-active: rgb(246 229 218 / 0.09);
  --surface-muted: rgb(189 162 148 / 0.06);
  --card: rgb(36 25 20 / 0.88);
  --card-strong: rgb(43 29 23 / 0.96);
  --input-bg: rgb(36 25 20 / 0.72);
  --menu-bg: rgb(43 29 23 / 0.98);
  --popover-bg: rgb(43 29 23 / 0.99);
  --panel-translucent: rgb(20 13 10 / 0.74);
  --text: #f1ece8;
  --text-secondary: #cbbeb7;
  --muted: #8e7b71;
  --border: rgb(189 162 148 / 0.1);
  --border-hover: rgb(189 162 148 / 0.18);
  --border-strong: rgb(189 162 148 / 0.28);
}

:root[data-app-theme="plum"] {
  --bg-rgb: 20 13 20;
  --bg-deep-rgb: 12 8 12;
  --sidebar-rgb: 29 18 29;
  --card-rgb: 38 26 38;
  --card-strong-rgb: 45 30 45;
  --elevated-rgb: 38 26 38;
  --border-rgb: 185 157 185;
  --surface-rgb: 242 223 242;
  --bg: #140d14;
  --bg-deep: #0c080c;
  --sidebar-bg: #1d121d;
  --titlebar-bg: rgb(12 8 12 / 0.95);
  --topbar-bg: rgb(20 13 20 / 0.94);
  --bottombar-bg: rgb(12 8 12 / 0.94);
  --surface: rgb(242 223 242 / 0.035);
  --surface-subtle: rgb(242 223 242 / 0.025);
  --surface-hover: rgb(242 223 242 / 0.065);
  --surface-active: rgb(242 223 242 / 0.09);
  --surface-muted: rgb(185 157 185 / 0.06);
  --card: rgb(38 26 38 / 0.88);
  --card-strong: rgb(45 30 45 / 0.96);
  --input-bg: rgb(38 26 38 / 0.72);
  --menu-bg: rgb(45 30 45 / 0.98);
  --popover-bg: rgb(45 30 45 / 0.99);
  --panel-translucent: rgb(20 13 20 / 0.74);
  --text: #f1eaf1;
  --text-secondary: #c9bbc9;
  --muted: #8b778b;
  --border: rgb(185 157 185 / 0.1);
  --border-hover: rgb(185 157 185 / 0.18);
  --border-strong: rgb(185 157 185 / 0.28);
}

:root[data-app-theme="burgundy"] {
  --bg-rgb: 23 11 14;
  --bg-deep-rgb: 13 7 8;
  --sidebar-rgb: 32 15 19;
  --card-rgb: 41 23 27;
  --card-strong-rgb: 49 27 32;
  --elevated-rgb: 41 23 27;
  --border-rgb: 192 157 165;
  --surface-rgb: 246 222 228;
  --bg: #170b0e;
  --bg-deep: #0d0708;
  --sidebar-bg: #200f13;
  --titlebar-bg: rgb(13 7 8 / 0.95);
  --topbar-bg: rgb(23 11 14 / 0.94);
  --bottombar-bg: rgb(13 7 8 / 0.94);
  --surface: rgb(246 222 228 / 0.035);
  --surface-subtle: rgb(246 222 228 / 0.025);
  --surface-hover: rgb(246 222 228 / 0.065);
  --surface-active: rgb(246 222 228 / 0.09);
  --surface-muted: rgb(192 157 165 / 0.06);
  --card: rgb(41 23 27 / 0.88);
  --card-strong: rgb(49 27 32 / 0.96);
  --input-bg: rgb(41 23 27 / 0.72);
  --menu-bg: rgb(49 27 32 / 0.98);
  --popover-bg: rgb(49 27 32 / 0.99);
  --panel-translucent: rgb(23 11 14 / 0.74);
  --text: #f2e9eb;
  --text-secondary: #cdbbc0;
  --muted: #907880;
  --border: rgb(192 157 165 / 0.1);
  --border-hover: rgb(192 157 165 / 0.18);
  --border-strong: rgb(192 157 165 / 0.28);
}

/* The only light palette: overlays and borders darken instead of lighten, and the status
   colours drop to deeper shades that stay legible on white. An active event theme forces its
   own dark background and white text, so the light palette steps aside while it runs. */
:root[data-app-theme="light"]:not(:has(> body.event-mode-active)) {
  color-scheme: light;
  --bg-rgb: 247 247 248;
  --bg-deep-rgb: 236 236 239;
  --sidebar-rgb: 241 241 243;
  --card-rgb: 255 255 255;
  --card-strong-rgb: 255 255 255;
  --elevated-rgb: 255 255 255;
  --border-rgb: 20 22 28;
  --surface-rgb: 20 22 28;
  --shadow-rgb: 20 22 28;
  --bg: #f7f7f8;
  --bg-deep: #ececef;
  --sidebar-bg: #f1f1f3;
  --titlebar-bg: rgb(236 236 239 / 0.96);
  --topbar-bg: rgb(247 247 248 / 0.94);
  --bottombar-bg: rgb(236 236 239 / 0.96);
  --surface: rgb(20 22 28 / 0.035);
  --surface-subtle: rgb(20 22 28 / 0.025);
  --surface-hover: rgb(20 22 28 / 0.06);
  --surface-active: rgb(20 22 28 / 0.085);
  --surface-muted: rgb(20 22 28 / 0.05);
  --card: rgb(255 255 255 / 0.92);
  --card-strong: rgb(255 255 255 / 0.98);
  --input-bg: rgb(255 255 255 / 0.92);
  --menu-bg: rgb(255 255 255 / 0.98);
  --popover-bg: rgb(255 255 255 / 0.99);
  --panel-translucent: rgb(247 247 248 / 0.82);
  --text: #1b1c20;
  --text-secondary: #474a52;
  --muted: #6b6e77;
  --border: rgb(20 22 28 / 0.1);
  --border-hover: rgb(20 22 28 / 0.17);
  --border-strong: rgb(20 22 28 / 0.26);
  --danger-rgb: 220 38 38;
  --danger: #dc2626;
  --danger-soft: rgb(220 38 38 / 0.12);
  --danger-text: #b91c1c;
  --danger-strong-bg: rgb(254 226 226 / 0.98);
  --warn-rgb: 217 119 6;
  --warn: #d97706;
  --warn-soft: rgb(217 119 6 / 0.14);
  --warn-text: #a16207;
  --warn-strong-bg: rgb(254 243 199 / 0.98);
  --success-rgb: 22 163 74;
  --success: #16a34a;
  --success-soft: rgb(22 163 74 / 0.13);
  --success-text: #15803d;
  --success-text-strong: #14532d;
  --info: #1d4ed8;
  --info-rgb: 29 78 216;
  --shadow-sm: 0 1px 2px rgb(var(--shadow-rgb) / 0.08);
  --shadow: 0 8px 22px rgb(var(--shadow-rgb) / 0.1);
  --shadow-lg: 0 18px 44px rgb(var(--shadow-rgb) / 0.16);
  --shadow-popover: 0 0 0 1px rgb(var(--shadow-rgb) / 0.08), 0 12px 32px rgb(var(--shadow-rgb) / 0.16);
}

:root {
  --titlebar-height: 32px;
  --bottombar-height: 56px;
  --topbar-height: 44px;
  --accent: #5b7cfa;
  --accent-soft: rgb(91 124 250 / 0.15);
  --accent-glow: rgb(91 124 250 / 0.45);
  --accent-gradient: linear-gradient(135deg, #5b7cfa, #5b7cfa);
  --accent-gradient-soft: linear-gradient(135deg, rgb(91 124 250 / 0.2), rgb(91 124 250 / 0.08));
  --primary: var(--accent);
  --primary-soft: var(--accent-soft);
  --primary-glow: var(--accent-glow);
  --accent-text: color-mix(in srgb, var(--text) 82%, var(--accent));
  /* Accent used as text (links, mentions): lifted toward the text colour so dark accents stay legible. */
  --accent-link: color-mix(in srgb, var(--accent) 62%, var(--text));
  --danger-rgb: 255 107 107;
  --danger-strong-rgb: 127 29 29;
  --danger: #ff6b6b;
  --danger-soft: rgb(255 107 107 / 0.15);
  --danger-text: #fecaca;
  --danger-action-hover: #c42b1c;
  --danger-action-active: #a5261a;
  --danger-strong-bg: rgb(69 10 18 / 0.96);
  --warn-rgb: 245 158 11;
  --warn: #f59e0b;
  --soundboard-frame: #facc15;
  --warn-soft: rgb(245 158 11 / 0.15);
  --warn-text: #fbbf24;
  --warn-strong-bg: rgb(69 42 6 / 0.95);
  --success-rgb: 34 197 94;
  --success: #22c55e;
  --success-soft: rgb(34 197 94 / 0.15);
  --success-text: #c7f5e6;
  --success-text-strong: #eafff7;
  --info: #93c5fd;
  --info-rgb: 147 197 253;
  --status-away: #eab308;
  --status-offline: #64748b;
  --overlay-light: rgb(0 0 0 / 0.2);
  --overlay-medium: rgb(0 0 0 / 0.42);
  --overlay-strong: rgb(0 0 0 / 0.78);
  --media-bg: #000;
  --on-media: #fff;
  --on-accent: #fff;
  --on-danger: #fff;
  --shadow-sm: 0 1px 2px rgb(var(--shadow-rgb) / 0.18);
  --shadow: 0 8px 22px rgb(var(--shadow-rgb) / 0.28);
  --shadow-lg: 0 18px 44px rgb(var(--shadow-rgb) / 0.45);
  --shadow-popover: 0 0 0 1px rgb(var(--shadow-rgb) / 0.3), 0 12px 32px rgb(var(--shadow-rgb) / 0.42);
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --ring: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent);
  /* Keyboard focus: a gap ring in the page colour, then the accent, so it reads on any surface. */
  --focus-ring: 0 0 0 2px var(--bg-deep), 0 0 0 4px color-mix(in srgb, var(--accent) 80%, var(--text));
  --transition: 0.16s cubic-bezier(0.2, 0, 0, 1);
  --transition-fast: 0.1s cubic-bezier(0.2, 0, 0, 1);

  /* Type scale: dense desktop UI, 13px body, 14px reading text. */
  --text-2xs: 10.5px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 13px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 20px;

  /* Control heights shared by buttons, inputs and selects. */
  --control-h-sm: 28px;
  --control-h: 32px;
  --control-h-lg: 38px;

  /* Filled accent surfaces (primary buttons, badges). Light accents keep their colour and take
     dark text; every other accent is capped in lightness so white text stays readable. */
  --accent-fill: var(--accent);
  --accent-fill-hover: color-mix(in srgb, var(--accent) 88%, var(--text));
  --on-accent-fill: var(--on-accent);
  --event-banner-bg: linear-gradient(90deg, rgba(75, 31, 120, 0.9), rgba(42, 14, 74, 0.96));
  --event-banner-border: rgba(212, 160, 23, 0.45);

  /* ─── EmreHunt nadirlik skalası ───
     Nadirlik sırası sunucunun; buradaki hue'lar yalnızca o sırayı görünür kılar. Tema
     değişkenleri arasında durur, çünkü bir tema bunları da yeniden tanımlayabilmelidir.
     Renk hiçbir yerde tek başına anlam taşımaz: her nadirlik adı ayrıca yazıyla yazılır. */
  --rarity-common: #8d9099;
  --rarity-uncommon: #5aa06a;
  --rarity-rare: #4f8fd6;
  --rarity-epic: #9a6fd8;
  --rarity-mythic: #d4713f;
  --rarity-legendary: #d8b23f;
  --rarity-glimmer: #46b7ac;
  --rarity-paradox: #d05a86;
  --rarity-event: #4fb0d6;
}

@supports (color: oklch(from red l c h)) {
  :root {
    --accent-fill: oklch(from var(--accent) calc(min(l, 0.6) + clamp(0, (l - 0.8) * 1000, 1) * (l - min(l, 0.6))) c h);
    --accent-fill-hover: oklch(from var(--accent-fill) calc(l + 0.05 - clamp(0, (l - 0.8) * 1000, 1) * 0.1) c h);
    --on-accent-fill: oklch(from var(--accent) calc(1 - clamp(0, (l - 0.8) * 1000, 1) * 0.86) 0 0);
  }
}

/* ─── RESET ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

body {
  font-family:
    'Country Flags',
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-width: 1100px;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea,
select,
[contenteditable],
.chatMessage,
.chatMessageBody,
.logText {
  user-select: text;
  -webkit-user-select: text;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  pointer-events: none;
  z-index: 0;
}

/* ─── APP SHELL ─── */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Page navigation and voice session have independent lifetimes. */
.appWorkspace {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.pageRail {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 6px 8px;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
  /* Lifted so the rail's hover titles paint over the page beside it. */
  position: relative;
  z-index: 20;
}
.pageRailLogo { width: 24px; height: 24px; margin: 2px 0 12px; }
.pageNavBtn {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--text-secondary);
  background: transparent;
  font: inherit;
  transition: scale 150ms ease-out;
  cursor: pointer;
  -webkit-app-region: no-drag;
}
.pageNavBtn.active { color: var(--on-accent-fill); background: var(--accent-fill); box-shadow: 0 2px 4px rgb(var(--shadow-rgb) / .16), inset 0 1px 0 rgb(var(--surface-rgb) / .12); }
.pageNavBtn.active svg { fill: currentColor; }
.pageRailShares { margin-top: auto; }
.pageNavBtn > .pageNavAchievementBadge { position: absolute; top: -4px; right: -6px; box-shadow: 0 0 0 2px var(--sidebar-bg); }
.bankMenu { width: min(220px, calc(100vw - 16px)); padding: 5px; }
.pageNavBtn svg { flex: none; width: 22px; height: 22px; }
.pageNavBtn.active::before { content: ''; position: absolute; left: -6px; width: 3px; height: 28px; border-radius: 4px; background: var(--accent-fill); }
.pageNavBtn:hover:not(.active) { background: var(--surface-hover); color: var(--text); }
.pageNavBtn:active { scale: .96; }
.pageNavBtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pageNavBtn .dmUnreadBadge { position: absolute; top: -3px; right: -2px; }
/* Each rail button names itself in a title beside it on hover or keyboard focus. */
.pageNavBtn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  padding: 7px 11px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background: var(--popover-bg);
  color: var(--text);
  box-shadow: var(--shadow-popover);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  translate: -4px -50%;
  transition: opacity 120ms ease-out, translate 120ms ease-out;
}
.pageNavBtn[data-tooltip]:focus-visible::after { opacity: 1; translate: 0 -50%; }
@media (hover: hover) {
  .pageNavBtn[data-tooltip]:hover::after { opacity: 1; translate: 0 -50%; }
}
.pageNavBtn[data-tooltip][aria-expanded="true"]::after { opacity: 0; }
.pageContent { display: flex; min-width: 0; min-height: 0; overflow: hidden; }
.pageContent > .view { min-width: 0; width: 100%; }
.appWorkspace > .bottomBar { grid-column: 2; }
.appWorkspace > .bottomBar .bbRight { margin-left: auto; }
/* Equal side groups keep the media controls centred on the bar, so the balance growing on hover (or
   any other right-side change) widens the right group leftward without moving them. A right group
   wider than its half still takes the room it needs instead of overflowing the controls. */
@media (min-width: 769px) {
  .appWorkspace > .bottomBar .bbLeft { flex: 1 1 0; min-width: 180px; }
  .appWorkspace > .bottomBar .bbCenter { flex: 0 1 auto; }
  .appWorkspace > .bottomBar .bbRight { flex: 1 1 0; min-width: max-content; }
}
.voiceEmptyState { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 28px 20px; }
.voiceEmptyState > img { width: 48px; height: 48px; margin-bottom: 8px; }
.voiceEmptyState h2 { margin: 0; font-size: 18px; font-weight: 600; }
.voiceEmptyState p { margin: 0; color: var(--text-secondary); font-size: var(--text-md); }
.voiceEmptyState .joinProgress { width: min(360px, 100%); }
.pendingInviteCard { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.roomChatWaiting { margin: auto; padding: 24px; text-align: center; color: var(--muted); }
.rightColumn.roomUnavailable > :not(.roomChatWaiting) { display: none; }
.voiceJoinStatus { margin-left: auto; color: var(--muted); font-size: var(--text-xs); }
@media (max-width: 720px) {
  .appWorkspace { grid-template-columns: 52px minmax(0, 1fr); }
  .pageRail { padding-inline: 4px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .appWorkspace > .bottomBar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 6px 8px; }
  .appWorkspace > .bottomBar .bbLeft { flex: 1; min-width: 80px; }
  .appWorkspace > .bottomBar .bbCenter { order: 3; flex-basis: 100%; flex-wrap: wrap; }
  .appWorkspace > .bottomBar .bbRight { flex: none; gap: 6px; }
  .appWorkspace > .bottomBar .bbVersion { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pageNavBtn, .pageNavBtn[data-tooltip]::after { transition: none; }
  .pageNavBtn:active { scale: 1; }
}

/* ─── TITLEBAR ─── */
.titlebar {
  height: var(--titlebar-height);
  background: var(--titlebar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 0 0 12px;
  -webkit-app-region: drag;
  flex-shrink: 0;
  z-index: 100;
  gap: 8px;
}

.titlebarDrag {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.appName {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.windowControls {
  display: flex;
  align-items: center;
  align-self: stretch;
  height: 100%;
  margin-left: auto;
  gap: 0;
  -webkit-app-region: no-drag;
}

.winBtn {
  flex: 0 0 46px;
  width: 46px;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  -webkit-app-region: no-drag;
}

.winGlyph {
  pointer-events: none;
}

.helpLink { text-decoration: none; }
.helpGlyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: currentColor;
  font-size: 0;
}
.helpGlyph::after {
  content: '?';
  color: var(--titlebar-bg);
  font: 700 12px/1 sans-serif;
}
.winBtn.helpLink { border-right: 1px solid var(--border); margin-right: 4px; }

.winGlyphRestore {
  display: none;
}

#winMaximize[data-window-state="maximized"] .winGlyphMaximize,
#winMaximize[data-window-state="fullscreen"] .winGlyphMaximize {
  display: none;
}

#winMaximize[data-window-state="maximized"] .winGlyphRestore,
#winMaximize[data-window-state="fullscreen"] .winGlyphRestore {
  display: block;
}

.winBtn:hover {
  color: var(--text);
  background: rgb(var(--surface-rgb) / 0.07);
}
.winBtn:active {
  background: rgb(var(--surface-rgb) / 0.12);
}
.winBtn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 80%, transparent);
}
.winBtn.danger:hover {
  background: var(--danger-action-hover);
  color: var(--on-media);
}
.winBtn.danger:active {
  background: var(--danger-action-active);
  color: var(--on-media);
}

/* ─── VIEWS ─── */
.view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.view.active {
  display: flex;
}

.eventBanner {
  display: flex;
  align-items: center;
  gap: 10px;
  /* margin: 10px 12px 0; */
  padding: 10px 12px;
  border: 1px solid var(--event-banner-border);
  /* border-radius: var(--radius-sm); */
  background: var(--event-banner-bg);
  box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.35);
}

.eventBannerBadge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: #201028;
  background: var(--primary);
}

.eventBannerText {
  display: grid;
  gap: 1px;
}

.eventBannerText strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.eventBannerText > span {
  font-size: 11px;
  color: var(--text-secondary);
}

.eventCountdown {
  margin-left: auto;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

/* ─── LOBBY ─── */
.lobbyHeader {
  text-align: center;
  margin-top: 48px;
  margin-bottom: 28px;
  animation: fadeSlideIn 0.5s ease;
}

.lobbyHeader .logo {
  user-select: none;
}

.lobbyHeader .logo img {
  width: 80px;
  height: 80px;
}

.lobbyHeader h1 {
  margin-top: 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lobbyHeader .subtitle {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  font-weight: 500;
}

.lobbyHeader .sub-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.lobbyColumns {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(270px, 292px);
  align-items: start;
  justify-content: center;
  gap: 14px;
  width: min(746px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 32px;
}

.lobbyPrimaryColumn {
  display: grid;
  min-width: 0;
}

.lobbyCard {
  width: 100%;
  margin: 0;
  display: grid;
  gap: 14px;
  animation: fadeSlideIn 0.5s ease 0.1s both;
}

.lobbyButtons {
  grid-template-columns: 1fr !important;
}

.lobbyButtons .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.joinProgress {
  display: grid;
  gap: 9px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgb(var(--surface-rgb) / 0.025);
  text-align: left;
}

.joinProgress.hidden {
  display: none;
}

.joinProgressHeader,
.joinProgressActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.joinProgressHeader {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.joinProgressTrack {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(var(--border-rgb) / 0.15);
}

.joinProgressTrack span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.joinProgressHint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.joinProgress.is-error {
  border-color: rgb(var(--danger-rgb) / 0.3);
  background: rgb(var(--danger-strong-rgb) / 0.1);
}

.lobbyRoomsCard {
  width: 100%;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
  animation: fadeSlideIn 0.5s ease 0.2s both;
}

.eventSuggestedRoom {
  width: 100%;
  margin: 12px 0 0;
}

.lobbyAfterForm {
  width: 100%;
  min-width: 0;
}

.lobbyOnlineCard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  max-height: min(420px, calc(100dvh - var(--titlebar-height) - 180px));
  overflow: hidden;
  animation: fadeSlideIn 0.5s ease 0.15s both;
}

.lobbyOnlineHeader {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  gap: 10px;
}

.lobbyOnlineTitle {
  margin: 0;
}

.lobbyOnlineHeaderDot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.lobbyOnlineUsersList {
  min-height: 0;
  margin-top: 8px;
  padding-right: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.lobbyOnlineEmpty {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 18px 8px;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.lobbyOnlineCard .onlineUserPresenceDot {
  border-color: var(--card-strong);
}

.lobbyOnlineUserStatus {
  appearance: none;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  font-family: inherit;
  text-align: left;
}

.lobbyOnlineUserStatus:disabled {
  opacity: 1;
  /* A label that is not a room link lets the click through to the row, which opens the profile card. */
  pointer-events: none;
}

.lobbyOnlineUserStatus.isRoomLink {
  color: var(--accent-link);
  cursor: pointer;
}

.lobbyOnlineUserStatus.isRoomLink:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lobbyOnlineUserStatus.isRoomLink:focus-visible {
  outline: none;
  box-shadow: 0 1px 0 var(--accent);
}

.eventSuggestedRoomBody {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.eventSuggestedRoomBody strong {
  font-size: 14px;
  color: var(--primary);
}

.eventSuggestedRoomBody p {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

@media (min-width: 801px) and (min-height: 700px) {
  body:not(.mobile-web-mode) #lobbyView.view.active {
    display: flex;
    justify-content: safe center;
    padding: 24px 0 48px;
    overflow-y: auto;
  }

  body:not(.mobile-web-mode) #lobbyView .lobbyHeader {
    margin: 0 0 28px;
  }
}

@media (max-width: 800px) {
  .lobbyColumns {
    grid-template-columns: minmax(0, 440px);
    width: min(440px, calc(100% - 32px));
  }

  .lobbyOnlineCard {
    max-height: none;
  }
}

/* ─── TOP BAR (room view) ─── */
.topBar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 12px;
  flex-shrink: 0;
  backdrop-filter: blur(16px);
}

.topBarLeft {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.topBarRight {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Connection state pill */
.connStatePill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
  white-space: nowrap;
}

.connDot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition:
    background var(--transition),
    box-shadow var(--transition);
}

/* State variants */
.connStatePill[data-state="disconnected"] .connDot {
  background: var(--muted);
}
.connStatePill[data-state="connecting"] {
  border-color: rgb(var(--warn-rgb) / 0.4);
  color: var(--warn);
}
.connStatePill[data-state="connecting"] .connDot {
  background: var(--warn);
  animation: dotBlink 0.8s ease-in-out infinite;
}
.connStatePill[data-state="connected"] {
  border-color: rgb(var(--success-rgb) / 0.22);
  background: rgb(var(--success-rgb) / 0.08);
  color: var(--success-text);
}
.connStatePill[data-state="connected"] .connDot {
  background: var(--success);
}
.connStatePill[data-state="reconnecting"] {
  border-color: rgb(var(--warn-rgb) / 0.4);
  color: var(--warn);
}
.connStatePill[data-state="reconnecting"] .connDot {
  background: var(--warn);
  animation: dotBlink 0.5s ease-in-out infinite;
}
.connStatePill[data-state="error"] {
  border-color: rgb(var(--danger-rgb) / 0.4);
  color: var(--danger);
}
.connStatePill[data-state="error"] .connDot {
  background: var(--danger);
}

.topRoomName {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.topRoomName svg {
  opacity: 0.5;
  flex-shrink: 0;
}

.topInviteBtn {
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--primary-soft);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.topInviteBtn:hover {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.topInviteBtn:active {
  transform: scale(0.96);
}

.topInviteBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.reconnectBtn {
  background: var(--warn-soft) !important;
  border-color: rgb(var(--warn-rgb) / 0.4) !important;
  color: var(--warn) !important;
  animation: fadeIn 0.2s ease;
}

.reconnectBtn:hover {
  background: rgb(var(--warn-rgb) / 0.25) !important;
}

/* ─── MAIN ROOM LAYOUT ─── */
.layout {
  --layout-left-width: 280px;
  --layout-right-width: 330px;
  /* The left column can be dragged between 200px and 480px (--sidebar-width) as long as the middle
     column keeps 420px next to the right column's default width. */
  --layout-left-actual: clamp(200px, var(--sidebar-width, var(--layout-left-width)),
    min(480px, 100% - var(--layout-right-width) - 420px));
  display: grid;
  /* The right column can be dragged wider (--chat-panel-width), never narrower than its default and
     never so wide that the middle column drops under 420px; past 640px it stops growing. */
  grid-template-columns: var(--layout-left-actual) 1fr clamp(var(--layout-right-width),
    var(--chat-panel-width, var(--layout-right-width)), min(640px, 100% - var(--layout-left-actual) - 420px));
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.roomLayout {
  height: 100%;
}

/* ─── LEFT SIDEBAR ─── */
.leftColumn {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
  padding: 12px;
  background: var(--sidebar-bg);
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}

.sidebarSection {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sidebarSectionHeader {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  gap: 8px;
}

.sidebarSectionTitle {
  min-width: 0;
  margin: 0;
}

.sidebarSectionDivider {
  flex: 0 0 1px;
  height: 1px;
  margin: 1px 0;
  background: var(--border);
}

.roomSwitcherOpenBtn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.roomSwitcherOpenBtn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.roomSwitcherOpenBtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.roomSwitcherOpenBtn:active {
  transform: scale(0.96);
}

.roomSwitcherOpenBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.onlineUsersCount {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgb(var(--border-rgb) / 0.1);
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.roomsListSidebar {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
  align-content: start;
}

.presenceUsersList {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  gap: 10px;
  padding-right: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.presenceUserGroup {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-width: 0;
}

.presenceUserGroupHeader {
  min-height: 26px;
}

.presenceUsersGroupList {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.presenceOfflineGroup {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.onlineUserRow {
  display: flex;
  flex: 0 0 44px;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.onlineUserRow:hover {
  background: var(--surface-hover);
}

.onlineUserRow.isCurrentUser {
  background: transparent;
}

.onlineUserAvatarWrap {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}

.onlineUserAvatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, var(--card-strong));
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  user-select: none;
}

.onlineUserAvatarImg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.onlineUserPresenceDot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--sidebar-bg);
  border-radius: 50%;
  background: var(--status-offline);
}

.onlineUserPresenceDot.online {
  background: var(--success);
}

.onlineUserPresenceDot.idle {
  background: var(--status-away);
}

.onlineUserPresenceDot.offline {
  background: var(--status-offline);
}

.onlineUserRow.isOffline {
  opacity: 0.58;
}

.onlineUserRow.isOffline .onlineUserAvatar {
  filter: grayscale(0.45);
}

.onlineUserRow.isOffline .onlineUserName,
.onlineUserRow.isOffline .onlineUserStatus {
  color: var(--muted);
}

.onlineUserMeta {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 2px;
}

.onlineUserNameLine,
.onlineUserSecondary {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
}

.onlineUserName {
  overflow: hidden;
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onlineUserSelfLabel {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 500;
}

.onlineUserStatus {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onlineUserVoiceIcon {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
}

.onlineUserContextMenu {
  position: fixed;
  z-index: 240;
  display: grid;
  width: max-content;
  min-width: 180px;
  max-width: calc(100vw - 16px);
  padding: 5px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
  animation: fadeIn 0.12s ease-out;
  isolation: isolate;
}

.onlineUserContextMenu.hidden {
  display: none !important;
}

.onlineUserContextMenuAction {
  appearance: none;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.onlineUserContextMenuAction:hover,
.onlineUserContextMenuAction:focus-visible {
  outline: none;
  background: var(--surface-hover);
}

.onlineUserContextMenuAction:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
}

.onlineUserContextMenuAction:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.onlineUserContextMenuAction:active {
  transform: scale(0.98);
}

/* ─── CENTER: PARTICIPANT GRID ─── */
.centerColumn {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg);
  overflow: hidden;
  padding: 12px;
}

.participantGrid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--participant-grid-cols, 3), minmax(0, 1fr));
  grid-auto-rows: auto;
  align-content: center;
  justify-content: center;
  justify-items: stretch;
  gap: 12px;
  overflow-y: auto;
  padding: 4px 2px;
  --participant-grid-cols: 3;
  --participant-count: 0;
  --participant-card-min-height: clamp(140px, 22vh, 240px);
  --participant-avatar-size: clamp(54px, 7vw, 96px);
  --participant-name-size: clamp(12px, 1.1vw, 14px);
}

.participantGrid.isEmpty {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.participantGrid:not(.isEmpty):not(.compact) {
  align-content: center;
}

.participantGrid.compact:not(.isEmpty) {
  align-content: start;
}

.participantGrid.count-1 {
  place-content: center;
  grid-template-columns: minmax(280px, min(720px, 100%));
}

.participantGrid.count-2,
.participantGrid.count-3,
.participantGrid.count-4 {
  align-content: center;
}

.participantGrid.compact {
  --participant-card-min-height: clamp(110px, 14vh, 170px);
  --participant-avatar-size: clamp(40px, 4.5vw, 64px);
  --participant-name-size: clamp(10px, 0.95vw, 11px);
  gap: 8px;
}

/* Participant tile card */
.participantCard {
  display: block;
  width: 100%;
  min-height: var(--participant-card-min-height, clamp(140px, 22vh, 240px));
  aspect-ratio: 16 / 9;
  max-height: min(42vh, 420px);
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  transition:
    border-color 0.1s ease,
    box-shadow 0.1s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.participantReactionLayer {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  contain: layout paint;
  isolation: isolate;
}

.participantReaction {
  --reaction-lane: 0;
  position: absolute;
  left: 50%;
  bottom: 10%;
  display: block;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: clamp(28px, 4.8vw, 52px);
  line-height: 1;
  opacity: 0;
  user-select: none;
  backface-visibility: hidden;
  filter: drop-shadow(0 5px 9px rgb(var(--shadow-rgb) / 0.42));
  transform-origin: 50% 50%;
  transform: translate3d(calc(-50% + (var(--reaction-lane) * 34px)), 26px, 0) scale(0.82);
  animation: participantReactionFloat 2s cubic-bezier(0.2, 0.72, 0.28, 1) forwards;
  will-change: transform, opacity;
}

.participantReactionImageWrap {
  width: clamp(44px, 6vw, 64px);
  height: clamp(44px, 6vw, 64px);
}

.participantReactionImage {
  width: 100%;
  height: 100%;
}

@keyframes participantReactionFloat {
  0% {
    opacity: 0;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 34px)), 26px, 0) scale(0.82);
  }

  9% {
    opacity: 1;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 34px)), 12px, 0) scale(1);
  }

  76% {
    opacity: 1;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 34px)), -52px, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 34px)), -104px, 0) scale(1.08);
  }
}

.screenTheaterTile .participantReaction {
  bottom: 6px;
  font-size: 26px;
  animation-name: participantReactionFloatTheater;
}

.screenTheaterTile .participantReactionImageWrap {
  width: 38px;
  height: 38px;
}

@keyframes participantReactionFloatTheater {
  0% {
    opacity: 0;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 24px)), 16px, 0) scale(0.84);
  }

  9% {
    opacity: 1;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 24px)), 6px, 0) scale(1);
  }

  76% {
    opacity: 1;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 24px)), -20px, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 24px)), -46px, 0) scale(1.06);
  }
}

.participantGrid.count-1 .participantCard {
  max-height: min(52vh, 480px);
  --participant-avatar-size: clamp(64px, 9vw, 112px);
}

.participantTileStage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.participantCard:hover {
  border-color: var(--border-hover);
}

.participantMenuTrigger {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: rgb(var(--bg-deep-rgb) / 0.72);
  color: rgb(var(--surface-rgb) / 0.86);
  cursor: pointer;
  opacity: 0.9;
  transition: opacity var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

/* Pointer users see the menu trigger on the tile they are over; touch and keyboard always reach it. */
@media (hover: hover) and (pointer: fine) {
  .participantCard .participantMenuTrigger {
    opacity: 0;
  }

  .participantCard:hover .participantMenuTrigger,
  .participantCard:focus-within .participantMenuTrigger {
    opacity: 0.9;
  }
}

.participantCard .participantMenuTrigger:hover,
.participantCard .participantMenuTrigger:focus-visible,
.participantCard .participantMenuTrigger[aria-expanded="true"] {
  opacity: 1;
  color: var(--text);
  background: rgb(var(--card-rgb) / 0.95);
}

.participantMenuTrigger:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.participantMenuTriggerIcon {
  position: relative;
  display: block;
}

.participantMenuTriggerIcon::before,
.participantMenuTriggerIcon::after,
.participantMenuTriggerIcon {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.participantMenuTriggerIcon::before,
.participantMenuTriggerIcon::after {
  position: absolute;
  top: 0;
}

.participantMenuTriggerIcon::before {
  left: -5px;
}

.participantMenuTriggerIcon::after {
  left: 5px;
}

body.event-special-border .participantCard {
  border-color: rgba(212, 160, 23, 0.45);
  box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.15);
}

body.event-special-border .participantCard:hover {
  border-color: rgba(242, 201, 76, 0.72);
  box-shadow:
    0 0 0 1px rgba(242, 201, 76, 0.22),
    0 0 18px rgba(212, 160, 23, 0.15);
}

body.event-special-border .participantCard.speaking {
  border-color: var(--accent);
}

body.event-special-border .participantCard.speaking.screenSharing {
  border-color: var(--accent);
}

.participantCard.speaking {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* The LIVE badge carries the sharing state; the tile itself only gets a quiet red edge. */
.participantCard.screenSharing {
  border-color: rgb(var(--danger-rgb) / 0.38);
}

.participantCard.speaking.screenSharing {
  border-color: var(--accent);
}

.screenShareTile {
  display: block;
  width: 100%;
  min-height: var(--participant-card-min-height, clamp(140px, 22vh, 240px));
  aspect-ratio: 16 / 9;
  max-height: min(42vh, 420px);
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-hover);
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
  color: var(--text);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.screenShareTile:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.screenShareTile:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.screenShareTile.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.screenShareTileLiveBadge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  pointer-events: none;
}

.screenShareTileWatchingBadge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--accent-fill);
  border: 0;
  color: var(--on-accent-fill);
  font-size: var(--text-2xs);
  font-weight: 600;
  pointer-events: none;
}

.screenViewerCountBadge {
  position: absolute;
  top: 34px;
  left: 8px;
  z-index: 3;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgb(var(--bg-deep-rgb) / 0.72);
  border: 0;
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.screenShareTileStage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.screenShareTileCta {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--accent-fill);
  color: var(--on-accent-fill);
  font-size: var(--text-sm);
  font-weight: 600;
  pointer-events: none;
  transition: background-color var(--transition-fast);
}

.screenShareTile:hover .screenShareTileCta {
  background: var(--accent-fill-hover);
}

.screenShareTileName {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 4;
  max-width: min(78%, calc(100% - 88px));
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgb(var(--shadow-rgb) / 0.55);
  font-size: var(--participant-name-size, 12px);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}

.participantGrid.count-1 .screenShareTile {
  max-height: min(52vh, 480px);
}

.participantLiveBadge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  border: 0;
  background: var(--danger-action-hover);
  color: var(--on-danger);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.participantLiveDot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--on-danger);
  animation: liveDotPulse 1.8s ease-in-out infinite;
}

@keyframes liveDotPulse {
  0%,
  100% {
    opacity: 0.75;
  }

  50% {
    opacity: 1;
  }
}
/* Speaking ring */
.participantRing {
  position: relative;
  width: var(--participant-avatar-size, 56px);
  height: var(--participant-avatar-size, 56px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inner glow ring – hidden by default */
.participantRing::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition:
    border-color 0.1s ease,
    box-shadow 0.1s ease;
  pointer-events: none;
}

/* Outer expanding pulse ring */
.participantRing::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  pointer-events: none;
}

.participantCard.speaking .participantRing::before {
  border-color: var(--accent);
  /* box-shadow:
    0 0 0 2px var(--accent-soft),
    0 0 16px var(--accent-glow); */
  /* animation: speakRing 0.5s ease-in-out infinite alternate; */
}

 /*body.event-special-border .participantCard.speaking .participantRing::before {
  box-shadow: 0 0 0 2px var(--accent-soft); */
  /* animation: speakRingNoGlow 0.5s ease-in-out infinite alternate; 
}
*/
body.event-special-border .participantCard.speaking .participantRing::after {
  animation: speakPulseNoGlow 1.4s ease-out infinite;
}

.participantCard.speaking .participantRing::after {
  animation: speakPulse 1.4s ease-out infinite;
}

.participantAvatar {
  width: var(--participant-avatar-size, 56px);
  height: var(--participant-avatar-size, 56px);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, var(--card-strong));
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, calc(var(--participant-avatar-size, 56px) * 0.34), 28px);
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  transition: opacity 0.2s ease;
  user-select: none;
  overflow: hidden;
}

.participantAvatarImg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.participantCard.speaking .participantAvatar {
  border-color: var(--accent);
  /* transform: scale(1.08);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 0 10px var(--accent-glow); */
}

body.event-special-border .participantCard.speaking .participantAvatar {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.participantCard.muted .participantAvatar,
.participantCard.deafened .participantAvatar {
  opacity: 0.7;
}

.participantName.participantNameBadge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 4;
  max-width: min(72%, calc(100% - 88px));
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgb(var(--shadow-rgb) / 0.5);
  border: 0;
  font-size: var(--participant-name-size, 12px);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: color 0.2s ease;
}

.participantNameScroll {
  display: inline;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participantNameText,
.selfTag,
.participantStatusLabel {
  display: inline;
}

.participantCard.speaking .participantName.participantNameBadge {
  color: color-mix(in srgb, var(--accent) 45%, var(--text));
}

body.event-special-border .participantCard.speaking .participantName.participantNameBadge {
  text-shadow: none;
}

.selfTag {
  font-size: var(--text-xs);
  font-weight: 400;
  color: rgb(var(--surface-rgb) / 0.62);
}

.participantStatusLabel {
  font-size: var(--text-xs);
  font-weight: 500;
  color: rgb(var(--surface-rgb) / 0.55);
  margin-left: 4px;
  flex-shrink: 0;
  pointer-events: none;
}

.nameKaan {
  color: #f1c40f !important;
}

.participantBadges {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  gap: 4px;
  align-items: center;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}

.participantBadges:empty {
  display: none;
}

.participantCard .participantBadges .partBadge:not(.localMutedBadge) {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.participantCard .participantBadges .partBadge svg {
  width: 15px;
  height: 15px;
}

.partBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgb(var(--bg-deep-rgb) / 0.72);
  border: 0;
  color: var(--text-secondary);
  font-size: 14px;
  transition: background var(--transition);
}

.partBadge.mutedBadge,
.partBadge.deafBadge {
  background: rgb(var(--danger-strong-rgb) / 0.85);
  color: var(--danger-text);
}
.partBadge.screenBadge {
  background: rgb(var(--bg-deep-rgb) / 0.72);
  color: var(--text);
}
.participantCard.localMuted {
  border-color: rgb(var(--warn-rgb) / 0.32);
}
.partBadge.localMutedBadge {
  position: absolute;
  top: 8px;
  left: 44px;
  z-index: 3;
  box-sizing: border-box;
  width: auto;
  max-width: calc(100% - 60px);
  min-width: 32px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--warn-soft);
  border-color: rgb(var(--warn-rgb) / 0.38);
  color: var(--warn-text);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.participantGrid.compact .participantCard .participantBadges .partBadge:not(.localMutedBadge) {
  width: 26px;
  height: 26px;
  font-size: 13px;
}

.participantGrid.compact .participantCard .participantBadges .partBadge svg {
  width: 14px;
  height: 14px;
}

.participantGrid.compact .partBadge.localMutedBadge {
  min-width: 28px;
  height: 20px;
  font-size: 9px;
}

/* ── Camera video inside participant card ── */
.participantCameraVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  border-radius: var(--radius);
  background: var(--media-bg);
}

/* Aynalama yalnızca isteğe bağlı yerel önizlemeye uygulanır; yayına yansımaz. */
.participantCameraVideo.participantCameraVideoLocal.participantCameraVideoMirrored {
  transform: scaleX(-1);
}

/* When camera is on: hide the center avatar stage */
.participantCard.cameraOn .participantTileStage {
  display: none;
}

/* Keep name badge visible over camera video */
.participantCard.cameraOn .participantName.participantNameBadge {
  background: rgb(var(--shadow-rgb) / 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3;
}

/* Keep status badges visible over camera video */
.participantCard.cameraOn .participantBadges {
  z-index: 3;
}

/* Theater strip tiles with camera video */
.screenTheaterTile.cameraOn .screenTheaterAvatar {
  display: none;
}

.screenTheaterTile.cameraOn .participantName.participantNameBadge {
  background: rgb(var(--shadow-rgb) / 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3;
}

/* Camera button – active state */
.cameraFocusTrigger,
.cameraFocusWatchShare {
  position: absolute;
  z-index: 5;
  border: 1px solid rgb(var(--surface-rgb) / 0.3);
  border-radius: 8px;
  background: rgb(var(--shadow-rgb) / 0.7);
  color: var(--text);
  cursor: pointer;
}

.cameraFocusTrigger {
  top: 8px;
  left: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.cameraFocusWatchShare {
  right: 6px;
  top: 6px;
  padding: 6px 8px;
  font-size: 11px;
}

.cameraFocusTrigger:focus-visible,
.cameraFocusWatchShare:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.participantCard.cameraOn .participantCameraVideo,
.screenTheaterTile.cameraOn .participantCameraVideo {
  cursor: pointer;
}

.centerColumn.cameraFocusMode .participantGrid,
.centerColumn.cameraFocusMode .screenTheater:not(.cameraTheater),
.screenPreview.screenPresentationSuspended {
  display: none !important;
}

.cameraTheaterMain {
  position: relative;
}

.cameraTheater .screenTheaterTopbar {
  position: relative;
  z-index: 1;
}

.cameraTheaterMain .participantCameraVideo {
  object-fit: contain;
  border-radius: 0;
}

@media (max-width: 600px) {
  .screenTheaterTopbar {
    flex-wrap: wrap;
  }
}

.barBtn.cameraBarBtn.camera-active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Stream bar button – active state (streaming) */
.barBtn.streamBarBtn.stream-active {
  color: var(--danger);
  background: rgb(var(--danger-rgb) / 0.12);
}

.participantContextMenu {
  position: fixed;
  width: 236px;
  z-index: 200;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hover);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
  color: var(--text);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  animation: fadeIn 0.12s ease;
}

.participantMenuHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.participantMenuTitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-base);
  font-weight: 600;
}

.participantMenuClose {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.participantMenuClose:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.participantMenuClose:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.participantMenuMutedBadge {
  justify-self: start;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgb(var(--warn-rgb) / 0.35);
  background: var(--warn-soft);
  color: var(--warn-text);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-fast),
    visibility var(--transition-fast);
}

.participantMenuMutedBadge.isVisible {
  opacity: 1;
  visibility: visible;
}

.participantMenuSliderRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.participantMenuSliderRow strong {
  color: var(--text);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.participantMenuVolume {
  accent-color: var(--primary);
}

.participantMenuActions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: 0 -4px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.participantMenuAction {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.participantMenuAction:hover,
.participantMenuAction:focus-visible {
  outline: none;
  background: var(--surface-hover);
}

.participantMenuAction:focus-visible {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent);
}

.participantMenuVoice {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.participantMenuAction.isDanger {
  color: var(--danger);
}

.participantMenuCheckItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.participantMenuCheckBox {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border-hover);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.participantMenuCheckItem.isChecked .participantMenuCheckBox {
  border-color: var(--primary);
  background: var(--primary);
}

.participantMenuCheckItem.isChecked .participantMenuCheckBox::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.participantMenuAction.isDanger:hover,
.participantMenuAction.isDanger:focus-visible {
  background: var(--danger-soft);
}

/* ─── RIGHT COLUMN ─── */
.rightColumn {
  position: relative;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--sidebar-bg);
  overflow: hidden;
  min-height: 0;
}

/* Drag handles on the side columns' inner edges (the right column's left edge, the left column's
   right edge); the line shows on hover, focus and while dragging. */
.chatPanelResizer,
.sidebarResizer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  width: 6px;
  cursor: col-resize;
  touch-action: none;
}
.sidebarResizer {
  left: auto;
  right: 0;
}
.chatPanelResizer::after,
.sidebarResizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: transparent;
  transition: background-color .15s ease;
}
.sidebarResizer::after {
  left: auto;
  right: 0;
}
.chatPanelResizer:hover::after,
.chatPanelResizer:focus-visible::after,
body.is-resizing-chat-panel .chatPanelResizer::after,
.sidebarResizer:hover::after,
.sidebarResizer:focus-visible::after,
body.is-resizing-sidebar .sidebarResizer::after {
  background: var(--accent);
}
.chatPanelResizer:focus-visible,
.sidebarResizer:focus-visible {
  outline: none;
}
body.is-resizing-chat-panel,
body.is-resizing-sidebar {
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
}
/* These layouts stack the columns or size them on their own, so there is nothing to drag. */
@media (max-width: 768px), (max-height: 560px) and (orientation: landscape) and (min-width: 641px) {
  .chatPanelResizer,
  .sidebarResizer { display: none; }
}
body.mobile-web-mode .chatPanelResizer,
body.mobile-web-mode .sidebarResizer { display: none; }

/* ─── TAB BAR ─── */
.tabBar {
  flex-shrink: 0;
  display: flex;
  gap: 2px;
  height: 40px;
  padding: 0 6px;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.tabBtn {
  flex: 1;
  border: 0;
  padding: 0 4px;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  position: relative;
}

.tabBtn svg {
  opacity: 0.75;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.tabBtn:hover {
  color: var(--text);
}
.tabBtn:hover svg {
  opacity: 1;
}
.tabBtn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 75%, transparent);
}
.tabBtn.active {
  color: var(--text);
  font-weight: 600;
}
.tabBtn.active svg {
  opacity: 1;
}
/* One indicator: an accent underline that sits on the tab bar's bottom edge. */
.tabBtn.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}

/* ─── TAB CONTENT ─── */
.tabContent {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
}

.tabContent .tabPane {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  width: 100%;
  animation: fadeIn 0.2s ease;
}

.tabContent .tabPane.active {
  display: flex;
  flex-direction: column;
}

/* ─── CHAT ─── */
.chatPane {
  gap: 8px;
  position: relative;
}

.chatPane.is-attachment-drag-over::after {
  content: "Dosyayı sohbete eklemek için bırak";
  position: absolute;
  inset: 8px;
  z-index: 40;
  display: grid;
  place-items: center;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 10%, rgb(var(--bg-deep-rgb) / 0.9));
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.chatToolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.chatGalleryBtn {
  flex: 0 0 auto;
  min-height: var(--control-h);
  height: var(--control-h);
}

.chatAttachmentComposer {
  display: block;
}
.chatAttachmentComposer.is-hidden {
  display: none;
}

.chatMessagesViewport {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.chatDateDivider {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  margin: 12px 8px 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.4;
}
.chatDateDivider::before,
.chatDateDivider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--border);
}
.chatDateDivider > span {
  white-space: nowrap;
}
.chatOlderHistoryLoader {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: calc(100% - 24px);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-strong, #202127);
  color: var(--muted);
  font-size: var(--text-xs);
  white-space: nowrap;
  pointer-events: none;
}
.chatOlderHistoryLoader[hidden] {
  display: none;
}

.chatMessages {
  min-height: 0;
  overflow-y: auto;
  overflow-anchor: none;
  border-radius: var(--radius-sm);
  /* border: 1px solid var(--border); */
  padding: 6px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  position: relative;
  z-index: 2;
}

/* Only a successfully loaded, empty room gets the empty-chat hint. */
.chatMessages[data-history-state="ready"]:empty::before {
  content: "Henüz mesaj yok. Sohbeti başlatan sen ol.";
  margin: auto;
  padding: 0 24px;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.chatMessages[data-history-state="loading"]:empty::before {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  margin: auto;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: chat-history-spin 0.8s linear infinite;
}

@keyframes chat-history-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .chatMessages[data-history-state="loading"]:empty::before {
    animation: none;
  }
}

.chatNewMessagesBtn {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 5;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-strong) 78%, var(--accent));
  box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.3);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.chatNewMessagesBtn:hover,
.chatNewMessagesBtn:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 80%, transparent);
  background: color-mix(in srgb, var(--card-strong) 64%, var(--accent));
}

.chatNewMessagesBtn.hidden {
  display: none;
}

.chatGameBtn {
  top: 8px;
  bottom: auto;
  min-height: 32px;
}

.chatMessages.has-pinned-game {
  overflow-y: hidden;
  padding-top: 44px;
}

.chatMessage.is-game-pinned {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.chatMessage {
  position: relative;
  /* Timeline rows must retain their content height inside the scrolling flex column. */
  flex-shrink: 0;
  padding: 5px 8px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  word-break: break-word;
  font-size: var(--text-md);
  line-height: 1.4;
}
.chatMessage:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent);
}
.chatMessageWithAvatar {
  padding-left: 54px;
  min-height: 48px;
}
.chatMessageAvatar {
  border: 0;
  padding: 0;
  font-family: inherit;
  position: absolute;
  top: 6px;
  left: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2, #292d35);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  contain: layout paint;
}
.chatMessageAvatar:not(:disabled) {
  cursor: pointer;
}
.chatMessageAvatar.hasCosmDeco {
  contain: layout;
  overflow: visible;
}
.chatMessageAvatar:focus-visible,
.chatMessageAuthor:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chatMessageAvatar > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
/* Continuations keep independent actions while reading as one compact message group.
   An unread divider or other timeline insert restores the next message's header. */
.chatMessage:not(.chatSearchHidden) + .chatMessageGrouped {
  margin-top: -6px;
  padding-top: 1px;
  padding-bottom: 1px;
  min-height: 0;
}
.chatMessage:not(.chatSearchHidden) + .chatMessageGrouped > .chatMessageHeader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.chatMessage a {
  color: var(--accent-link);
  text-decoration: none;
}
.chatMessage a:hover {
  text-decoration: underline;
}
.chatImage {
  display: block;
  max-width: 220px;
  max-height: 220px;
  width: auto;
  height: auto;
  margin-top: 6px;
  border-radius: var(--radius-xs);
  border: 1px solid rgb(var(--border-rgb) / 0.12);
  background: rgb(var(--shadow-rgb) / 0.2);
  cursor: zoom-in;
  object-fit: cover;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}
.chatImage:hover {
  transform: scale(1.02);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.chatImage.broken {
  min-width: 120px;
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
  cursor: default;
}
.chatVideoPlayer {
  position: relative;
  display: block;
  isolation: isolate;
  width: min(440px, 100%);
  aspect-ratio: 16 / 9;
  margin-top: 6px;
  overflow: hidden;
  border-radius: var(--radius-xs);
  outline: 1px solid rgb(255 255 255 / 0.1);
  background: var(--media-bg);
  color: #fff;
  user-select: none;
}
.chatVideoPlayer .chatVideoAttachment {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}
.chatVideoPlaceholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  padding: 12px;
  background: radial-gradient(ellipse at 50% 35%, rgb(255 255 255 / 0.06), transparent 70%);
  pointer-events: none;
}
.chatVideoPlaceholder strong { font-size: 13px; font-weight: 600; }
.chatVideoPlaceholder span { color: rgb(255 255 255 / 0.55); font-size: 11px; }
.chatVideoPlayer.has-frame .chatVideoPlaceholder { display: none; }
.chatVideoButton {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 0;
  border-radius: 5px;
  color: rgb(255 255 255 / 0.85);
  background: transparent;
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease;
}
.chatVideoButton svg { width: 20px; height: 20px; }
.chatVideoButton:hover { color: #fff; background: rgb(255 255 255 / 0.12); }
.chatVideoButton:active { transform: scale(0.96); }
.chatVideoPlayer :is(button, input):focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.chatVideoCenterPlay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.65);
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.25);
  color: #fff;
}
.chatVideoCenterPlay svg { width: 25px; height: 25px; margin-left: 3px; }
.chatVideoCenterPlay:hover { background: rgb(0 0 0 / 0.85); }
.chatVideoControls {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px 6px 5px;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.85));
  transition: opacity 120ms ease;
}
.chatVideoPlayer.is-playing:not(:hover):not(:focus-within) .chatVideoControls {
  opacity: 0;
  pointer-events: none;
}
.chatVideoPlayer [hidden] { display: none; }
.chatVideoTime { flex: 0 0 auto; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chatVideoSeek,
.chatVideoVolume {
  min-width: 0;
  height: 24px;
  margin: 0 3px;
  padding: 0;
  accent-color: var(--accent, #d61f3c);
  cursor: pointer;
}
.chatVideoTimeline { position: relative; flex: 1 1 32px; min-width: 24px; height: 24px; margin: 0 3px; }
.chatVideoTrack {
  position: absolute;
  inset: 10px 0 auto;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(190 190 190 / 0.18);
  pointer-events: none;
}
.chatVideoBuffered { position: absolute; inset: 0; }
.chatVideoBufferedRange { position: absolute; top: 0; height: 100%; background: rgb(190 190 190 / 0.5); }
.chatVideoPlayed { position: absolute; inset: 0 auto 0 0; background: var(--accent, #d61f3c); }
.chatVideoPlayer .chatVideoSeek {
  position: absolute;
  inset: 0;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  border: 0;
  background: transparent;
}
.chatVideoSeek::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.chatVideoSeek::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 8px;
  margin-top: -2px;
  border: 0;
  border-radius: 50%;
  background: var(--accent, #d61f3c);
  opacity: 0;
}
.chatVideoSeek::-moz-range-track { height: 4px; background: transparent; }
.chatVideoSeek::-moz-range-progress { background: transparent; }
.chatVideoSeek::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--accent, #d61f3c); opacity: 0; }
.chatVideoSeek:disabled { cursor: default; }
.chatVideoVolumeControl { position: relative; flex: 0 0 32px; width: 32px; height: 32px; }
.chatVideoVolumePopup {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 32px;
  height: 88px;
  border-radius: 5px;
  background: rgb(0 0 0 / 0.8);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.chatVideoVolumeControl:hover .chatVideoVolumePopup,
.chatVideoVolumeControl:focus-within .chatVideoVolumePopup { visibility: visible; opacity: 1; pointer-events: auto; }
.chatVideoVolumeTrack {
  position: absolute;
  inset: 10px 13px;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(190 190 190 / 0.25);
  pointer-events: none;
}
.chatVideoVolumeFill { position: absolute; inset: auto 0 0; background: var(--accent, #d61f3c); }
.chatVideoPlayer .chatVideoVolume {
  position: absolute;
  inset: 10px 0;
  appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 32px;
  height: 68px;
  margin: 0;
  border: 0;
  background: transparent;
}
.chatVideoVolume::-webkit-slider-runnable-track { width: 6px; background: transparent; }
.chatVideoVolume::-webkit-slider-thumb { appearance: none; width: 6px; height: 0; opacity: 0; }
.chatVideoVolume::-moz-range-track { width: 6px; background: transparent; }
.chatVideoVolume::-moz-range-progress { background: transparent; }
.chatVideoVolume::-moz-range-thumb { width: 6px; height: 0; border: 0; opacity: 0; }
.chatVideoStatus {
  position: absolute;
  inset: auto 12px 52px;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 5px 8px;
  border-radius: 4px;
  background: rgb(0 0 0 / 0.8);
  color: #fff;
  font-size: 11px;
  pointer-events: none;
}
.chatVideoPlayer:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
@media (hover: none) {
  .chatVideoPlayer.is-playing:not(:hover):not(:focus-within) .chatVideoControls { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .chatVideoButton, .chatVideoControls { transition: none; }
  .chatVideoButton:active { transform: none; }
}

.chatSpoilerMedia {
  display: flex;
  width: min(280px, 100%);
  min-height: 132px;
  margin-top: 6px;
  overflow: hidden;
  align-items: stretch;
  justify-content: stretch;
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  border-radius: var(--radius-xs);
  background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 42%),
    rgb(var(--bg-deep-rgb) / 0.96);
}
.chatSpoilerReveal {
  display: grid;
  width: 100%;
  min-height: 132px;
  place-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
}
.chatSpoilerReveal strong {
  color: var(--accent-text);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.chatSpoilerReveal span {
  color: var(--muted);
  font-size: 11px;
}
.chatSpoilerReveal:hover,
.chatSpoilerReveal:focus-visible {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  outline: none;
}
.chatSpoilerMedia.is-revealed {
  min-height: 0;
  border: 0;
  background: transparent;
}
.chatSpoilerMedia.is-revealed .chatImage,
.chatSpoilerMedia.is-revealed .chatVideoPlayer {
  margin-top: 0;
}

.chatLocalUploadCard {
  display: grid;
  width: min(360px, 100%);
  margin-top: 6px;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius-sm);
  background: rgb(var(--card-rgb) / 0.9);
}
.chatLocalUploadCard.is-failed {
  border-color: rgb(var(--danger-rgb) / 0.45);
}
.chatLocalUploadPreview {
  position: relative;
  display: grid;
  width: 58px;
  height: 48px;
  overflow: hidden;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.chatLocalUploadPreview img,
.chatLocalUploadPreview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chatLocalUploadCard.is-spoiler .chatLocalUploadPreview img,
.chatLocalUploadCard.is-spoiler .chatLocalUploadPreview video {
  filter: blur(9px);
  transform: scale(1.16);
}
.chatLocalUploadSpoiler {
  position: absolute;
  inset: auto 3px 3px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgb(var(--bg-deep-rgb) / 0.82);
  color: var(--on-media);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}
.chatLocalUploadIcon {
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.chatLocalUploadBody {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.chatLocalUploadName,
.chatLocalUploadCaption,
.chatLocalUploadError {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chatLocalUploadName {
  color: var(--text);
  font-size: 11px;
}
.chatLocalUploadCaption {
  color: var(--muted);
  font-size: 10px;
}
.chatLocalUploadStatus {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}
.chatLocalUploadPercentage {
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
.chatLocalUploadProgress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(var(--border-rgb) / 0.14);
}
.chatLocalUploadProgressFill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.12s linear;
}
.chatLocalUploadError {
  color: var(--danger-text);
  font-size: 9px;
}
.chatLocalUploadActions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chatLocalUploadActions:empty {
  display: none;
}
.chatLocalUploadActions button {
  padding: 4px 7px;
  border: 1px solid rgb(var(--border-rgb) / 0.2);
  border-radius: 5px;
  background: rgb(var(--surface-rgb) / 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 9px;
  white-space: nowrap;
}
.chatLocalUploadActions button:hover,
.chatLocalUploadActions button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  outline: none;
}
.chatVideoUploadPreview {
  background: var(--media-bg);
  object-fit: contain;
}

.chatFileUploadPreview {
  display: grid;
  min-height: 112px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.chatFileUploadPreview[hidden] {
  display: none;
}
.chatFileUploadPreview svg {
  width: 46px;
  height: 46px;
}
.chatFileUploadPreview strong {
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ─── Chat image upload (paste) preview card ─── */
.chatImageUploadRow.is-uploading {
  opacity: 0.92;
}
.chatImageUploadRow.is-sending {
  opacity: 0.95;
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
}
.chatImageUploadRow.is-error {
  border-color: rgb(var(--danger-rgb) / 0.35);
}
.chatImageUploadPrefix {
  display: inline;
}

.chatImageUploadCard {
  margin-top: 0;
  max-width: min(280px, 100%);
  border-radius: var(--radius-sm);
  border: 1px solid rgb(var(--border-rgb) / 0.12);
  background: rgb(var(--shadow-rgb) / 0.22);
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  position: relative;
}
.chatImageUploadCard.is-uploading {
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}
.chatImageUploadCard.chatImageUploadError {
  border-color: rgb(var(--danger-rgb) / 0.45);
  box-shadow: 0 0 0 1px rgb(var(--danger-rgb) / 0.12);
}

.chatImageUploadPreviewWrap {
  position: relative;
  display: block;
  max-height: 200px;
  background: rgb(var(--shadow-rgb) / 0.35);
}
.chatImageUploadPreview {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  opacity: 0.88;
}
.chatImageUploadRow.is-uploading .chatImageUploadPreview {
  opacity: 0.75;
}

.chatImageUploadSpinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(var(--bg-deep-rgb) / 0.45);
  pointer-events: none;
}
.chatImageUploadSpinner::after {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgb(var(--border-rgb) / 0.25);
  border-top-color: var(--accent);
  animation: chatImageUploadSpin 0.75s linear infinite;
}
.chatImageUploadSpinner.is-hidden {
  display: none;
}

@keyframes chatImageUploadSpin {
  to {
    transform: rotate(360deg);
  }
}

.chatImageUploadMeta {
  padding: 0 10px 10px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}
.chatImageUploadCard.chatImageUploadError .chatImageUploadMeta {
  color: var(--danger);
}

.chatImageUploadActions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px;
}
.chatImageUploadActions.is-hidden {
  display: none;
}

.chatImageUploadBtn {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgb(var(--border-rgb) / 0.2);
  cursor: pointer;
  background: rgb(var(--surface-rgb) / 0.05);
  color: var(--text-secondary);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.chatImageUploadBtn:hover {
  background: rgb(var(--surface-rgb) / 0.09);
  border-color: rgb(var(--border-rgb) / 0.35);
}
.chatImageUploadBtnPrimary {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent-text);
}
.chatImageUploadBtnPrimary:hover {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.chatImageUploadBtnGhost {
  background: transparent;
  color: var(--muted);
}

.chatMessage .meta {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
}
/* Metadata recedes: plain muted digits, no chip. */
.chatTimestamp {
  display: inline;
  margin-right: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chatMessageAuthor {
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 600;
}
.chatMessageBody {
  margin-top: 1px;
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
  font-size: var(--text-base);
  line-height: 1.45;
}
/* Game cards were sized for the narrow side panel; keep them there in the wide room chat. */
.chatGameMessage > .chatMessageBody,
.chatGameSetupMessage > * {
  max-width: var(--chat-game-card-max-width, 460px);
}
/* Text messages keep their line breaks; cards and previews inside them lay out as usual. */
.chatMessageText {
  white-space: pre-wrap;
}
.chatMessageText > :not(a, span, img, strong, em, u, s, code, blockquote, pre) {
  white-space: normal;
}

/* Chat markdown, shared by room chat and direct messages. */
:is(.chatMessageText, .dmText) :is(strong, em, u, s) {
  color: inherit;
}

:is(.chatMessageText, .dmText) strong {
  font-weight: 700;
}

.chatInlineCode,
.chatCodeBlock {
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-deep);
  font-family: var(--font-mono, ui-monospace, "Cascadia Mono", Consolas, monospace);
  font-size: 0.9em;
}

.chatInlineCode {
  padding: 1px 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chatCodeBlock {
  max-width: 100%;
  margin: 4px 0;
  padding: 8px 10px;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.45;
  user-select: text;
}

.chatQuote {
  margin: 2px 0;
  padding: 1px 0 1px 10px;
  border-left: 3px solid var(--border-hover);
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.chatSpoiler {
  padding: 0 3px;
  border-radius: var(--radius-xs);
  background: var(--text-secondary);
  color: transparent;
  cursor: pointer;
  user-select: none;
  transition: background 120ms cubic-bezier(0.2, 0, 0, 1);
}

.chatSpoiler:not(.is-revealed) * {
  visibility: hidden;
}

.chatSpoiler:not(.is-revealed):hover {
  background: var(--text);
}

.chatSpoiler:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.chatSpoiler.is-revealed {
  background: var(--surface-hover);
  color: inherit;
  cursor: auto;
  user-select: text;
}
/* Own messages: a thin accent rail, no filled bubble. */
.chatMessage.me {
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 0 6px 6px 0;
}

.chatMessageActions {
  position: absolute;
  top: 0;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  max-width: calc(100% - 8px);
  padding: 3px;
  overflow: hidden;
  flex-wrap: nowrap;
  white-space: nowrap;
  box-sizing: border-box;
  border-radius: 7px;
  background: var(--menu-bg);
  box-shadow:
    0 0 0 1px rgb(var(--border-rgb) / 0.12),
    0 2px 5px rgb(var(--shadow-rgb) / 0.24),
    0 8px 18px rgb(var(--shadow-rgb) / 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(calc(-50% + 2px));
  transform-origin: top right;
  transition-property: opacity, transform;
  transition-duration: 120ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
  z-index: 5;
}

.chatMessageActions.is-inside-message {
  top: 4px;
  transform: translateY(2px);
}

.chatMessage:hover .chatMessageActions,
.chatMessage:focus-within .chatMessageActions,
.chatMessage.is-reaction-picker-open .chatMessageActions {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%);
}

.chatMessage:hover .chatMessageActions.is-inside-message,
.chatMessage:focus-within .chatMessageActions.is-inside-message,
.chatMessage.is-reaction-picker-open .chatMessageActions.is-inside-message {
  transform: translateY(0);
}

.chatMessageActionBtn {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-width: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  transition-property: background-color, color, scale;
  transition-duration: 120ms;
  transition-timing-function: ease-out;
}

.chatMessageActionBtn:hover:not(:disabled),
.chatMessageActionBtn:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
}

.chatMessageActionBtn:focus-visible {
  box-shadow: var(--ring);
}

.chatMessageActionBtn:active:not(:disabled) {
  scale: 0.96;
}

.chatMessageActionBtn:disabled {
  opacity: 0.38;
  cursor: default;
}

.chatMessageActionIcon {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.chatQuickReactionBtn {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 15px;
}

.chatQuickReactionBtn::before {
  content: attr(data-emoji);
}

.chatQuickReactionBtn[hidden] {
  display: none;
}
.chatImageUploadCard.is-spoiler .chatImageUploadPreview {
  filter: blur(12px);
  transform: scale(1.08);
}

.chatDeleteBtn {
  color: var(--muted);
}
.chatMessage:hover {
  background: rgb(var(--surface-rgb) / 0.035);
}

.chatContextMenu {
  position: fixed;
  z-index: 10060;
  width: min(230px, calc(100vw - 16px));
  padding: 5px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
}

.chatContextMenuItem {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--text-md);
  text-align: left;
  cursor: pointer;
}

.chatContextMenuItem:hover,
.chatContextMenuItem:focus-visible {
  outline: none;
  background: var(--surface-hover);
}

.chatContextMenuItem:focus-visible {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent);
}

.chatContextMenuItem:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chatContextMenuItem.has-submenu {
  justify-content: space-between;
  gap: 12px;
}

.chatContextMenuArrow {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.chatContextMenuSeparator {
  height: 1px;
  margin: 5px 4px;
  background: rgb(var(--border-rgb) / 0.16);
}

.chatContextReactionSubmenu {
  position: fixed;
  z-index: 10061;
  width: min(212px, calc(100vw - 16px));
  padding: 5px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
}

.chatContextQuickReactions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgb(var(--border-rgb) / 0.16);
}

.chatContextMoreReactions {
  margin-top: 5px;
}

.chatContextReactionBtn {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
}

.chatContextReactionBtn:hover,
.chatContextReactionBtn:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.chatReactionPickerDialog {
  position: fixed;
  z-index: 10062;
  width: min(310px, calc(100vw - 16px));
  max-width: calc(100vw - 12px);
  max-height: calc(100vh - 12px);
  padding: 9px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgb(var(--border-rgb) / 0.22);
  border-radius: 12px;
  background: var(--popover-bg);
  box-shadow: 0 18px 46px rgb(var(--shadow-rgb) / 0.5);
  backdrop-filter: blur(18px);
}

.chatReactionPickerHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 2px 7px 7px;
  color: var(--text);
  font-size: 12px;
}

.chatReactionPickerClose {
  width: 28px;
  min-height: 28px;
  padding: 0;
  justify-content: center;
  font-size: 18px;
}

.chatReactionPickerGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  max-height: min(260px, calc(100vh - 80px));
  overflow-x: hidden;
  overflow-y: auto;
}

.chatReactionPickerGrid .chatContextReactionBtn {
  height: 38px;
  font-size: 20px;
}

.chatContextCoachmark {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
}

.chatContextCoachmarkHighlight {
  position: fixed;
  border: 2px solid var(--accent);
  border-radius: 9px;
  box-shadow: 0 0 0 9999px rgb(var(--bg-deep-rgb) / 0.68), 0 0 22px color-mix(in srgb, var(--accent) 42%, transparent);
  pointer-events: none;
}

.chatContextCoachmarkBubble {
  position: fixed;
  width: min(270px, calc(100vw - 16px));
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, rgb(var(--border-rgb) / 0.2));
  border-radius: 10px;
  background: var(--menu-bg);
  color: var(--text);
  box-shadow: 0 12px 32px rgb(var(--shadow-rgb) / 0.42);
  pointer-events: auto;
}

.chatContextCoachmarkBubble p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
}

.chatContextCoachmarkPointer {
  position: fixed;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, rgb(var(--elevated-rgb) / 0.96));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 40%, transparent);
}

.chatContextCoachmarkMouse {
  position: relative;
  width: 20px;
  height: 29px;
  overflow: hidden;
  border: 2px solid var(--text);
  border-radius: 10px 10px 9px 9px;
  transform: rotate(-12deg);
}

.chatContextCoachmarkMouse::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 12px;
  left: 50%;
  width: 1px;
  background: rgb(var(--surface-rgb) / 0.48);
}

.chatContextCoachmarkMouseRight {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 12px;
  border-radius: 0 8px 0 4px;
  background: var(--accent);
  animation: chat-context-right-click 1.15s ease-in-out infinite;
}

@keyframes chat-context-right-click {
  0%, 45%, 100% { opacity: 0.28; transform: scale(1); }
  58%, 72% { opacity: 1; transform: scale(0.84); transform-origin: top right; }
}

@media (prefers-reduced-motion: reduce) {
  .chatMessageActions,
  .chatMessageActionBtn {
    transition: none;
  }

  .chatMessageActionBtn:active:not(:disabled) {
    scale: 1;
  }

  .chatContextCoachmarkMouseRight {
    animation: none;
    opacity: 1;
  }
}

.chatContextCoachmarkDismiss {
  padding: 4px 8px;
  border: 1px solid rgb(var(--border-rgb) / 0.22);
  border-radius: 6px;
  background: rgb(var(--surface-rgb) / 0.06);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.chatDeleteBtn:hover:not(:disabled),
.chatDeleteBtn:focus-visible {
  background: rgb(var(--danger-rgb) / 0.25);
  color: var(--danger);
}

.chatUnreadDivider {
  width: 100%;
  padding: 4px 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
  color: var(--danger-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.chatUnreadDivider:hover,
.chatUnreadDivider:focus-visible {
  color: var(--danger-text);
}
.chatUnreadDivider::before,
.chatUnreadDivider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgb(var(--danger-rgb) / 0.38);
}

.chatUnreadBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0 5px;
  border: 1px solid rgb(var(--danger-rgb) / 0.36);
  border-radius: 999px;
  background: rgb(var(--danger-strong-rgb) / 0.22);
  color: var(--danger-text);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.chatUnreadBadge.hidden {
  display: none;
}

.chatDeliveryState {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-height: 14px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.chatMessage.is-sent .chatDeliveryState {
  display: none;
}

.chatMessage.is-pending .chatDeliveryState {
  opacity: 0.78;
}

.chatMessage.is-pending .chatDeliveryLabel::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border: 1px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: chatImageUploadSpin 0.75s linear infinite;
}

.chatMessage.is-failed {
  border-color: rgb(var(--danger-rgb) / 0.24);
  background: rgb(var(--danger-strong-rgb) / 0.08);
}

.chatMessage.is-failed .chatDeliveryState {
  color: var(--danger-text);
}

.chatDeliveryRetry {
  padding: 2px 6px;
  border: 1px solid rgb(var(--danger-rgb) / 0.32);
  border-radius: 6px;
  background: rgb(var(--danger-strong-rgb) / 0.16);
  color: var(--danger-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.chatDeliveryRetry:hover,
.chatDeliveryRetry:focus-visible {
  background: rgb(var(--danger-strong-rgb) / 0.24);
}

.chatDeliveryRetry:disabled {
  cursor: wait;
  opacity: 0.55;
}

/* ─── COIN FLIP CARD ─── */
.coinFlipCard {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgb(var(--border-rgb) / 0.18);
  background: rgb(var(--card-rgb) / 0.54);
  min-width: 130px;
}
.coinFlipLabel {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}
.coinFlipCoin {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 36%, #ffe066, #c8960c 70%);
  border: 3px solid #e0aa20;
  box-shadow: 0 2px 8px rgba(200, 150, 12, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #7a5200;
  transform-style: preserve-3d;
}
.coinFlipCoin.is-flipping {
  animation: coinFlipSpin 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes coinFlipSpin {
  0%   { transform: rotateY(0deg)    scale(1);    box-shadow: 0 2px 8px rgba(200,150,12,0.35); }
  25%  { transform: rotateY(270deg)  scale(1.12); box-shadow: 0 6px 18px rgba(200,150,12,0.5); }
  50%  { transform: rotateY(540deg)  scale(1);    box-shadow: 0 2px 8px rgba(200,150,12,0.35); }
  75%  { transform: rotateY(810deg)  scale(1.08); box-shadow: 0 4px 14px rgba(200,150,12,0.45); }
  100% { transform: rotateY(1080deg) scale(1);    box-shadow: 0 2px 8px rgba(200,150,12,0.35); }
}
.coinFlipFace {
  pointer-events: none;
  user-select: none;
}
.coinFlipStatus {
  min-height: 15px;
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
}
.coinFlipResult {
  min-height: 22px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.coinFlipResult--hidden {
  visibility: hidden;
}
.coinFlipResult--yazi {
  color: #7ac9ff;
}
.coinFlipResult--tura {
  color: #ffd166;
}
@media (prefers-reduced-motion: reduce) {
  .coinFlipCoin.is-flipping {
    animation: none;
  }
}

.pollCard {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  background: rgb(var(--card-rgb) / 0.52);
}
.pollQuestion {
  font-weight: 800;
  color: var(--text);
}
.pollOptions {
  display: grid;
  gap: 6px;
}
.pollOption {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  padding: 7px 9px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  background: rgb(var(--surface-rgb) / 0.04);
  color: var(--text);
  cursor: pointer;
}
.pollOption::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--poll-pct, 0%);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  pointer-events: none;
}
.pollOption.selected {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
}
.pollOptionLabel,
.pollOptionMeta {
  position: relative;
  z-index: 1;
}
.pollOptionMeta,
.pollTotal {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.pollCreateModalContent {
  width: min(440px, 92vw);
}
.pollCreateModalBody {
  gap: 12px;
}
.pollCreateField,
.balanceTransferField {
  display: grid;
  gap: 6px;
}
.pollCreateLabel,
.balanceTransferLabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.pollCreateOptionsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pollCreateOptions {
  display: grid;
  gap: 8px;
}
.pollCreateOptionRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.pollCreateError,
.balanceTransferError {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.4;
}
.pollCreateActions {
  margin-top: 4px;
}
.balanceTransferModalContent {
  width: min(360px, 92vw);
}
.balanceTransferBody {
  gap: 12px;
}
.balanceTransferSummary {
  display: grid;
  gap: 4px;
}
.balanceTransferRecipient {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}
.balanceTransferBalance,
.balanceTransferPreview {
  font-size: 12px;
  color: var(--text-secondary);
}
.balanceTransferPreview {
  min-height: 16px;
}
.balanceTransferActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Askıda para: the donor's dialog and the pool card in the chat timeline. */
.donationModalContent {
  width: min(400px, 92vw);
}
.donationBody {
  gap: 12px;
}
.donationField {
  display: grid;
  gap: 6px;
}
.donationLabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.donationIntro,
.donationHint {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.donationBalance,
.donationPreview {
  font-size: 12px;
  color: var(--text-secondary);
}
.donationPreview {
  min-height: 16px;
}
.donationError {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.4;
}
.donationActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
/* Kredi: the score, the terms, the open debt and the apply / repay forms. */
.loanModalContent {
  width: min(420px, 92vw);
}
.loanBody,
.loanForm {
  display: grid;
  gap: 12px;
}
.loanField,
.loanScore,
.loanDebt {
  display: grid;
  gap: 6px;
}
.loanLabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.loanHint,
.loanTerms {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.loanTerms {
  color: var(--text-secondary);
}
.loanStatus,
.loanPreview {
  font-size: 12px;
  color: var(--text-secondary);
}
.loanStatus:empty {
  display: none;
}
.loanPreview {
  min-height: 16px;
}
.loanScoreHead {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.loanScoreValue {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.loanScoreText {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.loanScoreBar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(var(--surface-rgb) / 0.08);
}
.loanScoreFill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--danger), var(--success));
  transition: width 0.3s ease;
}
.loanDebt {
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  background: rgb(var(--card-rgb) / 0.52);
}
.loanDebt.is-overdue {
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 8%, rgb(var(--card-rgb) / 0.52));
}
.loanDebtAmount {
  font-weight: 800;
  color: var(--text);
}
.loanDebtDetail,
.loanDebtDue {
  font-size: 12px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.loanDebt.is-overdue .loanDebtDue {
  font-weight: 700;
  color: var(--danger);
}
.loanError {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.4;
}
.loanActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .loanScoreFill {
    transition: none;
  }
}
.donationCard {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 10px;
  max-width: 360px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--success) 34%, transparent);
  background: color-mix(in srgb, var(--success) 8%, rgb(var(--card-rgb) / 0.52));
}
.donationCard:not([data-donation-status="open"]) {
  border-color: rgb(var(--border-rgb) / 0.16);
  background: rgb(var(--card-rgb) / 0.52);
}
.donationCardHead {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--text);
}
.donationCardSummary {
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}
.donationCardTerms,
.donationCardLimit,
.donationCardClaims {
  font-size: 12px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.donationCardProgress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(var(--surface-rgb) / 0.08);
}
.donationCardProgressFill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
}
.donationCardFooter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.donationCardExpiry,
.donationCardClosed {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.donationCardDone {
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
}
.chatMessageAuthor {
  cursor: pointer;
}
.chatMessageAuthor:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chatLine {
  font-size: 12px;
  line-height: 1.5;
  padding: 3px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgb(var(--border-rgb) / 0.04);
}
.chatLine:last-child {
  border-bottom: none;
}

.chatInputRow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  position: sticky;
  bottom: 0;
  padding-top: 6px;
  background: var(--sidebar-bg);
  z-index: 10;
}

.chatInputField {
  position: relative;
  min-width: 0;
}

.chatInputField #chatInput {
  display: block;
  width: 100%;
  min-height: var(--control-h-lg);
  max-height: 160px;
  /* A textarea does not centre its text like an input: pad one row to the middle of the box. */
  padding-block: calc((var(--control-h-lg) - 2px - 1.35em) / 2);
  padding-right: 118px;
  font-size: var(--text-base);
  line-height: 1.35;
  resize: none;
  overflow-y: hidden;
}

/* Once the composer grows past one line, the send button stays on its last line. */
.chatInputField.is-multiline :is(#chatSendBtn, .chatComposerToolBtn) {
  top: auto;
  bottom: calc((var(--control-h-lg) - 32px) / 2);
  transform: none;
}

#chatSendBtn {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  transform: translateY(-50%);
  cursor: pointer;
  transition-property: background, color, opacity, scale;
  transition-duration: 120ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

#chatSendBtn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-text);
}

#chatSendBtn:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: var(--focus-ring);
}

#chatSendBtn:active:not(:disabled) {
  scale: 0.96;
}

#chatSendBtn:disabled {
  background: transparent;
  color: var(--muted);
  opacity: 0.48;
  cursor: not-allowed;
}

#chatSendBtn svg {
  width: 16px;
  height: 16px;
  transform: translateX(1px);
}

.chatAttachmentBody {
  padding-top: 8px;
}

/* Formatting toolbar above a text selection in the message input. */
.chatFormatToolbar {
  position: absolute;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
  white-space: nowrap;
  user-select: none;
}

.chatFormatToolbar.hidden {
  display: none;
}

.chatFormatToolbarBtn {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.chatFormatToolbarBtn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.chatFormatToolbarBtn-italic {
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
}

.chatFormatToolbarBtn-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chatFormatToolbarBtn-strike {
  text-decoration: line-through;
}

.chatFormatToolbarBtn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chatFormatToolbarBtn svg.is-filled {
  fill: currentColor;
  stroke: none;
}

.chatFormatToolbarSeparator {
  width: 1px;
  height: 18px;
  margin: 0 3px;
  background: var(--border-hover);
}

/* Off-screen copy of the input's text, used only to find where the selection starts. */
.chatFormatToolbarMirror {
  position: absolute;
  top: 0;
  left: -9999px;
  visibility: hidden;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  pointer-events: none;
}

/* Emoji and games sit left of the send button, inside the input. */
.chatComposerToolBtn {
  position: absolute;
  top: 50%;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  transform: translateY(-50%);
  cursor: pointer;
  transition-property: background, color, scale;
  transition-duration: 120ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.chatComposerToolBtn.chatGamesBtn {
  right: 45px;
}

.chatComposerToolBtn.chatEmojiBtn {
  right: 79px;
}

/* A hairline separates the tools from send, as the reference composer does. */
.chatComposerToolBtn.chatGamesBtn::after {
  position: absolute;
  top: 6px;
  right: -5px;
  bottom: 6px;
  width: 1px;
  background: var(--border-hover);
  content: "";
  pointer-events: none;
}

.chatComposerToolBtn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chatComposerToolBtn:hover,
.chatComposerToolBtn[aria-expanded="true"] {
  background: var(--surface-hover);
  color: var(--text);
}

.chatComposerToolBtn[aria-expanded="true"] {
  color: var(--accent);
}

.chatComposerToolBtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.chatComposerToolBtn:active {
  scale: 0.96;
}

.chatEmojiPicker {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(352px, calc(100vw - 24px));
  height: min(400px, var(--chat-emoji-picker-max-height, calc(100vh - 120px)));
  height: min(400px, var(--chat-emoji-picker-max-height, calc(100dvh - 120px)));
  padding: 8px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
}

.chatEmojiPicker.hidden {
  display: none;
}

.chatEmojiPickerSearch {
  width: 100%;
  min-height: 34px;
  flex-shrink: 0;
}

.chatEmojiPickerNav {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.chatEmojiPickerNav.hidden {
  display: none;
}

.chatEmojiPickerNavItem {
  display: grid;
  flex: 1;
  height: 30px;
  min-width: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.chatEmojiPickerBody {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.chatEmojiPickerSectionTitle {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 4px 4px 5px;
  background: var(--popover-bg);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
}

.chatEmojiPickerGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 2px;
}

.chatEmojiPickerItem {
  display: grid;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.chatEmojiPickerItem img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

:is(.chatEmojiPickerItem, .chatEmojiPickerNavItem):hover,
:is(.chatEmojiPickerItem, .chatEmojiPickerNavItem):focus-visible {
  outline: none;
  background: var(--surface-hover);
}

:is(.chatEmojiPickerItem, .chatEmojiPickerNavItem):focus-visible {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent);
}

.chatEmojiPickerEmpty {
  padding: 28px 8px;
  color: var(--text-secondary);
  font-size: var(--text-md);
  text-align: center;
}

.chatActionLauncher .btn.chatAttachBtn {
  position: relative;
  width: var(--control-h-lg);
  height: var(--control-h-lg);
  padding: 0 0 2px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.chatActionLauncher {
  position: relative;
  display: flex;
  align-items: center;
}

.chatAttachBtn[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.chatActionMenu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: min(244px, calc(100vw - 24px));
  max-height: var(--chat-action-menu-max-height, calc(100vh - 120px));
  max-height: var(--chat-action-menu-max-height, calc(100dvh - 120px));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 5px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
}

.chatActionMenuItem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition-property: background, color;
  transition-duration: 120ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.chatActionMenuItem:not(:disabled):hover,
.chatActionMenuItem:not(:disabled):focus-visible {
  outline: none;
  background: var(--surface-hover);
}

.chatActionMenuItem:not(:disabled):focus-visible {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent);
}

/* Games open from their own button beside the emoji picker, anchored to the right of the input. */
.chatGamesMenu {
  right: 0;
  left: auto;
  width: min(320px, calc(100vw - 24px));
}

.chatActionMenuGameGroup {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.chatActionMenuGameGroup > .chatActionMenuGroupLabel {
  grid-column: 1 / -1;
}

.chatActionMenuGameGroup > .chatActionMenuItem {
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 72px;
  padding: 6px 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-size: var(--text-xs);
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 380px) {
  .chatActionMenuGameGroup {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.chatActionMenuGameGroup + .chatActionMenuGameGroup {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.chatActionMenuGroupLabel {
  padding: 3px 9px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* The wallet balance sits left of the app version in the bottom bar while a room is joined. */
.walletBalance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.walletBalance[hidden] {
  display: none;
}

.walletBalance svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A million and up reads short ("1.76m $") and grows to the exact amount while hovered. Nothing is
   reserved for the exact amount, so the balance stays against the version and, with the bar's
   right side anchored, the growth runs leftward. */
.chatBalanceAmount {
  display: inline-flex;
}

.chatBalanceShort,
.chatBalanceExact {
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 220ms ease, opacity 160ms ease;
}

.chatBalanceShort {
  max-width: 6em;
}

.chatBalanceExact {
  max-width: 0;
  opacity: 0;
}

.walletBalance:hover .chatBalanceShort {
  max-width: 0;
  opacity: 0;
}

.walletBalance:hover .chatBalanceExact {
  max-width: 14em;
  opacity: 1;
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .chatBalanceShort,
  .chatBalanceExact {
    transition: none;
  }
}

/* Kayıp bonusu closes the + menu: a claim button while the pool holds a bonus, otherwise a
   muted row whose "i" explains the profit, open round or cap that leaves nothing to claim. */
.chatActionMenuLossBonus[hidden],
.chatActionMenuLossBonusHint[hidden] {
  display: none;
}

.chatActionMenuLossBonus {
  position: relative;
  flex-wrap: wrap;
  row-gap: 7px;
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  border-radius: 0;
  color: var(--success);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chatActionMenuLossBonus svg {
  color: currentColor;
}

.chatActionMenuLossBonus:disabled {
  cursor: progress;
  opacity: 0.7;
}

.chatActionMenuLossBonus[aria-disabled="true"] {
  color: var(--text-secondary);
  font-weight: 500;
  cursor: help;
}

.chatActionMenuLossBonusInfoIcon {
  display: inline-flex;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  opacity: 0.75;
}

/* A sibling of the scrolling menu: opening the explanation never resizes the menu or gets clipped by it. */
.chatActionMenuLossBonusInfo {
  position: absolute;
  bottom: calc(100% + 56px);
  left: 8px;
  z-index: 51;
  width: min(210px, calc(100vw - 40px));
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  display: none;
  text-align: left;
  padding: 7px 9px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xs);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.4;
  white-space: pre-line;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.chatActionMenu:not(.hidden):has(.chatActionMenuLossBonus:not([hidden]):hover) + .chatActionMenuLossBonusInfo:not(:empty),
.chatActionMenu:not(.hidden):has(.chatActionMenuLossBonus:not([hidden]):focus-visible) + .chatActionMenuLossBonusInfo:not(:empty),
.chatActionMenu:not(.hidden):has(.chatActionMenuLossBonus:not([hidden])[data-info-open]) + .chatActionMenuLossBonusInfo:not(:empty) {
  display: block;
}

.chatActionMenuLossBonusHint {
  padding: 2px 9px 6px 37px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.chatActionMenuItem svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Newly earned cosmetic rewards remain visible until Başarımlar is viewed. */
.chatAchievementBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #f2c76a;
  color: #231c0c;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.chatAchievementBadge[hidden] { display: none; }

.chatMarketAchievementBadge { margin-left: auto; }

.chatActionCoachmark {
  position: fixed;
  inset: 0;
  z-index: 10070;
  pointer-events: none;
}

.chatActionCoachmarkHighlight {
  position: fixed;
  border: 2px solid var(--accent);
  border-radius: 13px;
  box-shadow:
    0 0 0 9999px rgb(var(--bg-deep-rgb) / 0.58),
    0 0 24px color-mix(in srgb, var(--accent) 52%, transparent);
}

.chatActionCoachmarkBubble {
  position: fixed;
  width: min(320px, calc(100vw - 16px));
  padding: 14px 38px 14px 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, rgb(var(--border-rgb) / 0.2));
  border-radius: 12px;
  background: var(--menu-bg);
  color: var(--text);
  box-shadow: 0 16px 42px rgb(var(--shadow-rgb) / 0.5);
  pointer-events: auto;
}

.chatActionCoachmarkBubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 15px;
  width: 12px;
  height: 12px;
  border-right: 1px solid color-mix(in srgb, var(--accent) 48%, rgb(var(--border-rgb) / 0.2));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 48%, rgb(var(--border-rgb) / 0.2));
  background: var(--menu-bg);
  transform: rotate(45deg);
}

.chatActionCoachmarkBubble.is-below::after {
  top: -7px;
  bottom: auto;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--accent) 48%, rgb(var(--border-rgb) / 0.2));
  border-left: 1px solid color-mix(in srgb, var(--accent) 48%, rgb(var(--border-rgb) / 0.2));
}

.chatActionCoachmarkBubble strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.chatActionCoachmarkBubble p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.chatActionCoachmarkAction {
  margin-top: 11px;
}

.chatActionCoachmarkAction[hidden] {
  display: none;
}

.chatActionCoachmarkDismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

.chatActionCoachmarkDismiss:hover,
.chatActionCoachmarkDismiss:focus-visible {
  outline: none;
  background: var(--surface-hover);
  color: var(--text);
}

.chatAttachmentSpoilerToggle {
  margin: 0 10px 10px;
  padding: 4px 7px;
  border: 1px solid rgb(var(--border-rgb) / 0.2);
  border-radius: 6px;
  background: rgb(var(--surface-rgb) / 0.035);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}
.chatAttachmentSpoilerToggle[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-text);
}
.chatAttachmentSpoilerToggle:hover,
.chatAttachmentSpoilerToggle:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  outline: none;
}
.chatAttachmentSpoilerToggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chatAttachmentFileMeta {
  padding: 0 10px 6px;
  font-size: 11px;
  color: var(--text-secondary);
  word-break: break-all;
}

.chatAttachmentRemoveBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgb(var(--border-rgb) / 0.28);
  background: rgb(var(--bg-deep-rgb) / 0.6);
  color: var(--text);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.chatAttachmentRemoveBtn:hover {
  border-color: rgb(var(--danger-rgb) / 0.6);
  color: var(--danger-text);
}
.chatAttachmentRemoveBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ─── CARDS ─── */
.card {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Full-height regions reuse .card for padding and fill only; they are not floating cards. */
.leftColumn.card,
.tabPane.card {
  border: 0;
  border-radius: 0;
}
.leftColumn.card {
  border-right: 1px solid var(--border);
}

.cardTitle {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cardTitle svg {
  opacity: 0.6;
}

.sidebarDivider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ─── FORM ELEMENTS ─── */
.row {
  display: grid;
  gap: 6px;
}
.label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}
.shortcutRow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.shortcutDisplay {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  padding: 6px 10px;
  background: rgb(var(--bg-deep-rgb) / 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  min-width: 100px;
}

.input {
  width: 100%;
  min-height: var(--control-h);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: var(--text-md);
  line-height: 1.35;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}
.input:hover:not(:focus):not(:disabled) {
  border-color: var(--border-hover);
}
.input::placeholder {
  color: color-mix(in srgb, var(--muted) 60%, transparent);
}
select.input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 8px) calc(50% - 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.input:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: var(--ring);
  background: var(--card-strong);
}
.input:disabled {
  opacity: 0.5;
}

/* ─── BUTTONS ─── */
.buttons {
  margin-top: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.twoButtons {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.testButtons {
  grid-template-columns: 1fr 1fr;
}
.logButtons {
  grid-template-columns: 1fr 1fr;
}

.btn {
  min-height: var(--control-h);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgb(var(--surface-rgb) / 0.055);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}
.btn svg {
  flex-shrink: 0;
}
.btn:hover {
  background: rgb(var(--surface-rgb) / 0.095);
  border-color: var(--border-hover);
}
.btn:active {
  transform: scale(0.98);
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn.small {
  min-height: var(--control-h-sm);
  padding: 4px 10px;
  font-size: var(--text-sm);
}

.btn.primary {
  background: var(--accent-fill);
  border-color: transparent;
  color: var(--on-accent-fill);
  font-weight: 600;
}
.btn.primary:hover:not(:disabled) {
  background: var(--accent-fill-hover);
  border-color: transparent;
}

/* Destructive actions stay quiet until the pointer commits to them. */
.btn.danger {
  background: rgb(var(--danger-rgb) / 0.1);
  border-color: rgb(var(--danger-rgb) / 0.28);
  color: var(--danger);
  font-weight: 600;
}
.btn.danger:hover:not(:disabled) {
  background: var(--danger-action-hover);
  border-color: transparent;
  color: var(--on-danger);
}

.iconBtn {
  width: var(--control-h);
  height: var(--control-h);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border-radius: var(--radius-sm);
}

/* ─── STATUS BAR ─── */
.statusBar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.statusPill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted);
  background: rgb(var(--surface-rgb) / 0.04);
  border: 1px solid var(--border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.statusPill svg {
  opacity: 0.7;
  flex-shrink: 0;
}

.statusDot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 5px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

/* ─── BOTTOM ACTION BAR ─── */
.bottomBar {
  height: var(--bottombar-height);
  background: var(--bottombar-bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  z-index: 10;
}

.bbLeft {
  flex: 0 0 180px;
  min-width: 0;
}

.bbCenter {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bbCenter > .barBtn {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  gap: 0;
}

.mediaSplitControl {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 44px;
  align-self: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgb(var(--surface-rgb) / 0.035);
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.mediaSplitControl:hover,
.mediaSplitControl.is-popover-open,
.mediaSplitControl.is-expanded {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.mediaSplitControl:has(:focus-visible) {
  box-shadow: var(--focus-ring);
}

.mediaSplitControl .mediaSplitMain {
  flex: 1 1 auto;
  min-width: 42px;
  align-self: stretch;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background-clip: padding-box;
}

.mediaSplitControl .mediaSplitMain:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.mediaSplitMenuBtn {
  display: inline-flex;
  flex: 0 0 28px;
  width: 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--border);
  background: rgb(var(--surface-rgb) / 0.025);
  color: var(--muted);
  cursor: pointer;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.mediaSplitMenuBtn:hover,
.mediaSplitMenuBtn[aria-expanded="true"] {
  color: var(--text);
  background: rgb(var(--surface-rgb) / 0.08);
}

.mediaSplitMenuBtn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.mediaSplitMenuBtn svg {
  transition: transform 160ms ease;
}

.mediaSplitMenuBtn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.voiceReactionBar {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgb(var(--surface-rgb) / 0.035);
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.voiceReactionBar:hover,
.voiceReactionBar.is-expanded {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.voiceReactionBar:has(:focus-visible) {
  box-shadow: var(--focus-ring);
}

.voiceReactionPrimary,
.voiceReactionToggle {
  display: inline-flex;
  flex: 0 0 30px;
  width: 30px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.voiceReactionPrimary {
  flex-basis: 44px;
  width: 44px;
  color: var(--text);
}

.voiceReactionToggle {
  border-left: 1px solid var(--border);
  background: rgb(var(--surface-rgb) / 0.025);
}

.voiceReactionPrimary:not(:disabled):hover,
.voiceReactionToggle:not(:disabled):not([aria-disabled="true"]):hover,
.voiceReactionToggle[aria-expanded="true"] {
  color: var(--text);
  background: rgb(var(--surface-rgb) / 0.08);
}

.voiceReactionPrimary:not(:disabled):active {
  transform: scale(0.92);
}

.voiceReactionPrimary:focus-visible,
.voiceReactionToggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.voiceReactionPrimary:disabled,
.voiceReactionToggle:disabled,
.voiceReactionToggle[aria-disabled="true"] {
  opacity: 0.32;
  cursor: not-allowed;
}

.voiceReactionToggleIcon {
  flex: 0 0 auto;
  transform: rotate(0);
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.voiceReactionToggle[aria-expanded="true"] .voiceReactionToggleIcon {
  transform: rotate(180deg);
}

.voiceReactionFace {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 20px;
  line-height: 1;
}

.roomReactionImage {
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.voiceReactionImage {
  width: 32px;
  height: 32px;
}

.soundboardBar {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgb(var(--surface-rgb) / 0.035);
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.soundboardBar:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.soundboardBar:has(:focus-visible) {
  box-shadow: var(--focus-ring);
}

.soundboardToggle {
  display: inline-flex;
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.soundboardToggle:not(:disabled):hover,
.soundboardToggle[aria-expanded="true"] {
  color: var(--text);
  background: rgb(var(--surface-rgb) / 0.08);
}

.soundboardToggle:not(:disabled):active {
  transform: scale(0.92);
}

.soundboardToggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.soundboardToggle:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.soundboardTray {
  width: min(340px, calc(100vw - 16px));
  max-height: min(380px, 60dvh);
  padding: 10px;
  overflow: hidden;
}

.soundboardTray.anchoredControlPopover.is-popover-open,
.soundboardTray.anchoredControlPopover.is-open {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@supports selector(:popover-open) {
  .soundboardTray.anchoredControlPopover:popover-open {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

.soundboardHeader {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.soundboardTitle {
  font-size: var(--text-sm);
  font-weight: 600;
}

.soundboardVolume {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.soundboardVolume input[type="range"] {
  width: 96px;
  accent-color: var(--accent);
}

.soundboardVolumeValue {
  min-width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.soundboardSrOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.soundboardGrid {
  display: grid;
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(5 * var(--control-h-lg) + 4 * 6px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--control-h-lg);
  gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.soundboardGrid[hidden] {
  display: none;
}

.soundboardSound {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: var(--control-h-lg);
  min-height: var(--control-h-lg);
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgb(var(--surface-rgb) / 0.035);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

.soundboardSound:not(:disabled):hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.soundboardSound:not(:disabled):active {
  transform: scale(0.95);
}

.soundboardSound:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.soundboardSound:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.soundboardSound.is-pending {
  border-color: var(--accent);
  opacity: 1;
}

.soundboardSoundEmoji {
  flex-shrink: 0;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: var(--text-xl);
  line-height: 1;
}

.soundboardSoundName {
  display: -webkit-box;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: var(--text-xs);
  line-height: 1.2;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.soundboardStatus {
  flex-shrink: 0;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: center;
}

.soundboardStatus[hidden] {
  display: none;
}

.anchoredControlPopover {
  position: fixed;
  inset: auto;
  z-index: 3000;
  margin: 0;
  box-sizing: border-box;
  display: none;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--popover-bg);
  color: var(--text);
  box-shadow: var(--shadow-popover);
}

.anchoredControlPopover.is-popover-open,
.anchoredControlPopover.is-open {
  display: block;
}

@supports selector(:popover-open) {
  .anchoredControlPopover:popover-open {
    display: block;
  }
}

.anchoredControlPopover::backdrop {
  background: transparent;
}

.voiceReactionTray {
  width: min(200px, calc(100vw - 16px));
  max-height: min(200px, 40dvh);
  grid-template-columns: repeat(4, 40px);
  justify-content: center;
  gap: 6px;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.voiceReactionTray.is-popover-open,
.voiceReactionTray.is-open {
  display: grid;
}

@supports selector(:popover-open) {
  .voiceReactionTray:popover-open {
    display: grid;
  }
}

.voiceReactionBtn {
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    opacity var(--transition-fast);
}

.voiceReactionBtn:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  transform: translateY(-1px) scale(1.08);
}

.voiceReactionBtn:not(:disabled):active {
  transform: translateY(0) scale(0.92);
}

.voiceReactionBtn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.voiceReactionBtn:disabled {
  opacity: 0.32;
  filter: grayscale(0.7);
  cursor: not-allowed;
}

.participantHookahButton {
  position: absolute;
  /* Top-left keeps the bottom-right mute badge visible; menu triggers only render on remote cards. */
  top: 8px;
  left: 8px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgb(20 24 30 / 0.55);
  cursor: pointer;
}

.participantHookahButton img {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.participantHookahButton:hover {
  border-color: rgb(232 209 162 / 0.35);
  background: rgb(191 153 96 / 0.15);
}

.participantHookahButton:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.participantHookah {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  /* The mouthpiece touches the avatar circumference, 30 degrees below its right edge. */
  --hookah-avatar-size: var(--participant-avatar-size, 56px);
  --hookah-pipe-size: clamp(36px, 8vw, 70px);
  --hookah-mouth-x: calc(50% + var(--hookah-avatar-size) * 0.433013);
  --hookah-mouth-y: calc(50% + var(--hookah-avatar-size) * 0.25);
}

.screenTheaterTile .participantHookah {
  --hookah-avatar-size: 60px;
  --hookah-pipe-size: 36px;
}

.participantHookahPipe {
  position: absolute;
  width: var(--hookah-pipe-size);
  height: var(--hookah-pipe-size);
  /* Mirroring the 64x64 icon places its mouthpiece endpoint at (6, 11). */
  left: calc(var(--hookah-mouth-x) - var(--hookah-pipe-size) * 0.09375);
  top: calc(var(--hookah-mouth-y) - var(--hookah-pipe-size) * 0.171875);
  transform-origin: 9.375% 17.1875%;
  filter: drop-shadow(0 3px 6px rgb(0 0 0 / 0.35));
  transition: opacity 300ms ease, transform 300ms ease;
}

.participantHookahPipeImage {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
}

.participantHookah[data-phase="draw"] .participantHookahPipe {
  animation: hookahDraw 1.4s ease-in-out both;
}

.participantHookahCaption {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border: 1px solid rgb(232 209 162 / 0.25);
  border-radius: 20px;
  background: rgb(20 24 30 / 0.85);
  color: #e8d1a2;
  font: 500 10px/1.2 var(--font-family, sans-serif);
  white-space: nowrap;
}

.participantHookahSmoke {
  position: absolute;
  left: var(--hookah-mouth-x);
  top: var(--hookah-mouth-y);
  width: clamp(36px, 36%, 130px);
  aspect-ratio: 1.3;
  opacity: 0;
  border-radius: 43% 57% 62% 38% / 55% 38% 62% 45%;
  background: url('./assets/reactions/hookah-smoke.svg') center / contain no-repeat;
  transform-origin: 0 50%;
}

.participantHookah[data-phase="exhale"] .participantHookahSmoke {
  animation: hookahExhale 2.6s cubic-bezier(0.2, 0.72, 0.28, 1) var(--puff-delay) both;
}

.participantHookah[data-phase="exhale"] .participantHookahPipe {
  opacity: 0;
  transform: translateY(12px) rotate(10deg);
}

.participantHookah[data-phase="exhale"] .participantHookahCaption {
  display: none;
}

@keyframes hookahDraw {
  0% { opacity: 0; transform: rotate(14deg); }
  25% { opacity: 1; transform: rotate(-5deg); }
  65% { transform: rotate(-8deg); }
  100% { opacity: 1; transform: rotate(0); }
}

@keyframes hookahExhale {
  0% { opacity: 0; transform: translate(-8%, -50%) scale(0.08, 0.12); }
  12% { opacity: 0.65; }
  38% { opacity: 0.48; }
  100% {
    opacity: 0;
    transform: translate(45%, calc(-100% + var(--puff-drift))) rotate(var(--puff-turn)) scale(2.2, 1.8);
  }
}

@media (prefers-reduced-motion: reduce) {
  .participantHookah[data-phase] .participantHookahPipe {
    animation: none;
    transition: none;
    transform: none;
  }

  .participantHookah[data-phase] .participantHookahSmoke {
    animation: none;
  }

  .participantHookah[data-phase="exhale"] .participantHookahSmoke:nth-child(3) {
    opacity: 0.25;
    transform: translate(-15%, -50%);
  }

}

.mediaControlPopover {
  width: min(272px, calc(100vw - 16px));
  max-height: min(520px, calc(100dvh - 16px));
  padding: 8px;
  overflow: visible;
  /* Fixed child flyouts use viewport coordinates; filtering would create a local containing block. */
  backdrop-filter: none;
}

.mediaControlPopover.is-popover-open,
.mediaControlPopover.is-open {
  display: block;
}

@supports selector(:popover-open) {
  .mediaControlPopover:popover-open {
    display: block;
  }
}

.mediaPopoverPage {
  display: grid;
  max-height: min(504px, calc(100dvh - 32px));
  gap: 3px;
  overflow: hidden auto;
  overscroll-behavior: contain;
}

.screenPopoverTitle {
  padding: 6px 8px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mediaPopoverNavRow,
.mediaPopoverActionRow,
.mediaPopoverBack,
.mediaPopoverChoice {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.mediaPopoverNavRow {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  text-align: left;
}

.mediaPopoverNavRow:hover,
.mediaPopoverNavRow[aria-expanded="true"],
.mediaPopoverActionRow:hover,
.mediaPopoverBack:hover,
.mediaPopoverChoice:hover {
  background: rgb(var(--surface-rgb) / 0.065);
}

.mediaPopoverNavRow:focus-visible,
.mediaPopoverActionRow:focus-visible,
.mediaPopoverBack:focus-visible,
.mediaPopoverChoice:focus-visible,
.mediaPopoverToggleRow:focus-within {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.mediaPopoverNavRow > svg {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform var(--transition-fast);
}

.mediaPopoverNavRow[data-submenu-placement="left"] > svg {
  transform: rotate(180deg);
}

.mediaPopoverNavText {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.mediaPopoverNavText strong,
.mediaPopoverRange strong,
.mediaPopoverMeterField strong {
  font-size: var(--text-md);
  font-weight: 600;
}

.mediaPopoverNavText small {
  max-width: 208px;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mediaPopoverDivider {
  height: 1px;
  margin: 6px 1px;
  background: var(--border);
}

.mediaPopoverRange,
.mediaPopoverMeterField {
  display: grid;
  gap: 8px;
  padding: 7px 8px;
}

.mediaPopoverSelectRow,
.mediaPopoverInfoRow {
  display: grid;
  gap: 7px;
  padding: 7px 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.mediaPopoverSelectRow .input {
  width: 100%;
  min-height: 34px;
  border-radius: 7px;
  font-size: 11px;
}

.mediaPopoverInfoRow {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.mediaPopoverInfoRow > strong {
  color: var(--muted);
  font-size: 11px;
}

.mediaPopoverInfoRow > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
}

.mediaPopoverRange > span,
.mediaPopoverMeterField > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mediaPopoverRange output,
.mediaPopoverMeterField small {
  color: var(--muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.mediaPopoverRange input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

.mediaPopoverMeter {
  display: grid;
  height: 18px;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  align-items: end;
  gap: 3px;
}

.mediaPopoverMeterBar {
  height: 70%;
  border-radius: 2px;
  background: rgb(var(--border-rgb) / 0.24);
  transition: background 80ms linear, height 80ms linear;
}

.mediaPopoverMeterBar.is-active {
  height: 100%;
  background: var(--accent);
}

.mediaPopoverMeterBar.is-peak {
  background: var(--danger);
}

.mediaPopoverToggleRow {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px;
  border-radius: var(--radius-xs);
  color: var(--text);
  cursor: pointer;
  font-size: var(--text-md);
  font-weight: 500;
}

.mediaPopoverToggleRow:hover {
  background: rgb(var(--surface-rgb) / 0.065);
}

.mediaPopoverToggleRow input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.mediaPopoverActionRow {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: var(--radius-xs);
  text-align: left;
  font-size: var(--text-md);
  font-weight: 500;
}

.mediaPopoverActionRow svg {
  flex: 0 0 auto;
  color: var(--muted);
}

.mediaPopoverActionRow.danger {
  color: var(--danger-text);
}

.mediaPopoverActionRow.danger svg {
  color: currentColor;
}

.screenSharingActions {
  display: grid;
  gap: 3px;
}

.mediaPopoverBack {
  min-height: 38px;
  padding: 8px;
  border-radius: 7px;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.mediaPopoverSubmenu {
  position: fixed;
  z-index: 3001;
  box-sizing: border-box;
  display: grid;
  width: min(248px, calc(100vw - 16px));
  max-height: min(360px, calc(100dvh - 16px));
  gap: 5px;
  padding: 8px;
  overflow: visible;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
}

.mediaPopoverSubmenu::before {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  content: "";
}

.mediaPopoverSubmenu[data-submenu-placement="right"]::before {
  right: 100%;
}

.mediaPopoverSubmenu[data-submenu-placement="left"]::before {
  left: 100%;
}

.mediaPopoverSubmenuTitle {
  padding: 5px 8px 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mediaPopoverChoiceList {
  display: grid;
  max-height: min(300px, 48dvh);
  gap: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mediaPopoverChoice {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-xs);
  text-align: left;
  font-size: var(--text-md);
}

.mediaPopoverChoice > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mediaPopoverChoiceCheck {
  visibility: hidden;
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 800;
}

.mediaPopoverChoice[aria-pressed="true"] .mediaPopoverChoiceCheck {
  visibility: visible;
}

.mediaPopoverEmpty {
  padding: 12px 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (pointer: coarse) {
  .voiceReactionToggle {
    flex-basis: 44px;
    width: 44px;
  }

  .voiceReactionTray {
    width: min(216px, calc(100vw - 16px));
    grid-template-columns: repeat(4, 44px);
  }

  .voiceReactionBtn {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .mediaPopoverChoice,
  .mediaPopoverActionRow,
  .mediaPopoverBack,
  .mediaPopoverToggleRow {
    min-height: 44px;
  }
}

.bbRight {
  flex: 0 0 auto;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.bbVersion {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin-right: 8px;
  white-space: nowrap;
  user-select: none;
}

.connectionQuality {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}

.connectionQuality svg { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.connectionQuality[data-quality="good"] { color: var(--success, #4ade80); }
.connectionQuality[data-quality="medium"] { color: var(--warn); }
.connectionQuality[data-quality="bad"] { color: var(--danger, #f87171); }
.connectionQuality[data-quality="medium"] .wifiOuter,
.connectionQuality[data-quality="bad"] :is(.wifiOuter, .wifiMiddle),
.connectionQuality[data-quality="unknown"] svg { opacity: 0.3; }
.connectionQuality:focus-visible { outline: 2px solid var(--text-secondary); outline-offset: 3px; }

.connectionQualityTooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 1;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bottombar-bg);
  color: var(--text);
  box-shadow: 0 4px 16px #0003;
  font-size: 12px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  visibility: hidden;
  opacity: 0;
  transition: opacity 120ms ease-out;
}

.connectionQuality:is(:hover, :focus) .connectionQualityTooltip { visibility: visible; opacity: 1; }

.appVersionText {
  margin-right: 4px;
  padding: 4px;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Secondary utilities sit as quiet text buttons beside the version. */
.bbVersion > .btn.small {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
}

.bbVersion > .btn.small:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.appVersionNote {
  font-size: 11px;
  font-weight: 600;
  color: var(--warn);
}

.releaseNotesNewPill {
  margin-left: 2px;
  border: 0;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: color-mix(in srgb, var(--accent) 55%, var(--text));
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.6;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.releaseNotesNewPill:hover {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

.releaseNotesNewPill:focus-visible,
.updateActionBtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.updateActionBtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgb(var(--success-rgb) / 0.5);
  background: rgb(var(--success-rgb) / 0.18);
  color: var(--success-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 2px 9px;
  line-height: 1.6;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.updateActionBtn:hover:not(:disabled) {
  background: rgb(var(--success-rgb) / 0.32);
  border-color: rgb(var(--success-rgb) / 0.75);
  color: var(--success-text-strong);
}

.updateActionBtn:disabled {
  cursor: progress;
  opacity: 0.8;
}

.updateActionBtn.is-ready {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-text);
  animation: updateActionPulse 2.4s ease-in-out infinite;
}

.updateActionBtn.is-ready:hover {
  background: color-mix(in srgb, var(--accent) 36%, transparent);
  border-color: color-mix(in srgb, var(--accent) 85%, transparent);
}

.updateActionBtn.is-error {
  border-color: rgb(var(--danger-rgb) / 0.55);
  background: rgb(var(--danger-rgb) / 0.18);
  color: var(--danger-text);
}

.updateActionIcon {
  flex-shrink: 0;
}

@keyframes updateActionPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
  50% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  }
}

.selfInfo {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.selfInfo .connectionQualityTooltip { left: 0; right: auto; }

/* Reserve 7px around the 34px avatar for its 1.36x cosmetic decoration. */
.selfAccountBtn {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 9px;
  align-self: flex-start;
  min-width: 0;
  max-width: 100%;
  padding: 7px 8px 7px 7px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.selfAccountBtn:hover {
  background: var(--surface-hover);
}

/* Inset so the ring is not clipped by the self area. */
.selfAccountBtn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 80%, var(--text));
  outline-offset: -2px;
}

.selfAccountBtn .selfName {
  min-width: 0;
}

.selfDetails {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.selfAvatarPill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, var(--card-strong));
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  flex-shrink: 0;
  user-select: none;
  overflow: hidden;
}

.selfName {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selfRoom {
  padding-inline-start: 0;
  font-size: var(--text-xs);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bottom bar buttons */
.barBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgb(var(--surface-rgb) / 0.035);
  color: var(--muted);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast);
  min-width: 72px;
}

.barBtn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text);
}
.barBtn:active {
  transform: scale(0.96);
}
.barBtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.barBtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.barBtn svg {
  flex-shrink: 0;
  transition: color var(--transition);
}

.barBtnLabel {
  font-size: var(--text-sm);
  font-weight: 600;
}

/* A live mic or headset carries a soft accent fill (no outline); switched off turns red. */
.micBarBtn:not(.muted-active):not([disabled]) {
  color: var(--text);
  background: var(--primary-soft);
}
.micBarBtn:not(.muted-active):not([disabled]):hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
/* When muted */
.micBarBtn.muted-active {
  color: var(--danger);
  border-color: rgb(var(--danger-rgb) / 0.4);
  background: var(--danger-soft);
}
.micBarBtn.muted-active:hover {
  background: rgb(var(--danger-rgb) / 0.2);
}

/* Listening (not deafened) */
.deafBarBtn:not(.deaf-active):not([disabled]) {
  color: var(--text);
  background: var(--primary-soft);
}
.deafBarBtn:not(.deaf-active):not([disabled]):hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.deafBarBtn.deaf-active {
  color: var(--danger);
  background: var(--danger-soft);
}
.deafBarBtn.deaf-active:hover {
  background: rgb(var(--danger-rgb) / 0.2);
}

/* Camera button */
.cameraBarBtn:not(.camera-active):not([disabled]) {
  color: var(--text);
}
.cameraBarBtn.camera-active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--primary-soft);
}
.cameraBarBtn.camera-active:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Stream bar button */
.streamBarBtn:not(.stream-active):not([disabled]) {
  color: var(--text);
}
.streamBarBtn.stream-active {
  color: var(--danger);
  border-color: rgb(var(--danger-rgb) / 0.4);
  background: rgb(var(--danger-rgb) / 0.1);
}
.streamBarBtn.stream-active:hover {
  background: rgb(var(--danger-rgb) / 0.2);
}

.streamBarBtn.is-loading {
  position: relative;
  cursor: progress;
}

.streamBarBtn.is-loading svg {
  opacity: 0.18;
}

.streamBarBtn.is-loading::after {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  content: "";
  animation: chatImageUploadSpin 0.75s linear infinite;
}

/* Source switch bar button (shown while streaming) */
.switchSourceBarBtn:not(.hidden):not([disabled]) {
  color: var(--info);
  border-color: rgb(var(--info-rgb) / 0.35);
  background: rgb(var(--info-rgb) / 0.08);
}

.switchSourceBarBtn:not(.hidden):not([disabled]):hover {
  background: rgb(var(--info-rgb) / 0.16);
}

/* Leave button: one clear, compact destructive control; solid red only on hover. */
.leaveBarBtn {
  flex-direction: row;
  gap: 7px;
  height: 44px;
  min-width: 0;
  padding: 0 14px 0 12px;
}
.leaveBarBtn svg {
  width: 17px;
  height: 17px;
}
.leaveBarBtn:not([disabled]) {
  color: var(--danger);
  border-color: transparent;
  background: rgb(var(--danger-rgb) / 0.12);
}
.leaveBarBtn:not([disabled]):hover {
  color: var(--on-danger);
  background: var(--danger-action-hover);
  border-color: transparent;
}

/* ─── ROOMS LIST ─── */
.roomsList {
  display: grid;
  gap: 2px;
  overflow: auto;
}

.roomItem {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 1px 0;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.roomItem:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
/* Only the room header reacts to hover and marks the current room; member rows stay plain. */
.roomItem .roomMeta {
  position: relative;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}
.roomItem .roomMeta:hover {
  background: var(--surface-hover);
}
/* The current room: tinted header plus an accent rail, not a full outline. */
.roomItem.active .roomMeta {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}
.roomItem.active .roomMeta::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
#lobbyView .roomItem {
  border-color: var(--border);
  background: var(--surface);
}
#lobbyView .roomItem:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.roomMeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.roomName {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: var(--text-md);
  font-weight: 600;
}
.roomName > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roomHiddenBadge {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--muted);
  background: rgb(var(--surface-rgb) / 0.06);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.roomCount {
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.roomSide {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.roomActiveTimer {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}
.roomMembers {
  display: grid;
  gap: 2px;
  padding: 0 10px 4px 22px;
}
.roomMember {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 28px;
  font-size: var(--text-sm);
  color: var(--muted);
  border-radius: var(--radius-xs);
}
/* Members open a profile on click: only the name brightens, the row keeps its background. */
.roomMember:hover .roomMemberName {
  color: var(--text);
}
/* Fake members are decorative like their stage cards: no profile, so no hover cue. */
.roomMember.is-decorative {
  cursor: default;
}
/* Admins drag a member's row onto another room to move them there. */
.roomMember[draggable="true"]:active {
  cursor: grabbing;
}
.roomMember.is-dragging {
  opacity: 0.45;
}
.roomItem.is-move-target,
#lobbyView .roomItem.is-move-target {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.roomMember.is-decorative:hover .roomMemberName {
  color: inherit;
}
.roomMember:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.roomMemberAvatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: rgb(var(--surface-rgb) / 0.12);
}
/* The ring is a shadow on a layer 1px outside the avatar: the gap stays see-through and, unlike
   outline or border widths, the 1.5px thickness is not rounded to whole device pixels. */
.roomMemberAvatar::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px transparent;
  pointer-events: none;
  transition: box-shadow var(--transition-fast);
}
/* A member of your current room who is speaking gets an accent ring, like the participant card. */
.roomMember.speaking .roomMemberAvatar::after {
  box-shadow: 0 0 0 1.5px var(--accent);
}
/* A soundboard clip's yellow ring takes over from the speaking ring while it plays. */
.roomMember.soundboardPlaying .roomMemberAvatar::after {
  box-shadow: 0 0 0 1.5px var(--soundboard-frame);
}
.roomMember.speaking .roomMemberName {
  color: #fff;
}
.roomMemberAvatarImg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.roomMemberName {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roomMemberStates {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: var(--danger);
}
.roomMemberState {
  display: inline-grid;
  place-items: center;
}
.roomMemberState svg {
  width: 13px;
  height: 13px;
}

/* ─── USERS LIST (hidden compat) ─── */
.users {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text);
}
.users li {
  padding: 5px 7px;
  margin: 1px 0;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 12px;
}
.speakingNameGlow {
  color: var(--accent) !important;
  text-shadow: 0 0 8px var(--accent-glow) !important;
  font-weight: 600;
}

/* ─── SETTINGS MODAL ─── */
.roomSwitcherModal {
  position: fixed;
  inset: var(--titlebar-height) 0 0;
  z-index: 1001;
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  background: var(--popover-bg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: settingsModalIn 0.18s ease;
}

.roomSwitcherBackdrop {
  position: fixed;
  inset: var(--titlebar-height) 0 0;
  z-index: 1000;
  background: rgb(var(--shadow-rgb) / 0.78);
}

.roomSwitcherBackdrop[hidden] {
  display: none;
}

.roomSwitcherModal:not([open]) {
  display: none;
}

.roomSwitcherForm {
  display: flex;
  flex-direction: column;
}

.roomSwitcherModalHeader {
  padding: 18px 20px 4px;
}

.roomSwitcherModalHeader h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
}

.roomSwitcherModalBody {
  display: grid;
  gap: 12px;
  padding: 12px 20px 20px;
}

.roomSwitcherField {
  display: grid;
  gap: 6px;
}

.roomSwitcherDescription {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.roomSwitcherError {
  padding: 8px 10px;
  border: 1px solid rgb(var(--danger-rgb) / 0.35);
  border-radius: var(--radius-xs);
  background: rgb(var(--danger-strong-rgb) / 0.16);
  color: var(--danger-text);
  font-size: 11px;
  line-height: 1.4;
}

.roomSwitcherActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.roomSwitcherActions .btn {
  min-width: 88px;
  min-height: var(--control-h);
  font-size: var(--text-md);
}

#roomSwitcherSubmitBtn.is-loading {
  cursor: wait;
}

.settingsModal {
  position: fixed;
  inset: var(--titlebar-height) 0 0;
  z-index: 1001;
  width: min(780px, calc(100vw - 36px));
  max-width: none;
  height: min(780px, calc(100dvh - var(--titlebar-height) - 36px));
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  background: var(--popover-bg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: settingsModalIn 0.14s ease-out;
}

.settingsBackdrop {
  position: fixed;
  inset: var(--titlebar-height) 0 0;
  z-index: 1000;
  background: rgb(var(--shadow-rgb) / 0.78);
}

.settingsBackdrop[hidden] {
  display: none;
}

.settingsModal:not([open]) {
  display: none;
}

@keyframes settingsModalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.settingsModalContent {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.settingsModalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 auto;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--menu-bg);
  z-index: 1;
}
.settingsModalHeader h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  font-weight: 600;
}
.settingsModalHeader h3 svg {
  color: var(--muted);
}

.settingsModalHeader h3:focus {
  outline: none;
  box-shadow: none;
}

.settingsModalBody {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.settingsSidebar {
  min-width: 0;
  padding: 14px 10px;
  border-right: 1px solid var(--border);
  background: var(--panel-translucent);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.settingsNavItem {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  gap: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.settingsNavItem + .settingsNavItem {
  margin-top: 2px;
}

.settingsNavItem svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  opacity: 0.76;
}

.settingsNavItem:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.settingsNavItem.active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
  font-weight: 600;
}

.settingsNavItem.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
}

.settingsNavItem.active svg {
  opacity: 1;
}

.settingsNavItem:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.settingsContent {
  min-width: 0;
  min-height: 0;
  padding: 22px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.settingsPanel {
  min-width: 0;
}

.settingsPanel[hidden] {
  display: none;
}

.settingsPageHeader {
  margin-bottom: 22px;
}

.settingsPageHeader h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.settingsGroup {
  display: grid;
  width: min(100%, 500px);
  gap: 12px;
}

.settingsSectionTitle {
  margin: 0;
  color: var(--text);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
}

.settingsSectionHeading {
  display: grid;
  gap: 4px;
}

.settingsSectionHeading .settingsSettingDescription {
  margin: 0;
}

.settingsDivider {
  width: min(100%, 520px);
  height: 1px;
  margin: 22px 0;
  background: var(--border);
}

.settingsFields {
  gap: 15px;
}

.settingsAudioGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 520px);
  gap: 12px;
}

.settingsAudioCard {
  display: grid;
  min-width: 0;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgb(var(--surface-rgb) / 0.035);
}

.settingsAudioCard .settingsField,
.settingsAudioCard .settingsRangeField {
  min-width: 0;
}

.settingsAudioCard .input,
.settingsAudioCard input[type="range"] {
  width: 100%;
  min-width: 0;
}

.settingsVideoFields {
  margin-top: 18px;
}

.settingsField {
  max-width: 500px;
  gap: 7px;
}

.settingsField > .label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.settingsField > .input,
.hiddenRoomsSettingsFields > .input {
  max-width: 500px;
}

.settingsToggleList {
  display: grid;
  width: min(100%, 520px);
  gap: 3px;
}

.settingsToggleRow.switch {
  position: relative;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  gap: 18px;
  color: var(--text);
}

.settingsToggleText {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.settingsToggleRow .switchLabel {
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.35;
}

.settingsSettingDescription {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.settingsToggleRowCompact.switch {
  min-height: 38px;
}

.settingsSubsection {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.settingsActionGroup {
  justify-items: start;
}

.settingsAccordion {
  width: min(100%, 520px);
  margin-top: 20px;
  border-radius: 7px;
}

#settingsPanelAdvanced .settingsAccordion {
  margin-top: 0;
}

.settingsAccordion .accordionHeader {
  min-height: 38px;
  padding: 9px 10px;
  background: transparent;
}

.settingsAccordion .accordionBody {
  padding: 12px;
  background: transparent;
}

.settingsRangeField {
  display: grid;
  gap: 8px;
}

@media (max-width: 720px) {
  .settingsAudioGrid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settingsDiagnostics .accordionBody {
  gap: 10px;
}

.diagnosticsTabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgb(var(--bg-deep-rgb) / 0.34);
}

.diagnosticsTab {
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.diagnosticsTab:hover {
  color: var(--text);
  background: rgb(var(--surface-rgb) / 0.04);
}

.diagnosticsTab.active {
  color: var(--text);
  background: var(--surface);
}

.diagnosticsTab:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.diagnosticsPanels,
.diagnosticsPanel {
  min-width: 0;
  min-height: 0;
}

.diagnosticsPanel[hidden] {
  display: none !important;
}

.settingsDiagnostics .diagnosticsPanel {
  display: grid;
  gap: 12px;
  padding: 4px 1px 1px;
  background: transparent;
}

.diagnosticsPanelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.diagnosticsNotice {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.diagnosticsNotice[data-tone="error"] {
  color: var(--danger);
}

.diagnosticsDetailList {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.diagnosticsSubTitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.diagnosticsDetail {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 7px 1px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font-size: 10px;
}

.diagnosticsDetail span {
  color: var(--muted);
}

.diagnosticsDetail strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: "SF Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  text-align: right;
}

.diagnosticsRefreshBtn {
  align-self: flex-end;
  justify-self: end;
}

.settingsDiagnostics .logFull {
  min-height: 150px;
  height: clamp(170px, 34dvh, 280px);
  max-height: 280px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: rgb(var(--bg-deep-rgb) / 0.5);
}

.settingsDiagnostics .logButtons {
  display: flex;
  grid-template-columns: none !important;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}

.settingsDiagnostics .statItem {
  padding: 8px 1px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.settingsDiagnostics .diagnosticsOverviewGrid {
  gap: 0 18px;
}

.settingsDiagnostics .btn.danger {
  border-color: rgb(var(--danger-rgb) / 0.34);
  background: var(--danger-soft);
  color: var(--danger-text);
  box-shadow: none;
}

.settingsDiagnostics .btn.danger:hover {
  border-color: rgb(var(--danger-rgb) / 0.5);
  background: rgb(var(--danger-rgb) / 0.2);
  box-shadow: none;
}

.avatarSettingsBody {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: 500px;
}

.avatarPreview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
  text-transform: uppercase;
  user-select: none;
}

.avatarPreview img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatarPreview[data-has-avatar="false"] {
  border-color: var(--border);
}

.avatarSettingsFields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.avatarUrlInput {
  width: 100%;
}

.avatarSettingsActions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.avatarUrlFallback {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.avatarUrlFallback summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  user-select: none;
}

.avatarUrlFallback summary:hover {
  color: var(--text);
}

.avatarUrlFallbackBody {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.avatarUrlFallbackBody .avatarUrlInput {
  min-width: 0;
  flex: 1;
}

.avatarStatus {
  min-height: 16px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.avatarStatus[data-tone="success"] {
  color: var(--accent);
}

.avatarStatus[data-tone="warn"] {
  color: var(--warn);
}

/* Account page: Profil, Güvenlik and Oturum groups */
.settingsGroupTitle {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.settingsAccountGroup {
  gap: 20px;
}

.settingsAccountField {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.settingsAccountField .settingsSettingDescription,
.settingsAccountField .statusPickerNote {
  margin: 0;
}

.displayNameRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.displayNameInput {
  min-width: 0;
  flex: 1 1 200px;
}

.displayNameStatus {
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.displayNameStatus[data-tone="success"] {
  color: var(--accent);
}

.displayNameStatus[data-tone="warn"] {
  color: var(--warn);
}

.hiddenRoomsDesc {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.4;
}

.hiddenRoomsSettingsFields {
  display: grid;
  gap: 8px;
  max-width: 500px;
}

.hiddenRoomsSettingsActions {
  display: flex;
  gap: 6px;
}

.hiddenRoomsStatus {
  min-height: 16px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.hiddenRoomsStatus[data-tone="success"] {
  color: var(--accent);
}

.hiddenRoomsStatus[data-tone="warn"] {
  color: var(--warn);
}

.accentOptions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.accentOptionLabel {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 7px 4px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: rgb(var(--bg-deep-rgb) / 0.6);
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.accentOptionLabel input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.accentOptionLabel:hover {
  border-color: var(--border-hover);
  background: rgb(var(--surface-rgb) / 0.04);
}

.accentSwatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgb(var(--surface-rgb) / 0.2);
  background: var(--swatch);
  box-shadow: 0 0 0 2px rgb(var(--shadow-rgb) / 0.25);
}

.accentName {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.1;
}

.accentOptionLabel:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.accentOptionLabel:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

.accentOptionLabel:has(input:checked) .accentName {
  color: var(--text);
}

.settingsAccentOptions {
  width: min(100%, 500px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
}

.settingsAccentOptions .accentOptionLabel {
  display: flex;
  align-items: center;
  justify-items: initial;
  min-height: 34px;
  gap: 8px;
  padding: 6px 8px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.settingsAccentOptions .accentOptionLabel:hover {
  border-color: transparent;
  background: var(--surface-hover);
}

.settingsAccentOptions .accentSwatch {
  width: 15px;
  height: 15px;
  box-shadow: none;
}

.settingsAccentOptions .accentName {
  font-size: var(--text-md);
  line-height: 1.2;
}

.settingsAccentOptions .accentOptionLabel:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: none;
}

.settingsAccentOptions .accentOptionLabel:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

.appThemeOptions {
  display: grid;
  width: min(100%, 500px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
}

.appThemeOption {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-subtle);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.appThemeOption:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.appThemeOption input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.appThemePalette {
  display: flex;
  width: 42px;
  height: 20px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  flex-shrink: 0;
}

.appThemePalette i {
  display: block;
  flex: 1;
  background: var(--theme-swatch-1);
}

.appThemePalette i:nth-child(2) {
  background: var(--theme-swatch-2);
}

.appThemePalette i:nth-child(3) {
  background: var(--theme-swatch-3);
}

.appThemeName {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.appThemeOption:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}

.appThemeOption:has(input:checked) .appThemeName {
  color: var(--text);
}

.appThemeOption:has(input:focus-visible) {
  box-shadow: var(--ring);
}

.appIconOptions {
  display: grid;
  width: min(100%, 500px);
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}

.appIconOption {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-subtle);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.appIconOption:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.appIconOption input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.appIconPreview {
  display: block;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.appIconName {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appIconOption:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}

.appIconOption:has(input:checked) .appIconName {
  color: var(--text);
}

.appIconOption:has(input:focus-visible) {
  box-shadow: var(--ring);
}

/* ─── SWITCHES ─── */
.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-md);
  color: var(--muted);
  cursor: pointer;
}
/* Visually replaced by .switchSlider but kept focusable and announced as a checkbox. */
.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.switchSlider {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgb(var(--border-rgb) / 0.2);
  position: relative;
  transition: background var(--transition), box-shadow var(--transition-fast);
  flex-shrink: 0;
}
.switchSlider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition), background-color var(--transition);
  box-shadow: 0 1px 3px rgb(var(--shadow-rgb) / 0.3);
}
.switch:hover .switchSlider {
  background: rgb(var(--border-rgb) / 0.28);
}
.switch input:checked + .switchSlider {
  background: var(--accent-fill);
}
.switch input:checked + .switchSlider::after {
  transform: translateX(16px);
  background: var(--on-accent-fill);
}
.switch input:focus-visible + .switchSlider {
  box-shadow: var(--focus-ring);
}
.switch input:disabled + .switchSlider {
  opacity: 0.45;
}
.switchLabel {
  line-height: 1.4;
  font-size: var(--text-md);
}
.toggles {
  margin-top: 2px;
  gap: 10px !important;
  display: flex;
  flex-direction: column;
}

/* ─── AUDIO SETTINGS ─── */
.audioSettings {
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

#settingsPanelMedia .audioSettings {
  gap: 16px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.audioList {
  display: grid;
  gap: 7px;
}
.audioListEmpty {
  padding: 18px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}
.audioCard {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px 12px;
  background: var(--surface);
  display: grid;
  gap: 8px;
}
.audioCard:hover {
  border-color: var(--border-hover);
}
.audioHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-md);
  font-weight: 600;
}
.participantControlMicState {
  margin-left: auto;
  color: var(--success);
  font-size: var(--text-xs);
  font-weight: 500;
}
.participantControlMicState[data-muted="true"] {
  color: var(--muted);
}
.participantControlVolumeRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.participantControlVolumeValue {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.participantControlVolume {
  width: 100%;
  min-width: 0;
}
.participantControlActions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.participantControlActions .btn {
  flex: 1 1 auto;
  min-width: max-content;
}
.participantControlRow.isLocallyMuted {
  border-color: rgb(var(--border-rgb) / 0.3);
}
.sliderRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.labelRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ─── VU METER ─── */
.micMeter {
  gap: 8px;
}
.vu {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgb(var(--border-rgb) / 0.1);
  overflow: hidden;
  border: 1px solid rgb(var(--border-rgb) / 0.1);
}
.vuFill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--accent-gradient);
  transition: width 0.08s ease;
  box-shadow: 0 0 6px var(--accent-soft);
}

/* ─── RANGE INPUTS ─── */
input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgb(var(--border-rgb) / 0.15);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
  cursor: pointer;
  transition: box-shadow var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent);
}
input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: var(--focus-ring);
}
input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: var(--focus-ring);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: white;
  cursor: pointer;
}

/* ─── TOASTS ─── */
.toastContainer {
  position: fixed;
  top: calc(var(--titlebar-height) + var(--topbar-height) + 12px);
  right: 16px;
  display: grid;
  gap: 7px;
  z-index: 80;
  pointer-events: none;
}
.toast {
  max-width: min(360px, calc(100vw - 32px));
  padding: 9px 14px 9px 13px;
  border-radius: var(--radius-sm);
  background: var(--popover-bg);
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-size: var(--text-md);
  line-height: 1.4;
  box-shadow: var(--shadow-popover);
  animation: toastIn 0.2s cubic-bezier(0.2, 0, 0, 1);
  pointer-events: auto;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
/* "success" is the default tone for plain notices, so it stays neutral; warn/error are tinted. */
.toast.success {
  border-color: var(--border-hover);
}
.toast.warn {
  border-color: rgb(var(--warn-rgb) / 0.45);
  background: var(--warn-strong-bg);
}
.toast.error {
  border-color: rgb(var(--danger-rgb) / 0.5);
  background: var(--danger-strong-bg);
}

/* ─── MODALS ─── */
.modal {
  position: fixed;
  inset: 0;
  background: rgb(var(--shadow-rgb) / 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  animation: modalBgIn 0.18s ease;
}
@keyframes modalBgIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal.hidden {
  display: none;
}

.modalContent {
  width: 400px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - var(--titlebar-height) - 32px);
  overflow-y: auto;
  background: var(--popover-bg);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.18s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.modalHeader h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}
.modalBody {
  display: grid;
  gap: 10px;
}

.releaseNotesModalContent {
  width: min(680px, 94vw);
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.releaseNotesModal {
  inset: var(--titlebar-height) 0 0;
  z-index: 1000;
  background: rgb(var(--shadow-rgb) / 0.78);
  backdrop-filter: none;
}

.releaseNotesModalBody {
  gap: 12px;
  flex: 1;
  min-height: 0;
  max-height: min(72vh, 560px);
  overflow-y: auto;
}

.surveyModal {
  width: min(520px, calc(100vw - 32px));
  max-width: 520px;
  max-height: min(760px, calc(100vh - var(--titlebar-height) - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid rgb(var(--border-rgb) / 0.24);
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  overflow: visible;
  z-index: 10000;
}

.surveyModal.hidden,
.surveyModal:not([open]) {
  display: none;
}

.surveyModal::backdrop {
  background: rgb(var(--bg-deep-rgb) / 0.82);
}

.surveyModalContent {
  display: grid;
  gap: 20px;
  padding: 24px;
  border-radius: inherit;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 15%, transparent), transparent 44%),
    rgb(var(--card-rgb) / 0.99);
  box-shadow: 0 28px 80px rgb(var(--shadow-rgb) / 0.52);
}

.surveyModalHeader {
  display: grid;
  gap: 7px;
}

.surveyEyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.surveyModalHeader h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 4vw, 26px);
  line-height: 1.2;
}

.surveyModalHeader p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.surveyOptions {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.surveyOption {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgb(var(--border-rgb) / 0.2);
  border-radius: 12px;
  background: rgb(var(--surface-rgb) / 0.035);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.surveyOption:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.surveyOption:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 82%, transparent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.surveyOption input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.surveyOptionMarker {
  width: 18px;
  height: 18px;
  border: 2px solid rgb(var(--border-rgb) / 0.58);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px transparent;
}

.surveyOption input:checked + .surveyOptionMarker {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px rgb(var(--card-rgb) / 0.98);
}

.surveyOption input:focus-visible + .surveyOptionMarker {
  outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: 3px;
}

.surveyOptionLabel {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.surveyFeedback {
  margin: -4px 0 0;
  padding: 10px 12px;
  border: 1px solid rgb(var(--danger-rgb) / 0.36);
  border-radius: 10px;
  background: rgb(var(--danger-strong-rgb) / 0.2);
  color: var(--danger-text);
  font-size: 12px;
}

.surveyModalActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.surveyModalActions .btn {
  min-width: 104px;
}

.surveyModal[data-busy='true'] .surveyOption {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 560px) {
  .surveyModal {
    width: calc(100vw - 20px);
  }

  .surveyModalContent {
    gap: 16px;
    padding: 20px;
  }

  .surveyModalActions {
    flex-direction: column-reverse;
  }

  .surveyModalActions .btn {
    width: 100%;
  }
}

.releaseNotesList li.releaseNotesSection {
  list-style: none;
  margin-left: -17px;
  margin-top: 4px;
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
}

.releaseNotesList li.releaseNotesSection:first-child {
  margin-top: 0;
}

.releaseNotesHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: var(--text-base);
}

.releaseNotesVersion {
  font-size: var(--text-xs);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  background: rgb(var(--surface-rgb) / 0.03);
  font-variant-numeric: tabular-nums;
}

.releaseNotesIntro {
  margin: 0;
  font-size: var(--text-md);
  color: var(--muted);
  line-height: 1.5;
}

.releaseNotesList {
  margin: 0;
  padding-left: 17px;
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.5;
}

.releaseNotesModalBody > .row.buttons {
  display: flex;
  justify-content: flex-end;
}

.releaseNotesModalBody > .row.buttons .btn {
  min-width: 96px;
}

/* ─── RICH DOC (admin-authored release notes / event banner) ─── */
.releaseNotesRichBody {
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.5;
}

.richDoc p,
.richDoc ul,
.richDoc ol {
  margin: 0;
}

.richDoc ul,
.richDoc ol {
  padding-left: 17px;
  display: grid;
  gap: 4px;
}

.richDoc ul {
  list-style: disc;
}

.richDoc ol {
  list-style: decimal;
}

.richDoc li > ul,
.richDoc li > ol {
  margin-top: 4px;
}

.richDoc .richDocHeading {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.richDoc h5.richDocHeading {
  font-size: 12px;
}

.richDoc .richDocHeading:first-child {
  margin-top: 0;
}

.richDoc hr {
  width: 100%;
  margin: 2px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.richDocLink {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.richDocAccent[data-accent="primaryPurple"] { color: var(--event-accent-primary-purple, #9B6BD3); }
.richDocAccent[data-accent="deepPurple"] { color: var(--event-accent-deep-purple, #6A3FA0); }
.richDocAccent[data-accent="gold"] { color: var(--event-accent-gold, var(--primary)); }
.richDocAccent[data-accent="brightGold"] { color: var(--event-accent-bright-gold, var(--accent)); }
.richDocAccent[data-accent="white"] { color: var(--event-accent-white, var(--text)); }

/* ─── IMAGE LIGHTBOX ─── */
.imageLightbox {
  z-index: 80;
  background: rgb(var(--shadow-rgb) / 0.88);
  cursor: zoom-out;
  padding: 24px;
  overflow: hidden;
}
.imageLightboxImg {
  max-width: min(96vw, 1600px);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgb(var(--shadow-rgb) / 0.6);
  animation: modalIn 0.22s ease;
  cursor: zoom-in;
  object-fit: contain;
  background: var(--media-bg);
  transform-origin: center center;
  transition: transform 0.2s ease;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}
.imageLightboxImg.isZoomed {
  cursor: grab;
}
.imageLightboxImg.isDragging {
  cursor: grabbing;
  transition: none;
}

.chatGalleryModalContent {
  width: min(720px, 94vw);
  max-height: min(720px, 86vh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chatGalleryEmpty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.chatGalleryEmpty.hidden {
  display: none;
}
.chatGalleryGrid {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  padding: 2px;
}
.chatGalleryItem {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid rgb(var(--border-rgb) / 0.14);
  background: rgb(var(--shadow-rgb) / 0.22);
  cursor: zoom-in;
  padding: 0;
}
.chatGalleryItem img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.chatGalleryMeta {
  display: block;
  padding: 6px 7px;
  color: var(--muted);
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.imageLightboxClose {
  position: absolute;
  top: calc(var(--titlebar-height, 32px) + 12px);
  right: 16px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgb(var(--border-rgb) / 0.25);
  background: rgb(var(--card-rgb) / 0.9);
  color: var(--on-media);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    transform 0.15s;
}
.imageLightboxClose:hover {
  background: rgb(var(--danger-rgb) / 0.6);
  transform: scale(1.05);
}

/* ─── SCREEN PREVIEW ─── */
.screenViewerHost[hidden] {
  display: none !important;
}

.screenPreview {
  position: relative;
  flex: 1;
  min-height: 0;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--media-bg);
  overflow: hidden;
  display: flex;
}
#screenVideo {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 160px;
  object-fit: contain;
  background: var(--media-bg);
}
.mobileScreenRotateHint {
  display: none;
}
/* Chromium/Electron: tam ekranda yerel video kontrol çubuğunu gizle (mobil web hariç) */
body:not(.mobile-web-mode) #screenVideo::-webkit-media-controls,
body:not(.mobile-web-mode) #screenVideo::-webkit-media-controls-enclosure,
body:not(.mobile-web-mode) #screenVideo::-webkit-media-controls-panel,
body:not(.mobile-web-mode) #screenVideo::-webkit-media-controls-overlay-play-button {
  display: none !important;
}

.screenEmpty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: rgb(var(--bg-deep-rgb) / 0.62);
}
.screenEmpty::before {
  content: "";
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgb(var(--border-rgb) / 0.2);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, transparent), color-mix(in srgb, var(--accent) 2%, transparent)), rgb(var(--surface-rgb) / 0.03);
  box-shadow:
    inset 0 1px 0 rgb(var(--surface-rgb) / 0.06),
    0 8px 24px rgb(var(--shadow-rgb) / 0.3);
}
.screenPreview.hasStream .screenEmpty {
  opacity: 0;
  pointer-events: none;
}

.centerColumn.theaterMode,
.centerColumn.cameraFocusMode {
  gap: 12px;
  background: var(--bg);
}

.centerColumn.theaterMode .participantGrid {
  display: none;
}

.screenTheater {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(84px, 96px);
  gap: 8px;
}

.screenTheater.hidden {
  display: none;
}

.screenTheaterTopbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
}

.screenTheaterTitle {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: var(--text-base);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screenTheaterActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.screenTheaterStopViewBtn,
.screenTheaterGridBtn,
.screenTheaterCloseBtn {
  min-height: var(--control-h-sm);
  border-radius: var(--radius-sm);
  padding: 4px 11px;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.screenTheaterStopViewBtn:focus-visible,
.screenTheaterGridBtn:focus-visible,
.screenTheaterCloseBtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Leaving a stream is not destructive: a neutral button, red only on hover. */
.screenTheaterStopViewBtn {
  border: 1px solid var(--border-hover);
  background: rgb(var(--surface-rgb) / 0.05);
  color: var(--text);
}

.screenTheaterStopViewBtn:hover {
  border-color: rgb(var(--danger-rgb) / 0.45);
  background: rgb(var(--danger-rgb) / 0.14);
  color: var(--danger-text);
}

.screenTheaterGridBtn,
.screenTheaterCloseBtn {
  border: 1px solid rgb(var(--border-rgb) / 0.24);
  background: rgb(var(--surface-rgb) / 0.05);
  color: var(--text);
}

.screenTheaterGridBtn:hover,
.screenTheaterCloseBtn:hover {
  border-color: rgb(var(--border-rgb) / 0.38);
  background: rgb(var(--surface-rgb) / 0.08);
}

.screenTheaterMain {
  min-height: 0;
  display: flex;
  border-radius: var(--radius);
  background: var(--media-bg);
  box-shadow: 0 18px 44px rgb(var(--shadow-rgb) / 0.34);
  overflow: hidden;
}

.centerColumn.theaterMode .screenPreview {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

/* A watched stream keeps playing in a small floating player while DMs are open. */
.screenMiniPlayer {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 240;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 44px rgb(var(--shadow-rgb) / 0.34);
  overflow: hidden;
}

.screenMiniPlayer.hidden {
  display: none;
}

.screenMiniPlayerHeader {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
}

.screenMiniPlayerTitle {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screenMiniPlayerBtn {
  flex-shrink: 0;
  min-height: var(--control-h-sm);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 2px 9px;
  background: rgb(var(--surface-rgb) / 0.05);
  color: var(--text);
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}

.screenMiniPlayerBtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.screenMiniPlayerStopBtn:hover {
  border-color: rgb(var(--danger-rgb) / 0.45);
  background: rgb(var(--danger-rgb) / 0.14);
  color: var(--danger-text);
}

.screenMiniPlayer .screenPreview {
  flex: none;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
}

.screenMiniPlayer #screenVideo {
  min-height: 0;
}

.screenTheaterStrip {
  min-height: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.screenTheaterStrip.theaterParticipantStrip {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 170px));
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 4px;
}

.screenTheaterStrip.theaterParticipantStrip.count-many {
  max-width: none;
  grid-template-columns: repeat(var(--theater-strip-count, 5), minmax(0, 1fr));
  justify-content: stretch;
}

.screenTheaterTile {
  position: relative;
  flex: 0 0 112px;
  width: 112px;
  min-height: 72px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  overflow: hidden;
  cursor: default;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.screenTheaterStrip.theaterParticipantStrip .screenTheaterTile {
  flex: initial;
  width: 100%;
  max-width: 170px;
  min-width: 0;
  justify-self: center;
}

.screenTheaterStrip.theaterParticipantStrip.count-many .screenTheaterTile {
  max-width: 180px;
}

button.screenTheaterTile {
  cursor: pointer;
}

.screenTheaterTile.active {
  border-color: color-mix(in srgb, var(--accent) 88%, transparent);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent),
    0 12px 28px rgb(var(--shadow-rgb) / 0.28);
}

.screenTheaterTile.speaking {
  border-color: var(--accent);
}

.screenTheaterTile.active.speaking {
  border-color: var(--accent);
}

.screenTheaterTile:hover {
  border-color: rgb(var(--border-rgb) / 0.38);
}

.screenTheaterAvatar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
}

.screenTheaterAvatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgb(var(--surface-rgb) / 0.342);
}

.participantRing.isYotaAvatar,
.participantRing.isYotaAvatar::before,
.participantRing.isYotaAvatar::after,
.participantAvatar.isYotaAvatar,
.participantAvatarImg.isYotaAvatar,
.selfAvatarPill.isYotaAvatar,
.avatarPreview.isYotaAvatar,
.avatarPreview.isYotaAvatar img,
.screenTheaterAvatar img.isYotaAvatar {
  border-radius: 16%;
}

.screenTheaterStrip .participantLiveBadge.screenTheaterLiveBadge {
  top: 6px;
  right: 6px;
  height: 18px;
  padding: 0 6px;
  font-size: 8px;
}

/* Another live share in the strip: an always-visible switch cue, filled on hover. */
.screenTheaterSwitchCue {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 5;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, rgb(var(--shadow-rgb) / 0.6));
  color: var(--text);
  font-size: var(--text-2xs);
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.screenTheaterTile.canSwitchShare:hover,
.screenTheaterTile.canSwitchShare:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
  outline: none;
}

.screenTheaterTile.canSwitchShare:hover .screenTheaterSwitchCue,
.screenTheaterTile.canSwitchShare:focus-visible .screenTheaterSwitchCue {
  background: var(--accent-fill);
  border-color: transparent;
  color: var(--on-accent-fill);
}

/* Hide members: an arrow tab sits in the 8px handle row between the stream and
   the strip (row gaps are off here, so the handle row is the spacing). */
.screenTheater.screenShareTheater {
  row-gap: 0;
  grid-template-rows: auto minmax(0, 1fr) 8px minmax(84px, 96px);
}

.screenTheater.screenShareTheater > .screenTheaterTopbar {
  margin-bottom: 8px;
}

.screenTheaterMembersHandle {
  position: relative;
  z-index: 6;
  min-height: 0;
}

.screenTheaterMembersToggle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(var(--border-rgb) / 0.32);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-muted, var(--text));
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgb(var(--shadow-rgb) / 0.35);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

/* CSS chevron: points down (hide) while the strip shows, up (show) when hidden. */
.screenTheaterMembersToggle::before {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.75px solid currentColor;
  border-bottom: 1.75px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.screenTheater.membersHidden .screenTheaterMembersToggle::before {
  transform: translateY(2px) rotate(-135deg);
}

.screenTheaterMembersToggle:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  color: var(--text);
}

.screenTheaterMembersToggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.screenTheater.screenShareTheater.membersHidden {
  grid-template-rows: auto minmax(0, 1fr) 8px;
}

body.screen-broadcast-fullscreen.screen-broadcast-theater .screenTheaterMembersHandle {
  display: none !important;
}

/* "İzlemeye ekle": watch this share next to the focused one. */
.screenTheaterAddShareBtn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 6;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid rgb(var(--border-rgb) / 0.38);
  background: rgb(var(--shadow-rgb) / 0.62);
  color: var(--text);
  font-size: var(--text-2xs);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.screenTheaterAddShareBtn:hover,
.screenTheaterAddShareBtn:focus-visible {
  border-color: transparent;
  background: var(--accent-fill);
  color: var(--on-accent-fill);
  outline: none;
}

.screenTheaterWatchedAsideBadge {
  font-size: var(--text-2xs);
}

/* Streams watched next to the focused one: a column of small live tiles. */
.screenTheaterMain {
  position: relative;
}

.screenTheaterMain > #screenPreview {
  order: 1;
}

.screenTheaterWatched {
  order: 2;
  flex: 0 0 clamp(168px, 20%, 260px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  overflow-y: auto;
  background: rgb(var(--shadow-rgb) / 0.28);
}

.screenTheaterWatched.hidden,
.screenTheaterFocusAudioBtn.hidden,
.screenWatchedPaused.hidden,
.screenWatchedBtn.hidden {
  display: none;
}

/* The focused stream's own mute, at the head of the watched column. */
.screenTheaterFocusAudioBtn {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgb(var(--border-rgb) / 0.24);
  border-radius: 999px;
  background: rgb(var(--surface-rgb) / 0.05);
  color: var(--text);
  font: inherit;
  font-size: var(--text-2xs);
  font-weight: 600;
  cursor: pointer;
}

.screenTheaterFocusAudioBtn:hover {
  border-color: rgb(var(--border-rgb) / 0.38);
  background: rgb(var(--surface-rgb) / 0.08);
}

.screenTheaterFocusAudioBtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.screenWatchedTile {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgb(var(--border-rgb) / 0.24);
  border-radius: calc(var(--radius) - 4px);
  background: var(--media-bg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.screenWatchedTile:hover,
.screenWatchedTile:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
  outline: none;
}

.screenWatchedVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.screenWatchedTile.isLoading .screenWatchedVideo,
.screenWatchedTile.isPaused .screenWatchedVideo {
  filter: blur(3px) brightness(0.6);
}

.screenWatchedName {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 72px);
  padding: 1px 6px;
  border-radius: 999px;
  background: rgb(var(--shadow-rgb) / 0.62);
  color: var(--text);
  font-size: var(--text-2xs);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screenWatchedPaused {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgb(var(--shadow-rgb) / 0.62);
  color: var(--text);
  font-size: var(--text-2xs);
}

.screenWatchedActions {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
  gap: 4px;
}

.screenWatchedBtn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(var(--border-rgb) / 0.32);
  border-radius: 999px;
  background: rgb(var(--shadow-rgb) / 0.62);
  color: var(--text);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.screenWatchedBtn:hover,
.screenWatchedBtn:focus-visible {
  border-color: transparent;
  background: var(--accent-fill);
  color: var(--on-accent-fill);
  outline: none;
}

.screenTheater.membersHidden .screenTheaterStrip {
  display: none;
}

.screenTheaterWatchingBadge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--accent-fill);
  border: 0;
  color: var(--on-accent-fill);
  font-size: var(--text-2xs);
  font-weight: 600;
  pointer-events: none;
}

.screenTheaterStrip .participantName.participantNameBadge {
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 6px;
  font-size: 10px;
  border-radius: 6px;
}

.screenPreview:fullscreen,
.screenPreview:-webkit-full-screen,
#screenVideo:fullscreen,
#screenVideo:-webkit-full-screen {
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-width: 100dvw;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
  aspect-ratio: auto;
}
#screenVideo:fullscreen,
#screenVideo:-webkit-full-screen {
  object-fit: contain;
  background: var(--media-bg);
}

/* Electron: native tam ekran + sadece yayın (modal yerine) */
body.screen-broadcast-fullscreen #titlebar,
body.screen-broadcast-fullscreen .topBar,
body.screen-broadcast-fullscreen .leftColumn,
body.screen-broadcast-fullscreen .centerColumn,
body.screen-broadcast-fullscreen .rightColumn {
  display: none !important;
}
body.screen-broadcast-fullscreen #roomView .layout.roomLayout {
  display: block;
  height: 100%;
  min-height: 0;
}
body.screen-broadcast-fullscreen #screenViewerHost[hidden] {
  display: flex !important;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 60;
  background: var(--media-bg);
}
body.screen-broadcast-fullscreen #screenPreview {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  border: none;
  aspect-ratio: auto;
}

/* Keep the relocated theater preview visible while Electron owns fullscreen. */
body.screen-broadcast-fullscreen.screen-broadcast-theater #roomView .centerColumn {
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: 61;
  width: 100%;
  max-width: none;
  height: 100%;
  padding: 0;
  background: var(--media-bg);
}
body.screen-broadcast-fullscreen.screen-broadcast-theater #roomView .rightColumn {
  display: none !important;
}
body.screen-broadcast-fullscreen.screen-broadcast-theater .screenTheater {
  display: grid !important;
  width: 100%;
  height: 100%;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}
body.screen-broadcast-fullscreen.screen-broadcast-theater .screenTheaterTopbar,
body.screen-broadcast-fullscreen.screen-broadcast-theater .screenTheaterStrip {
  display: none !important;
}
body.screen-broadcast-fullscreen.screen-broadcast-theater .screenTheaterMain,
body.screen-broadcast-fullscreen.screen-broadcast-theater #screenPreview {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

/* ─── SCREEN PREVIEW OVERLAY CONTROLS ─── */
.screenOverlayControls {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translate(-50%, 6px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 266px;
  max-width: calc(100% - 32px);
  padding: 8px 10px;
  border-radius: 12px;
  background: rgb(var(--card-rgb) / 0.55);
  border: 1px solid rgb(var(--border-rgb) / 0.18);
  box-shadow:
    0 12px 32px rgb(var(--shadow-rgb) / 0.45),
    inset 0 1px 0 rgb(var(--surface-rgb) / 0.06);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
  color: var(--text);
}
.screenPreview.hasStream:hover .screenOverlayControls,
.screenPreview.hasStream:focus-within .screenOverlayControls,
.screenPreview.hasStream.overlayPinned .screenOverlayControls,
.screenPreview.hasStream.overlayAwake .screenOverlayControls {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.screenPreview:not(.hasStream) .screenOverlayControls {
  display: none;
}

.screenOverlayLabel {
  display: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: rgb(var(--surface-rgb) / 0.78);
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screenOverlayBar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.screenOverlayBtn {
  width: 28px;
  height: 28px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  background: rgb(var(--surface-rgb) / 0.04);
  color: var(--text);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}
.screenOverlayBtn:hover {
  background: rgb(var(--surface-rgb) / 0.1);
  border-color: rgb(var(--border-rgb) / 0.28);
}
.screenOverlayBtn:active {
  transform: translateY(0.5px);
}
.screenOverlayBtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.screenOverlayBtn[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent-text);
}

.screenOverlayBtn .iconVolumeOff,
.screenOverlayBtn .iconFullscreenExit {
  display: none;
}
.screenOverlayBtn.isMuted .iconVolumeOn {
  display: none;
}
.screenOverlayBtn.isMuted .iconVolumeOff {
  display: block;
}
.screenOverlayBtn.isFullscreen .iconFullscreenEnter {
  display: none;
}
.screenOverlayBtn.isFullscreen .iconFullscreenExit {
  display: block;
}

.screenOverlayBtnLabel {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.micOverlayBtn .iconOff,
.deafOverlayBtn .iconOff {
  display: none;
}
.micOverlayBtn.muted-active .iconOn,
.deafOverlayBtn.deaf-active .iconOn {
  display: none;
}
.micOverlayBtn.muted-active .iconOff,
.deafOverlayBtn.deaf-active .iconOff {
  display: block;
}
.micOverlayBtn.muted-active,
.deafOverlayBtn.deaf-active {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent-text);
}
.micOverlayBtn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.screenOverlayVolume {
  flex: 0 0 98px;
  min-width: 92px;
  max-width: 110px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    var(--primary) var(--screen-overlay-fill, 33%),
    rgb(var(--border-rgb) / 0.22) var(--screen-overlay-fill, 33%),
    rgb(var(--border-rgb) / 0.22) 100%
  );
  border-radius: 999px;
  cursor: pointer;
  outline: none;
}
.screenOverlayVolume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--on-media);
  border: 2px solid var(--primary);
  box-shadow: 0 2px 6px rgb(var(--shadow-rgb) / 0.35);
  cursor: pointer;
}
.screenOverlayVolume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--on-media);
  border: 2px solid var(--primary);
  cursor: pointer;
}
.screenOverlayVolume:focus-visible {
  box-shadow: var(--ring);
}

.screenOverlayVolumeValue {
  flex: none;
  min-width: 34px;
  text-align: right;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: rgb(var(--surface-rgb) / 0.72);
}

/* Fullscreen spacing tweaks (both native :fullscreen and body class fallback) */
.screenPreview:fullscreen .screenOverlayControls,
.screenPreview:-webkit-full-screen .screenOverlayControls,
body.screen-broadcast-fullscreen #screenPreview .screenOverlayControls {
  bottom: 28px;
  min-width: 420px;
  padding: 14px 18px;
  border-radius: 16px;
  gap: 10px;
}
.screenPreview:fullscreen .screenOverlayBar,
.screenPreview:-webkit-full-screen .screenOverlayBar,
body.screen-broadcast-fullscreen #screenPreview .screenOverlayBar {
  gap: 14px;
}
.screenPreview:fullscreen .screenOverlayBtn,
.screenPreview:-webkit-full-screen .screenOverlayBtn,
body.screen-broadcast-fullscreen #screenPreview .screenOverlayBtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.screenPreview:fullscreen .screenOverlayLabel,
.screenPreview:-webkit-full-screen .screenOverlayLabel,
body.screen-broadcast-fullscreen #screenPreview .screenOverlayLabel {
  display: block;
  font-size: 12px;
}
.screenPreview:fullscreen .screenOverlayVolume,
.screenPreview:-webkit-full-screen .screenOverlayVolume,
body.screen-broadcast-fullscreen #screenPreview .screenOverlayVolume {
  flex: 1;
  min-width: 220px;
  max-width: none;
}
.screenPreview:fullscreen .screenOverlayVolumeValue,
.screenPreview:-webkit-full-screen .screenOverlayVolumeValue,
body.screen-broadcast-fullscreen #screenPreview .screenOverlayVolumeValue {
  font-size: 12px;
  min-width: 46px;
}
/* Fullscreen auto-hide behavior: JS toggles .overlayAwake on activity. */
.screenPreview:fullscreen .screenOverlayControls,
.screenPreview:-webkit-full-screen .screenOverlayControls,
body.screen-broadcast-fullscreen #screenPreview .screenOverlayControls {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
}
.screenPreview:fullscreen.overlayAwake .screenOverlayControls,
.screenPreview:-webkit-full-screen.overlayAwake .screenOverlayControls,
body.screen-broadcast-fullscreen #screenPreview.overlayAwake .screenOverlayControls {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
/* Fullscreen'de hover/focus kuralı auto-hide davranisini ezmesin. */
.screenPreview:fullscreen.hasStream:hover .screenOverlayControls,
.screenPreview:fullscreen.hasStream:focus-within .screenOverlayControls,
.screenPreview:-webkit-full-screen.hasStream:hover .screenOverlayControls,
.screenPreview:-webkit-full-screen.hasStream:focus-within .screenOverlayControls,
body.screen-broadcast-fullscreen #screenPreview.hasStream:hover .screenOverlayControls,
body.screen-broadcast-fullscreen #screenPreview.hasStream:focus-within .screenOverlayControls {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
}
/* overlayAwake fullscreen'de her zaman en baskin gorunum durumu */
.screenPreview:fullscreen.hasStream.overlayAwake .screenOverlayControls,
.screenPreview:-webkit-full-screen.hasStream.overlayAwake .screenOverlayControls,
body.screen-broadcast-fullscreen #screenPreview.hasStream.overlayAwake .screenOverlayControls {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.screenPreview:fullscreen .screenViewerBanner,
.screenPreview:-webkit-full-screen .screenViewerBanner,
body.screen-broadcast-fullscreen #screenPreview .screenViewerBanner {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s, 0.22s;
}

.screenPreview:fullscreen.overlayAwake .screenViewerBanner,
.screenPreview:-webkit-full-screen.overlayAwake .screenViewerBanner,
body.screen-broadcast-fullscreen #screenPreview.overlayAwake .screenViewerBanner {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s, 0s;
}

/* Outside fullscreen the banner follows the same triggers as the overlay controls. */
.screenPreview.hasStream .screenViewerBanner {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s, 0.22s;
}
.screenPreview.hasStream:hover .screenViewerBanner,
.screenPreview.hasStream:focus-within .screenViewerBanner,
.screenPreview.hasStream.overlayPinned .screenViewerBanner,
.screenPreview.hasStream.overlayAwake .screenViewerBanner {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s, 0s;
}
/* In fullscreen only overlayAwake shows it, as for the controls. */
.screenPreview:fullscreen.hasStream:hover .screenViewerBanner,
.screenPreview:fullscreen.hasStream:focus-within .screenViewerBanner,
.screenPreview:-webkit-full-screen.hasStream:hover .screenViewerBanner,
.screenPreview:-webkit-full-screen.hasStream:focus-within .screenViewerBanner,
body.screen-broadcast-fullscreen #screenPreview.hasStream:hover .screenViewerBanner,
body.screen-broadcast-fullscreen #screenPreview.hasStream:focus-within .screenViewerBanner {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s, 0.22s;
}
.screenPreview:fullscreen.hasStream.overlayAwake .screenViewerBanner,
.screenPreview:-webkit-full-screen.hasStream.overlayAwake .screenViewerBanner,
body.screen-broadcast-fullscreen #screenPreview.hasStream.overlayAwake .screenViewerBanner {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s, 0s;
}

/* ─── ACCORDION ─── */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.accordionHeader {
  width: 100%;
  text-align: left;
  min-height: 40px;
  padding: 9px 12px;
  background: var(--surface);
  border: none;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition);
}
.accordionHeader:hover {
  background: var(--surface-hover);
}
.accordionHeader:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 75%, transparent);
}
.accordionChevron {
  margin-left: auto;
  transition: transform var(--transition);
  opacity: 0.5;
}
.accordion.open .accordionChevron {
  transform: rotate(180deg);
}
.accordionBody {
  display: none;
  padding: 10px;
  background: rgb(var(--bg-deep-rgb) / 0.3);
  border-top: 1px solid var(--border);
}
.accordion.open .accordionBody {
  display: grid;
  gap: 8px;
}

/* ─── STATS ─── */
.statsCard {
  gap: 9px;
}
.statsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.statItem {
  padding: 9px 11px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}
.statItem strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

/* ─── LOG ─── */
.logCard {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
}
.logFull {
  flex: 1;
  min-height: 0;
  overflow: auto;
  width: 100%;
  word-break: break-word;
}
.logText {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.4;
  font-family: "SF Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  color: color-mix(in srgb, var(--text-secondary) 85%, transparent);
}
.logButtons {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* ─── AUDIO CONTROLS ─── */
.audioCardPanel {
  gap: 10px;
}

.mutedText {
  color: var(--muted);
  font-size: 11px;
}
.mutedBadge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 500;
}

/* ─── SCROLLBARS ─── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-thumb {
  background: rgb(var(--border-rgb) / 0.18);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgb(var(--border-rgb) / 0.32);
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ─── SELECTION ─── */
::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: white;
}

/* ─── FOCUS ─── */
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* ─── ANIMATIONS ─── */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@keyframes dotBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}
@keyframes speakRing {
  from {
    box-shadow:
      0 0 0 2px var(--accent-soft),
      0 0 12px var(--accent-glow);
  }
  to {
    box-shadow:
      0 0 0 8px var(--accent-glow),
      0 0 28px var(--accent-glow);
  }
}
@keyframes speakRingNoGlow {
  from {
    box-shadow: 0 0 0 2px var(--accent-soft);
  }
  to {
    box-shadow: 0 0 0 5px var(--accent-soft);
  }
}
@keyframes speakPulseNoGlow {
  0% {
    box-shadow: 0 0 0 0 var(--accent-soft);
    opacity: 1;
  }
  45% {
    box-shadow: 0 0 0 11px var(--accent-soft);
  }
  75% {
    box-shadow: 0 0 0 20px transparent;
    opacity: 0.5;
  }
  100% {
    box-shadow: 0 0 0 20px transparent;
    opacity: 0;
  }
}
@keyframes speakPulse {
  0% {
    box-shadow:
      0 0 0 0 var(--accent-glow),
      0 0 0 0 var(--accent-soft);
    opacity: 1;
  }
  45% {
    box-shadow:
      0 0 0 11px var(--accent-soft),
      0 0 0 0 var(--accent-soft);
  }
  75% {
    box-shadow:
      0 0 0 20px transparent,
      0 0 0 11px var(--accent-soft);
    opacity: 0.5;
  }
  100% {
    box-shadow:
      0 0 0 20px transparent,
      0 0 0 20px transparent;
    opacity: 0;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── BODY STATE CLASSES ─── */
body.window-maximized .app,
body.window-fullscreen .app {
  --window-state: 1; /* handled naturally by flex */
}

/* ─── UTILITY ─── */
.hidden {
  display: none !important;
}
.column {
  display: grid;
  gap: 10px;
}

/* ─── RESPONSIVE ─── */
/* ─── RESPONSIVE ─── */

/* Large desktop: tighten side columns */
@media (max-width: 1200px) {
  body {
    min-width: 0;
  }

  .layout {
    --layout-left-width: 250px;
    --layout-right-width: 280px;
  }
}

/* Small desktop & large tablet landscape */
@media (max-width: 1024px) {
  body {
    min-width: 0;
  }

  .layout {
    --layout-left-width: 230px;
    --layout-right-width: 260px;
  }

  .participantGrid:not(.isEmpty) {
    grid-template-columns: repeat(var(--participant-grid-cols, 2), minmax(0, 1fr));
    gap: 12px;
  }

  .buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tabBtn {
    padding: 7px 10px;
    font-size: 12px;
  }

  .lobbyHeader {
    margin-top: 36px;
  }
}

/* Tablet: lobby & in-room panels (3-column room layout unchanged until 768px) */
@media (max-width: 960px) {
  body {
    min-width: 0;
    height: 100dvh;
  }

  .lobbyHeader {
    margin-top: 28px;
    margin-bottom: 18px;
  }

  .lobbyHeader h1 {
    font-size: 26px;
  }

  .participantGrid:not(.isEmpty) {
    grid-template-columns: repeat(var(--participant-grid-cols, 2), minmax(0, 1fr));
    gap: 10px;
    align-content: start;
    padding: 0;
  }

  .screenTheater {
    grid-template-rows: auto minmax(0, 1fr) minmax(78px, 88px);
  }

  .screenTheater.screenShareTheater {
    grid-template-rows: auto minmax(0, 1fr) 8px minmax(78px, 88px);
  }

  .screenTheaterTile {
    flex-basis: 100px;
    width: 100px;
    min-height: 68px;
  }

  .participantGrid.count-1 {
    grid-template-columns: minmax(0, 100%);
  }

  .participantGrid.count-1 .participantCard {
    max-height: min(44vh, 360px);
  }

  .chatInputRow {
    grid-template-columns: 1fr;
  }

  .chatInputRow .btn {
    width: 100%;
  }

  .chatActionLauncher {
    width: 100%;
  }

  .settingsModal {
    width: min(760px, calc(100vw - 24px));
    height: calc(100dvh - var(--titlebar-height) - 24px);
  }

  .toastContainer {
    left: 10px;
    right: 10px;
    top: calc(var(--titlebar-height) + var(--topbar-height) + 10px);
  }

  .toast {
    width: 100%;
  }

  .modalContent {
    width: min(94vw, 460px);
    max-height: 92vh;
    overflow: auto;
  }
}

/* Mobile room stack (≤768px only; desktop/tablet ≥769px keeps 3-column layout) */
@media (max-width: 768px) {
  :root {
    --topbar-height: auto;
    --bottombar-height: auto;
  }

  .toastContainer {
    top: 10px;
  }

  #roomView.view.active {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(220px, 260px) minmax(260px, auto) minmax(320px, auto);
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
  }

  #roomView.view.active > .topBar {
    grid-row: 1;
    grid-column: 1;
    height: auto;
    align-items: flex-start;
    padding: 8px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }

  #roomView.view.active > .topBar .topBarLeft,
  #roomView.view.active > .topBar .topBarRight {
    width: 100%;
  }

  #roomView.view.active > .topBar .topBarRight {
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
  }

  #roomView.view.active > .topBar .topRoomName {
    max-width: min(55vw, 280px);
  }

  #roomView.view.active > .topBar .statusBar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  #roomView.view.active > .topBar .statusBar .statusPill {
    flex: 0 0 auto;
  }

  #roomView.view.active > .layout {
    display: contents;
  }

  #roomView.view.active .centerColumn {
    grid-row: 3;
    grid-column: 1;
    min-height: 260px;
    overflow: hidden;
  }

  .appWorkspace > .bottomBar {
    grid-row: 2;
    grid-column: 2;
    flex-shrink: 0;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 8px;
    flex-wrap: nowrap;
    padding: 8px 10px;
  }

  #roomView.view.active .rightColumn {
    grid-row: 4;
    grid-column: 1;
    border-left: none;
    border-top: 1px solid var(--border);
    min-height: 260px;
    max-height: none;
    overflow: hidden;
  }

  #roomView.view.active .rightColumn .tabBar {
    overflow-x: auto;
    padding: 6px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }

  #roomView.view.active .rightColumn .tabBtn {
    flex: 0 0 auto;
    min-width: 86px;
    padding: 6px 8px;
  }

  #roomView.view.active .leftColumn {
    grid-row: 2;
    grid-column: 1;
    border-right: none;
    border-top: 1px solid var(--border);
    max-height: 260px;
    min-height: 0;
    overflow: hidden;
    justify-content: flex-start;
    padding: 10px;
  }

  .appWorkspace > .bottomBar .bbLeft {
    flex: none;
    grid-column: 1;
    grid-row: 1;
  }

  .appWorkspace > .bottomBar .bbRight {
    flex: none;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .appWorkspace > .bottomBar .bbCenter {
    order: unset;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .appWorkspace > .bottomBar .bbCenter .barBtn {
    flex: none;
    width: 100%;
  }

  .appWorkspace > .bottomBar .bbCenter .mediaSplitControl {
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }

  .appWorkspace > .bottomBar .bbCenter .mediaSplitControl .mediaSplitMain {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  /* Reactions and the soundboard share the last row, side by side in the middle; dense packing
     lets the later soundboard fill the cell left of the reactions. */
  .appWorkspace > .bottomBar .bbCenter {
    grid-auto-flow: row dense;
  }

  .appWorkspace > .bottomBar .voiceReactionBar {
    grid-column: 2;
    width: fit-content;
    max-width: 100%;
    justify-self: start;
  }

  .appWorkspace > .bottomBar .soundboardBar {
    grid-column: 1;
    width: fit-content;
    justify-self: end;
  }

  .lobbyColumns {
    width: min(92vw, 420px);
  }

  .participantGrid:not(.isEmpty) {
    grid-template-columns: repeat(var(--participant-grid-cols, 2), minmax(0, 1fr));
    gap: 8px;
  }

  .participantGrid.compact:not(.count-1):not(.count-2) {
    grid-template-columns: repeat(var(--participant-grid-cols, 3), minmax(0, 1fr));
  }

  #roomView.view.active > .topBar {
    padding: 7px 9px;
  }

  .buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .modalContent {
    width: min(94vw, 420px);
  }
}

/* Mobile (large phones): compact panels and controls */
@media (max-width: 640px) {
  #roomView.view.active {
    grid-template-rows: auto minmax(220px, 260px) minmax(240px, auto) minmax(320px, auto);
  }

  #roomView.view.active .centerColumn {
    min-height: 240px;
    padding: 8px 10px;
  }

  #roomView.view.active .rightColumn {
    min-height: 220px;
    max-height: none;
  }

  #roomView.view.active .leftColumn {
    max-height: 260px;
    padding: 8px;
    gap: 6px;
  }

  #roomView .leftColumn .cardTitle {
    font-size: 11px;
    padding-bottom: 2px;
  }

  #roomView .roomsListSidebar {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
  }

  .appWorkspace > .bottomBar {
    padding: 8px 10px;
  }

  .appWorkspace > .bottomBar .bbCenter .barBtn {
    min-height: 40px;
  }

  .appWorkspace > .bottomBar .bbVersion {
    margin-right: 0;
    gap: 4px;
    max-width: 40vw;
    overflow: hidden;
    flex-wrap: nowrap;
  }

  .appWorkspace > .bottomBar .appVersionText {
    font-size: 10px;
  }

  .appWorkspace > .bottomBar #feedbackBtn {
    padding: 2px 6px;
    font-size: 9px;
  }

  .lobbyColumns {
    width: min(94vw, 440px);
  }

  .lobbyButtons {
    grid-template-columns: 1fr !important;
  }

  .topRoomName {
    max-width: 44vw;
  }

  .statusPill {
    font-size: 9px;
    padding: 3px 7px;
  }

  #roomView.view.active .rightColumn .tabBar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 6px;
    gap: 4px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  #roomView.view.active .rightColumn .tabBtn {
    flex: 0 0 auto;
    min-width: 72px;
    min-height: 32px;
    padding: 4px 8px;
    font-size: 10px;
  }

  .tabContent {
    min-height: 0;
  }

  .tabContent .tabPane {
    padding: 10px;
  }

  .buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logButtons {
    grid-template-columns: 1fr !important;
  }

  .screenTheater {
    grid-template-rows: auto minmax(0, 1fr) minmax(76px, 96px);
  }

  .screenTheater.screenShareTheater {
    grid-template-rows: auto minmax(0, 1fr) 8px minmax(76px, 96px);
  }

  .screenTheaterStrip,
  .screenTheaterStrip.theaterParticipantStrip {
    min-height: 76px;
    flex-shrink: 0;
  }

  .screenTheaterTile {
    flex: 0 0 108px;
    width: 108px;
    min-height: 72px;
  }

  .screenTheaterStrip.theaterParticipantStrip .screenTheaterTile {
    min-height: 72px;
  }

  .participantGrid:not(.isEmpty) {
    gap: 8px;
    align-content: start;
    --participant-avatar-size: clamp(44px, 12vw, 64px);
    --participant-card-min-height: clamp(100px, 18vh, 160px);
    --participant-name-size: clamp(10px, 2.8vw, 12px);
  }

  .participantGrid.count-1 .participantCard {
    --participant-avatar-size: clamp(56px, 16vw, 88px);
    max-height: min(36vh, 300px);
  }

  .participantName.participantNameBadge {
    left: 8px;
    bottom: 8px;
    max-width: min(68%, calc(100% - 72px));
    padding: 4px 7px;
  }

  .participantBadges {
    right: 8px;
    bottom: 8px;
  }

  .settingsModal {
    width: calc(100vw - 16px);
    height: calc(100dvh - var(--titlebar-height) - 16px);
    border-radius: var(--radius);
  }

  .modalContent {
    padding: 14px;
  }
}

/* Small phones */
@media (max-width: 420px) {
  .lobbyHeader {
    margin-top: 20px;
  }

  .lobbyHeader h1 {
    font-size: 22px;
  }

  .lobbyHeader .logo {
    margin-bottom: 8px;
  }

  .lobbyColumns {
    width: 94vw;
  }

  .topRoomName {
    max-width: 38vw;
    font-size: 12px;
  }

  .tabBtn {
    min-width: 72px;
    padding: 6px 7px;
    font-size: 11px;
  }

  .participantName.participantNameBadge {
    font-size: 10px;
  }

  .chatInputRow input,
  .chatInputRow textarea {
    font-size: 13px;
  }

  .modalContent {
    padding: 12px;
    border-radius: var(--radius-sm);
  }

  .settingsModalHeader {
    padding: 10px 12px;
  }

  .toastContainer {
    left: 8px;
    right: 8px;
    top: 8px;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .participantName.participantNameBadge {
    font-size: 9px;
  }

  .tabBtn {
    min-width: 66px;
    font-size: 10px;
    padding: 5px 6px;
  }

  .bottomBar .barBtn {
    font-size: 11px;
    padding: 6px 8px;
  }

  .buttons {
    grid-template-columns: 1fr 1fr;
  }
}

/* Short / landscape phones & tablets */
@media (max-height: 760px) and (max-width: 768px) {
  #roomView.view.active {
    grid-template-rows: auto minmax(180px, 220px) minmax(160px, auto) minmax(260px, auto);
  }

  #roomView.view.active .centerColumn {
    min-height: 160px;
  }

  #roomView.view.active .rightColumn {
    min-height: 130px;
    max-height: none;
  }

  #roomView.view.active .leftColumn {
    max-height: 220px;
  }
}

@media (max-height: 560px) and (orientation: landscape) and (min-width: 641px) {
  .lobbyHeader {
    margin-top: 12px;
    margin-bottom: 10px;
  }

  .lobbyHeader h1 {
    font-size: 20px;
  }

  .lobbyHeader .logo {
    height: 40px;
    margin-bottom: 6px;
  }

  /* Re-expand to 3 columns on wide-short landscape phones */
  .layout {
    grid-template-columns: minmax(170px, 280px) 1fr minmax(200px, 260px);
    grid-template-rows: 1fr;
  }

  .centerColumn {
    grid-column: 2;
    grid-row: 1;
  }

  .leftColumn {
    grid-column: 1;
    grid-row: 1;
    border-top: none;
    border-right: 1px solid var(--border);
  }

  .rightColumn {
    grid-column: 3;
    grid-row: 1;
    border-top: none;
    border-left: 1px solid var(--border);
  }

  .bottomBar {
    padding: 6px 10px;
  }

  .bbCenter {
    order: 0;
    width: auto;
  }

  .bbLeft,
  .bbRight {
    flex: 1 1 auto;
  }
}

/* Safe-area insets for notched / rounded-corner devices */
@supports (padding: max(0px)) {
  .titlebar {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .topBar {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .bottomBar {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  .settingsContent {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .toastContainer {
    padding-top: env(safe-area-inset-top);
  }
}

/* Touch-friendly tap targets on coarse pointers */
@media (pointer: coarse) {
  .btn,
  .barBtn,
  .tabBtn {
    min-height: 38px;
  }

  .participantCard {
    min-height: clamp(100px, 18vh, 180px);
  }

  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
}

/* Respect the user's motion preference. The Roulette spin is the game's result reveal and runs
   identically in every motion mode, so its card must not be collapsed to the global 0.01ms fallback. */
@media (prefers-reduced-motion: reduce) {
  :where(:not(.rouletteCard, .rouletteCard *)),
  :where(:not(.rouletteCard, .rouletteCard *))::before,
  :where(:not(.rouletteCard, .rouletteCard *))::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .participantReaction {
    opacity: 1;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 34px)), -8px, 0) !important;
    animation: participantReactionReduced 2s linear forwards !important;
    will-change: opacity;
  }
}

@keyframes participantReactionReduced {
  0%,
  82% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.bootSplash {
  position: fixed;
  inset: var(--titlebar-height) 0 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.bootSplashCard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgb(var(--surface-rgb) / 0.05);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.bootLogo {
  flex-shrink: 0;
  line-height: 0;
}

.bootLogo img {
  width: 44px;
  height: 44px;
  display: block;
  border-radius: 14px;
  object-fit: contain;
}

.bootText {
  font-size: 14px;
  color: var(--muted);
}

body.app-booting .app {
  opacity: 0;
}

body.app-ready .bootSplash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.authGate {
  position: fixed;
  inset: var(--titlebar-height) 0 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg-deep);
}

.authCard {
  width: min(100%, 380px);
  padding: 32px 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.authLogo { width: 44px; height: 44px; display: block; margin: 0 auto 14px; }
.authCard h1, .authCard h2 { text-align: center; }
.authCard h1 { margin: 0 0 24px; font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.01em; }
.authCard h2 { margin: 0 0 8px; font-size: var(--text-lg); font-weight: 600; }
.authCard p { margin: 0 0 14px; color: var(--muted); font-size: var(--text-md); line-height: 1.55; text-align: center; }
.authForm { display: grid; gap: 6px; }
.authForm .authField { display: grid; gap: 6px; }
.authForm label { margin-top: 8px; color: var(--text-secondary); font-size: var(--text-sm); font-weight: 500; }
.authForm label:first-child, .authForm .authField:first-child label { margin-top: 0; }
.authForm .btn { min-height: var(--control-h-lg); margin-top: 14px; }
/* Secondary routes (forgot password, back to login) are text actions, not a stack of equal buttons. */
.authSecondary { width: 100%; margin-top: 6px; border-color: transparent; background: transparent; color: var(--text-secondary); }
.authSecondary:hover:not(:disabled) { border-color: transparent; background: var(--surface-hover); color: var(--text); }
.authStatus { margin-bottom: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgb(var(--surface-rgb) / 0.07); color: var(--text-secondary); font-size: var(--text-md); text-align: left; }
/* The sign-in gate stacks the card and its public info links as one centred column. */
.authGate:has(> .authInfoLinks) { align-content: center; gap: 14px; }
.authInfoLinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; max-width: 440px; }
.authInfoLinks a { padding: 4px 8px; border-radius: var(--radius-xs); color: var(--muted); font-size: var(--text-sm); text-decoration: none; transition: color var(--transition-fast), background-color var(--transition-fast); }
.authInfoLinks a:hover { background: var(--surface-hover); color: var(--text-secondary); }
.authInfoLinks a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.authCodeInput { min-height: 48px; font-size: 22px; font-weight: 600; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
body.auth-required .app { visibility: hidden; }
/* The signed-in password dialog reuses the auth card over a dimmed app, above the settings modal. */
.accountPasswordDialog { z-index: 10002; background: rgb(0 0 0 / 0.6); }

/* ─── POLISH FEATURE RESTORE ─── */
/* Kept at the end intentionally so these newer UI pieces win the cascade. */

.bootSplash {
  inset: 0;
  background:
    radial-gradient(ellipse 520px 360px at 50% 42%, transparent, transparent 68%), rgb(var(--bg-deep-rgb) / 0.96);
  backdrop-filter: blur(18px);
}

.bootSplashCard {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 22px 26px;
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  border-radius: 18px;
  background: rgb(var(--card-rgb) / 0.78);
  box-shadow: var(--shadow);
}

.bootLogo {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgb(var(--surface-rgb) / 0.04);
  animation: bootPulse 1.4s ease-in-out infinite;
}

.bootLogo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.bootText {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.app-booting .app,
body.app-booting .titlebar {
  opacity: 0;
}

body.app-ready .app,
body.app-ready .titlebar {
  opacity: 1;
  transition: opacity 0.18s ease;
}

/* A logged-out auth screen is interactive at once; only the protected app's boot keeps the splash. */
body.auth-gate-active .bootSplash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.auth-gate-active .titlebar {
  opacity: 1;
}

@keyframes bootPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 25%, transparent);
  }
  50% {
    transform: scale(1.035);
    box-shadow: 0 0 0 10px transparent;
  }
}

.chatSearchInput {
  flex: 1 1 180px;
  width: auto;
  min-width: min(180px, 100%);
  min-height: var(--control-h);
  height: var(--control-h);
  margin: 0;
}

.chatMessage.chatActionMessage {
  font-style: italic;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.chatMessage.chatSystemMessage {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;

  width: auto;
  max-width: calc(100% - 24px);

  margin: 2px auto 6px;
  padding: 0 0 0 8px;

  background: transparent;
  border: none;
  border-left: 2px solid rgb(var(--border-rgb) / 0.22);
  border-radius: 0;
  box-shadow: none;

  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  /* white-space: nowrap; */
  opacity: 0.95;
}

.chatMessage.chatSystemMessage .chatTimestamp {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
}

.chatTransferTotal {
  position: relative;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  outline: none;
}

.chatTransferTotal:focus-visible {
  border-radius: 3px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}

.chatTransferTooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  padding: 7px 9px;
  transform: translateX(-50%);
  background: rgb(var(--elevated-rgb));
  border: 1px solid rgb(var(--border-rgb) / 0.35);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.3);
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}

.chatTransferTotal:hover .chatTransferTooltip,
.chatTransferTotal:focus-visible .chatTransferTooltip {
  display: flex;
}

.chatTransferTooltipRow {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.chatTransferTooltipTime,
.chatTransferTooltipMore {
  color: var(--muted);
}

.chatMessage.chatJoinMessage {
  color: var(--success-text);
  border-left-color: rgb(var(--success-rgb) / 0.65);
}

.chatMessage.chatJoinMessage::before {
  content: "↗";
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  flex-shrink: 0;
}

.chatMessage.chatLeaveMessage {
  color: var(--warn-text);
  border-left-color: rgb(var(--warn-rgb) / 0.6);
}

.chatMessage.chatLeaveMessage::before {
  content: "↘";
  font-size: 11px;
  font-weight: 700;
  color: var(--warn);
  flex-shrink: 0;
}

.chatMessage.chatSearchHidden {
  display: none;
}

.chatReplyQuote {
  display: block;
  width: 100%;
  margin: 4px 0 6px;
  padding: 5px 7px;
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  border-left: 2px solid var(--accent);
  border-radius: 7px;
  background: rgb(var(--surface-rgb) / 0.04);
  color: var(--muted);
  text-align: left;
  font-size: 11px;
  cursor: pointer;
}

.chatReactionBar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  max-width: 100%;
}
.chatReactionBar.hidden {
  display: none;
}

.chatReactionPill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgb(var(--border-rgb) / 0.18);
  background: rgb(var(--surface-rgb) / 0.04);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.3;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.chatReactionPill:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.chatReactionPill.active {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent-text);
}

.chatReactionEmoji {
  font-size: 12px;
  line-height: 1;
}
.chatReactionCount {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  min-width: 0.75em;
}
.chatReactionPill.active .chatReactionCount {
  color: var(--accent-text);
}

.chatComposerMeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 8px;
  border: 1px solid rgb(var(--border-rgb) / 0.14);
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--muted);
  font-size: 11px;
}

/* Reply / edit bar: joined to the top of the composer row, as in the reference design. */
.chatComposerMeta.is-context {
  position: relative;
  z-index: 11;
  margin-bottom: -6px;
  padding: 7px 8px 7px 12px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--text-md);
}

.chatComposerMeta.is-context strong {
  color: var(--text);
  font-weight: 600;
}

.chatComposerMeta.is-context .chatComposerReplyText {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chatComposerMeta.is-context:not(.hidden) + .chatInputRow :is(.chatAttachBtn, #chatInput) {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.chatComposerMeta .chatComposerContextClose {
  display: grid;
  width: 18px;
  height: 18px;
  padding: 0 0 1px;
  place-items: center;
  border-radius: 50%;
  background: var(--text-secondary);
  color: var(--bg-deep);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background 120ms cubic-bezier(0.2, 0, 0, 1);
}

.chatComposerMeta .chatComposerContextClose:hover,
.chatComposerMeta .chatComposerContextClose:focus-visible {
  outline: none;
  background: var(--text);
}

.chatComposerMeta .chatComposerContextClose:focus-visible {
  box-shadow: var(--focus-ring);
}

.chatComposerMeta.is-editing {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.chatEditedTag {
  display: inline-block;
  margin-inline-start: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
  white-space: nowrap;
}

.chatComposerReplyText {
  display: -webkit-box;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chatComposerMeta button {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--accent-text);
  cursor: pointer;
}

.chatTypingIndicator {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  padding: 0 4px;
}

.chatLinkPreview {
  display: flex;
  gap: 8px;
  margin-top: 7px;
  padding: 7px;
  border: 1px solid rgb(var(--border-rgb) / 0.14);
  border-radius: var(--radius-xs);
  background: rgb(var(--shadow-rgb) / 0.2);
  color: var(--text) !important;
  text-decoration: none !important;
}

.chatYouTubePreview > .chatYouTubeThumbLink img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
}

.chatLinkPreviewBody {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.chatLinkPreviewBody strong {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chatLinkPreviewBody span {
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatWebPreview {
  width: min(100%, 400px);
  min-width: 0;
  align-items: flex-start;
  border-left: 3px solid var(--chat-web-accent, rgb(var(--border-rgb) / 0.32));
}

.chatWebPreview.has-large-image {
  flex-direction: column;
}

.chatWebPreview .chatWebPreviewBody {
  flex: 1 1 auto;
  gap: 3px;
}

.chatWebPreview .chatWebPreviewBody .chatWebSite {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.chatWebPreview .chatWebTitle {
  display: -webkit-box;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chatWebPreview .chatWebPreviewBody .chatWebDescription {
  display: -webkit-box;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.38;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.chatWebPreview .chatWebPreviewBody [hidden] {
  display: none;
}

.chatWebImage {
  flex: 0 0 auto;
  border-radius: 6px;
  background: rgb(var(--shadow-rgb) / 0.35);
  object-fit: cover;
}

.chatWebPreview.has-thumb .chatWebImage {
  width: 72px;
  height: 72px;
}

.chatWebPreview.has-large-image .chatWebImage {
  width: 100%;
  max-height: 220px;
  aspect-ratio: 1.91 / 1;
}

.chatWebPreview:hover .chatWebTitle {
  text-decoration: underline;
}

.chatYouTubePreview {
  width: min(100%, 360px);
  min-width: 0;
  align-items: center;
  overflow: hidden;
}

.chatYouTubeThumbLink {
  position: relative;
  display: grid;
  flex: 0 0 96px;
  width: 96px;
  height: 54px;
  overflow: hidden;
  border-radius: 6px;
  background: rgb(var(--shadow-rgb) / 0.35);
  place-items: center;
}

.chatYouTubeTitle {
  display: -webkit-box;
  color: var(--text) !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chatYouTubeThumbFallback {
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
}

.chatXPreview {
  position: relative;
  display: grid;
  gap: 7px;
  width: min(100%, 360px);
  min-width: 0;
  margin-top: 7px;
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgb(var(--border-rgb) / 0.18);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  user-select: text;
  -webkit-user-select: text;
}

.chatXPreview.is-fallback {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 38px;
}

.chatXFallbackLink {
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
}

.chatXHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chatXAuthor {
  min-width: 0;
  overflow: hidden;
  color: var(--text) !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatXLogo {
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex: 0 0 14px;
  object-fit: contain;
  opacity: 0.86;
}

.chatXText {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.38;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  user-select: text;
  -webkit-user-select: text;
}

.chatXTextLink {
  overflow-wrap: anywhere;
}

.chatXPreview .chatXTimestamp {
  width: fit-content;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-decoration: none;
}

.chatXPreview .chatXTimestamp:hover {
  text-decoration: underline;
}

.chatXMediaWrap {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 7px;
  background: var(--card);
}

.chatXMediaGrid {
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.chatXMediaGrid.count-1 {
  aspect-ratio: 16 / 9;
  grid-template: 1fr / 1fr;
}

.chatXMediaGrid.count-1.is-square {
  aspect-ratio: 1 / 1;
}

.chatXMediaGrid.count-1.is-portrait {
  aspect-ratio: 4 / 5;
}

.chatXMediaGrid.count-2 {
  aspect-ratio: 2 / 1;
  grid-template: 1fr / repeat(2, minmax(0, 1fr));
}

.chatXMediaGrid.count-3 {
  aspect-ratio: 3 / 2;
  grid-template: repeat(2, minmax(0, 1fr)) / 2fr 1fr;
}

.chatXMediaGrid.count-3 .chatXMediaCell:first-child {
  grid-row: 1 / span 2;
}

.chatXMediaGrid.count-4 {
  aspect-ratio: 1 / 1;
  grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr));
}

.chatXMediaCell {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--card-strong);
  color: var(--text);
  cursor: zoom-in;
  place-items: center;
}

.chatXMediaCell.is-video,
.chatXMediaCell.is-gif {
  cursor: pointer;
}

.chatXMediaCell img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
}

.chatXMediaPlay {
  position: absolute;
  display: grid;
  width: 32px;
  height: 32px;
  border: 1px solid rgb(var(--surface-rgb) / 0.35);
  border-radius: 50%;
  background: rgb(var(--shadow-rgb) / 0.68);
  color: var(--on-media);
  font-size: 13px;
  place-items: center;
}

.chatXMediaMore {
  position: absolute;
  inset: 0;
  display: grid;
  background: rgb(var(--shadow-rgb) / 0.62);
  color: var(--on-media);
  font-size: 20px;
  font-weight: 700;
  place-items: center;
  pointer-events: none;
}

.chatXMediaPlaceholder {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 8px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  place-items: center;
}

.chatXMediaWrap.is-sensitive .chatXMediaGrid {
  filter: blur(14px);
  transform: scale(1.04);
}

.chatXMediaWrap.is-sensitive .chatXMediaCell {
  pointer-events: none;
}

.chatXSensitiveReveal {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid rgb(var(--surface-rgb) / 0.24);
  border-radius: 999px;
  background: rgb(var(--shadow-rgb) / 0.78);
  color: var(--on-media);
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.chatWebPreview:focus-visible,
.chatYouTubePreview a:focus-visible,
.chatXPreview a:focus-visible,
.chatXPreview button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chatXMediaCell:focus-visible {
  outline-offset: -3px !important;
}

@media (max-width: 360px) {
  .chatYouTubeThumbLink,
  .chatYouTubePreview > .chatYouTubeThumbLink img {
    width: 80px;
    height: 45px;
  }
  .chatYouTubeThumbLink {
    flex-basis: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chatXMediaWrap.is-sensitive .chatXMediaGrid,
  .chatXMediaCell,
  .chatYouTubePreview {
    transition: none;
  }
}

.chatFileUrl {
  overflow-wrap: anywhere;
}

.chatFileAttachment {
  display: flex;
  align-items: stretch;
  gap: 5px;
  width: min(100%, 440px);
  margin-top: 7px;
}

.chatFileLink {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  border-radius: var(--radius-sm);
  background: rgb(var(--shadow-rgb) / 0.2);
  color: var(--text) !important;
  text-decoration: none !important;
  transition: border-color 0.15s, background 0.15s;
}

.chatFileLink:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.chatFileIcon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 40px;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent-text);
}

.chatFileIcon svg {
  width: 25px;
  height: 25px;
}

.chatFileBody {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chatFileBody strong,
.chatFileBody span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatFileBody strong {
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
}

.chatFileBody span {
  color: var(--muted);
  font-size: 10px;
}

.chatFileDownloadBtn {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  place-items: center;
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  border-radius: var(--radius-sm);
  background: rgb(var(--shadow-rgb) / 0.2);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.chatFileDownloadBtn:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-text);
}

.chatFileDownloadBtn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.chatFileDownloadBtn svg {
  width: 19px;
  height: 19px;
}

.screenViewerBanner {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgb(var(--border-rgb) / 0.18);
  background: rgb(var(--bg-deep-rgb) / 0.72);
  color: var(--text);
  font-size: 11px;
  backdrop-filter: blur(10px);
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear;
}

.musicCard {
  gap: 10px;
}

/* ─── LEAGUE TAB ─── */
.leaguePane {
  gap: 10px;
}

.leagueMatchHost {
  display: flex;
  flex-direction: column;
  align-items: center;
  container-type: inline-size;
}

.leagueMatchHost:empty {
  display: none;
}

/* The card's compact layout follows the tab's width, which the viewport query cannot see. */
/* A wide league tab shows the match and the betting side by side, with a bigger pitch. */
@container (min-width: 760px) {
  .leagueMatchHost .footballCard { width: min(1120px, 100%); }
  .leagueMatchHost .footballBody { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); grid-template-rows: auto 1fr;
    grid-template-areas: "match side" "details side"; column-gap: 28px; align-items: start; }
  .leagueMatchHost .footballCard[data-pitch="on"] .footballBody { grid-template-areas: "match side" "match details"; }
  .leagueMatchHost .footballMatchColumn { grid-area: match; }
  .leagueMatchHost .footballSideColumn { grid-area: side; padding-left: 28px; border-left: 1px solid var(--border); }
  .leagueMatchHost .footballDetails { grid-area: details; margin-top: 12px; }
  .leagueMatchHost .footballCard[data-pitch="on"] .footballDetails { align-self: stretch; margin-top: 0; padding-left: 28px; border-left: 1px solid var(--border); }
  .leagueMatchHost .footballSideColumn > .footballSeasonLine { margin-top: 0; }
  .leagueMatchHost .footballPitch { height: auto; aspect-ratio: 2 / 1; }
  .leagueMatchHost .footballPitchCircle { width: auto; height: 22%; aspect-ratio: 1; }
  .leagueMatchHost .footballPitchPlayer { width: 22px; height: 22px; font-size: 10px; }
  .leagueMatchHost .footballBall { height: 12px; }
}

@container (max-width: 420px) {
  .leagueMatchHost .footballCard { padding: 16px; }
  .leagueMatchHost .footballScoreboard { gap: 8px; }
  .leagueMatchHost .footballScore { font-size: 26px; }
  .leagueMatchHost .footballTeamName { font-size: 12px; }
}

.leagueIdle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 180px;
  padding: 24px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
}

.leagueIdle[hidden] {
  display: none;
}

.leagueIdleTitle {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
}

.leagueStartBtn {
  min-width: 160px;
  padding: 10px 22px;
  font-size: var(--text-base);
}

.leagueIdleHint {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.leagueShortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.leagueShortcuts .btn[hidden] {
  display: none;
}

.leagueTabBadge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgb(var(--success-rgb) / 0.36);
  border-radius: 999px;
  background: rgb(var(--success-rgb) / 0.14);
  color: var(--success);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.leagueTabBadge[data-tone="live"] {
  border-color: rgb(var(--danger-rgb) / 0.36);
  background: rgb(var(--danger-strong-rgb) / 0.22);
  color: var(--danger-text);
}

.leagueTabBadge[data-tone="next"] {
  border-color: var(--border-strong);
  background: rgb(var(--surface-rgb) / 0.06);
  color: var(--muted);
}

.leagueTabBadge[hidden] {
  display: none;
}

.musicNowPlaying {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgb(var(--surface-rgb) / 0.03);
}

.musicNowPlaying strong {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
}

.musicStatusPill {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: color-mix(in srgb, var(--accent) 55%, var(--text));
  font-size: var(--text-xs);
  font-weight: 600;
}

/* Rows already carry their position ("1. …"), so the list draws no markers of its own. */
.musicQueue {
  margin: 6px 0 0;
  padding-left: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: var(--text-md);
  display: grid;
  gap: 6px;
}

.musicControls {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.musicPlayRow.is-loading .input {
  opacity: 0.72;
  cursor: wait;
}

.btn.primary.is-loading {
  position: relative;
  min-width: 92px;
  padding-left: 28px;
  cursor: wait;
}

.btn.primary.is-loading::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid rgb(var(--surface-rgb) / 0.25);
  border-top-color: var(--on-accent);
  animation: chatImageUploadSpin 0.75s linear infinite;
}

.webParityNotice {
  padding: 9px 10px;
  border: 1px solid rgb(var(--warn-rgb) / 0.28);
  border-radius: var(--radius-sm);
  background: rgb(var(--warn-rgb) / 0.08);
  color: var(--warn-text);
  font-size: 11px;
  line-height: 1.4;
}

.screenShareFeedback {
  display: block;
  padding: 9px 10px;
  border: 1px solid rgb(var(--danger-rgb) / 0.28);
  border-radius: var(--radius-sm);
  background: rgb(var(--danger-strong-rgb) / 0.12);
  color: var(--danger-text);
  font-size: 11px;
  line-height: 1.4;
}

.screenShareFeedback.hidden {
  display: none;
}

/* One equal column per visible tab (mobile web hides Müzik). */
.rightColumn .tabBar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  container-type: inline-size;
}

/* Five tabs share a narrow column: the league badge, then every label, wins over the icons. */
.rightColumn .tabBtn:has(.leagueTabBadge:not([hidden])) svg {
  display: none;
}

@container (max-width: 420px) {
  .rightColumn .tabBtn {
    gap: 4px;
  }

  .rightColumn .tabBtn svg {
    display: none;
  }

  .rightColumn .leagueTabBadge {
    padding: 0 4px;
  }
}

.rightColumn .tabBtn {
  min-width: 0;
  width: 100%;
  padding-inline: 6px;
}

/* ─── MENTION SYSTEM ─── */
.chatMention {
  display: inline;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--text-secondary);
  font-weight: 500;
}

.chatMentionMe {
  color: var(--accent-link);
  font-weight: 700;
}

/* ─── CUSTOM EMOJI ─── */
.chatCustomEmoji {
  display: inline-block;
  width: 1.375em;
  height: 1.375em;
  margin: 0 1px;
  object-fit: contain;
  vertical-align: -0.35em;
  user-select: none;
}

.chatCustomEmojiOnly .chatCustomEmoji {
  width: 2.5em;
  height: 2.5em;
  vertical-align: middle;
}

/* ─── SLASH COMMAND AUTOCOMPLETE ─── */
.slashAutocomplete {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 20;
  max-height: 224px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgb(var(--border-rgb) / 0.18);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  box-shadow: 0 8px 28px rgb(var(--shadow-rgb) / 0.45);
  padding: 4px;
  backdrop-filter: none;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  pointer-events: auto;
  touch-action: pan-y;
}
.slashAutocomplete.hidden {
  display: none;
}
.slashCmdItem {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0 10px;
  width: 100%;
  padding: 7px 9px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.slashCmdItem:hover,
.slashCmdItem.active {
  background: var(--accent-soft);
}
.slashCmdName {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.slashCmdDesc {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slashCmdHint {
  flex-shrink: 0;
  font-size: 11px;
  color: color-mix(in srgb, var(--muted) 55%, transparent);
  white-space: nowrap;
  font-family: var(--font-mono, monospace);
}

.mentionAutocomplete {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 20;
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgb(var(--border-rgb) / 0.18);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  box-shadow: 0 8px 24px rgb(var(--shadow-rgb) / 0.35);
  padding: 4px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  pointer-events: auto;
  touch-action: pan-y;
}

.mentionAutocomplete.hidden {
  display: none;
}

.mentionAutocompleteItem {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mentionAutocompleteItem:hover,
.mentionAutocompleteItem.active {
  background: var(--accent-soft);
}

.mentionAutocompleteName {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

.emojiAutocompleteGlyph {
  flex-shrink: 0;
  width: 22px;
  font-size: 18px;
  line-height: 22px;
  text-align: center;
}

.emojiAutocompleteImage {
  height: 22px;
  object-fit: contain;
}

.mentionAutocompleteMeta {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.chatMessage.chatMessageMentionedMe {
  background: rgb(var(--warn-rgb) / 0.1);
  border-radius: 0 6px 6px 0;
}

.chatMessage.chatMessageMentionedMe:hover {
  background: rgb(var(--warn-rgb) / 0.16);
}

.chatMessage.chatMessageMentionedMe::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--warn);
  pointer-events: none;
}

.mentionToast {
  position: fixed;
  bottom: 72px;
  right: 16px;
  background: rgb(var(--card-rgb) / 0.96);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 80;
  pointer-events: none;
  animation: mentionToastIn 0.2s ease;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.mentionToast.mentionToastOut {
  opacity: 0;
  transform: translateX(16px);
}

@keyframes mentionToastIn {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ─── USER STATUS DOT ─── */
.participantStatusDot {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid var(--bg);
  z-index: 2;
  pointer-events: none;
}
.participantStatusDot.online {
  background: var(--success);
}
.participantStatusDot.afk {
  background: var(--status-away);
}
.participantStatusDot.dnd {
  background: var(--danger);
}
.participantStatusDot.invisible {
  background: var(--status-offline);
}

.selfAvatarWrap {
  position: relative;
  flex-shrink: 0;
}

.selfStatusDot {
  width: 10px;
  height: 10px;
  border-width: 2px;
  bottom: 0;
  right: 0;
}

/* ─── STATUS PICKER ─── */
.statusPickerRow {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.statusPickerBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--control-h);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgb(var(--surface-rgb) / 0.035);
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--text-md);
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    color var(--transition);
}

.statusPickerBtn:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  color: var(--text);
}

.statusPickerBtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.statusPickerBtn.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
}

.statusDotInline {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.statusDotInline.online {
  background: var(--success);
}
.statusDotInline.afk {
  background: var(--status-away);
}
.statusDotInline.dnd {
  background: var(--danger);
}
.statusDotInline.invisible {
  background: var(--status-offline);
}

.statusPickerNote {
  font-size: 11px;
  margin-top: 6px;
  min-height: 14px;
}

/* ─── ONBOARDING WIZARD ─── */
.onboardingModalContent {
  width: min(460px, 95vw);
  max-height: min(640px, 92vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.onboardingHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.onboardingTitle {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
}

.onboardingHeader .btn {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.onboardingHeader .btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.onboardingProgress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.onboardingProgressBar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}

.onboardingProgressFill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

.onboardingStepLabel {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
  min-width: 32px;
  text-align: right;
}

.onboardingStep {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 150px;
  overflow-y: auto;
}

.onboardingStepTitle {
  font-size: var(--text-base);
  font-weight: 600;
}

.onboardingStepDesc {
  margin: -6px 0 4px;
  font-size: var(--text-md);
  color: var(--muted);
}

.onboardingMicTestRow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.onboardingMicMeter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 80px;
}

.onboardingVu {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.onboardingPermStatus {
  font-size: 11px;
  color: var(--muted);
  min-height: 14px;
}

.onboardingShortcutRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.onboardingShortcutRow:last-of-type {
  border-bottom: none;
}

.onboardingShortcutNote {
  font-size: 11px;
  margin-top: 4px;
}

.onboardingDoneBody {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 14px;
  padding: 24px 0;
  text-align: center;
  min-height: 180px;
}

.onboardingDoneCheck {
  color: var(--accent);
}

.onboardingFooter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  flex-shrink: 0;
}

.onboardingFooter .btn {
  min-width: 84px;
  min-height: var(--control-h);
  font-size: var(--text-md);
}

/* ═══════════════════════════════════════════
   MOBILE WEB MODE
   Applied via JS when running in a mobile
   browser (not Electron). Turns the full
   voice client into a viewer / chat mode.
   Rules use high specificity + !important
   where needed to override responsive @media
   breakpoints that target generic mobile widths.
═══════════════════════════════════════════ */

/* ── Mobile info banner (hidden on desktop) ── */
.mobileBanner {
  display: none;
}

body.mobile-web-mode .mobileBanner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 12px;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.mobileBannerMain {
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.mobileBannerSub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* In the room every row counts: keep the banner to one line so the chat gets the height. */
body.mobile-web-mode #roomView .mobileBannerMain {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.mobile-web-mode #roomView .mobileBannerSub {
  display: none;
}

/* ── Root / viewport (Safari browser chrome safe) ── */
body.mobile-web-mode {
  min-width: 0 !important;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
}

body.mobile-web-mode .app {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.mobile-web-mode #titlebar {
  display: none;
}

body.mobile-web-mode .toastContainer {
  top: 8px;
}

/* ── View isolation: only one screen at a time ── */
body.mobile-web-mode .view:not(.active) {
  display: none !important;
}

body.mobile-web-mode .view.active {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

body.mobile-web-mode #lobbyView.view.active {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

body.mobile-web-mode .lobbyColumns {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

body.mobile-web-mode .lobbyCard,
body.mobile-web-mode .lobbyRoomsCard,
body.mobile-web-mode .eventSuggestedRoom,
body.mobile-web-mode .lobbyOnlineCard {
  width: 100%;
}

/* ── Room view: scrollable panels above the shared footer ── */
body.mobile-web-mode #roomView.view.active {
  display: flex !important;
  flex-direction: column !important;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  grid-template-rows: none !important;
  grid-template-columns: none !important;
}

/* Undo responsive grid placement from @media (max-width: 768px) */
body.mobile-web-mode #roomView.view.active > .topBar,
body.mobile-web-mode #roomView.view.active > .mobileBanner,
body.mobile-web-mode #roomView.view.active > .layout,
body.mobile-web-mode #roomView.view.active .centerColumn,
body.mobile-web-mode #roomView.view.active .rightColumn,
body.mobile-web-mode #roomView.view.active .leftColumn {
  grid-row: unset !important;
  grid-column: unset !important;
}

body.mobile-web-mode #roomView.view.active > .layout.roomLayout {
  display: flex !important;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

/* One row: connection pill + room name on the left, settings on the right. */
body.mobile-web-mode #roomView.view.active > .topBar {
  flex-shrink: 0;
  height: auto;
  min-height: 40px;
  flex-wrap: nowrap;
  align-items: center;
  padding: 4px 10px;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.mobile-web-mode #roomView.view.active > .topBar .topBarLeft,
body.mobile-web-mode #roomView.view.active > .topBar .topBarRight {
  width: auto;
  min-width: 0;
  max-width: 100%;
}

body.mobile-web-mode #roomView.view.active > .topBar .topBarLeft {
  flex: 1 1 auto;
}

body.mobile-web-mode #roomView.view.active > .topBar .topBarRight {
  flex: 0 0 auto;
  gap: 6px;
  flex-wrap: nowrap;
}

body.mobile-web-mode #roomView.view.active > .topBar .topRoomName {
  max-width: none;
}

body.mobile-web-mode .pageRail #settingsBtn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
}

body.mobile-web-mode .topRoomName {
  min-width: 0;
  max-width: 100%;
}

body.mobile-web-mode .topRoomName span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-web-mode .statusBar,
body.mobile-web-mode #statQuality,
body.mobile-web-mode #statusScreen,
body.mobile-web-mode #statusMic {
  display: none !important;
}

/* ── Main content stack inside room layout ── */
/* The room view scrolls as one stack here, so the sidebar takes its content height.
   Its sections are flex-basis 0 on desktop and would collapse to nothing without this. */
body.mobile-web-mode #roomView.view.active .leftColumn {
  display: flex !important;
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

body.mobile-web-mode #roomView.view.active .leftColumn .sidebarSection {
  flex: 0 0 auto;
}

body.mobile-web-mode #roomView.view.active .leftColumn .roomsListSidebar {
  max-height: 220px;
}

body.mobile-web-mode #roomView.view.active .leftColumn .presenceUsersList {
  max-height: 260px;
}

/* Each panel remains reachable within the room scroll area. */
body.mobile-web-mode #roomView.view.active .centerColumn {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: none;
  min-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  -webkit-overflow-scrolling: touch;
}

body.mobile-web-mode #roomView.view.active .rightColumn {
  flex: 0 0 360px;
  min-height: 320px;
  max-height: none;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  border-left: none;
  border-top: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Participant grid: compact name chips ── */
body.mobile-web-mode #participantGrid,
body.mobile-web-mode .participantGrid,
body.mobile-web-mode .participantGrid:not(.isEmpty),
body.mobile-web-mode .participantGrid.count-1,
body.mobile-web-mode .participantGrid.count-2,
body.mobile-web-mode .participantGrid.count-3,
body.mobile-web-mode .participantGrid.count-4,
body.mobile-web-mode .participantGrid.compact,
body.mobile-web-mode .participantGrid.compact:not(.count-1):not(.count-2) {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)) !important;
  --participant-grid-cols: auto !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 4px;
  align-content: start;
  padding: 0;
}

body.mobile-web-mode .participantCard {
  display: flex;
  align-items: center;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  max-height: none !important;
  aspect-ratio: unset !important;
  height: auto;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgb(var(--surface-rgb) / 0.04);
}

body.mobile-web-mode .participantGrid.count-1 .participantCard {
  max-height: none;
}

body.mobile-web-mode .participantCard .participantTileStage,
body.mobile-web-mode .participantCard .participantBadges,
body.mobile-web-mode .participantCard .participantLiveBadge,
body.mobile-web-mode .participantCard .participantCameraVideo,
body.mobile-web-mode .participantCard .partBadge.localMutedBadge {
  display: none !important;
}

body.mobile-web-mode .participantCard.cameraOn {
  grid-column: span 2;
}

body.mobile-web-mode .participantCard.cameraOn .cameraFocusTrigger {
  position: static;
  flex: 0 0 36px;
  order: -1;
  margin-right: 4px;
}

body.mobile-web-mode .cameraTheater {
  flex: 0 0 auto;
  height: clamp(280px, 65dvh, 560px);
}

body.mobile-web-mode .participantCard .participantName.participantNameBadge {
  position: static;
  left: auto;
  bottom: auto;
  z-index: auto;
  max-width: 100%;
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  backdrop-filter: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  pointer-events: auto;
}

/* Compact chips: the options trigger sits inline at the end instead of covering the name. */
body.mobile-web-mode .participantCard .participantMenuTrigger {
  position: static;
  order: 2;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-left: 2px;
  background: transparent;
  opacity: 0.75;
}

body.mobile-web-mode .participantCard .participantName.participantNameBadge {
  min-width: 0;
}

body.mobile-web-mode .participantCard.speaking .participantName.participantNameBadge {
  color: var(--accent);
  border-color: transparent;
  text-shadow: none;
}

body.mobile-web-mode .participantCard.speaking {
  box-shadow: inset 0 0 0 1px var(--accent);
}

body.mobile-web-mode .participantCard.soundboardPlaying {
  border-color: var(--soundboard-frame);
  box-shadow: inset 0 0 0 1px var(--soundboard-frame);
}

body.mobile-web-mode .participantCard .selfTag {
  font-size: 9px;
}

body.mobile-web-mode .participantCard .participantStatusLabel {
  font-size: 9px;
}

body.mobile-web-mode .screenShareTile {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  --participant-card-min-height: 56px;
  max-height: 72px;
  aspect-ratio: unset;
  min-height: 56px;
}

/* ── Mobile tabs: keep diagnostics out of room navigation; controls remain available ── */
body.mobile-web-mode .tabBtn[data-tab="network"],
body.mobile-web-mode .tabBtn[data-tab="music"],
body.mobile-web-mode .tabBtn[data-tab="log"] {
  display: none !important;
}

body.mobile-web-mode .tabBar {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Share the row between the visible tabs; full-width buttons pushed "Kontroller" off screen. */
body.mobile-web-mode #roomView.view.active .rightColumn .tabBar {
  padding: 4px 8px;
}

body.mobile-web-mode #roomView.view.active .rightColumn .tabBtn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 4px 8px;
}

body.mobile-web-mode .tabContent {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

body.mobile-web-mode .tabContent .tabPane:not(.active) {
  display: none !important;
}

body.mobile-web-mode .tabContent .tabPane.active {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

/* ── Chat ── */
body.mobile-web-mode .chatPane {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

body.mobile-web-mode .chatMessages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

body.mobile-web-mode .chatInputRow {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

body.mobile-web-mode #chatInput,
body.mobile-web-mode .chatSearchInput {
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.mobile-web-mode .chatInputRow .btn {
  width: 100%;
  min-height: 40px;
}

body.mobile-web-mode .chatActionLauncher {
  width: 100%;
}

body.mobile-web-mode .chatInputField {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* The action menu (Rulet, Blackjack, …) opens from "+": keep it a full thumb-sized target instead
   of letting the generic `.chatInputRow .btn { width: 100% }` collapse it inside its auto column. */
body.mobile-web-mode .chatInputRow .chatAttachBtn {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  font-size: 20px;
}

body.mobile-web-mode #chatInput {
  min-height: 44px;
  padding-block: calc((44px - 2px - 1.35em) / 2);
}

body.mobile-web-mode .chatPane {
  gap: 6px;
}

body.mobile-web-mode .tabContent .tabPane.chatPane {
  padding: 8px 10px;
}

body.mobile-web-mode .chatToolbar {
  flex-wrap: nowrap;
  gap: 6px;
}

body.mobile-web-mode .chatToolbar .chatSearchInput {
  flex: 1 1 auto;
  min-height: 36px;
  padding-top: 4px;
  padding-bottom: 4px;
}

body.mobile-web-mode .chatToolbar .chatGalleryBtn {
  flex: 0 0 auto;
  min-height: 36px;
}

/* While typing, the on-screen keyboard takes half the screen: give the rest to the conversation. */
body.mobile-web-mode:has(#chatInput:focus) #roomView.view.active > .mobileBanner,
body.mobile-web-mode:has(#chatInput:focus) #roomView.view.active .centerColumn,
body.mobile-web-mode:has(#chatInput:focus) #roomView.view.active .leftColumn {
  display: none !important;
}

/* ── Screen share viewer ── */
/* ── Bottom bar: one icon row (Mic | Kulaklık | Kamera | Tepki | Çıkış) so the chat keeps the height ── */
body.mobile-web-mode .appWorkspace > .bottomBar {
  flex-shrink: 0;
  order: 10;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  padding: 8px 10px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  gap: 6px;
  margin-top: auto;
  align-items: stretch;
  box-sizing: border-box;
  overflow: hidden;
}

/* Yayın kontrolleri mobil web'de gizli kalır; soundboard'un mobil yerleşimi henüz yok. */
body.mobile-web-mode .streamSplitControl,
body.mobile-web-mode .switchSourceBarBtn,
body.mobile-web-mode .soundboardBar {
  display: none !important;
}

body.mobile-web-mode .bbLeft {
  display: flex !important;
  grid-column: 1;
  grid-row: 1;
}

body.mobile-web-mode .bbCenter {
  display: grid !important;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto minmax(44px, 1fr);
  gap: 4px;
}
body.mobile-web-mode .bbRight {
  display: flex !important;
  grid-column: 2;
  grid-row: 1;
}

body.mobile-web-mode .bottomBar .micSplitControl {
  grid-column: 1;
  grid-row: 1;
}

body.mobile-web-mode .bottomBar .deafBarBtn {
  grid-column: 2;
  grid-row: 1;
}

body.mobile-web-mode .bottomBar .cameraSplitControl {
  grid-column: 3;
  grid-row: 1;
}

body.mobile-web-mode .bottomBar .leaveBarBtn {
  grid-column: 5;
  grid-row: 1;
}

/* #roomView outranks the ≤768px rule that spans the reaction bar across the whole row. */
body.mobile-web-mode .appWorkspace > .bottomBar .voiceReactionBar {
  grid-column: 4;
  grid-row: 1;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  box-sizing: border-box;
}

body.mobile-web-mode .voiceReactionTray {
  width: min(216px, calc(100vw - 16px));
  grid-template-columns: repeat(4, 44px);
}

body.mobile-web-mode .voiceReactionBtn {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

body.mobile-web-mode .participantReaction {
  bottom: 3px;
  font-size: 18px;
  animation-name: participantReactionFloatCompact;
}

body.mobile-web-mode .participantReactionImageWrap {
  width: 36px;
  height: 36px;
}

@keyframes participantReactionFloatCompact {
  0% {
    opacity: 0;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 20px)), 9px, 0) scale(0.86);
  }

  9% {
    opacity: 1;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 20px)), 2px, 0) scale(1);
  }

  76% {
    opacity: 1;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 20px)), -5px, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + (var(--reaction-lane) * 20px)), -14px, 0) scale(1.04);
  }
}

body.mobile-web-mode .bottomBar .micBarBtn,
body.mobile-web-mode .bottomBar .deafBarBtn,
body.mobile-web-mode .bottomBar .cameraBarBtn,
body.mobile-web-mode .bottomBar .leaveBarBtn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 42px;
  padding: 8px 6px;
  flex-direction: row;
  gap: 6px;
  justify-content: center;
  box-sizing: border-box;
}

body.mobile-web-mode .bottomBar .barBtn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Icon-only row; the buttons keep their aria-label/title as the accessible name. */
body.mobile-web-mode .bottomBar .barBtnLabel {
  display: none;
}

body.mobile-web-mode .bbVersion {
  display: none !important;
}

/* ── Settings modal: hide desktop-only controls ── */
body.mobile-web-mode .testButtons,
body.mobile-web-mode .accordion,
body.mobile-web-mode #muteShortcutDisplay,
body.mobile-web-mode #muteShortcutListenBtn,
body.mobile-web-mode #deafShortcutDisplay,
body.mobile-web-mode #deafShortcutListenBtn,
body.mobile-web-mode .shortcutRow,
body.mobile-web-mode label[for="micSelect"],
body.mobile-web-mode #micSelect,
body.mobile-web-mode label[for="outputSelect"],
body.mobile-web-mode #outputSelect,
body.mobile-web-mode label[for="cameraSelect"],
body.mobile-web-mode #cameraSelect,
body.mobile-web-mode label[for="cameraQuality"],
body.mobile-web-mode #cameraQuality {
  display: none !important;
}

body.mobile-web-mode #moderationPanel:not(.hidden) {
  display: block !important;
}

body.mobile-web-mode #onboardingStep2 {
  display: none !important;
}

/* ── Global overflow guards ── */
body.mobile-web-mode .layout,
body.mobile-web-mode .layout.roomLayout,
body.mobile-web-mode .centerColumn,
body.mobile-web-mode .rightColumn,
body.mobile-web-mode .tabPane,
body.mobile-web-mode .eventBanner {
  max-width: 100%;
  min-width: 0;
}

/* Dedicated mobile screen viewer. The existing preview is moved to body while active. */
body.mobile-web-mode.mobile-screen-viewer-active {
  min-width: 0 !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.mobile-web-mode.mobile-screen-viewer-active #screenPreview {
  position: fixed !important;
  left: var(--mobile-screen-viewer-left, 0px) !important;
  top: var(--mobile-screen-viewer-top, 0px) !important;
  width: var(--mobile-screen-viewer-width, 100vw) !important;
  width: var(--mobile-screen-viewer-width, 100dvw) !important;
  height: var(--mobile-screen-viewer-height, 100vh) !important;
  height: var(--mobile-screen-viewer-height, 100dvh) !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  border: 0 !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
  background: var(--media-bg);
  overflow: hidden;
  z-index: 1000;
  box-sizing: border-box;
  touch-action: manipulation;
}

body.mobile-web-mode.mobile-screen-viewer-active #screenPreview:fullscreen,
body.mobile-web-mode.mobile-screen-viewer-active #screenPreview:-webkit-full-screen {
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
}

body.mobile-web-mode.mobile-screen-viewer-active #screenVideo {
  display: block;
  flex: 1 1 auto;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: var(--media-bg);
}

body.mobile-web-mode.mobile-screen-viewer-active .screenViewerBanner,
body.mobile-web-mode.mobile-screen-viewer-active .screenOverlayLabel,
body.mobile-web-mode.mobile-screen-viewer-active #screenOverlayMicBtn,
body.mobile-web-mode.mobile-screen-viewer-active #screenOverlayVolume,
body.mobile-web-mode.mobile-screen-viewer-active #screenOverlayVolumeValue,
body.mobile-web-mode.mobile-screen-viewer-active #screenPipBtn {
  display: none !important;
}

body.mobile-web-mode.mobile-screen-viewer-active .screenOverlayControls,
body.mobile-web-mode.mobile-screen-viewer-active #screenPreview:fullscreen .screenOverlayControls,
body.mobile-web-mode.mobile-screen-viewer-active #screenPreview:-webkit-full-screen .screenOverlayControls {
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: auto;
  min-width: 0;
  max-width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right) - 24px);
  padding: 8px;
  border-radius: 16px;
  gap: 0;
}

body.mobile-web-mode.mobile-screen-viewer-active .screenOverlayBar,
body.mobile-web-mode.mobile-screen-viewer-active #screenPreview:fullscreen .screenOverlayBar,
body.mobile-web-mode.mobile-screen-viewer-active #screenPreview:-webkit-full-screen .screenOverlayBar {
  gap: 10px;
}

body.mobile-web-mode.mobile-screen-viewer-active .screenOverlayBtn,
body.mobile-web-mode.mobile-screen-viewer-active #screenPreview:fullscreen .screenOverlayBtn,
body.mobile-web-mode.mobile-screen-viewer-active #screenPreview:-webkit-full-screen .screenOverlayBtn {
  width: 48px;
  height: 48px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 13px;
  touch-action: manipulation;
}

body.mobile-web-mode.mobile-screen-viewer-active .screenOverlayBtn svg {
  width: 20px;
  height: 20px;
}

body.mobile-web-mode.mobile-screen-viewer-active .mobileScreenRotateHint {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 6;
  display: block;
  max-width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right) - 32px);
  padding: 8px 12px;
  border: 1px solid rgb(var(--border-rgb) / 0.22);
  border-radius: 999px;
  background: rgb(var(--card-rgb) / 0.72);
  color: rgb(var(--surface-rgb) / 0.9);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

body.mobile-web-mode.mobile-screen-viewer-active .mobileScreenRotateHint.isVisible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.mobile-web-mode.mobile-screen-viewer-active .screenTheater {
  display: none !important;
}

body.mobile-web-mode * {
  box-sizing: border-box;
}

body.mobile-web-mode .bottomBar .mediaSplitControl {
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

body.mobile-web-mode .bottomBar .mediaSplitMenuBtn {
  flex-basis: 28px;
  width: 28px;
}

body.mobile-web-mode .bottomBar .voiceReactionToggle {
  flex-basis: 28px;
  width: 28px;
}

@media (max-width: 360px) {
  body.mobile-web-mode .appWorkspace > .bottomBar {
    gap: 4px;
    padding-left: max(6px, env(safe-area-inset-left));
    padding-right: max(6px, env(safe-area-inset-right));
  }

  body.mobile-web-mode .bottomBar .mediaSplitMenuBtn,
  body.mobile-web-mode .bottomBar .voiceReactionToggle {
    flex-basis: 24px;
    width: 24px;
  }

  body.mobile-web-mode .bottomBar .voiceReactionPrimary {
    flex-basis: 38px;
    width: 38px;
  }
}

body.mobile-web-mode .bottomBar .mediaSplitControl .mediaSplitMain {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
}

@media (max-width: 640px) {
  .settingsModalBody {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .settingsSidebar {
    display: flex;
    gap: 2px;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .settingsNavItem {
    flex: 0 0 auto;
    width: auto;
    min-height: 34px;
    white-space: nowrap;
  }

  .settingsNavItem + .settingsNavItem {
    margin-top: 0;
  }

  .settingsNavItem.active::before {
    display: none;
  }

  .settingsContent {
    padding: 18px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .settingsPageHeader {
    margin-bottom: 18px;
  }
}
/* Server-authoritative Blackjack chat card */
.blackjackGameCard {
  width: min(100%, 360px);
  box-sizing: border-box;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 92%, var(--media-bg));
}

.blackjackHeader,
.blackjackHandHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.blackjackStatus,
.blackjackHandValue,
.blackjackHint {
  color: var(--muted);
  font-size: 0.78rem;
}

/* Sahiplik etiketi: kendi kartında vurgulu rozet, diğerlerinde nötr "Ad'ın Oyunu" metni. */
.blackjackTitle { display: flex; align-items: center; gap: 8px; min-width: 0; }
.blackjackOwnerTag {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.blackjackOwnerTag.is-own {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-text);
}
.blackjackGameCard.is-own-blackjack {
  border-color: color-mix(in srgb, var(--accent) 85%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, color-mix(in srgb, var(--card) 92%, var(--media-bg)));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.blackjackMoney { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
/* Tutar ile para birimi ayrı satıra düşmesin. */
.blackjackBalance, .blackjackBet, .blackjackWager { white-space: nowrap; }
.blackjackBalance { color: var(--text); }
.blackjackBet { color: var(--muted); }
.blackjackBetPrompt { margin: 12px 0 8px; font-weight: 700; }
.blackjackWagers { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; }
.blackjackWager {
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: inherit;
  font-weight: 800;
  cursor: pointer;
}
.blackjackWager:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.blackjackWager:disabled { cursor: not-allowed; opacity: 0.42; }
.blackjackWager:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.blackjackBetActions { display: flex; justify-content: flex-end; margin-top: 8px; }
.blackjackBetCancel {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.blackjackBetCancel:hover:not(:disabled) { background: color-mix(in srgb, var(--muted) 16%, transparent); }
.blackjackBetCancel:disabled { cursor: not-allowed; opacity: 0.52; }
.blackjackBetCancel:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.blackjackHands { display: grid; gap: 12px; margin-top: 12px; }
.blackjackCards { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.blackjackPlayingCard {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 46px;
  height: 64px;
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid #d7d2dd;
  border-radius: 7px;
  background: #f8f7fa;
  color: #17131f;
  font-weight: 750;
  line-height: 1;
  box-shadow: 0 4px 12px rgb(var(--shadow-rgb) / 0.22);
}

.blackjackPlayingCard.is-red { color: #c6283b; }
.blackjackCardSuit { align-self: flex-end; font-size: 1.35rem; }
.blackjackPlayingCard.is-hidden {
  overflow: hidden;
  border-color: #77639d;
  background: #24173b;
}
.blackjackCardBack {
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  background-color: #563491;
  background-image: repeating-linear-gradient(45deg, rgb(255 255 255 / 12%) 0 2px, transparent 2px 6px);
}

.blackjackActions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.blackjackAction {
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.blackjackAction:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 34%, transparent); }
.blackjackAction:disabled { cursor: not-allowed; opacity: 0.52; }
.blackjackAction:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.blackjackAction.is-exit { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; }
.blackjackResult { min-height: 1.2em; margin-top: 10px; font-weight: 800; }
.blackjackGameCard.is-finished .blackjackResult { color: var(--accent-text); }
.blackjackHint { margin: 8px 0 0; }

@media (max-width: 420px) {
  .blackjackGameCard { padding: 10px; }
  .blackjackPlayingCard { width: 42px; height: 58px; }
  .blackjackWagers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (pointer: coarse) {
  .blackjackAction { min-height: 44px; }
  .blackjackWager { min-height: 44px; }
  .blackjackBetCancel { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .blackjackGameCard *,
  .blackjackGameCard *::before,
  .blackjackGameCard *::after { animation: none !important; transition: none !important; }
}

/* Server-authoritative Mayın Tarlası chat card. Colours come only from theme tokens. */
.minesGameCard {
  width: min(100%, 360px);
  box-sizing: border-box;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 92%, var(--media-bg));
}
.minesGameCard.is-own {
  border-color: color-mix(in srgb, var(--accent) 85%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, color-mix(in srgb, var(--card) 92%, var(--media-bg)));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.minesHeader { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.minesTitle { display: flex; align-items: center; gap: 8px; min-width: 0; }
.minesStatus, .minesHint, .minesFieldLabel, .minesStatLabel { color: var(--muted); font-size: 0.78rem; }
.minesOwnerTag {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.minesOwnerTag.is-own {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-text);
}
.minesField { display: grid; gap: 6px; margin-top: 10px; }
.minesStepper { display: inline-flex; align-items: center; gap: 8px; }
.minesStepperValue { min-width: 2.2ch; font-size: 1.05rem; font-weight: 800; text-align: center; }
.minesChips { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; }
.minesStep, .minesChip, .minesAction {
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: inherit;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.minesStep { width: 36px; font-size: 1.1rem; }
.minesChip { white-space: nowrap; }
.minesChip.is-selected { background: color-mix(in srgb, var(--accent) 38%, transparent); border-color: var(--accent); }
.minesCustomAmount {
  grid-column: 1 / -1;
  min-height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--card) 70%, var(--media-bg));
  color: inherit;
  font: inherit;
}
.minesStats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 6px 10px; margin-top: 10px; }
.minesStat { display: grid; gap: 1px; min-width: 0; }
.minesStatValue { overflow: hidden; color: var(--text); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.minesStat[data-mines-stat="next"] .minesStatValue { color: var(--accent-text); }
.minesBoard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}
.minesCell {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--card) 70%, var(--media-bg));
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  cursor: default;
  transition: transform 120ms ease, background-color 120ms ease;
}
.minesCell.is-hidden:not(:disabled) { cursor: pointer; }
.minesCell.is-hidden:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 22%, var(--card));
  transform: translateY(-1px);
}
.minesCell.is-pending { animation: minesCellPulse 0.9s ease-in-out infinite; }
.minesCell.is-safe {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 26%, var(--card));
  color: var(--accent-text);
}
.minesCell.is-untouched { color: var(--accent-text); opacity: 0.38; }
.minesCell.is-mine {
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  background: color-mix(in srgb, var(--danger) 16%, var(--card));
  color: var(--danger-text);
}
.minesCell.is-exploded {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 45%, var(--card));
  color: var(--danger-text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 45%, transparent);
}
.minesCell.is-hidden:disabled { opacity: 0.85; }
.minesStep:disabled, .minesChip:disabled, .minesAction:disabled { cursor: not-allowed; opacity: 0.45; }
.minesStep:hover:not(:disabled), .minesChip:hover:not(:disabled), .minesAction:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}
.minesCell:focus-visible, .minesStep:focus-visible, .minesChip:focus-visible,
.minesAction:focus-visible, .minesCustomAmount:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.minesActions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 12px; }
.minesActions:has(> :only-child) { grid-template-columns: 1fr; }
.minesAction { min-height: 40px; white-space: nowrap; }
.minesAction.is-primary { background: color-mix(in srgb, var(--accent) 42%, transparent); border-color: var(--accent); }
.minesAction.is-secondary { background: transparent; border-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.minesResult { min-height: 1.2em; margin-top: 10px; font-weight: 800; }
.minesGameCard.is-cashed-out .minesResult { color: var(--success-text); }
.minesGameCard.is-lost .minesResult { color: var(--danger-text); }
.minesHint { margin: 8px 0 0; }

@keyframes minesCellPulse {
  50% { background: color-mix(in srgb, var(--accent) 30%, var(--card)); }
}

@media (pointer: coarse) {
  .minesStep, .minesChip, .minesAction { min-height: 44px; }
  .minesStep { width: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .minesGameCard *,
  .minesGameCard *::before,
  .minesGameCard *::after { animation: none !important; transition: none !important; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   EMREHUNT
   Oyun modalı.

   Emrecord'un tema değişkenleri temeldir; EmreHunt kendi üstüne yalnızca bir oyun katmanı
   ekler: nadirlik renkleri, portre çerçeveleri, ölçekler ve tek bir yükseklik dili. Sabit
   renk yoktur, böylece açık/koyu ve vurgu teması değişiklikleri olduğu gibi devralınır.

   İki kural bu bölümün tamamında geçerlidir:
   1. Kenarlık yapı içindir (ayırıcı, seçim, odak). Derinlik gölgeyle yapılır.
   2. Hiçbir durum yalnızca renkle anlatılmaz; her renk bir glif ya da kelimenin yanındadır.
   ═══════════════════════════════════════════════════════════════════════════ */

.emreHuntBtn {
  font-weight: 600;
}

/* ─── Belirteçler ─── */

.emreHuntModal {
  /* Concentric radii: her kap, içindekinin yarıçapı + dolgusu kadar yuvarlanır. */
  /* Ölçek uygulamanın kendi yarıçaplarından türer, böylece tema değişince bu da değişir. */
  --eh-r-lg: var(--radius);
  --eh-r-md: var(--radius-sm);
  --eh-r-sm: var(--radius-xs);
  --eh-r-xs: calc(var(--radius-xs) - 2px);

  --eh-gap: 12px;
  --eh-pad: 12px;

  --eh-panel: rgb(var(--surface-rgb) / 0.04);
  --eh-panel-raised: rgb(var(--surface-rgb) / 0.06);
  --eh-panel-sunken: rgb(var(--shadow-rgb) / 0.22);
  --eh-line: rgb(var(--border-rgb) / 0.09);
  --eh-line-strong: rgb(var(--border-rgb) / 0.16);
  --eh-image-edge: rgb(var(--surface-rgb) / 0.1);

  --eh-lift: 0 1px 2px rgb(var(--shadow-rgb) / 0.32), 0 6px 16px -10px rgb(var(--shadow-rgb) / 0.55);
  --eh-lift-strong: 0 2px 4px rgb(var(--shadow-rgb) / 0.38), 0 14px 32px -14px rgb(var(--shadow-rgb) / 0.7);

  /* Nadirlik tonları tema bloğunda tanımlıdır; burada yalnızca varsayılanı seçilir.
     Renk hiçbir yerde tek başına anlam taşımaz — nadirlik adı ayrıca yazıyla yazılır. */
  --eh-rarity: rgb(var(--border-rgb) / 0.35);
}

[data-eh-rarity="common"] { --eh-rarity: var(--rarity-common); }
[data-eh-rarity="uncommon"] { --eh-rarity: var(--rarity-uncommon); }
[data-eh-rarity="rare"] { --eh-rarity: var(--rarity-rare); }
[data-eh-rarity="epic"] { --eh-rarity: var(--rarity-epic); }
[data-eh-rarity="mythic"] { --eh-rarity: var(--rarity-mythic); }
[data-eh-rarity="legendary"] { --eh-rarity: var(--rarity-legendary); }
[data-eh-rarity="glimmer"] { --eh-rarity: var(--rarity-glimmer); }
[data-eh-rarity="paradox"] { --eh-rarity: var(--rarity-paradox); }
[data-eh-rarity="stellar"] { --eh-rarity: var(--rarity-paradox); }
[data-eh-rarity="event"] { --eh-rarity: var(--rarity-event); }

/* ─── Kabuk ─── */

.emreHuntBackdrop {
  position: fixed;
  inset: var(--titlebar-height) 0 0;
  z-index: 1000;
  background: rgb(var(--shadow-rgb) / 0.78);
}

.emreHuntModal {
  position: fixed;
  inset: var(--titlebar-height) 0 0;
  z-index: 1001;
  width: min(1240px, calc(100vw - 32px));
  max-width: none;
  height: min(940px, calc(100dvh - var(--titlebar-height) - 32px));
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--eh-line-strong);
  border-radius: var(--eh-r-lg);
  background: var(--popover-bg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: emreHuntModalIn 0.14s ease-out;
}

.emreHuntModal:not([open]) { display: none; }

@keyframes emreHuntModalIn {
  from { opacity: 0; transform: scale(0.995); }
  to { opacity: 1; transform: scale(1); }
}

.emreHuntModalContent {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}

.emreHuntHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--eh-line);
  background: var(--surface-subtle);
}

.emreHuntHeaderText h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.emreHuntHeaderText h2:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--eh-r-xs);
}

.emreHuntSubtitle {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.emreHuntStatus {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  min-height: 13px;
}

.emreHuntHeaderActions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.emreHuntTabs {
  display: flex;
  gap: 2px;
  padding: 6px 16px 0;
  border-bottom: 1px solid var(--eh-line);
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Sekme, altı çizili bir başlık gibi davranır: seçili olan zeminle değil, çizgiyle işaretlenir.
   Böylece dokuz sekme dokuz düğme yığını gibi görünmez. */
.ehTab {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 12px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: var(--eh-r-sm) var(--eh-r-sm) 0 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition-property: color, background, border-color;
  transition-duration: 0.12s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ehTab:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text);
}

.ehTab:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.ehTab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.ehTab:disabled { opacity: 0.4; cursor: default; }

.ehTabDivider {
  flex: 0 0 auto;
  align-self: center;
  width: 1px;
  height: 16px;
  margin: 0 8px;
  background: var(--eh-line-strong);
}

.ehTab--secondary { color: rgb(var(--surface-rgb) / 0.38); }
.ehTab--secondary:hover:not(:disabled) { color: var(--text-secondary); }
.ehTab--secondary.is-active { color: var(--text); }

.emreHuntContent {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 20px 28px;
  scrollbar-width: thin;
}

.emreHuntContent:focus-visible {
  outline: none;
  box-shadow: inset var(--ring);
}

.emreHuntToast {
  margin: 0;
  padding: 9px 20px;
  border-top: 1px solid var(--eh-line);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 12px;
}

.emreHuntToast[data-tone="warn"] { background: var(--warn-soft); color: var(--warn-text); }
.emreHuntToast[data-tone="ok"] { background: var(--success-soft); color: var(--success-text); }

/* ═══ Ortak yapı ═══ */

.ehPanel,
.ehPanelBody {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ehPanelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ehPanelHeadActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ehSection {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ehSectionHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ehSectionTitle {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.ehSectionNote,
.ehNote {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.ehSectionActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ehEyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ehName {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ehSub {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 11.5px;
}

.ehSep { color: var(--muted); }
.ehRarityWord { color: var(--eh-rarity); font-weight: 600; }
.ehLevel { font-variant-numeric: tabular-nums; }

.ehReading {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.ehLoading {
  margin: 32px 0;
  text-align: center;
  color: var(--text-secondary);
}

.ehButtonRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ehButtonRow--danger { margin-top: 2px; }

.ehLink {
  padding: 2px 4px;
  border: 0;
  border-radius: var(--eh-r-xs);
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 11.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.12s cubic-bezier(0.2, 0, 0, 1);
}

.ehLink:hover:not(:disabled) { color: var(--text); }
.ehLink:focus-visible { outline: none; box-shadow: var(--ring); }
.ehLink:disabled { opacity: 0.45; cursor: default; text-decoration: none; }

.ehInlineHint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ═══ Yüzeyler ═══ */

/* Tek kart dili. Kenarlık yerine zemin + gölge; nadirlik sol kenardan bir şerit olarak gelir. */
.ehTile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--eh-pad);
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
  box-shadow: var(--eh-lift);
  transition-property: background, box-shadow, outline-color;
  transition-duration: 0.12s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
  outline: 1px solid transparent;
  outline-offset: -1px;
}

.ehTile[data-eh-rarity]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--eh-r-md) 0 0 var(--eh-r-md);
  background: var(--eh-rarity);
}

.ehTile[data-eh-rarity] { padding-left: calc(var(--eh-pad) + 4px); }

.ehTile.is-selected {
  background: var(--accent-soft);
  outline-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.ehTile.is-disabled { opacity: 0.5; }
.ehTile.is-locked { background: var(--eh-panel-sunken); box-shadow: none; }
.ehTile.is-claimable { outline-color: color-mix(in srgb, var(--success) 50%, transparent); }
.ehTile.is-recommended { outline-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.ehTileGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--eh-gap);
}

.ehTileGrid--dense { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ehTileGrid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.ehRowList {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ═══ Portre ═══ */

/* Kare çerçeve, daire değil: yaratık ve boss çizimleri kareyi doldurmak için çizildi ve
   dairesel maske onları tanıtan silueti kırpıyor. */
.ehPortrait {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--eh-r-sm);
  background: rgb(var(--shadow-rgb) / 0.28);
  outline: 1px solid var(--eh-image-edge);
  outline-offset: -1px;
  overflow: hidden;
}

.ehPortrait[data-eh-rarity] {
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--eh-rarity) 22%, transparent),
    rgb(var(--shadow-rgb) / 0.3));
}

.ehPortrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ehPortraitGlyph {
  font-size: 20px;
  line-height: 1;
}

.ehPortrait--sm { width: 30px; height: 30px; border-radius: var(--eh-r-xs); }
.ehPortrait--sm .ehPortraitGlyph { font-size: 15px; }
.ehPortrait--md { width: 40px; height: 40px; }
.ehPortrait--lg { width: 60px; height: 60px; }
.ehPortrait--lg .ehPortraitGlyph { font-size: 30px; }
.ehPortrait--xl { width: 96px; height: 96px; border-radius: var(--eh-r-md); }
.ehPortrait--xl .ehPortraitGlyph { font-size: 52px; }
.ehPortrait.is-empty { background: rgb(var(--shadow-rgb) / 0.2); color: var(--muted); }

.ehIdentity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ehIdentityText { min-width: 0; flex: 1 1 auto; }

/* ═══ Durum işaretleri ═══ */

/* Her işaret bir glif ve bir kelime taşır. Renk yalnızca pekiştirir. */
.ehMarks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.ehMark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

.ehMarkGlyph { font-size: 10px; opacity: 0.9; }
.ehMarkLabel { overflow-wrap: anywhere; white-space: normal; }

.ehMark[data-eh-tone="good"] { color: var(--success-text); }
.ehMark[data-eh-tone="warn"] { color: var(--warn-text); }
.ehMark[data-eh-tone="danger"] { color: var(--danger-text); }
.ehMark[data-eh-tone="accent"] { color: var(--accent-text); }
.ehMark[data-eh-tone="info"] { color: var(--info); }
.ehMark[data-eh-tone="passive"] { color: var(--accent-text); }
.ehMark[data-eh-tone="status"] { color: var(--warn-text); }
.ehMark[data-eh-tone="special"] { color: var(--rarity-legendary); }
.ehMark[data-eh-tone="new"] { color: var(--accent-text); font-weight: 600; }

/* ═══ Sayılar ═══ */

.ehMetricRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding: 10px 14px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
}

.ehMetric {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ehMetricValue {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.ehMetricLabel {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ehMetricCaption {
  color: var(--text-secondary);
  font-size: 11px;
}

.ehMetric[data-eh-tone="good"] .ehMetricValue { color: var(--success-text); }
.ehMetric[data-eh-tone="warn"] .ehMetricValue { color: var(--warn-text); }

.ehQuickStats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ehQuickStat {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 11.5px;
}

.ehQuickStatLabel { color: var(--muted); }
.ehQuickStatValue { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.ehQuickStat[data-eh-stat="power"] .ehQuickStatValue { color: var(--accent-text); }

.ehStats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ehStat { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.ehStatLabel { color: var(--muted); }
.ehStatValue { color: var(--text); font-variant-numeric: tabular-nums; }

/* ═══ Ölçekler ═══ */

.ehMeterRow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ehMeter {
  flex: 1 1 auto;
  height: 5px;
  min-width: 40px;
  border-radius: 999px;
  background: rgb(var(--shadow-rgb) / 0.4);
  overflow: hidden;
}

.ehMeterFill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.22s cubic-bezier(0.2, 0, 0, 1);
}

.ehMeter[data-eh-tone="hp"] .ehMeterFill { background: var(--success); }
.ehMeter[data-eh-tone="danger"] .ehMeterFill { background: var(--danger); }
.ehMeter[data-eh-tone="good"] .ehMeterFill { background: var(--success); }
.ehMeter[data-eh-tone="warn"] .ehMeterFill { background: var(--warn); }
.ehMeter[data-eh-tone="xp"] .ehMeterFill { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.ehMeter[data-eh-tone="damage"] .ehMeterFill { background: var(--danger); }
.ehMeter[data-eh-tone="endurance"] .ehMeterFill { background: var(--info); }
.ehMeter[data-eh-tone="support"] .ehMeterFill { background: var(--success); }

.ehMeterValue {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* Eski bar bileşeni (progressBar) hâlâ birkaç yerde kullanılıyor. */
.ehBar { height: 5px; border-radius: 999px; background: rgb(var(--shadow-rgb) / 0.4); overflow: hidden; }
.ehBarFill { height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.22s cubic-bezier(0.2, 0, 0, 1); }

/* ═══ Araç çubuğu ve filtreler ═══ */

.ehToolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
}

/* The shared .input is full-width by default, which stacked four filters into four rows.
   Inside a toolbar they are sized to their content instead. */
.ehToolbar .input,
.ehToolbar select {
  width: auto;
  height: 32px;
  padding-block: 0;
  font-size: 12px;
}

.ehToolbar select.input { padding-right: 26px; }

.ehSearch { min-width: 170px; flex: 1 1 200px; max-width: 320px; }
.ehSelect { min-width: 130px; max-width: 100%; }

.ehCheckboxLabel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
}

.ehCheckbox { accent-color: var(--accent); }

.ehFilterSummary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ehActiveFilters {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.ehSegmented {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel-sunken);
  gap: 2px;
}

.ehSegment {
  padding: 6px 14px;
  border: 0;
  border-radius: var(--eh-r-sm);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition-property: background, color;
  transition-duration: 0.12s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ehSegment:hover:not(.is-active) { color: var(--text); background: var(--surface-hover); }
.ehSegment:focus-visible { outline: none; box-shadow: var(--ring); }

.ehSegment.is-active {
  background: var(--eh-panel-raised);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--eh-lift);
}

/* ═══ Açılır ayrıntı ═══ */

.ehDetails { margin-top: 2px; }

.ehDetailsSummary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  list-style: none;
  transition: color 0.12s cubic-bezier(0.2, 0, 0, 1);
}

.ehDetailsSummary::-webkit-details-marker { display: none; }

.ehDetailsSummary::before {
  content: "▸";
  font-size: 9px;
  transition: transform 0.14s cubic-bezier(0.2, 0, 0, 1);
}

.ehDetails[open] > .ehDetailsSummary::before { transform: rotate(90deg); }
.ehDetailsSummary:hover { color: var(--text); }
.ehDetailsSummary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--eh-r-xs); }

.ehDetailsBody {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 2px;
}

.ehTileDetails > .ehDetailsBody {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--eh-line);
}

/* A term host is a word, not a chip: no frame, no circle, no padding of its own. Wrapping a
   tooltip host in a border made ordinary labels read as interactive controls, and a round frame
   around one made it read as a badge. */
.ehTerm {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: none;
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: help;
}

.ehTerm:focus-visible { outline: none; box-shadow: var(--ring); }

/* ═══ Tehlikeli bölge ═══ */

.ehDangerZone {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed color-mix(in srgb, var(--danger) 30%, transparent);
}

.ehConfirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel-raised);
  box-shadow: var(--eh-lift-strong);
  outline: 1px solid var(--eh-line-strong);
  outline-offset: -1px;
}

.ehConfirm--danger { outline-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.ehConfirmTitle { margin: 0; font-size: 14px; font-weight: 650; }
.ehConfirmCount { margin: 0; font-size: 13px; }

.ehSalvagePreviewList { max-height: 190px; overflow-y: auto; scrollbar-width: thin; }

.ehBulkBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 14px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel-raised);
  box-shadow: var(--eh-lift);
  outline: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: -1px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.ehBulkCount {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.ehBulkBar .ehNote { flex-basis: 100%; }

/* ═══ Listeler ve boş durumlar ═══ */

.ehList {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.65;
}

.ehEmpty {
  padding: 30px 16px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
  text-align: center;
}

.ehEmptyTitle { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--text); }
.ehEmptyBody { margin: 6px auto 0; max-width: 46ch; font-size: 12px; color: var(--muted); }

/* ═══ Ödüller ═══ */

.ehRewards {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ehReward {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  border-radius: var(--eh-r-sm);
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success-text);
  font-size: 11.5px;
}

.ehReward[data-eh-kind="creature"] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); }
.ehReward[data-eh-kind="weapon"] { background: color-mix(in srgb, var(--info) 16%, transparent); color: var(--info); }
.ehReward[data-eh-kind="crate"] { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn-text); }
.ehRewardGlyph { font-size: 12px; }
.ehRewardCount { color: currentColor; opacity: 0.75; font-size: 10.5px; font-variant-numeric: tabular-nums; }

.ehTeamXp {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ─── Ustalık ───
   Seviye tavanından sonraki ilerleme. Üç satır, okundukları sırayla: seviye, ustalık rütbesi,
   o rütbenin içindeki ilerleme. Bar seviye barından ayrı bir renk taşır ki ikisi karışmasın. */

.ehMastery {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ehMasteryLines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ehMasteryLevel {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.ehMasteryRank {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
}

.ehMasteryProgress {
  margin: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.ehMasteryGain {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--eh-r-sm, 8px);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.ehMasteryGainTotal {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   OYNA
   ═══════════════════════════════════════════════════════════════════════════ */

.ehPlay {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Komut şeridi yapışkandır: iki temel eylem hiçbir zaman kayıp gitmez, sonuç hep altında açılır.
   Bu, av → savaş döngüsünün tek en önemli düzen kararıdır. */
.ehCommand {
  position: sticky;
  top: -14px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px 20px;
  padding: 12px 16px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel-raised);
  box-shadow: var(--eh-lift-strong);
  backdrop-filter: blur(8px);
}

.ehCommandHead {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.ehCommandPreset {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.ehCommandTeam { min-width: 0; }
.ehCommandTeam.is-empty .ehNote { max-width: 40ch; }

.ehChipRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ehTeamChip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 132px;
}

.ehChip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 4px;
  border: 0;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  min-width: 0;
}

.ehChip--action { cursor: pointer; transition: background 0.12s cubic-bezier(0.2, 0, 0, 1); }
.ehChip--action:hover { background: var(--surface-hover); }
.ehChip--action:focus-visible { outline: none; box-shadow: var(--ring); }
.ehChip--action:active { scale: 0.96; }
.ehChip.is-locked { opacity: 0.6; }

.ehChipText { display: flex; flex-direction: column; min-width: 0; }
.ehChipName { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.ehChipMeta { color: var(--muted); font-size: 10.5px; }

.ehCommandMeters {
  display: flex;
  gap: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--eh-line);
}

.ehCommandActions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.ehAction {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 118px;
}

/* Birincil eylem birincil görünür: tek büyük hedef, tek renk, tek kelime. */
.ehActionButton {
  padding: 12px 22px;
  border: 0;
  border-radius: var(--eh-r-md);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--eh-lift);
  transition-property: background, box-shadow, scale, opacity;
  transition-duration: 0.12s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ehActionButton:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, var(--on-accent)); }
.ehActionButton:active:not(:disabled) { scale: 0.96; }
.ehActionButton:focus-visible { outline: none; box-shadow: var(--ring); }

.ehActionButton:disabled {
  background: var(--eh-panel-sunken);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}

.ehActionHint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  min-height: 15px;
}

.ehAction[data-eh-state="cooldown"] .ehActionHint { color: var(--warn-text); }
.ehAction[data-eh-state="blocked"] .ehActionHint { color: var(--danger-text); }

/* ─── Sıradaki iş ─── */

.ehTodo {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ehTodoList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ehTodoItem {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 0;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  box-shadow: var(--eh-lift);
  transition-property: background, scale;
  transition-duration: 0.12s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ehTodoItem:hover { background: var(--surface-hover); }
.ehTodoItem:active { scale: 0.96; }
.ehTodoItem:focus-visible { outline: none; box-shadow: var(--ring); }
.ehTodoGlyph { font-size: 13px; }
.ehTodoLabel { font-weight: 500; }
.ehTodoGo { color: var(--accent-text); font-size: 11px; }

/* ─── Etkinlik ─── */

.ehEvent {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--eh-r-md);
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--rarity-event) 16%, transparent),
    var(--eh-panel));
}

.ehEventHead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ehEventName { margin: 0; font-size: 13px; font-weight: 600; }
/* Yumuşak şans göstergesi: yalnızca oranı söyler, arkasındaki merdiveni değil. */
.ehEventLuck { color: var(--accent-text); font-variant-numeric: tabular-nums; }

/* ─── Sahne ─── */

.ehStage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
  min-height: 220px;
}

.ehStageBody {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ehStageBody--idle {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 22px 0;
}

.ehStageIdleTitle { margin: 0; font-size: 16px; font-weight: 650; }
.ehIdleStats { display: flex; gap: 28px; margin-top: 10px; }

/* Yakalanan yaratık büyük görünür: bir koleksiyon oyununda ödül, yaratığın kendisidir. */
.ehCatch {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--eh-r-md);
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--eh-rarity) 18%, transparent),
    rgb(var(--shadow-rgb) / 0.18));
}

/* Giriş animasyonu yalnızca kartın ilk görünüşünde oynar. Bekleme sayacı paneli her saniye
   yeniden çizer; animasyon her çizimde oynasaydı kart her saniye yerinden sekerdi. */
.ehCatch.is-entering,
.ehVerdict.is-entering,
.ehCrateReveal.is-entering { animation: ehCatchIn 0.28s cubic-bezier(0.2, 0, 0, 1); }
.ehCatchAside.is-entering { animation: ehCatchIn 0.24s cubic-bezier(0.2, 0, 0, 1); }

@keyframes ehCatchIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ehCatchText { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

/* Bir savaş oynanırken gelen av: sahneyi almaz, üstünde tek satır durur. Rozet gibi görünmesin
   diye nadirlik yine sol kenardan gelir, ama yükseklik bir satırla sınırlıdır. */
.ehCatchAside {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 7px 12px 7px 10px;
  border-radius: var(--eh-r-sm);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--eh-rarity) 16%, transparent),
    rgb(var(--shadow-rgb) / 0.18));
  box-shadow: inset 3px 0 0 var(--eh-rarity);
}

.ehCatchAside .ehEyebrow { flex: 0 0 auto; }
.ehCatchAside .ehChip { background: none; padding-inline: 0; }
.ehCatchAside .ehRewards { margin-left: auto; }

/* ─── Savaş arenası ─── */

.ehVerdict {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel-raised);
}

.ehVerdict.is-win { box-shadow: inset 3px 0 0 var(--success); }
.ehVerdict.is-loss { box-shadow: inset 3px 0 0 var(--danger); }

.ehVerdictHead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ehVerdictGlyph { font-size: 13px; }
.ehVerdict.is-win .ehVerdictGlyph { color: var(--success); }
.ehVerdict.is-loss .ehVerdictGlyph { color: var(--danger); }
.ehVerdictText { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.ehVerdictStreak { color: var(--text-secondary); font-size: 12px; }
.ehVerdictStats { display: flex; flex-wrap: wrap; gap: 8px 26px; }

.ehArena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.ehArenaSide { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ehArenaSide--enemy { text-align: left; }

.ehArenaVs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 22px;
  color: var(--muted);
}

.ehArenaVsMark { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.ehArenaRound { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.ehCombatant {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--eh-r-sm);
  background: var(--eh-panel);
  transition-property: opacity, background, box-shadow;
  transition-duration: 0.16s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ehCombatant.is-active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.ehCombatant.is-down { opacity: 0.45; }

.ehCombatantBody { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ehCombatantHead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ehCombatantName { margin: 0; font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }

.ehArenaControls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.ehArenaTicker { min-height: 18px; }
.ehTickerLine { margin: 0; color: var(--accent-text); font-size: 11.5px; }

.ehLogList {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ehLogList .is-final { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   TAKIM
   ═══════════════════════════════════════════════════════════════════════════ */

.ehTeamLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.ehPresetRow { display: flex; gap: 6px; flex-wrap: wrap; }

.ehPreset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: var(--eh-r-sm) var(--eh-r-sm) 0 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition-property: color, background, border-color;
  transition-duration: 0.12s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ehPreset:hover { background: var(--surface-hover); color: var(--text); }
.ehPreset:focus-visible { outline: none; box-shadow: var(--ring); }
.ehPreset.is-open { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.ehPresetName { white-space: nowrap; }
.ehPresetCount { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.ehBoard { display: flex; flex-direction: column; gap: 10px; }

/* Hat başlıkları yuvaların üstünde durur: dizilişi okumak için rozet aramak gerekmez. */
.ehLineKey {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ehLineKeyItem {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--eh-r-sm);
  background: var(--eh-panel);
  color: var(--muted);
  font-size: 11px;
}

.ehLineKeyItem.is-filled { color: var(--text); box-shadow: inset 2px 0 0 var(--info); }
.ehLineKeyName { font-weight: 600; }
.ehLineKeyCount { font-variant-numeric: tabular-nums; }

.ehSlots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--eh-gap);
}

.ehSlot { align-items: center; text-align: center; gap: 7px; }
.ehSlot .ehIdentityText { text-align: center; }
.ehSlot .ehSub { justify-content: center; }

.ehSlot.is-empty {
  justify-content: center;
  min-height: 210px;
  background: var(--eh-panel-sunken);
  box-shadow: none;
  outline: 1px dashed var(--eh-line-strong);
  outline-offset: -1px;
}

.ehSlotLine {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ehSlotIndex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: var(--eh-r-xs);
  background: var(--eh-panel-sunken);
  font-size: 10px;
}

.ehSlotMeters { display: flex; gap: 20px; justify-content: center; }
.ehSlotActions { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: auto; }

/* Silah yuvası kendi hedefidir: eşit ağırlıklı üç düğme yerine tek dokunulur alan. */
.ehWeaponSlot {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--eh-r-sm);
  background: var(--eh-panel-sunken);
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  outline: 1px dashed var(--eh-line-strong);
  outline-offset: -1px;
  transition-property: background, color, outline-color;
  transition-duration: 0.12s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ehWeaponSlot:hover { background: var(--surface-hover); color: var(--text); }
.ehWeaponSlot:focus-visible { outline: none; box-shadow: var(--ring); }
.ehWeaponSlot:active { scale: 0.96; }

.ehWeaponSlot.is-filled {
  background: var(--eh-panel);
  color: var(--text);
  outline-style: solid;
  outline-color: var(--eh-line);
}

.ehWeaponSlotGlyph { font-size: 14px; flex: 0 0 auto; }
.ehWeaponSlotText { display: flex; flex-direction: column; min-width: 0; }
.ehWeaponSlotName { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.ehWeaponSlotMeta { color: var(--muted); font-size: 10.5px; }

.ehRail { display: flex; flex-direction: column; gap: 14px; }

.ehRailBlock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
}

.ehBalance { display: flex; flex-direction: column; gap: 6px; }

.ehBalanceRow {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.ehBalanceLabel { color: var(--muted); font-size: 11px; }
.ehBalanceValue { font-size: 11.5px; font-variant-numeric: tabular-nums; }

.ehPicker { display: flex; flex-direction: column; gap: 12px; }

.ehPickerHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ehCurrentSlot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
  box-shadow: inset 3px 0 0 var(--info);
}

.ehCurrentSlotBody { display: flex; flex-direction: column; gap: 7px; }

.ehTileSelect {
  width: 100%;
  margin-top: auto;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--eh-r-sm);
  background: var(--eh-panel-sunken);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition-property: background, color, scale;
  transition-duration: 0.12s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ehTileSelect:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.ehTileSelect:focus-visible { outline: none; box-shadow: var(--ring); }
.ehTileSelect:active:not(:disabled) { scale: 0.96; }
.ehTileSelect.is-active { background: var(--accent); color: var(--on-accent); }
.ehTileSelect:disabled { opacity: 0.45; cursor: default; }

/* Seçim modunda kartın tamamı bir hedef gibi davranır. */
.ehCreatureTile.is-selectable { cursor: pointer; }
.ehCreatureTile.is-selectable:hover { background: var(--eh-panel-raised); }

/* ═══════════════════════════════════════════════════════════════════════════
   KOLEKSİYON
   ═══════════════════════════════════════════════════════════════════════════ */

.ehRarityRow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--eh-line);
}

.ehRarityName {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--eh-rarity);
}

.ehSpeciesTile { gap: 6px; }
.ehSpeciesTile.is-locked .ehName { color: var(--muted); }
.ehMilestone { gap: 8px; }

/* ═══════════════════════════════════════════════════════════════════════════
   ENVANTER
   ═══════════════════════════════════════════════════════════════════════════ */

.ehCrate { gap: 10px; }
.ehCrateHead { display: flex; align-items: center; gap: 12px; }

.ehCrateResult {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: var(--eh-r-sm);
  background: rgb(var(--shadow-rgb) / 0.22);
  animation: ehCatchIn 0.24s cubic-bezier(0.2, 0, 0, 1);
}

/* Silahlar satır olarak okunur; yirmi iki kart yerine yirmi iki satır. */
.ehWeaponRow {
  flex-direction: column;
  gap: 6px;
  padding-block: 9px;
}

.ehWeaponMain {
  display: grid;
  grid-template-columns: auto minmax(150px, 1.4fr) minmax(130px, 0.8fr) minmax(160px, 1.6fr);
  align-items: center;
  gap: 12px;
}

.ehWeaponQuality {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ehWeaponQuality .ehMeterRow { flex: 1 1 auto; }

.ehCraft { gap: 8px; }

.ehCompare {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 11px;
  border-radius: var(--eh-r-sm);
  background: rgb(var(--shadow-rgb) / 0.2);
}

.ehCompareTotal { margin: 0; font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ehCompareTotal.is-up { color: var(--success-text); }
.ehCompareTotal.is-down { color: var(--warn-text); }

.ehCompareRows {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

/* İşaret yönü zaten taşır; renk yalnızca pekiştirir. */
.ehCompareRows li.is-up { color: var(--success-text); }
.ehCompareRows li.is-down { color: var(--warn-text); }

.ehWarn { margin: 0; color: var(--warn-text); font-size: 11.5px; }

.ehOption { gap: 7px; }
.ehTraitRow { display: flex; flex-direction: column; gap: 6px; }

/* ═══════════════════════════════════════════════════════════════════════════
   GÜNLÜK · KEŞİF · BOSS
   ═══════════════════════════════════════════════════════════════════════════ */

.ehClaim { gap: 9px; }
.ehClaimHead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.ehTaskList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ehTask {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
}

.ehTask.is-complete { box-shadow: inset 3px 0 0 var(--success); }
.ehTaskHead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ehTaskName { font-size: 12.5px; font-weight: 600; }

.ehExpeditionSlot { gap: 8px; min-height: 150px; }
.ehExpeditionSlot.is-empty { justify-content: center; align-items: center; text-align: center; background: var(--eh-panel-sunken); box-shadow: none; outline: 1px dashed var(--eh-line-strong); outline-offset: -1px; }

.ehBoss { gap: 9px; }
.ehBossHead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ehBossHead .ehIdentityText { flex: 1 1 140px; }
.ehBossPower { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ehBossPower .ehMeterRow { flex: 1 1 110px; }
.ehBoss.is-locked { opacity: 0.65; }

/* ─── Uç oyun: Kule, Rütbe, Uyanış ───
   Kule katı boss kartının düzenini paylaşır; muhafız katı yalnızca kenar rengiyle ayrılır.
   Uyanış yıldızları seviye satırının yanında durur, adı erişilebilir etikettedir. */

.ehTower,
.ehRank { gap: 12px; }
.ehTowerFloor { gap: 9px; }
.ehTowerFloor.is-guardian { box-shadow: inset 3px 0 0 var(--rarity-legendary); }
.ehTowerLineup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ehTowerFoe {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
  min-width: 0;
}
.ehTowerUpcomingList { display: flex; flex-direction: column; gap: 6px; }
.ehTowerUpcoming { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ehTowerUpcoming.is-guardian .ehChipName { color: var(--rarity-legendary); }

.ehRankReward { gap: 6px; }
.ehRankReward.is-claimed { opacity: 0.6; }

.ehStars {
  color: var(--rarity-legendary);
  letter-spacing: 1px;
  font-size: 11px;
}

.ehAwakeningBlock {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--eh-r-sm, 8px);
  background: color-mix(in srgb, var(--rarity-legendary) 10%, transparent);
}

.ehFodderOption {
  padding: 2px;
  border: 0;
  border-radius: var(--eh-r-md);
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.ehFodderOption:focus-visible { outline: none; box-shadow: var(--ring); }
.ehCrateReveal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel-raised);
  box-shadow: inset 3px 0 0 var(--success);
}
.ehRevealList { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ehRevealItem {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--eh-r-md);
  background: var(--eh-panel);
}
.ehRevealItem[data-eh-kind="weapon"],
.ehRevealItem[data-eh-kind="creature"] { box-shadow: inset 2px 0 0 var(--accent); }
.ehRevealText { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ehRevealGlyph { width: 32px; text-align: center; font-size: 18px; line-height: 32px; }
.ehFodderOption.is-selected .ehChip { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface-hover); }

/* ═══════════════════════════════════════════════════════════════════════════
   REHBER
   ═══════════════════════════════════════════════════════════════════════════ */

.ehGuide { max-width: 860px; }

.ehLoop {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ehLoop;
}

.ehLoopStep {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--eh-r-sm);
  background: var(--eh-panel);
}

.ehLoopIndex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: var(--eh-r-xs);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ehLoopLabel { font-size: 12.5px; }

.ehTopic {
  padding: 4px 0;
  border-bottom: 1px solid var(--eh-line);
}

.ehTopic > .ehDetailsSummary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  padding: 8px 0;
}

.ehGuideText {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.65;
  max-width: 74ch;
}

.ehReference {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  margin: 0;
  font-size: 12px;
}

.ehReference dt {
  padding: 6px 0;
  color: var(--muted);
  border-top: 1px solid var(--eh-line);
}

.ehReference dd {
  margin: 0;
  padding: 6px 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--eh-line);
}

.ehFormationExample {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--eh-r-sm);
  background: rgb(var(--shadow-rgb) / 0.25);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  overflow-x: auto;
}

/* ═══ Dar pencereler ═══ */

@media (max-width: 1100px) {
  .ehTeamLayout { grid-template-columns: minmax(0, 1fr); }
  .ehCommand { grid-template-columns: minmax(0, 1fr) auto; }
  .ehCommandActions { grid-column: 1 / -1; }
  .ehWeaponMain { grid-template-columns: auto minmax(0, 1fr); grid-auto-rows: auto; }
  .ehWeaponQuality,
  .ehWeaponMain > .ehMarks { grid-column: 2 / -1; }
}

@media (max-width: 860px) {
  .ehArena { grid-template-columns: minmax(0, 1fr); }
  .ehArenaVs { flex-direction: row; padding-top: 0; justify-content: center; gap: 10px; }
}

@media (max-width: 720px) {
  .emreHuntModal {
    width: calc(100vw - 12px);
    height: calc(100dvh - var(--titlebar-height) - 12px);
  }

  .emreHuntHeader,
  .emreHuntContent { padding-inline: 12px; }

  .ehTileGrid,
  .ehTileGrid--dense,
  .ehTileGrid--wide,
  .ehSlots { grid-template-columns: 1fr; }

  .ehCommand { grid-template-columns: minmax(0, 1fr); }
  .ehCommandMeters { padding-left: 0; border-left: 0; }
  .ehCommandActions { display: grid; grid-template-columns: 1fr 1fr; }
  .ehIdleStats { flex-wrap: wrap; gap: 16px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .emreHuntModal,
  .ehCatch,
  .ehCatchAside,
  .ehVerdict,
  .ehCatch.is-entering,
  .ehCatchAside.is-entering,
  .ehVerdict.is-entering,
  .ehCrateReveal.is-entering,
  .ehCrateResult { animation: none; }

  .ehMeterFill,
  .ehBarFill { transition: none; }

  /* Routine navigation and disclosure must never wait on an animation. */
  .ehTab,
  .ehSegment,
  .ehDetailsSummary,
  .ehDetailsSummary::before,
  .ehTerm,
  .ehTodoItem,
  .ehActionButton,
  .ehTileSelect,
  .ehChip--action,
  .ehWeaponSlot { transition: none; }

  .ehActionButton:active,
  .ehTileSelect:active,
  .ehTodoItem:active,
  .ehChip--action:active,
  .ehWeaponSlot:active { scale: 1; }
}

/* Shared Roulette: original, dependency-free European wheel. */
.rouletteCard { width: min(100%, 430px); box-sizing: border-box; padding: 16px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--card-strong); color: var(--text); box-shadow: 0 12px 32px var(--overlay-light); }
.rouletteEyebrow { font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--text-secondary); }
.rouletteTitle { font-size: 25px; margin: 5px 0 8px; letter-spacing: -.04em; }
.rouletteStatus { font-size: 13px; color: var(--text-secondary); margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.rouletteWheelFrame { position: relative; width: 190px; height: 190px; margin: 0 auto 14px; padding: 0; border-radius: 50%; border: 5px solid color-mix(in srgb, var(--warn) 35%, var(--text-secondary)); box-shadow: 0 0 0 3px var(--bg-deep), 0 8px 25px var(--overlay-medium); }
.rouletteWheelClip { width: 100%; height: 100%; overflow: hidden; border-radius: 50%; }
.rouletteWheel { width: 100%; height: 100%; border-radius: 50%; position: relative; }
.rouletteNumber { position: absolute; left: 50%; top: 50%; font-size: 10px; font-weight: 700; color: var(--on-media); font-variant-numeric: tabular-nums; }
.rouletteHub { position: absolute; inset: 30%; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--success) 18%, var(--card-strong)), var(--bg-deep)); border: 3px solid color-mix(in srgb, var(--warn) 35%, var(--text-secondary)); box-shadow: 0 0 0 7px var(--overlay-medium); font-size: 32px; font-weight: 800; color: color-mix(in srgb, var(--warn) 35%, var(--text)); }
.roulettePointer { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); color: var(--text); font-size: 24px; text-shadow: 0 2px 4px var(--media-bg); }
.roulettePlayers { display: grid; gap: 6px; margin-bottom: 10px; }
.roulettePlayer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.roulettePlayerName { flex: 1; overflow-wrap: anywhere; font-weight: 600; }
.rouletteWager { color: var(--text-secondary); }
.rouletteWin { color: var(--success-text); }.rouletteLoss { color: var(--danger-text); }
.rouletteEmpty, .rouletteHint, .rouletteBalance { font-size: 11px; line-height: 1.6; color: var(--text-secondary); margin: 8px 0; }
.rouletteHistory { display: grid; gap: 5px; margin: 4px 0 8px; }
.rouletteHistoryLabel { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); }
.rouletteHistoryList { display: flex; gap: 4px; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-deep); }
/* Pocket colors follow the bet buttons, lifted so small red and black chips stay distinct. */
.rouletteHistoryItem { flex: 0 1 24px; min-width: 0; aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--on-media); background: color-mix(in srgb, var(--text) 14%, var(--bg-deep)); }
.rouletteHistoryItem.is-red { background: color-mix(in srgb, var(--danger) 55%, var(--bg-deep)); }
.rouletteHistoryItem.is-green { background: color-mix(in srgb, var(--success) 45%, var(--bg-deep)); }
.rouletteHistoryItem.is-latest { outline: 2px solid var(--accent); outline-offset: 1px; }
.rouletteAmount { width: 100%; min-height: 40px; padding: 8px 12px; background: var(--input-bg); color: var(--text); border: 1px solid var(--border-hover); border-radius: 8px; font: inherit; font-size: 13px; }
.rouletteControls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.rouletteBet { flex: 1; min-height: 44px; padding: 8px; border-radius: 8px; border: 1px solid var(--border-hover); color: var(--on-media); font: inherit; font-size: 12px; cursor: pointer; background: var(--surface-active); }
.rouletteBet-red { background: var(--danger-strong-bg); }.rouletteBet-green { background: color-mix(in srgb, var(--success) 25%, var(--bg-deep)); }
.rouletteBet:hover { filter: brightness(1.2); }.rouletteBet:disabled { opacity: .45; cursor: default; }
.rouletteBet:focus-visible, .rouletteAmount:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.rouletteAmounts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.rouletteAmountButton { min-height: 40px; padding: 6px 8px; border: 1px solid var(--border-hover); border-radius: 8px; background: var(--surface-active); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.rouletteAmountButton:hover:not(:disabled) { background: var(--surface-hover); }
.rouletteAmountButton[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface-active)); font-weight: 700; }
.rouletteAmountButton:focus-visible, .rouletteCustomAmount:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rouletteAmounts :disabled { opacity: .45; cursor: default; }
.rouletteCustomControl { grid-column: 1 / -1; display: flex; gap: 6px; min-width: 0; }
.rouletteCustomAmount { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--border-hover); border-radius: 8px; background: var(--input-bg); color: var(--text); font: inherit; font-size: 12px; }
.rouletteCustomButton { flex: none; }
.rouletteSelected { margin: 8px 0; font-size: 12px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.rouletteOutside { display: grid; gap: 6px; }
.rouletteOutsideGroup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.rouletteOutsideGroup.is-2-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rouletteOutsideGroup.is-3-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rouletteOutsideGroup .rouletteBet { min-width: 0; min-height: 44px; padding: 5px; }
.rouletteOutsideGroup .rouletteBet { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; line-height: 1.15; }
.rouletteOutsideGroup .rouletteBet.has-own-wager { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.roulettePlacedAmount { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.rouletteSlip { display: grid; gap: 4px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.rouletteSlipTitle { font-size: 12px; }
.rouletteSlipRow { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.rouletteSlipRow > span { min-width: 0; overflow-wrap: anywhere; }
.blackjackCustomAmount { display: block; width: 100%; box-sizing: border-box; min-width: 0; margin-top: 8px; padding: 8px; border: 1px solid var(--border-hover); border-radius: 8px; background: var(--input-bg); color: var(--text); font: inherit; }
.blackjackGameCard.is-betting .blackjackWagers { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(84px, 1.5fr); }
.blackjackGameCard.is-betting .blackjackCustomAmount { margin-top: 0; min-height: 38px; }
.blackjackCustomAmount:focus-visible, .blackjackBetControl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.blackjackBetActions { flex-wrap: wrap; gap: 6px; }
.blackjackBetControl { min-height: 38px; padding: 6px 10px; border: 1px solid var(--border-hover); border-radius: 9px; background: var(--surface-active); color: var(--text); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.blackjackBetControl:hover:not(:disabled) { background: var(--surface-hover); }
.blackjackBetControl.is-confirm { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface-active)); }
.blackjackBetControl:disabled, .blackjackCustomAmount:disabled { opacity: .45; cursor: default; }
.warInviteQuickAmounts { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.warInviteQuickAmount { min-width: 44px; min-height: 36px; }
.warInviteTotal { display: block; margin: 4px 0 0; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.rouletteWheel.is-spinning { animation: roulette-spin 6s cubic-bezier(.12,.65,.12,1) both; }
/* No reduced-motion variant: the spin reveals the result and must match normal motion exactly. */
@keyframes roulette-spin { from { transform: rotate(0deg); } to { transform: rotate(var(--roulette-land)); } }
@media (max-width: 420px) { .rouletteCard { padding: 14px; }.rouletteWheelFrame { zoom: .85; } }

/* ─── Kart Savaşı ─── */
.warSrOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.warInviteModalContent { width: min(380px, 92vw); }
.warInviteBody { gap: 12px; }
.warInviteField { display: grid; gap: 6px; }
.warInviteLabel { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.warInviteTarget { font-size: 13px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.warInviteBalance,
.warInvitePreview,
.warInviteRules { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.warInvitePreview { min-height: 16px; color: var(--text); }
.warInviteError { font-size: 12px; color: var(--danger); line-height: 1.4; }
.warInviteActions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.warInviteStack {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 56;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 32px));
  pointer-events: none;
}
.warInviteCard {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-strong);
  box-shadow: 0 10px 28px rgb(var(--shadow-rgb) / 0.35);
  color: var(--text);
}
.warInviteCard.is-incoming { border-color: var(--accent); }
.warInviteCard.is-expired { opacity: 0.6; }
.warInviteText { font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; }
.warInviteTimer { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.warInviteButtons { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; }

.warResumeChip {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 55;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--card-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgb(var(--shadow-rgb) / 0.3);
}
.warResumeChip:focus-visible,
.warPanelClose:focus-visible,
.warAutoSwitch:focus-visible { outline: 2px solid var(--ring, var(--accent)); outline-offset: 2px; }

.warPanel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 55;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius, 14px);
  border: 1px solid var(--border);
  background: var(--card-strong);
  color: var(--text);
  box-shadow: 0 18px 48px rgb(var(--shadow-rgb) / 0.45);
}
.warPanel.hidden,
.warResumeChip.hidden,
.warInviteStack.hidden { display: none; }
.warPanelHeader { display: flex; align-items: center; gap: 8px; }
.warPanelTitle { font-size: 15px; font-weight: 700; margin: 0; }
.warPanelMeta { flex: 1; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.warPanelClose {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.warTable { display: grid; gap: 8px; }
.warSeat {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-active);
}
.warSeatName { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.warSeatBadges { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.warSeatDeck { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.warBadge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-active);
  color: var(--text-secondary);
}
.warBadge.is-ready { background: var(--success); color: var(--on-accent); }
.warBadge.is-auto { background: var(--accent-soft); color: var(--text); }
.warBadge.is-offline { background: var(--danger); color: var(--on-accent); }
.warArena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 118px;
}
.warSlot { display: flex; align-items: center; justify-content: center; gap: 6px; }
.warSlot.is-opponent { flex-direction: row-reverse; }
.warSlot.is-winner .warFaceSlot .warCard { box-shadow: 0 0 0 3px var(--success), 0 8px 20px rgb(var(--shadow-rgb) / 0.35); }
.warDownStack { display: flex; }
.warDownStack .warCard + .warCard { margin-left: -30px; }
.warCenter { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 96px; }
.warPhaseBadge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warn);
  color: rgb(var(--bg-deep-rgb));
}
.warDepth { font-size: 12px; font-weight: 700; color: var(--accent); min-height: 14px; }
.warClock { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.warClock.is-urgent { color: var(--danger); font-weight: 700; }
.warOutcome { margin: 0; font-size: 12.5px; font-weight: 600; min-height: 17px; }
.warCard {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 82px;
  border-radius: 8px;
  background: var(--on-accent);
  color: rgb(var(--bg-deep-rgb));
  border: 1px solid rgb(var(--shadow-rgb) / 0.18);
  box-shadow: 0 4px 12px rgb(var(--shadow-rgb) / 0.3);
  font-weight: 800;
  line-height: 1;
  transition: transform var(--transition-fast, 0.15s ease), box-shadow var(--transition-fast, 0.15s ease);
}
.warCard.is-red { color: var(--danger); }
.warCardRank { font-size: 20px; }
.warCardSuit { font-size: 22px; margin-top: 4px; }
.warCard.is-small { width: 30px; height: 42px; border-radius: 5px; }
.warCard.is-small .warCardRank { font-size: 12px; }
.warCard.is-small .warCardSuit { font-size: 12px; margin-top: 1px; }
.warCard.is-back {
  background: repeating-linear-gradient(45deg, var(--accent) 0 6px, var(--card-strong) 6px 12px);
  border-color: var(--accent);
}
.warCard.is-back.is-deck { width: 22px; height: 30px; border-radius: 4px; box-shadow: none; }
.warCard.is-back.is-empty { opacity: 0.18; box-shadow: none; }
.warCard.is-back.is-down { width: 44px; height: 62px; }
.warArena.is-revealing .warCard.is-flipping { animation: warFlip 0.75s ease-in-out; }
.warArena.is-result .warSlot.is-winner .warFaceSlot .warCard { transform: translateY(-4px) scale(1.04); }
@keyframes warFlip {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}
.warTrail { display: grid; gap: 4px; }
.warTrail:empty { display: none; }
.warTrailTitle { margin: 0; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.warDuel { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.warDuelIndex { width: 22px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.warDuelVerdict { color: var(--text-secondary); }
.warActions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.warActions.hidden,
.warConfirm.hidden,
.warResult.hidden { display: none; }
.warReadyButton { flex: 1; min-width: 120px; }
.warAutoSwitch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  cursor: pointer;
}
.warAutoTrack {
  position: relative;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: var(--surface-active);
  transition: background var(--transition-fast, 0.15s ease);
}
.warAutoTrack::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--on-accent);
  transition: transform var(--transition-fast, 0.15s ease);
}
.warAutoSwitch.is-on .warAutoTrack { background: var(--accent); }
.warAutoSwitch.is-on .warAutoTrack::after { transform: translateX(14px); }
.warAutoSwitch:disabled,
.warPanel button:disabled { opacity: 0.55; cursor: not-allowed; }
.warSurrenderButton { color: var(--danger); }
.warConfirm {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--danger);
  background: rgb(var(--danger-rgb) / 0.08);
}
.warConfirmText { margin: 0; font-size: 12.5px; line-height: 1.45; }
.warConfirmActions { display: flex; justify-content: flex-end; gap: 8px; }
.warResult { display: grid; gap: 6px; }
.warResultTitle { margin: 0; font-size: 18px; }
.warResultReason,
.warResultPayout { margin: 0; font-size: 13px; color: var(--text-secondary); }
.warVerify summary { cursor: pointer; font-size: 12px; color: var(--text-secondary); }
.warVerifyBody { display: grid; gap: 4px; margin-top: 6px; }
.warVerifyRow { display: grid; gap: 2px; }
.warVerifyLabel { font-size: 11px; color: var(--text-secondary); }
.warVerifyValue { font-size: 11px; overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.warVerifyHint { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.warPanelNote { margin: 0; font-size: 11px; color: var(--muted); }
.warPanel.is-sudden { border-color: var(--warn); }
@media (max-width: 560px) {
  .warPanel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: calc(100vh - 16px);
    padding: 12px;
  }
  .warInviteStack { left: 8px; bottom: 8px; width: calc(100vw - 16px); }
  .warResumeChip { right: 8px; bottom: 8px; }
  .warCard { width: 48px; height: 68px; }
  .warCard.is-back.is-down { width: 36px; height: 50px; }
  .warArena { min-height: 100px; gap: 6px; }
}
@media (max-width: 360px) {
  .warArena { gap: 4px; }
  .warSlot { gap: 4px; }
  .warCenter { min-width: 76px; }
  .warCard { width: 42px; height: 60px; }
  .warCard.is-back.is-down { width: 30px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .warArena.is-revealing .warCard.is-flipping { animation-duration: 0.01s; }
  .warCard,
  .warAutoTrack,
  .warAutoTrack::after { transition: none; }
}

/* ─── AVIATOR ─── */
.aviatorCard {
  --aviator-sky: var(--bg-deep);
  --aviator-ray: rgb(var(--surface-rgb) / 0.035);
  --aviator-line: var(--danger);
  --aviator-fill: rgb(var(--danger-rgb) / 0.2);
  --aviator-plane: var(--danger);
  --aviator-plane-detail: var(--text);
  --aviator-grid: rgb(var(--surface-rgb) / 0.06);
  --aviator-axis: var(--muted);
  --aviator-win: var(--success);
  --aviator-gold: var(--warn);
  width: min(520px, 100%); box-sizing: border-box; margin: 8px 0; padding: 16px;
  border: 1px solid var(--border-strong); border-radius: 14px; background: var(--card-strong); color: var(--text);
}
.aviatorCard [hidden] { display: none !important; }
.aviatorHeader { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.aviatorHeader h2 { margin: 0; font-size: 18px; letter-spacing: .02em; }
.aviatorMuted { color: var(--text-secondary); font-size: 12px; }
.aviatorHistory { display: flex; gap: 6px; margin: 14px 0 10px; overflow-x: auto; scrollbar-width: none; min-height: 22px; }
.aviatorHistory::-webkit-scrollbar { display: none; }
.aviatorChip { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface-muted); color: var(--text-secondary); }
.aviatorChip[data-tier="high"] { background: rgb(var(--success-rgb) / .14); color: var(--success); }
.aviatorChip[data-tier="epic"], .aviatorChip[data-tier="legendary"] { background: rgb(var(--warn-rgb) / .16); color: var(--warn); }
.aviatorStage { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-deep); height: clamp(160px, 40vw, 220px); }
.aviatorCanvas { display: block; width: 100%; height: 100%; }
.aviatorOverlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; pointer-events: none; text-align: center; }
.aviatorPhase { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.aviatorMultiplier { font-size: clamp(34px, 9vw, 54px); line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); text-shadow: 0 2px 18px rgb(var(--shadow-rgb) / .6); transition: color .15s; }
.aviatorStage[data-phase="crashed"] .aviatorPhase, .aviatorStage[data-phase="crashed"] .aviatorMultiplier { color: var(--danger); }
.aviatorStage[data-phase="flying"][data-tier="epic"] .aviatorMultiplier { color: var(--warn); }
.aviatorStage[data-phase="flying"][data-tier="legendary"] .aviatorMultiplier { color: var(--warn); text-shadow: 0 0 22px rgb(var(--warn-rgb) / .55); }
.aviatorOverlay[data-milestone] .aviatorMultiplier { animation: aviatorPulse .5s ease-out 3; }
.aviatorBadge { margin-top: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgb(var(--success-rgb) / .18); color: var(--success); }
.aviatorOverlay[data-milestone] .aviatorBadge { background: rgb(var(--warn-rgb) / .18); color: var(--warn); }
.aviatorBadge[hidden] { display: none; }
.aviatorCountdown { position: absolute; left: 14px; right: 14px; bottom: 10px; height: 4px; border-radius: 2px; background: rgb(var(--surface-rgb) / .1); overflow: hidden; }
.aviatorCountdown[hidden] { display: none; }
.aviatorCountdownBar { display: block; height: 100%; background: var(--danger); transform-origin: left center; }
.aviatorStatus { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.aviatorControls { display: grid; gap: 10px; margin-top: 14px; }
.aviatorField { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 10px; }
.aviatorLabel { font-size: 12px; color: var(--text-secondary); }
.aviatorField > .input { width: 100%; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.aviatorQuick { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.aviatorQuickButton { min-height: 30px; border: 1px solid var(--border-hover); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.aviatorQuickButton:hover:not(:disabled) { background: var(--surface-hover); }
.aviatorQuickButton:disabled { opacity: .5; cursor: default; }
.aviatorAutoRow { grid-template-columns: auto minmax(0, 120px) auto; justify-content: start; }
.aviatorToggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.aviatorButtons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.aviatorAction { min-height: 48px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.aviatorCard .aviatorAction[data-mode="cashout"] { background: var(--warn); border-color: var(--warn); color: var(--bg-deep); }
.aviatorCard .aviatorAction[data-mode="cashout"]:not(:disabled) { animation: aviatorGlow 1.2s ease-in-out infinite; }
.aviatorRebet[hidden] { display: none; }
.aviatorBalance { margin: 0; }
.aviatorResult { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; background: var(--surface); }
.aviatorResult[hidden] { display: none; }
.aviatorResult[data-result="won"] { color: var(--success); background: rgb(var(--success-rgb) / .1); }
.aviatorResult[data-result="lost"] { color: var(--danger); background: rgb(var(--danger-rgb) / .08); }
.aviatorPlayers { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.aviatorPlayersHeader { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.aviatorPlayersHeader h3 { margin: 0; font-size: 13px; }
/* Rows share the list's columns: the name keeps a readable minimum and the numbers take only their content width. */
.aviatorPlayerList { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: minmax(64px, 1fr) repeat(3, auto); gap: 2px 10px; max-height: 200px; overflow-y: auto; }
.aviatorPlayer { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.aviatorPlayer:nth-child(odd) { background: var(--surface-subtle); }
.aviatorPlayerName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.aviatorPlayerMultiplier, .aviatorPlayerWin { text-align: right; }
.aviatorPlayer[data-status="won"] .aviatorPlayerMultiplier, .aviatorPlayer[data-status="won"] .aviatorPlayerWin { color: var(--success); }
.aviatorPlayer[data-status="lost"] .aviatorPlayerWin { color: var(--danger); }
.aviatorPlayers > .aviatorMuted { margin: 8px 0 0; }
.aviatorPlayers > [hidden] { display: none; }
.aviatorRecord { margin: 12px 0 0; font-size: 12px; color: var(--warn); }
.aviatorRecord[hidden] { display: none; }
.aviatorCard button:focus-visible, .aviatorCard input:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@keyframes aviatorPulse { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes aviatorGlow { 0%, 100% { box-shadow: 0 0 0 0 rgb(var(--warn-rgb) / .45); } 50% { box-shadow: 0 0 0 6px rgb(var(--warn-rgb) / 0); } }
@media (max-width: 420px) {
  .aviatorCard { padding: 12px; }
  .aviatorPlayerList { column-gap: 6px; }
  .aviatorAutoRow { grid-template-columns: auto minmax(0, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) {
  .aviatorOverlay[data-milestone] .aviatorMultiplier,
  .aviatorAction[data-mode="cashout"]:not(:disabled) { animation: none; }
}

/* ─── UNO ─── */
/* A card table: other players on top, draw pile and face-up card in the middle, the hand below. */
.unoCard, .unoDragGhost {
  --uno-red: var(--danger);
  --uno-yellow: var(--warn);
  --uno-green: var(--success);
  --uno-blue: color-mix(in srgb, var(--info) 55%, var(--bg-deep));
  --uno-ink: var(--bg-deep);
  --uno-paper: var(--text);
  --uno-icon-skip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='black' stroke-width='3'/%3E%3Cpath d='M6.3 17.7L17.7 6.3' stroke='black' stroke-width='3'/%3E%3C/svg%3E");
  --uno-icon-reverse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9h13l-3.5-3.5M19 15H6l3.5 3.5' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.unoCard {
  width: min(480px, 100%); box-sizing: border-box; margin: 8px 0; padding: 14px;
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--card-strong); color: var(--text);
}
.unoCard [hidden] { display: none !important; }
.unoHeader { display: flex; align-items: center; gap: 10px; }
.unoHeader h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: .06em; }
.unoPot { margin-right: auto; padding: 2px 8px; border-radius: 999px; background: var(--surface-subtle); color: var(--text-secondary); font-size: 12px; font-variant-numeric: tabular-nums; }
.unoMuted { color: var(--text-secondary); font-size: 12px; }
.unoTimer { font-variant-numeric: tabular-nums; }

/* Buttons */
.unoButton, .unoQuit {
  min-height: 34px; padding: 0 14px; border: 1px solid var(--border-hover); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.unoButton.is-primary { border-color: transparent; background: var(--accent); color: var(--text); }
.unoButton.is-ghost, .unoQuit { background: transparent; color: var(--text-secondary); font-weight: 600; }
.unoButton.is-danger { border-color: transparent; background: var(--danger); color: var(--uno-ink); }
.unoQuit { min-height: 28px; padding: 0 10px; font-size: 12px; }
.unoButton:disabled, .unoQuit:disabled { opacity: .5; cursor: default; }
.unoActions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }

/* Lobby */
.unoSeats { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.unoSeat { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.unoSeatAvatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--text); font-weight: 800; }
.unoSeat[data-empty="true"] .unoSeatAvatar { background: transparent; border: 2px dashed var(--border-hover); color: var(--text-secondary); font-weight: 400; }
.unoSeatName { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.unoSeat[data-empty="true"] .unoSeatName { color: var(--text-secondary); }
.unoInfo { margin: 14px 0 0; text-align: center; color: var(--text-secondary); font-size: 12px; }

/* Opponents */
.unoOpponents { list-style: none; margin: 12px 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.unoOpponent { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 12px; }
.unoOpponent[data-turn="true"] { background: rgb(var(--surface-rgb) / .06); box-shadow: 0 0 0 2px var(--accent); }
.unoOpponent[data-status="eliminated"], .unoOpponent[data-status="lost"] { opacity: .45; }
.unoOpponentName { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.unoOpponentCount { position: absolute; inset: 0; display: grid; place-items: center; color: var(--uno-paper); font-size: 15px; font-weight: 800; }
.unoBadge { position: absolute; top: -4px; right: -6px; padding: 1px 6px; border-radius: 6px; background: var(--uno-red); color: var(--uno-ink); font-size: 10px; font-weight: 800; }
.unoBadge.is-win { background: var(--uno-green); }
.unoNudge { min-height: 22px; padding: 0 8px; border: 1px solid var(--border-hover); border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.unoNudge:not(:disabled):hover { border-color: var(--accent); color: var(--text); }
.unoNudge:disabled { opacity: .5; cursor: default; }
.unoNudged { margin: 6px auto 0; width: fit-content; padding: 3px 10px; border-radius: 999px; background: rgb(var(--warn-rgb) / .16); color: var(--warn); font-size: 12px; font-weight: 800; text-align: center; }
.unoNudged[data-fresh="true"] { animation: unoShake .36s ease 2; }

/* Card faces */
.unoPlayingCard, .unoCardBack {
  position: relative; display: grid; place-items: center; box-sizing: border-box; flex: none;
  width: 52px; height: 76px; border: 3px solid var(--uno-paper); border-radius: 9px; overflow: hidden;
  box-shadow: 0 3px 8px rgb(var(--bg-deep-rgb) / .5);
}
.unoPlayingCard { --uno-face: var(--uno-ink); background: var(--uno-face); }
.unoPlayingCard[data-color="red"] { --uno-face: var(--uno-red); }
.unoPlayingCard[data-color="yellow"] { --uno-face: var(--uno-yellow); }
.unoPlayingCard[data-color="green"] { --uno-face: var(--uno-green); }
.unoPlayingCard[data-color="blue"] { --uno-face: var(--uno-blue); }
/* The tilted white oval of a real Uno card; the symbol sits in its exact middle. */
.unoPlayingCard::before { content: ""; position: absolute; width: 78%; height: 62%; border-radius: 50%; background: var(--uno-paper); transform: rotate(-28deg); }
.unoPlayingCard[data-color="wild"]::before { background: conic-gradient(var(--uno-red) 0 25%, var(--uno-blue) 0 50%, var(--uno-yellow) 0 75%, var(--uno-green) 0); }
.unoPlayingCardGlyph { position: relative; display: grid; place-items: center; color: var(--uno-face); font-size: 22px; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.unoPlayingCard[data-color="wild"] .unoPlayingCardGlyph { color: var(--uno-paper); text-shadow: 0 1px 2px rgb(var(--bg-deep-rgb) / .9); }
.unoPlayingCard[data-value="skip"] .unoPlayingCardGlyph,
.unoPlayingCard[data-value="reverse"] .unoPlayingCardGlyph {
  width: 26px; height: 26px; background: var(--uno-face);
  -webkit-mask: var(--uno-icon-skip) center / contain no-repeat; mask: var(--uno-icon-skip) center / contain no-repeat;
}
.unoPlayingCard[data-value="reverse"] .unoPlayingCardGlyph {
  -webkit-mask-image: var(--uno-icon-reverse); mask-image: var(--uno-icon-reverse);
}
.unoCardBack { background: var(--uno-ink); }
.unoCardBack::before { content: ""; position: absolute; width: 78%; height: 62%; border-radius: 50%; background: var(--uno-red); transform: rotate(-28deg); }
.unoCardBackLogo { position: relative; color: var(--uno-yellow); font-size: 13px; font-weight: 900; font-style: italic; transform: rotate(-28deg); }
.unoCardBack.is-mini { width: 34px; height: 50px; border-width: 2px; border-radius: 6px; }
.unoCardBack.is-mini .unoCardBackLogo { opacity: .25; }

/* Board */
/* The draw pile keeps to the left edge; the face-up card stays in the middle of the table. */
.unoBoard { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--surface-subtle); }
.unoDeck { position: relative; justify-self: start; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; }
.unoDeckLabel { color: var(--text-secondary); font-size: 12px; font-weight: 600; white-space: nowrap; }
.unoDeck[data-ready="true"] .unoDeckLabel { color: var(--accent); font-weight: 800; }
.unoPile { grid-column: 2; }
.unoDeck:disabled { cursor: default; }
.unoDeck .unoCardBack { width: 60px; height: 88px; }
.unoDeck[data-ready="true"] .unoCardBack { box-shadow: 0 0 0 3px var(--accent); }
.unoDeck[data-ready="true"]:hover .unoCardBack { transform: translateY(-3px); }
.unoPenalty { position: absolute; top: -8px; right: -12px; padding: 2px 7px; border-radius: 8px; background: var(--uno-red); color: var(--uno-ink); font-size: 13px; font-weight: 900; }
.unoPile { --uno-glow: var(--border-hover); padding: 5px; border-radius: 14px; box-shadow: 0 0 0 3px var(--uno-glow); }
.unoPile[data-color="red"] { --uno-glow: var(--uno-red); }
.unoPile[data-color="yellow"] { --uno-glow: var(--uno-yellow); }
.unoPile[data-color="green"] { --uno-glow: var(--uno-green); }
.unoPile[data-color="blue"] { --uno-glow: var(--uno-blue); }
.unoPile .unoPlayingCard { width: 60px; height: 88px; }
.unoPile .unoPlayingCardGlyph { font-size: 26px; }
.unoDirection { position: absolute; right: 12px; top: 8px; color: var(--text-secondary); font-size: 18px; }

/* Turn and hand */
.unoStatus { margin: 12px 0 0; text-align: center; font-size: 14px; font-weight: 700; }
.unoStatus[data-turn="true"] { color: var(--accent); }
.unoStatus .unoTimer { color: var(--text-secondary); font-weight: 500; }
.unoLastMove { margin: 2px 0 0; text-align: center; color: var(--text-secondary); font-size: 12px; }
.unoHandArea { margin-top: 12px; }
.unoHand { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding-top: 8px; }
.unoHand[data-crowded="true"] { gap: 0; }
.unoHand[data-crowded="true"] .unoHandCard + .unoHandCard { margin-left: -16px; }
.unoHandCard { padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; transition: transform .12s ease; }
.unoHandCard:disabled { cursor: default; }
.unoHandCard:disabled .unoPlayingCard { filter: saturate(.35) brightness(.6); }
/* On turn every card looks the same, playable or not; none is lifted out as a hint. */
.unoHandCard:not(:disabled):hover { transform: translateY(-6px); }
.unoHandCard[data-drawn="true"] .unoPlayingCard { box-shadow: 0 0 0 3px var(--accent); }
/* A card that does not fit shakes and stays in the hand. */
.unoHandCard[data-rejected="true"] { animation: unoShake .36s ease; }
@keyframes unoShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
/* Playable cards are dragged onto the board; touch-action keeps a touch drag from scrolling the chat. */
.unoHandCard:not(:disabled) { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.unoHandCard[data-dragging="true"] { opacity: .25; }
.unoDragGhost { position: fixed; left: 0; top: 0; z-index: 2147483000; pointer-events: none; cursor: grabbing; box-shadow: 0 12px 28px rgb(var(--bg-deep-rgb) / .6); }
.unoBoard[data-drop="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: rgb(var(--surface-rgb) / .07); }
.unoHint { margin: 8px 0 0; text-align: center; color: var(--text-secondary); font-size: 12px; }
.unoColorPicker { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.unoColorChoice { width: 38px; height: 38px; border: 3px solid var(--uno-paper); border-radius: 50%; cursor: pointer; }
.unoColorChoice[data-color="red"] { background: var(--uno-red); }
.unoColorChoice[data-color="yellow"] { background: var(--uno-yellow); }
.unoColorChoice[data-color="green"] { background: var(--uno-green); }
.unoColorChoice[data-color="blue"] { background: var(--uno-blue); }
.unoCall { border-color: transparent; background: var(--uno-red); color: var(--uno-ink); font-weight: 900; letter-spacing: .04em; }
.unoCall[aria-pressed="true"] { background: var(--uno-yellow); }
.unoConfirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 12px; background: rgb(var(--danger-rgb) / .1); font-size: 13px; }

/* Result */
.unoResult { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface-subtle); text-align: center; }
.unoResult strong { font-size: 18px; }
.unoResult span { color: var(--text-secondary); font-size: 13px; }
.unoResult[data-result="won"] { background: rgb(var(--success-rgb) / .12); }
.unoResult[data-result="won"] strong, .unoResult[data-result="won"] span { color: var(--success); }
.unoResult[data-result="lost"] strong { color: var(--danger); }

.unoCard button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
@media (max-width: 420px) {
  .unoCard { padding: 12px; }
  .unoPlayingCard { width: 44px; height: 66px; }
  .unoPlayingCardGlyph { font-size: 19px; }
  .unoBoard { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .unoHandCard { transition: none; }
  .unoHandCard[data-rejected="true"], .unoNudged[data-fresh="true"] { animation: none; }
}

/* Hidden pages and controls must not acquire a flex/grid layout box. */
.pageContent > .view[hidden],
.dmPage[hidden],
.voiceEmptyState[hidden],
#participantGrid[hidden],
.pendingInviteCard[hidden],
.roomChatWaiting[hidden],
#roomView > .topBar[hidden],
.appWorkspace > .bottomBar [hidden] { display: none !important; }
#roomActions.roomUnavailable > :not(.roomChatWaiting) { display: none !important; }

@media (max-width: 768px) {
  .pageContent #roomView.view.active:has(.voiceEmptyState:not([hidden])) {
    grid-template-rows: auto minmax(220px, 260px) max-content minmax(320px, auto);
  }
  .pageContent #roomView .centerColumn:has(.voiceEmptyState:not([hidden])) {
    min-height: max-content;
    overflow: visible;
  }
}

/* Günlük giriş ödülü */
.dailyLoginModal {
  width: min(760px, calc(100vw - 32px));
  max-width: 760px;
  max-height: min(640px, calc(100vh - var(--titlebar-height) - 32px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text);
  overflow: visible;
  z-index: 10000;
}

.dailyLoginModal.hidden,
.dailyLoginModal:not([open]) {
  display: none;
}

.dailyLoginModal::backdrop {
  background: rgb(var(--bg-deep-rgb) / 0.82);
}

/* A plain app surface, like the other modals: elevation from a hairline ring and the shared shadow. */
.dailyLoginContent {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: inherit;
  background: var(--popover-bg);
  box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.1), var(--shadow-lg);
  overflow: auto;
}

.dailyLoginHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dailyLoginHeading {
  display: grid;
  gap: 6px;
}

.dailyLoginEyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dailyLoginHeading h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.dailyLoginReset {
  justify-self: start;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dailyLoginClose {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 0 0 2px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.08);
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition-property: background-color, color, box-shadow, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.dailyLoginClose:hover:not(:disabled) {
  background: var(--surface-hover);
  box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.13);
  color: var(--text);
}

.dailyLoginClose:active:not(:disabled) {
  scale: 0.96;
}

.dailyLoginClose:disabled {
  opacity: 0.5;
  cursor: default;
}

.dailyLoginDays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Cards are 14px inside an 8px grid gap; the ring is a shadow so state colours swap without a border. */
.dailyLoginDay {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 10px 6px 12px;
  border-radius: 14px;
  background: rgb(var(--surface-rgb) / 0.05);
  box-shadow: 0 0 0 1px rgb(var(--border-rgb) / 0.08);
  text-align: center;
}

.dailyLoginDayNumber {
  justify-self: start;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* The glyph sits a pixel high in a circle; nudge it to the optical centre. */
.dailyLoginCoin {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 4px 0;
  padding-top: 1px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: inset 0 -2px 0 rgb(var(--shadow-rgb) / 0.22);
  color: var(--bg-deep);
  font-size: 18px;
  font-weight: 900;
}

.dailyLoginDay[data-finale="true"] .dailyLoginCoin {
  width: 48px;
  height: 48px;
  margin: 0;
  font-size: 22px;
}

.dailyLoginAmount {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dailyLoginStatus {
  min-height: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dailyLoginDay[data-status="available"] {
  background: var(--accent-soft);
  box-shadow: 0 0 0 1.5px var(--accent);
}

.dailyLoginDay[data-status="available"] .dailyLoginStatus {
  color: var(--accent);
}

.dailyLoginDay[data-status="claimed"] .dailyLoginStatus {
  color: var(--success);
}

.dailyLoginDay[data-status="claimed"]::after {
  content: '✓';
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px rgb(var(--card-rgb));
  color: var(--bg-deep);
  font-size: 12px;
  font-weight: 900;
}

/* The step just claimed: its check arrives like a contextual icon, once. */
.dailyLoginDay[data-just-claimed="true"]::after {
  animation: dailyLoginCheckIn 300ms cubic-bezier(0.2, 0, 0, 1) backwards;
}

@keyframes dailyLoginCheckIn {
  from {
    opacity: 0;
    scale: 0.25;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    scale: 1;
    filter: blur(0px);
  }
}

.dailyLoginDay[data-status="claimed"] .dailyLoginCoin {
  opacity: 0.45;
}

.dailyLoginFeedback {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgb(var(--danger-rgb) / 0.36);
  border-radius: 10px;
  background: rgb(var(--danger-strong-rgb) / 0.2);
  color: var(--danger-text);
  font-size: 12px;
}

.dailyLoginFeedback.hidden {
  display: none;
}

.dailyLoginClaim {
  justify-self: center;
  min-width: min(320px, 100%);
  padding: 12px 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-fill);
  color: var(--on-accent-fill);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition-property: scale, background-color, opacity;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.dailyLoginClaim:hover:not(:disabled) {
  background: var(--accent-fill-hover);
}

.dailyLoginClaim:active:not(:disabled) {
  scale: 0.96;
}

.dailyLoginClaim:focus-visible,
.dailyLoginClose:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.dailyLoginClaim:disabled {
  cursor: default;
  opacity: 0.6;
}

.dailyLoginClaim[data-state="claimed"] {
  opacity: 1;
}

.dailyLoginNote {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  text-wrap: pretty;
}

/* Opening is a rare, staged moment: header, then the week, then the action, 100ms apart. The
   dialog is display:none while closed, so the sequence plays on every open and never on re-render. */
.dailyLoginModal[open] .dailyLoginHeader,
.dailyLoginModal[open] .dailyLoginDays,
.dailyLoginModal[open] .dailyLoginClaim,
.dailyLoginModal[open] .dailyLoginNote {
  animation: dailyLoginEnter 400ms ease-out backwards;
}

.dailyLoginModal[open] .dailyLoginDays {
  animation-delay: 100ms;
}

.dailyLoginModal[open] .dailyLoginClaim,
.dailyLoginModal[open] .dailyLoginNote {
  animation-delay: 200ms;
}

@keyframes dailyLoginEnter {
  from {
    opacity: 0;
    translate: 0 12px;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    translate: 0 0;
    filter: blur(0px);
  }
}

@media (max-width: 640px) {
  .dailyLoginContent {
    padding: 18px 16px;
  }

  .dailyLoginDays {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .dailyLoginModal[open] .dailyLoginHeader,
  .dailyLoginModal[open] .dailyLoginDays,
  .dailyLoginModal[open] .dailyLoginClaim,
  .dailyLoginModal[open] .dailyLoginNote,
  .dailyLoginDay[data-just-claimed="true"]::after {
    animation: none;
  }

  .dailyLoginClaim,
  .dailyLoginClose {
    transition-property: background-color, color, box-shadow, opacity;
  }

  .dailyLoginClaim:active:not(:disabled),
  .dailyLoginClose:active:not(:disabled) {
    scale: none;
  }
}

/* A soundboard clip only turns the player's frame yellow; speaking effects stay as they are. */
.participantCard.soundboardPlaying,
body.event-special-border .participantCard.soundboardPlaying {
  border-color: var(--soundboard-frame);
  box-shadow: inset 0 0 0 1px var(--soundboard-frame);
}

.screenTheaterTile.soundboardPlaying,
.screenTheaterTile.active.soundboardPlaying {
  border-color: var(--soundboard-frame);
}

/* League controls reuse the share window's theme and compact buttons. */
.footballLeagueSelector { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.footballLeagueSelector button { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.footballLeagueSelector [aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.footballLeagueWaiting { flex-basis: 100%; margin: 6px 0; overflow-wrap: anywhere; }
.footballSharesDetailTitle { flex-wrap: wrap; }
.footballSharesOpeningCap { font-variant-numeric: tabular-nums; }
.footballSharesFilter { flex-wrap: wrap; }
.footballSharesLeagueNav { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footballSharesLeagueLabel { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.footballSharesLeagueArrow { flex: 0 0 40px; min-height: 40px; padding: 0; font-size: 26px; line-height: 1; }
.footballSharesLeagueArrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) { .footballLeagueSelector button { flex: 1 1 auto; } .footballSharesClubTitle { overflow-wrap: anywhere; } }

/* Mobile room priorities: media, conversation/games, then room discovery.
   Keep the existing palette and components; every override is mobile-web-only. */
body.mobile-web-mode .appWorkspace {
  display: flex;
  flex-direction: column;
  --mobile-room-chrome: calc(204px + env(safe-area-inset-top) + env(safe-area-inset-bottom));
}

body.mobile-web-mode .pageRail {
  flex: 0 0 auto;
  flex-direction: row;
  gap: 8px;
  padding: max(4px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left));
  border-right: 0;
  border-bottom: 1px solid var(--border);
}

body.mobile-web-mode .pageRailLogo {
  margin: 0 auto 0 0;
}

body.mobile-web-mode .pageNavBtn[data-tooltip]::after {
  display: none;
}

body.mobile-web-mode .pageRailShares,
body.mobile-web-mode .pageRailSettings {
  margin: 0;
}

body.mobile-web-mode .pageNavBtn.active::before {
  display: none;
}

body.mobile-web-mode .pageContent {
  flex: 1;
}

body.mobile-web-mode #roomView.view.active > .mobileBanner {
  display: none;
}

body.mobile-web-mode #roomView.view.active > .topBar {
  min-height: 44px;
}

body.mobile-web-mode #roomView.view.active > .layout.roomLayout {
  --mobile-media-height: 56px;
  gap: 0;
}

body.mobile-web-mode #roomView.view.active > .layout.roomLayout:has(.cameraOn, .screenShareTile) {
  --mobile-media-height: clamp(112px, 22dvh, 176px);
}

body.mobile-web-mode #roomView.view.active > .layout.roomLayout:has(.cameraFocusMode, .theaterMode) {
  --mobile-media-height: clamp(180px, 32dvh, 280px);
}

body.mobile-web-mode #roomView.view.active .centerColumn {
  order: 0;
  flex: 0 0 var(--mobile-media-height);
  min-height: 0;
  height: var(--mobile-media-height);
  padding: 6px 10px;
  overflow: hidden;
}

body.mobile-web-mode #roomView.view.active .rightColumn {
  order: 1;
  flex: 0 0 auto;
  height: max(180px, calc(100dvh - var(--mobile-room-chrome) - var(--mobile-media-height)));
  min-height: 0;
}

/* Secondary content follows the conversation in the room's outer scroll area. */
body.mobile-web-mode #roomView.view.active .leftColumn {
  order: 2;
  padding: 16px 10px;
  border-top: 1px solid var(--border);
}

body.mobile-web-mode #roomView.view.active .leftColumn :is(button, .roomItem) {
  min-height: 44px;
}

/* Before joining, room discovery is the primary task. */
body.mobile-web-mode #roomView.view.active:has(.voiceEmptyState:not([hidden])) .leftColumn {
  order: -1;
}

body.mobile-web-mode #roomView.view.active:has(.voiceEmptyState:not([hidden])) .centerColumn {
  flex-basis: auto;
  height: auto;
  min-height: 220px;
  overflow: visible;
}

body.mobile-web-mode #roomView.view.active .rightColumn.roomUnavailable {
  height: auto;
}

body.mobile-web-mode #roomView .rightColumn.roomUnavailable > :not(.roomChatWaiting) {
  display: none !important;
}

/* A horizontally scrollable media strip keeps video visible without consuming the chat. */
body.mobile-web-mode #roomView #participantGrid:not([hidden]) {
  display: flex;
  flex: 1;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
}

body.mobile-web-mode #roomView #participantGrid > .participantCard {
  flex: 0 0 136px;
  width: 136px !important;
  min-height: 44px !important;
  padding: 0 4px 0 10px;
  scroll-snap-align: start;
}

body.mobile-web-mode #roomView #participantGrid > :is(.participantCard.cameraOn, .screenShareTile) {
  order: -1;
  flex: 0 0 clamp(172px, 54vw, 280px);
  width: auto !important;
  max-height: none;
  height: 100%;
  min-height: 0 !important;
  padding: 0;
  scroll-snap-align: start;
}

body.mobile-web-mode #roomView .participantCard.cameraOn .participantCameraVideo {
  display: block !important;
}

body.mobile-web-mode #roomView .participantCard.cameraOn .cameraFocusTrigger {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 44px;
  height: 44px;
  margin: 0;
}

body.mobile-web-mode #roomView .participantCard .participantMenuTrigger {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  opacity: 1;
}

body.mobile-web-mode #roomView .participantCard.cameraOn .participantMenuTrigger {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgb(var(--shadow-rgb) / 0.7);
}

body.mobile-web-mode #roomView .participantCard .participantName.participantNameBadge {
  font-size: 13px;
  text-align: left;
}

body.mobile-web-mode #roomView .participantCard.cameraOn .participantName.participantNameBadge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 4;
  width: auto;
  max-width: calc(100% - 12px);
  padding: 4px 8px;
  color: var(--on-media);
  background: rgb(var(--shadow-rgb) / 0.8);
  pointer-events: none;
}

body.mobile-web-mode #roomView .cameraTheater,
body.mobile-web-mode #roomView .screenTheater {
  flex: 1;
  height: 100%;
  min-height: 0;
}

body.mobile-web-mode #roomView :is(.screenTheaterCloseBtn, .screenTheaterGridBtn, .screenTheaterStopViewBtn) {
  min-width: 44px;
  min-height: 44px;
}

body.mobile-web-mode #roomView .screenTheaterStrip {
  flex: 0 0 56px;
  min-height: 0;
}

body.mobile-web-mode #roomView .rightColumn .tabBtn {
  min-height: 44px;
}

body.mobile-web-mode #roomView .chatToolbar :is(input, button),
body.mobile-web-mode #roomView :is(.chatNewMessagesBtn, .chatActionMenuItem) {
  min-height: 44px;
}

body.mobile-web-mode #roomView .chatActionMenu {
  width: min(300px, calc(100vw - 24px));
  touch-action: pan-y;
}

body.mobile-web-mode #roomView .chatMessages {
  overscroll-behavior-y: contain;
}

/* Keep the timeline pinned while allowing a tall game itself to scroll. */
body.mobile-web-mode #roomView .chatMessages.has-pinned-game .chatMessage.is-game-pinned {
  flex-shrink: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

body.mobile-web-mode #roomView .chatMessage :is(button, input, select) {
  min-height: 44px;
}

body.mobile-web-mode #roomView .chatMessage :is(input, select) {
  font-size: 16px;
}

/* Keep both composer controls side by side; never let generic .btn width fill the input. */
body.mobile-web-mode #roomView .chatInputRow {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
}

body.mobile-web-mode #roomView .chatActionLauncher {
  width: auto;
}

body.mobile-web-mode #roomView #chatInput {
  min-height: 48px;
  padding-block: calc((48px - 2px - 1.35em) / 2);
  padding-right: 128px;
  font-size: 16px;
}

body.mobile-web-mode #roomView #chatSendBtn {
  width: 44px;
  height: 44px;
  min-height: 44px;
}

body.mobile-web-mode #roomView .chatInputField.is-multiline #chatSendBtn {
  bottom: 2px;
}

body.mobile-web-mode #roomView .chatComposerToolBtn {
  width: 36px;
  height: 36px;
}

body.mobile-web-mode #roomView .chatComposerToolBtn.chatGamesBtn {
  right: 52px;
}

body.mobile-web-mode #roomView .chatComposerToolBtn.chatEmojiBtn {
  right: 90px;
}

body.mobile-web-mode #roomView .chatInputField.is-multiline .chatComposerToolBtn {
  bottom: 6px;
}

body.mobile-web-mode #roomView .chatRewardButton {
  width: 44px;
  height: 44px;
}

/* Account, reactions and leave above microphone/headphones/camera. Each split half is tappable. */
body.mobile-web-mode .appWorkspace > .bottomBar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 6px;
  padding: 4px max(8px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  overflow: visible;
}

body.mobile-web-mode .appWorkspace > .bottomBar .bbCenter:not([hidden]) {
  display: contents !important;
}

body.mobile-web-mode .appWorkspace > .bottomBar .bbLeft {
  min-width: 0;
}

body.mobile-web-mode .appWorkspace > .bottomBar .bbRight {
  grid-column: 3;
  min-width: 0;
  justify-self: end;
}

body.mobile-web-mode .appWorkspace > .bottomBar .voiceReactionBar {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

body.mobile-web-mode .bottomBar :is(.micSplitControl, .deafBarBtn, .cameraSplitControl) {
  grid-row: 2;
}

body.mobile-web-mode .bottomBar :is(.barBtn, .mediaSplitControl, .selfAccountBtn, .voiceReactionBtn) {
  min-height: 44px;
}

body.mobile-web-mode .bottomBar :is(.mediaSplitMenuBtn, .voiceReactionToggle) {
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
}

body.mobile-web-mode .bottomBar .voiceReactionPrimary {
  flex: 0 0 44px;
  width: 44px;
}

body.mobile-web-mode .bottomBar .leaveBarBtn {
  width: 44px;
}

body.mobile-web-mode .bottomBar .selfAccountBtn {
  padding-block: 5px;
}

/* Chat and game entry keep the composer reachable when the keyboard reduces the viewport. */
body.mobile-web-mode:has(.chatPane :is(input, textarea, select):focus) #roomView.view.active :is(.centerColumn, .leftColumn) {
  display: none !important;
}

body.mobile-web-mode:has(.chatPane :is(input, textarea, select):focus) #roomView.view.active .rightColumn {
  height: max(180px, calc(100dvh - var(--mobile-room-chrome)));
}

@media (max-height: 560px) {
  body.mobile-web-mode:has(.chatPane :is(input, textarea, select):focus) .appWorkspace {
    --mobile-room-chrome: calc(108px + env(safe-area-inset-bottom));
  }

  body.mobile-web-mode:has(.chatPane :is(input, textarea, select):focus) .pageRail,
  body.mobile-web-mode:has(.chatPane :is(input, textarea, select):focus) #roomView.view.active > .topBar {
    display: none;
  }
}

@media (orientation: landscape) and (max-height: 560px) and (min-width: 560px) {
  body.mobile-web-mode .appWorkspace {
    --mobile-room-chrome: calc(154px + env(safe-area-inset-top) + env(safe-area-inset-bottom));
  }

  body.mobile-web-mode .appWorkspace > .bottomBar {
    grid-template-columns: minmax(44px, 1fr) repeat(3, minmax(88px, 1fr)) 90px 44px;
  }

  body.mobile-web-mode .appWorkspace > .bottomBar .micSplitControl {
    grid-column: 2;
    grid-row: 1;
  }

  body.mobile-web-mode .appWorkspace > .bottomBar .deafBarBtn {
    grid-column: 3;
    grid-row: 1;
  }

  body.mobile-web-mode .appWorkspace > .bottomBar .cameraSplitControl {
    grid-column: 4;
    grid-row: 1;
  }

  body.mobile-web-mode .appWorkspace > .bottomBar .voiceReactionBar {
    grid-column: 5;
  }

  body.mobile-web-mode .appWorkspace > .bottomBar .bbRight {
    grid-column: 6;
  }

  body.mobile-web-mode #roomView.view.active > .layout.roomLayout {
    display: grid !important;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    grid-template-rows: max(160px, calc(100dvh - var(--mobile-room-chrome))) auto;
    align-items: stretch;
  }

  body.mobile-web-mode #roomView.view.active .centerColumn {
    grid-column: 1 !important;
    grid-row: 1 !important;
    height: 100%;
  }

  body.mobile-web-mode #roomView.view.active .rightColumn {
    grid-column: 2 !important;
    grid-row: 1 !important;
    height: 100%;
  }

  body.mobile-web-mode #roomView.view.active .leftColumn {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  body.mobile-web-mode #roomView #participantGrid > :is(.participantCard.cameraOn, .screenShareTile) {
    flex-basis: 172px;
  }

  body.mobile-web-mode:has(.chatPane :is(input, textarea, select):focus) #roomView.view.active > .layout.roomLayout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.mobile-web-mode:has(.chatPane :is(input, textarea, select):focus) #roomView.view.active .rightColumn {
    grid-column: 1 !important;
  }

  body.mobile-web-mode #roomView.view.active:has(.voiceEmptyState:not([hidden])) > .layout.roomLayout {
    display: flex !important;
  }
}

/* The selected league match uses the room viewport instead of a scrolling chat card. */
body.mobile-web-mode #roomView.view.active:has(.leaguePane.active) .centerColumn {
  display: none !important;
}

body.mobile-web-mode #roomView.view.active:has(.leaguePane.active) > .layout.roomLayout {
  display: flex !important;
}

body.mobile-web-mode #roomView.view.active:has(.leaguePane.active) .rightColumn {
  height: calc(100dvh - var(--mobile-room-chrome));
}

body.mobile-web-mode #roomView .tabContent .leaguePane.active {
  gap: 4px;
  padding: 4px 8px;
  overflow-y: auto;
}

/* The match already names the competition; the pane heading repeats it. */
body.mobile-web-mode #roomView .leaguePane > .cardTitle {
  display: none;
}

body.mobile-web-mode #roomView .leagueMatchHost {
  flex: 0 0 auto;
  min-width: 0;
}

/* mountCard prepends the newest match; mobile keeps one match in the primary view. */
body.mobile-web-mode #roomView .leagueMatchHost > .footballCard ~ .footballCard {
  display: none;
}

body.mobile-web-mode #roomView .leagueMatchHost .footballCard {
  width: 100%;
  max-width: 620px;
  margin: 0;
  padding: 6px;
}

body.mobile-web-mode #roomView .footballHeader {
  min-height: 44px;
  gap: 4px;
}

body.mobile-web-mode #roomView .footballHeader h2 {
  max-width: calc(100% - 144px);
  font-size: 13px;
  line-height: 1.25;
}

body.mobile-web-mode #roomView .footballSoundToggle {
  width: 44px;
  height: 44px;
}

body.mobile-web-mode #roomView .footballSeasonLine {
  position: absolute;
  top: 6px;
  right: 54px;
  gap: 0;
  margin: 0;
}

body.mobile-web-mode #roomView .footballSeasonLine > .footballMuted {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

body.mobile-web-mode #roomView .footballTableButton {
  min-height: 44px;
  padding: 4px 8px;
  font-size: 11px;
}

body.mobile-web-mode #roomView :is(.footballState, .footballTime, .footballStoppage, .footballGoal, .footballCupBadge, .footballAbsences) {
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.3;
}

body.mobile-web-mode #roomView .footballGoal:empty {
  display: none;
}

body.mobile-web-mode #roomView .footballShorten {
  min-height: 44px;
  margin: 0 0 0 auto;
  padding: 4px 6px;
  width: 46%;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
}

body.mobile-web-mode #roomView .footballCard:has(.footballShorten:not([hidden])) .footballState {
  float: left;
  display: flex;
  align-items: center;
  width: 52%;
  min-height: 44px;
  margin: 0;
  text-align: left;
}

body.mobile-web-mode #roomView .footballScoreboard {
  clear: both;
  gap: 6px;
  margin-top: 4px;
}

body.mobile-web-mode #roomView .footballTeam {
  gap: 2px;
}

body.mobile-web-mode #roomView .footballTeamStrength {
  gap: 1px;
  margin: 0;
}

body.mobile-web-mode #roomView .footballTeamName {
  font-size: 12px;
  line-height: 1.2;
}

body.mobile-web-mode #roomView .footballScore {
  font-size: 26px;
  line-height: 1.1;
}

body.mobile-web-mode #roomView .footballBetForm {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  gap: 2px;
}

body.mobile-web-mode #roomView .footballCard[data-phase="BETTING"] .footballTime {
  display: none;
}

body.mobile-web-mode #roomView .footballBetForm > .footballMuted {
  grid-column: 1 / 4;
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
}

body.mobile-web-mode #roomView .footballAmountLabel {
  grid-column: 4 / -1;
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  text-align: right;
}

body.mobile-web-mode #roomView .footballBetForm > input {
  grid-column: 1 / 4;
  grid-row: 4;
  min-height: 44px;
  padding: 6px 8px;
  font-size: 16px;
}

body.mobile-web-mode #roomView .footballChoices {
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 4px;
  margin: 0;
}

body.mobile-web-mode #roomView .footballChoice {
  gap: 3px;
  min-height: 64px;
  padding: 5px 3px;
  font-size: 11px;
  line-height: 1.2;
}

body.mobile-web-mode #roomView .footballChoice > .footballOdds {
  font-size: 14px;
  line-height: 1.2;
}

body.mobile-web-mode #roomView .footballChoice .footballMuted {
  font-size: 11px;
}

body.mobile-web-mode #roomView .footballTotals {
  grid-column: 1 / -1;
  grid-row: 3;
  gap: 4px;
  margin: 0;
}

body.mobile-web-mode #roomView .footballTotalChoice {
  min-height: 44px;
  gap: 2px;
  padding-block: 4px;
}

body.mobile-web-mode #roomView .footballSubmit {
  grid-column: 4 / -1;
  grid-row: 4;
  min-height: 44px;
}

body.mobile-web-mode #roomView .footballPitch {
  height: clamp(54px, 12dvh, 100px);
  margin: 6px 0;
}

body.mobile-web-mode #roomView .footballPitchPlayer {
  width: 8px;
  height: 8px;
  font-size: 0;
}

body.mobile-web-mode #roomView .footballCommentary {
  margin: 4px 0;
  padding: 4px 6px;
}

body.mobile-web-mode #roomView :is(.footballGoalsList, .footballBetsList) {
  margin: 4px 0;
}

body.mobile-web-mode #roomView .footballPublicBets {
  margin-top: 6px;
  padding-top: 4px;
}

body.mobile-web-mode #roomView .footballPublicBets:has(.footballBetsList[hidden]):has(.footballResult[hidden]) {
  display: none;
}

body.mobile-web-mode #roomView .footballPublicBets > :is(strong, p),
body.mobile-web-mode #roomView .footballBetRow {
  margin: 2px 0;
  padding: 2px 0;
  font-size: 11px;
}

/* Commentary and the goal record share a row; neither pushes the player's result off screen. */
@media (orientation: portrait), (min-height: 561px) {
  body.mobile-web-mode #roomView .footballCard[data-phase="LIVE"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
  }

  body.mobile-web-mode #roomView .footballCard[data-phase="LIVE"] > * {
    grid-column: 1 / -1;
    min-width: 0;
    margin-block: 0;
  }

  body.mobile-web-mode #roomView .footballCard[data-phase="LIVE"] .footballCommentary {
    grid-column: 1;
    order: 10;
    padding: 0;
    font-size: 11px;
    line-height: 1.2;
  }

  body.mobile-web-mode #roomView .footballCard[data-phase="LIVE"] .footballGoalsList {
    grid-column: 2;
    order: 10;
    font-size: 11px;
    line-height: 1.2;
  }

  body.mobile-web-mode #roomView .footballCard[data-phase="LIVE"] .footballGoalRow {
    gap: 4px;
    padding-block: 2px;
  }

  body.mobile-web-mode #roomView .footballCard[data-phase="LIVE"] .footballGoalRow > .footballMuted {
    font-size: 11px;
  }

  body.mobile-web-mode #roomView .footballCard[data-phase="LIVE"] .footballPublicBets {
    order: 11;
  }
}

body.mobile-web-mode #roomView .footballBetRow {
  line-height: 1.2;
}

/* Other players' bets are a secondary horizontal strip, separate from the match controls. */
body.mobile-web-mode #roomView .footballPublicBets > strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

body.mobile-web-mode #roomView .footballBetsList {
  display: flex;
  gap: 12px;
  margin: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
}

body.mobile-web-mode #roomView .footballBetRow {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

body.mobile-web-mode #roomView .footballPublicBets .footballResult {
  margin: 2px 0;
  font-size: 11px;
  line-height: 1.2;
}

body.mobile-web-mode #roomView .leagueShortcuts {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

body.mobile-web-mode #roomView .leagueShortcuts .btn {
  min-width: 0;
  min-height: 44px;
  padding: 4px 3px;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
}

body.mobile-web-mode #roomView .leagueIdle {
  flex: 1;
  min-height: 0;
  padding: 12px;
}

body.mobile-web-mode .footballTableDialog {
  width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  padding: 12px;
}

body.mobile-web-mode .footballTableDialog :is(.footballTableClose, .footballTeamChip, .footballTableTab, .footballFixtureNav .btn) {
  min-height: 44px;
}

@media (max-height: 700px) {
  body.mobile-web-mode #roomView .footballChoice > .footballMuted {
    display: none;
  }

  body.mobile-web-mode #roomView .footballPitch {
    height: 40px;
  }

  body.mobile-web-mode #roomView .footballCupBadge {
    position: absolute;
    top: 12px;
    right: 56px;
    max-width: calc(100% - 150px);
    padding: 4px 6px;
    font-size: 10px;
  }

  body.mobile-web-mode:has(.roomConversationLayout[data-mobile-panel="conversation"] .leaguePane.active) .appWorkspace {
    --mobile-room-chrome: calc(58px + env(safe-area-inset-bottom));
  }

  body.mobile-web-mode:has(.roomConversationLayout[data-mobile-panel="conversation"] .leaguePane.active) .pageRail,
  body.mobile-web-mode #roomView.view.active:has(.leaguePane.active) > .topBar,
  body.mobile-web-mode:has(.roomConversationLayout[data-mobile-panel="conversation"] .leaguePane.active) .appWorkspace > .bottomBar :is(.bbLeft, .voiceReactionBar) {
    display: none !important;
  }

  body.mobile-web-mode:has(.roomConversationLayout[data-mobile-panel="conversation"] .leaguePane.active) .appWorkspace > .bottomBar {
    grid-template-columns: minmax(88px, 1fr) minmax(44px, 1fr) minmax(88px, 1fr) 44px;
    gap: 4px;
  }

  body.mobile-web-mode:has(.roomConversationLayout[data-mobile-panel="conversation"] .leaguePane.active) .appWorkspace > .bottomBar .micSplitControl {
    grid-column: 1;
    grid-row: 1;
  }

  body.mobile-web-mode:has(.roomConversationLayout[data-mobile-panel="conversation"] .leaguePane.active) .appWorkspace > .bottomBar .deafBarBtn {
    grid-column: 2;
    grid-row: 1;
  }

  body.mobile-web-mode:has(.roomConversationLayout[data-mobile-panel="conversation"] .leaguePane.active) .appWorkspace > .bottomBar .cameraSplitControl {
    grid-column: 3;
    grid-row: 1;
  }

  body.mobile-web-mode:has(.roomConversationLayout[data-mobile-panel="conversation"] .leaguePane.active) .appWorkspace > .bottomBar .bbRight {
    grid-column: 4;
    grid-row: 1;
  }
}

@media (orientation: landscape) and (max-height: 560px) and (min-width: 560px) {
  body.mobile-web-mode #roomView.view.active:has(.leaguePane.active) .rightColumn {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
  }

  body.mobile-web-mode #roomView.view.active:has(.leaguePane.active) .rightColumn .tabBar {
    flex-direction: column;
    align-self: start;
    height: auto;
    overflow: visible;
    gap: 4px;
    padding: 4px 2px;
  }

  body.mobile-web-mode #roomView.view.active:has(.leaguePane.active) .rightColumn .tabBtn {
    flex: none;
    min-height: 44px;
    padding: 4px 2px;
    font-size: 11px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.mobile-web-mode #roomView.view.active:has(.leaguePane.active) .tabBtn :is(svg, .leagueTabBadge) {
    display: none;
  }

  body.mobile-web-mode #roomView .leagueMatchHost .footballCard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 2px 10px;
    padding: 2px;
    max-width: none;
  }

  body.mobile-web-mode #roomView .tabContent .leaguePane.active {
    padding-block: 2px;
    gap: 2px;
  }

  body.mobile-web-mode #roomView .footballCard > * {
    grid-column: 1;
    min-width: 0;
  }

  body.mobile-web-mode #roomView .footballHeader {
    grid-row: 1;
  }

  body.mobile-web-mode #roomView .footballHeader h2 {
    max-width: calc(100% - 48px);
    font-size: 12px;
  }

  body.mobile-web-mode #roomView .footballSeasonLine {
    display: none;
  }

  body.mobile-web-mode #roomView .footballState {
    grid-row: 2;
  }

  body.mobile-web-mode #roomView .footballShorten {
    grid-row: 2;
    justify-self: end;
  }

  body.mobile-web-mode #roomView .footballScoreboard {
    grid-row: 3;
    margin: 0;
  }

  body.mobile-web-mode #roomView .footballTime {
    grid-row: 4;
    margin: 0;
  }

  body.mobile-web-mode #roomView .footballBetForm {
    grid-column: 2;
    grid-row: 1 / span 6;
    align-self: start;
    gap: 2px;
  }

  body.mobile-web-mode #roomView .footballChoice {
    min-height: 56px;
    gap: 2px;
    padding-block: 2px;
  }

  body.mobile-web-mode #roomView .footballChoice > .footballMuted {
    display: none;
  }

  body.mobile-web-mode #roomView .footballPitch {
    height: 32px;
    margin: 0;
  }

  body.mobile-web-mode #roomView .footballCommentary {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    margin: 0;
    padding: 0;
    font-size: 11px;
    line-height: 1.2;
  }

  body.mobile-web-mode #roomView .footballGoalsList {
    grid-column: 2;
    grid-row: 3 / span 2;
    align-self: start;
    margin: 0;
    font-size: 11px;
  }

  body.mobile-web-mode #roomView .footballGoalRow {
    padding: 2px 0;
    font-size: 11px;
    line-height: 1.2;
  }

  body.mobile-web-mode #roomView .footballGoalRow .footballMuted {
    font-size: 11px;
  }

  body.mobile-web-mode #roomView .footballPublicBets {
    grid-column: 2;
    grid-row: 5 / span 2;
    margin: 0;
  }

  body.mobile-web-mode #roomView .footballCard[data-phase="FINISHED"] .footballPublicBets {
    grid-row: 1 / span 6;
    align-self: start;
  }

  body.mobile-web-mode #roomView .footballCard[data-phase="BETTING"] .footballPublicBets {
    grid-column: 1 / -1;
    grid-row: 7;
  }

  body.mobile-web-mode #roomView .leagueShortcuts {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    max-width: none;
  }
}

/* Conversation-first room layout. Navigation and the media bar keep their existing owners. */
.roomConversationLayout {
  --layout-left-width: 240px;
  --layout-right-width: 240px;
  --layout-left-actual: clamp(200px, var(--sidebar-width, var(--layout-left-width)),
    min(480px, 100% - var(--layout-right-width) - 360px));
  grid-template-columns: var(--layout-left-actual) minmax(0, 1fr)
    clamp(200px, var(--chat-panel-width, var(--layout-right-width)),
      min(480px, 100% - var(--layout-left-actual) - 360px));
  grid-template-rows: minmax(0, 1fr);
}
.roomConversationLayout > .leftColumn { grid-area: 1 / 1; }
.roomConversationLayout > .centerColumn,
.roomConversationLayout > .rightColumn { grid-area: 1 / 2; min-width: 0; min-height: 0; }
.roomConversationLayout > .centerColumn { display: none; }
.roomConversationLayout > .rightColumn { border-left: 0; background: var(--bg); }
.roomConversationLayout > .presenceColumn {
  grid-area: 1 / 3;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 12px;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border);
  overflow: hidden;
}
.roomConversationHeader {
  display: flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.roomConversationName {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-md);
  font-weight: 600;
}
.roomConversationHeader > button { flex: 0 0 auto; }
.roomConversationLayout > .rightColumn .tabBar { justify-content: flex-start; }
.roomConversationLayout > .rightColumn .tabBtn { flex: 0 1 auto; min-width: 64px; padding: 0 12px; }
.roomConversationLayout > .rightColumn .chatPane { padding: 16px; }
.roomMemberLiveBadge {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--danger);
  color: var(--on-media);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 16px;
}
.roomMemberLiveBadge + .roomMemberStates { margin-left: 0; }
.roomMemberCamera { flex: 0 0 auto; color: var(--muted); }
.roomMemberWatching { flex: 0 0 auto; color: var(--muted); }
.roomMember[data-streaming="true"] .roomMemberLiveBadge { cursor: pointer; }
.roomMember.is-stream-card-open { background: var(--surface-hover); }
.roomMember.is-stream-card-open .roomMemberName { color: var(--text); }

/* "Yayında" flyout beside a streaming member row. */
.roomStreamCard {
  position: fixed;
  z-index: 3000;
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  width: 280px;
  max-width: calc(100vw - 16px);
  padding: 12px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--popover-bg);
  color: var(--text);
  box-shadow: var(--shadow-popover);
}
/* Bridges the gap to the row so the pointer can travel into the card without closing it. */
.roomStreamCard::before { content: ''; position: absolute; }
.roomStreamCard[data-placement="beside"]::before { top: 0; bottom: 0; left: -9px; width: 9px; }
.roomStreamCard[data-placement="below"]::before { left: 0; right: 0; top: -9px; height: 9px; }
.roomStreamCardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
}
.roomStreamCardHeader .roomMemberLiveBadge { margin-left: 0; }
.roomStreamCardPreview {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgb(var(--surface-rgb) / 0.06);
}
/* A blurred still of the stream, a hint of what is on screen rather than a player. */
.roomStreamCardThumb { width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(0.85); transform: scale(1.1); }
.roomStreamCardPlaceholder { padding: 0 16px; font-size: var(--text-sm); color: var(--text-secondary); text-align: center; }
.roomStreamCardInfo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.roomStreamCardInfo .roomMemberAvatar { width: 36px; height: 36px; font-size: 15px; }
.roomStreamCardText { display: grid; gap: 1px; min-width: 0; }
.roomStreamCardTitle,
.roomStreamCardSource { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roomStreamCardTitle { font-size: 13px; font-weight: 700; }
.roomStreamCardSource { font-size: var(--text-xs); color: var(--text-secondary); }
.roomStreamCardElapsed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--success);
}
.roomStreamCardElapsed svg { width: 14px; height: 14px; }
.roomStreamCardWatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--success) 70%, rgb(var(--shadow-rgb)));
  color: var(--on-media);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.roomStreamCardWatch:hover { background: color-mix(in srgb, var(--success) 60%, rgb(var(--shadow-rgb))); }
.roomStreamCardWatch:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.roomStreamCardWatch svg { width: 18px; height: 18px; }

/* Keep the same mounted stage and tracks when moving between conversation and participants. */
.roomConversationLayout[data-room-surface="stage"] > .centerColumn {
  display: flex;
  padding-top: 64px;
}
.roomConversationLayout[data-room-surface="stage"] > .rightColumn {
  align-self: start;
  height: 52px;
  z-index: 2;
}
.roomConversationLayout[data-room-surface="stage"] > .rightColumn :is(.tabBar, .tabContent) {
  display: none;
}
.roomConversationLayout[data-room-available="false"] > .centerColumn { display: flex; padding-top: 12px; }
.roomConversationLayout[data-room-available="false"] > .rightColumn { display: none; }
body.screen-broadcast-fullscreen .roomConversationLayout > .presenceColumn { display: none !important; }

@media (max-width: 1000px) and (min-width: 769px) {
  .roomConversationLayout {
    --layout-left-width: 200px;
    --layout-right-width: 200px;
    grid-template-columns: 200px minmax(0, 1fr) 200px;
  }
  .roomConversationLayout > .rightColumn .tabBtn { min-width: 0; padding: 0 7px; gap: 4px; }
}

/* Compact room navigation keeps the mounted media and conversation in one viewport. */
.mobileRoomNav { display: none; }

@media (max-width: 1024px) {
  body.compact-room-mode { min-width: 0; height: 100dvh; }
  body.compact-room-mode.mobile-web-mode { min-height: 0; }
  body.compact-room-mode .appWorkspace { display: flex; flex-direction: column; }
  body.compact-room-mode .pageRail {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 4px;
    padding: max(4px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left));
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  body.compact-room-mode.mobile-web-mode .pageRail { gap: 4px; }
  body.compact-room-mode .pageRailLogo { flex: none; margin: 0 auto 0 0; }
  body.compact-room-mode .pageRailShares, body.compact-room-mode .pageRailSettings { margin: 0; }
  body.compact-room-mode .pageNavBtn[data-tooltip]::after, body.compact-room-mode .pageNavBtn.active::before { display: none; }
  body.compact-room-mode .pageContent { flex: 1; }
  body.compact-room-mode #roomView.view.active:has(> .roomConversationLayout) {
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
  }
  body.compact-room-mode .mobileRoomNav {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    background: var(--sidebar-bg);
  }
  body.compact-room-mode .mobileRoomNav button {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }
  body.compact-room-mode .mobileRoomNav button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
  body.compact-room-mode .mobileRoomNav button:disabled { opacity: .45; cursor: default; }
  body.compact-room-mode .mobileRoomNav button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  body.compact-room-mode #roomView.view.active > .layout.roomLayout.roomConversationLayout[data-mobile-panel] {
    display: grid !important;
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel] > :is(.leftColumn, .centerColumn, .rightColumn, .presenceColumn) {
    grid-area: 1 / 1 !important;
    min-width: 0;
    min-height: 0;
    max-height: none;
    height: 100%;
    width: 100%;
    margin: 0;
  }
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel] > :is(.leftColumn, .presenceColumn) {
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    border: 0;
  }
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel] .roomsListSidebar,
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel] .presenceUsersList { max-height: none; }
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel] > .centerColumn { padding-top: 64px; }
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel] > .rightColumn { padding: 0; border: 0; overflow: hidden; }
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel][data-room-surface="stage"] > .rightColumn { height: 56px; }
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel="rooms"] > :is(.centerColumn, .rightColumn, .presenceColumn),
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel="people"] > :is(.centerColumn, .rightColumn, .leftColumn),
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel="conversation"] > :is(.leftColumn, .presenceColumn) { display: none !important; }
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel="rooms"] > .leftColumn,
  body.compact-room-mode #roomView.view.active > .roomConversationLayout[data-mobile-panel="people"] > .presenceColumn { display: flex !important; }
  body.compact-room-mode #roomView.view.active .roomConversationHeader { flex-basis: 56px; gap: 8px; padding: 0 12px; }
  body.compact-room-mode #roomView.view.active .roomConversationHeader > button { width: auto; min-height: 44px; }
  body.compact-room-mode #roomView.view.active .roomConversationLayout > .rightColumn .tabBar {
    flex: 0 0 auto;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 8px;
    gap: 4px;
  }
  body.compact-room-mode #roomView.view.active .roomConversationLayout > .rightColumn .tabBtn { flex: 0 0 auto; width: auto; min-height: 44px; padding: 0 12px; }
  body.compact-room-mode #roomView.view.active .roomConversationLayout > .rightColumn .chatPane { padding: 8px 10px; }
  body.compact-room-mode #roomView.view.active .chatMessages { overflow-wrap: anywhere; }
  body.compact-room-mode #roomView.view.active .sidebarResizer,
  body.compact-room-mode #roomView.view.active .chatPanelResizer { display: none; }
  body.compact-room-mode #roomView.view.active :is(.roomItem, .roomSwitcherOpenBtn, .onlineUserRow) { min-height: 44px; }
  body.compact-room-mode.mobile-web-mode:has(.chatPane :is(input, textarea, select):focus) #roomView.view.active .rightColumn { height: 100%; }
}

@media (max-height: 560px) and (max-width: 768px) {
  body.mobile-web-mode:has(#chatInput:focus) #roomView .chatToolbar { display: none; }
}

.remoteAudioResume {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  z-index: 10000;
  width: max-content;
  max-width: calc(100vw - 32px);
  min-height: 44px;
  padding: 10px 18px;
  transform: translateX(-50%);
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 24%, var(--bg-deep));
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.remoteAudioResume[hidden] { display: none; }
